dmaengine: bcm-sba-raid: Re-factor sba_process_deferred_requests()
authorAnup Patel <anup.patel@broadcom.com>
Tue, 22 Aug 2017 09:57:02 +0000 (15:27 +0530)
committerVinod Koul <vinod.koul@intel.com>
Mon, 28 Aug 2017 11:14:24 +0000 (16:44 +0530)
commitd6ffd2395a9225f89ab7e07b4ee5216018aa7787
tree268409ddf902a685898ba68cedead935dbc96927
parentfd8eb5395fa992983581301541e428eb0bd8fbf2
dmaengine: bcm-sba-raid: Re-factor sba_process_deferred_requests()

Currently, sba_process_deferred_requests() handles both pending
and completed sba_request which is unnecessary overhead for
sba_issue_pending() because completed sba_request handling is
not required in sba_issue_pending().

This patch breaks sba_process_deferred_requests() into two parts
sba_process_received_request() and _sba_process_pending_requests().

The sba_issue_pending() will only process pending sba_request
by calling _sba_process_pending_requests(). This will improve
sba_issue_pending().

The sba_receive_message() will only process received sba_request
by calling sba_process_received_request() for each received
sba_request. The sba_process_received_request() will also call
_sba_process_pending_requests() after handling received sba_request
because we might have pending sba_request not submitted by previous
call to sba_issue_pending().

Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/bcm-sba-raid.c