On 12/09/2017 02:18 AM, James Smart wrote:
> 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.kenn...@broadcom.com>
> Signed-off-by: James Smart <james.sm...@broadcom.com>
> ---
>  drivers/scsi/lpfc/lpfc_nvme.c | 135 
> ++++++++++++++++--------------------------
>  1 file changed, 51 insertions(+), 84 deletions(-)
> 
Reviewed-by: Hannes Reinecke <h...@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Teamlead Storage & Networking
h...@suse.de                                   +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

Reply via email to