SBA_REQUEST_STATE_ALLOCED = 0x002,
SBA_REQUEST_STATE_PENDING = 0x004,
SBA_REQUEST_STATE_ACTIVE = 0x008,
- SBA_REQUEST_STATE_RECEIVED = 0x010,
- SBA_REQUEST_STATE_COMPLETED = 0x020,
- SBA_REQUEST_STATE_ABORTED = 0x040,
+ SBA_REQUEST_STATE_COMPLETED = 0x010,
+ SBA_REQUEST_STATE_ABORTED = 0x020,
SBA_REQUEST_STATE_MASK = 0x0ff,
SBA_REQUEST_FENCE = 0x100,
};
struct list_head reqs_alloc_list;
struct list_head reqs_pending_list;
struct list_head reqs_active_list;
- struct list_head reqs_received_list;
struct list_head reqs_completed_list;
struct list_head reqs_aborted_list;
struct list_head reqs_free_list;
sba->reqs_fence = false;
}
-/* Note: Must be called with sba->reqs_lock held */
-static void _sba_received_request(struct sba_device *sba,
- struct sba_request *req)
-{
- lockdep_assert_held(&sba->reqs_lock);
- req->flags &= ~SBA_REQUEST_STATE_MASK;
- req->flags |= SBA_REQUEST_STATE_RECEIVED;
- list_move_tail(&req->node, &sba->reqs_received_list);
- if (list_empty(&sba->reqs_active_list))
- sba->reqs_fence = false;
-}
-
static void sba_free_chained_requests(struct sba_request *req)
{
unsigned long flags;
list_for_each_entry_safe(req, req1, &sba->reqs_alloc_list, node)
_sba_free_request(sba, req);
- /* Freeup all received request */
- list_for_each_entry_safe(req, req1, &sba->reqs_received_list, node)
- _sba_free_request(sba, req);
-
/* Freeup all completed request */
list_for_each_entry_safe(req, req1, &sba->reqs_completed_list, node)
_sba_free_request(sba, req);
_sba_free_request(sba, nreq);
INIT_LIST_HEAD(&first->next);
- /* Mark request as received */
- _sba_received_request(sba, first);
-
/* The client is allowed to attach dependent operations
* until 'ack' is set
*/
INIT_LIST_HEAD(&sba->reqs_alloc_list);
INIT_LIST_HEAD(&sba->reqs_pending_list);
INIT_LIST_HEAD(&sba->reqs_active_list);
- INIT_LIST_HEAD(&sba->reqs_received_list);
INIT_LIST_HEAD(&sba->reqs_completed_list);
INIT_LIST_HEAD(&sba->reqs_aborted_list);
INIT_LIST_HEAD(&sba->reqs_free_list);