scsi: lpfc: Fix loop mode target discovery
authorDick Kennedy <dick.kennedy@broadcom.com>
Wed, 23 Aug 2017 23:55:31 +0000 (16:55 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:29:35 +0000 (22:29 -0400)
commit2877cbffb79ed121a6bcc5edbe629d3aba36cd29
treebe16f49df0a39b9d218c5425422a8609e8614568
parent1fe68477d235e42fb2613d01837d49545408c622
scsi: lpfc: Fix loop mode target discovery

The driver does not discover targets when in loop mode.

The NLP type is correctly getting set when a fabric connection is
detected but, not for loop. The unknown NLP type means that the driver
does not issue a PRLI when in loop topology. Thus target discovery
fails.

Fix by checking the topology during discovery.  If it is loop, set the
NLP FC4 type to FCP.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nportdisc.c