diff --git a/qla2x00t/qla2x00-target/qla2x00t.c b/qla2x00t/qla2x00-target/qla2x00t.c index 594cdf323..080d7e042 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.c +++ b/qla2x00t/qla2x00-target/qla2x00t.c @@ -824,7 +824,7 @@ static int q24_get_loop_id(scsi_qla_host_t *ha, const uint8_t *s_id, dma_addr_t gid_list_dma; struct gid_list_info *gid_list; char *id_iter; - int res, rc, i; + int res, rc, i, retries = 0; uint16_t entries; TRACE_ENTRY(); @@ -839,11 +839,19 @@ static int q24_get_loop_id(scsi_qla_host_t *ha, const uint8_t *s_id, } /* Get list of logged in devices */ +retry: rc = qla2x00_get_id_list(ha, gid_list, gid_list_dma, &entries); if (rc != QLA_SUCCESS) { + if (rc == QLA_FW_NOT_READY) { + retries++; + if (retries < 3) { + msleep(1500); + goto retry; + } + } TRACE_MGMT_DBG("qla2x00t(%ld): get_id_list() failed: %x", ha->instance, rc); - res = -1; + res = -rc; goto out_free_id_list; } diff --git a/qla2x00t/qla2x_tgt_def.h b/qla2x00t/qla2x_tgt_def.h index c48efe5fa..003ffebda 100644 --- a/qla2x00t/qla2x_tgt_def.h +++ b/qla2x00t/qla2x_tgt_def.h @@ -50,7 +50,7 @@ * Must be changed on any change in any target visible interfaces or * data in the initiator */ -#define QLA2X_INITIATOR_MAGIC 57223 +#define QLA2X_INITIATOR_MAGIC 57224 #define QLA2X_INI_MODE_STR_EXCLUSIVE "exclusive" #define QLA2X_INI_MODE_STR_DISABLED "disabled" diff --git a/qla2x00t/qla_def.h b/qla2x00t/qla_def.h index 525db6f09..ea5d578b2 100644 --- a/qla2x00t/qla_def.h +++ b/qla2x00t/qla_def.h @@ -2721,6 +2721,7 @@ struct qla_tgt_vp_map { #define QLA_BUSY 0x107 #define QLA_RSCNS_HANDLED 0x108 #define QLA_ALREADY_REGISTERED 0x109 +#define QLA_FW_NOT_READY 0x10A #define NVRAM_DELAY() udelay(10) diff --git a/qla2x00t/qla_mbx.c b/qla2x00t/qla_mbx.c index a777af09d..c59d223ee 100644 --- a/qla2x00t/qla_mbx.c +++ b/qla2x00t/qla_mbx.c @@ -2039,7 +2039,9 @@ qla2x00_get_id_list(scsi_qla_host_t *ha, void *id_list, dma_addr_t id_list_dma, rval = qla2x00_mailbox_command(ha, mcp); if (rval != QLA_SUCCESS) { - /*EMPTY*/ + if ((mcp->mb[0] == MBS_COMMAND_ERROR) && + (mcp->mb[1] == 0x7)) + rval = QLA_FW_NOT_READY; DEBUG2_3_11(printk("qla2x00_get_id_list(%ld): failed=%x.\n", ha->host_no, rval)); } else { diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index 1428d8bab..95f80f234 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -3350,7 +3350,7 @@ qla2x00_module_exit(void) module_init(qla2x00_module_init); module_exit(qla2x00_module_exit); -MODULE_AUTHOR("QLogic Corporation"); +MODULE_AUTHOR("QLogic Corporation & SCST team"); #ifdef CONFIG_SCSI_QLA2XXX_TARGET MODULE_DESCRIPTION("QLogic Fibre Channel HBA Driver (Target Mode Support, including 24xx+ ISP)"); #else diff --git a/qla2x00t/qla_version.h b/qla2x00t/qla_version.h index d058c8862..83f4f61bf 100644 --- a/qla2x00t/qla_version.h +++ b/qla2x00t/qla_version.h @@ -7,7 +7,7 @@ /* * Driver version */ -#define QLA2XXX_VERSION "8.02.01-k4" +#define QLA2XXX_VERSION "8.02.01-k4-tgt" #define QLA_DRIVER_MAJOR_VER 8 #define QLA_DRIVER_MINOR_VER 2