alistair23-linux/drivers/scsi/lpfc
James Smart d1f525aaa4 Fix driver unload/reload operation.
There are couple of different load/unload issues fixed with this patch.
One of the issues was reported by Junichi Nomura, a patch was submitted
by Johannes Thumsrhirn which did fix one of the problems but the fix in
this patch separates the pring free from the queue free and does not set
the parameter passed in to NULL.

issues:
(1) driver could not be unloaded and reloaded without some Oops or
 Panic occurring.
(2) The driver was panicking because of a corruption in the Memory
Manager when the iocb list was getting allocated.

Root cause for the memory corruption was a double free of the Work Queue
ring pointer memory - Freed once in the lpfc_sli4_queue_free when the CQ
was destroyed and again in lpfc_sli4_queue_free when the WQ was destroyed.

The pring free and the queue free were separated, the pring free was moved
to the wq destroy routine because it a better fit logically to delete the
ring with the wq.

The checkpatch flagged several alignmenet issues that were also corrected
with this patch.

The mboxq was never initialed correctly before it was used by the driver
this patch corrects that issue.

Reported-by: Junichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Tested-by: Junichi Nomura <j-nomura@ce.jp.nec.com>
2017-04-24 09:25:48 +02:00
..
lpfc.h scsi: lpfc: code cleanups in NVME initiator base 2017-03-06 23:04:23 -05:00
lpfc_attr.c Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes 2017-03-15 11:28:54 -07:00
lpfc_attr.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_bsg.c scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_bsg.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_compat.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_crtn.h scsi: lpfc: Fix eh_deadline setting for sli3 adapters. 2017-03-06 23:04:22 -05:00
lpfc_ct.c scsi: lpfc: code cleanups in NVME initiator discovery 2017-03-06 23:04:23 -05:00
lpfc_debugfs.c Fix extra line print in rqpair debug print. 2017-04-24 09:25:48 +02:00
lpfc_debugfs.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_disc.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_els.c Fix PRLI ACC rsp for NVME 2017-04-24 09:25:48 +02:00
lpfc_hbadisc.c scsi: lpfc: code cleanups in NVME initiator base 2017-03-06 23:04:23 -05:00
lpfc_hw.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_hw4.h scsi: lpfc: Rename LPFC_MAX_EQ_DELAY to LPFC_MAX_EQ_DELAY_EQID_CNT 2017-03-06 23:04:22 -05:00
lpfc_ids.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_init.c Fix driver unload/reload operation. 2017-04-24 09:25:48 +02:00
lpfc_logmsg.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_mbox.c scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_mem.c scsi: lpfc: don't dereference dma_buf->iocbq before null check 2017-03-06 23:04:22 -05:00
lpfc_nl.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_nportdisc.c scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_nvme.c Fix log message in completion path. 2017-04-24 09:25:48 +02:00
lpfc_nvme.h Remove unused defines for NVME PostBuf. 2017-04-24 09:25:48 +02:00
lpfc_nvmet.c Standardize nvme SGL segment count 2017-04-24 09:25:48 +02:00
lpfc_nvmet.h Standardize nvme SGL segment count 2017-04-24 09:25:48 +02:00
lpfc_scsi.c scsi: lpfc: add transport eh_timed_out reference 2017-03-06 23:04:22 -05:00
lpfc_scsi.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_sli.c Fix driver unload/reload operation. 2017-04-24 09:25:48 +02:00
lpfc_sli.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
lpfc_sli4.h scsi: lpfc: add NVME exchange aborts 2017-03-06 23:04:22 -05:00
lpfc_version.h scsi: lpfc: revise version number to 11.2.0.10 2017-03-06 23:04:23 -05:00
lpfc_vport.c SCSI misc on 20170303 2017-03-03 21:36:56 -08:00
lpfc_vport.h scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00
Makefile scsi: lpfc: Update copyrights 2017-02-22 18:41:44 -05:00