]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
qla2xxx: Return N-port id to firmware on logout.
authorJoe Carnuccio <joe.carnuccio@qlogic.com>
Tue, 11 Oct 2011 23:47:36 +0000 (16:47 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 9 May 2012 00:40:55 +0000 (17:40 -0700)
When logging out a port, return the N-port id to the firmware for
recycling to avoid running out of N-port id's.

JIRA Key: V2632FC-83

drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_iocb.c

index 82b5239689fe899fd0c3799066cfec89bb93471b..f4c04938122592236ac9fe0b218f2cba3934760b 100644 (file)
@@ -413,6 +413,7 @@ qla2x00_async_logout_done(struct scsi_qla_host *vha, fc_port_t *fcport,
     uint16_t *data)
 {
        qla2x00_mark_device_lost(vha, fcport, 1, 0);
+       fcport->loop_id = FC_NO_LOOP_ID;
        return;
 }
 
index ae8e4595dbd752236fd180a86cd8005feb19b35a..068c3f95002a0e0b7b2ae49cfc697c58e372db51 100644 (file)
@@ -1931,7 +1931,7 @@ qla24xx_logout_iocb(srb_t *sp, struct logio_entry_24xx *logio)
 {
        logio->entry_type = LOGINOUT_PORT_IOCB_TYPE;
        logio->control_flags =
-           cpu_to_le16(LCF_COMMAND_LOGO|LCF_IMPL_LOGO);
+           cpu_to_le16(LCF_COMMAND_LOGO|LCF_IMPL_LOGO|LCF_FREE_NPORT);
        logio->nport_handle = cpu_to_le16(sp->fcport->loop_id);
        logio->port_id[0] = sp->fcport->d_id.b.al_pa;
        logio->port_id[1] = sp->fcport->d_id.b.area;