From: Joe Carnuccio Date: Tue, 11 Oct 2011 23:47:36 +0000 (-0700) Subject: qla2xxx: Return N-port id to firmware on logout. X-Git-Tag: v2.6.39-400.9.0~423^2~100 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=be4d79b8e54ee52f928286656b0c18df441d5d38;p=users%2Fjedix%2Flinux-maple.git qla2xxx: Return N-port id to firmware on logout. 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 --- diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 82b5239689fe..f4c049381225 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -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; } diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index ae8e4595dbd7..068c3f95002a 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -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;