]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: lpfc: Fix used-RPI accounting problem.
authorJames Smart <james.smart@broadcom.com>
Wed, 12 Jul 2017 22:44:59 +0000 (18:44 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 14 Jul 2017 00:13:42 +0000 (17:13 -0700)
commit29fa2df8f0bf4652bf0468d48e31391ebe001f62
tree9f1cb2ca76f17f59136bfc34aeb34159fe05d7ea
parentf252b11df52b11b7f308e40625ed926ba83a0354
scsi: lpfc: Fix used-RPI accounting problem.

[backport of a1d3e3605028f2b4b0ff811b91df73454d9b8792]
From: rkennedy <dick.kennedy@avagotech.com>

Orabug: 26439257

With 255 vports created a link trasition can casue a crash.

When going through discovery after a link bounce the driver is using
rpis before the cmd FCOE_POST_HDR_TEMPLATES completes. By doing that the
next rpi bumps the rpi range out of the boundary.

The fix it to increment the next_rpi only when the
FCOE_POST_HDR_TEMPLATE succeeds.

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>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c
drivers/scsi/lpfc/lpfc_sli4.h