diff options
author | Jayamohan Kallickal <jayamohan.kallickal@emulex.com> | 2014-08-08 07:00:01 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-09-16 18:09:47 +0200 |
commit | b7ab35b13379e709a2a1c3f1b3a59e5db62ce4e3 (patch) | |
tree | b7e9050c574cb6c49a84e5cae29bf828a04fc02b /drivers/scsi/be2iscsi/be_main.c | |
parent | be2iscsi: Fix updating the boot enteries in sysfs (diff) | |
download | linux-b7ab35b13379e709a2a1c3f1b3a59e5db62ce4e3.tar.xz linux-b7ab35b13379e709a2a1c3f1b3a59e5db62ce4e3.zip |
be2iscsi: Fix processing CQE before connection resources are freed
Driver should process the completion queue entries before a connection
resources are freed. While running mixed traffic due to latency, driver
processes the CQE after the connection resources are freed. This fix
processes all the completion queue before the connection resources are
freed.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com>
Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r-- | drivers/scsi/be2iscsi/be_main.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index 0762b8e44f95..c44dce2aa1f2 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -2068,7 +2068,7 @@ static void beiscsi_process_mcc_isr(struct beiscsi_hba *phba) * return * Number of Completion Entries processed. **/ -static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq) +unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq) { struct be_queue_info *cq; struct sol_cqe *sol; @@ -2110,6 +2110,18 @@ static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq) cri_index = BE_GET_CRI_FROM_CID(cid); ep = phba->ep_array[cri_index]; + + if (ep == NULL) { + /* connection has already been freed + * just move on to next one + */ + beiscsi_log(phba, KERN_WARNING, + BEISCSI_LOG_INIT, + "BM_%d : proc cqe of disconn ep: cid %d\n", + cid); + goto proc_next_cqe; + } + beiscsi_ep = ep->dd_data; beiscsi_conn = beiscsi_ep->conn; @@ -2219,6 +2231,7 @@ static unsigned int beiscsi_process_cq(struct be_eq_obj *pbe_eq) break; } +proc_next_cqe: AMAP_SET_BITS(struct amap_sol_cqe, valid, sol, 0); queue_tail_inc(cq); sol = queue_tail_node(cq); |