Searched hist:"3 fd78355cdd59dbfec60e03a539378e3e3498c38" (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/scsi/lpfc/ |
H A D | lpfc_nvme.c | diff 3fd78355cdd59dbfec60e03a539378e3e3498c38 Sat Dec 09 02:18:09 CET 2017 James Smart <jsmart2021@gmail.com> scsi: lpfc: Fix infinite wait when driver unregisters a remote NVME port.
When unregistering a remote port the lpfc driver would eventually wait for the remoteport_unreg done callback. But the driver never completed the io aborts that would allow the connections to terminate thus the unreg done callback was never issued. Turns out the coding style of the driver allowed for the wait to occur on the same cpu that the deferred isr is called on. The blocking for the wait, blocked the isr, and as the isr didn't run, the io aborts wouldn't finish.
Turns out there was never a good reason to block waiting for the unreg done in the first place. The driver can continue execution and the ref counting within the driver will do the right thing.
Resolve by removing the wait and patching up a few cases where the ref counting didn't look right - mainly cases where the remote port comes back before the aborts had completed and the unreg done had been called. Additionally, a few places which used pointer values to guide driver actions weren't protected by lock, so correct those.
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
|