From: Vaios Papadimitriou Date: Tue, 8 May 2012 22:01:24 +0000 (-0500) Subject: Fix bug with driver returning the wrong ndlp (CR 125743) X-Git-Tag: v2.6.39-400.9.0~423^2~123^2~23 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e6d284dc9f188e7917344695737d8515c03307e7;p=users%2Fjedix%2Flinux-maple.git Fix bug with driver returning the wrong ndlp (CR 125743) 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 --- diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 678a4b11059c3..2cadb8271f10b 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -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; }