]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Fix bug with driver returning the wrong ndlp (CR 125743)
authorVaios Papadimitriou <vaios.papadimitriou@emulex.com>
Tue, 8 May 2012 22:01:24 +0000 (17:01 -0500)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 9 May 2012 00:01:24 +0000 (17:01 -0700)
When searching for a matching rpi the driver was not checking the active state
of the ndlp. A check was added to see if the nldp is active.

commit id: eff4a01b6e9f8cee3c541ab7f2ad18b5bbffd124

Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c

index 678a4b11059c3ad7feccadf7a8428d6436a3e218..2cadb8271f10bf7bc694988ac9a1dd1a6f562ba3 100644 (file)
@@ -5332,6 +5332,10 @@ lpfc_filter_by_rpi(struct lpfc_nodelist *ndlp, void *param)
 {
        uint16_t *rpi = param;
 
+       /* check for active node */
+       if (!NLP_CHK_NODE_ACT(ndlp))
+               return 0;
+
        return ndlp->nlp_rpi == *rpi;
 }