aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 3843bbc77211..dad66de50aa0 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -1471,14 +1471,13 @@ hwi_update_async_writables(struct hwi_async_pdu_context *pasync_ctx,
1471 return 0; 1471 return 0;
1472} 1472}
1473 1473
1474static unsigned int hwi_free_async_msg(struct beiscsi_hba *phba, 1474static void hwi_free_async_msg(struct beiscsi_hba *phba,
1475 unsigned int cri) 1475 unsigned int cri)
1476{ 1476{
1477 struct hwi_controller *phwi_ctrlr; 1477 struct hwi_controller *phwi_ctrlr;
1478 struct hwi_async_pdu_context *pasync_ctx; 1478 struct hwi_async_pdu_context *pasync_ctx;
1479 struct async_pdu_handle *pasync_handle, *tmp_handle; 1479 struct async_pdu_handle *pasync_handle, *tmp_handle;
1480 struct list_head *plist; 1480 struct list_head *plist;
1481 unsigned int i = 0;
1482 1481
1483 phwi_ctrlr = phba->phwi_ctrlr; 1482 phwi_ctrlr = phba->phwi_ctrlr;
1484 pasync_ctx = HWI_GET_ASYNC_PDU_CTX(phwi_ctrlr); 1483 pasync_ctx = HWI_GET_ASYNC_PDU_CTX(phwi_ctrlr);
@@ -1488,23 +1487,20 @@ static unsigned int hwi_free_async_msg(struct beiscsi_hba *phba,
1488 list_for_each_entry_safe(pasync_handle, tmp_handle, plist, link) { 1487 list_for_each_entry_safe(pasync_handle, tmp_handle, plist, link) {
1489 list_del(&pasync_handle->link); 1488 list_del(&pasync_handle->link);
1490 1489
1491 if (i == 0) { 1490 if (pasync_handle->is_header) {
1492 list_add_tail(&pasync_handle->link, 1491 list_add_tail(&pasync_handle->link,
1493 &pasync_ctx->async_header.free_list); 1492 &pasync_ctx->async_header.free_list);
1494 pasync_ctx->async_header.free_entries++; 1493 pasync_ctx->async_header.free_entries++;
1495 i++;
1496 } else { 1494 } else {
1497 list_add_tail(&pasync_handle->link, 1495 list_add_tail(&pasync_handle->link,
1498 &pasync_ctx->async_data.free_list); 1496 &pasync_ctx->async_data.free_list);
1499 pasync_ctx->async_data.free_entries++; 1497 pasync_ctx->async_data.free_entries++;
1500 i++;
1501 } 1498 }
1502 } 1499 }
1503 1500
1504 INIT_LIST_HEAD(&pasync_ctx->async_entry[cri].wait_queue.list); 1501 INIT_LIST_HEAD(&pasync_ctx->async_entry[cri].wait_queue.list);
1505 pasync_ctx->async_entry[cri].wait_queue.hdr_received = 0; 1502 pasync_ctx->async_entry[cri].wait_queue.hdr_received = 0;
1506 pasync_ctx->async_entry[cri].wait_queue.bytes_received = 0; 1503 pasync_ctx->async_entry[cri].wait_queue.bytes_received = 0;
1507 return 0;
1508} 1504}
1509 1505
1510static struct phys_addr * 1506static struct phys_addr *