aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h3
-rw-r--r--drivers/scsi/qla2xxx/qla_fw.h7
-rw-r--r--drivers/scsi/qla2xxx/qla_gbl.h4
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c5
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c49
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
6 files changed, 50 insertions, 20 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 144f6d04f3d1..3f934bdce6ae 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -623,9 +623,6 @@ typedef struct {
623#define MBC_GET_LINK_PRIV_STATS 0x6d /* Get link & private data. */ 623#define MBC_GET_LINK_PRIV_STATS 0x6d /* Get link & private data. */
624#define MBC_SET_VENDOR_ID 0x76 /* Set Vendor ID. */ 624#define MBC_SET_VENDOR_ID 0x76 /* Set Vendor ID. */
625 625
626#define TC_ENABLE 4
627#define TC_DISABLE 5
628
629/* Firmware return data sizes */ 626/* Firmware return data sizes */
630#define FCAL_MAP_SIZE 128 627#define FCAL_MAP_SIZE 128
631 628
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index 69a5e31dd93a..ef14bcde712a 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -952,6 +952,13 @@ struct device_reg_24xx {
952 uint32_t iobase_sdata; 952 uint32_t iobase_sdata;
953}; 953};
954 954
955/* Trace Control *************************************************************/
956
957#define TC_AEN_DISABLE 0
958
959#define TC_EFT_ENABLE 4
960#define TC_EFT_DISABLE 5
961
955/* MID Support ***************************************************************/ 962/* MID Support ***************************************************************/
956 963
957#define MIN_MULTI_ID_FABRIC 64 /* Must be power-of-2. */ 964#define MIN_MULTI_ID_FABRIC 64 /* Must be power-of-2. */
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h
index fd7553920e00..2fd31fdafcc9 100644
--- a/drivers/scsi/qla2xxx/qla_gbl.h
+++ b/drivers/scsi/qla2xxx/qla_gbl.h
@@ -228,7 +228,9 @@ extern int
228qla2x00_stop_firmware(scsi_qla_host_t *); 228qla2x00_stop_firmware(scsi_qla_host_t *);
229 229
230extern int 230extern int
231qla2x00_trace_control(scsi_qla_host_t *, uint16_t, dma_addr_t, uint16_t); 231qla2x00_enable_eft_trace(scsi_qla_host_t *, dma_addr_t, uint16_t);
232extern int
233qla2x00_disable_eft_trace(scsi_qla_host_t *);
232 234
233extern int 235extern int
234qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t, uint16_t); 236qla2x00_read_sfp(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t, uint16_t);
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 03444d6e4d26..da2cce011520 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -766,8 +766,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *ha)
766 goto cont_alloc; 766 goto cont_alloc;
767 } 767 }
768 768
769 rval = qla2x00_trace_control(ha, TC_ENABLE, eft_dma, 769 rval = qla2x00_enable_eft_trace(ha, eft_dma, EFT_NUM_BUFFERS);
770 EFT_NUM_BUFFERS);
771 if (rval) { 770 if (rval) {
772 qla_printk(KERN_WARNING, ha, "Unable to initialize " 771 qla_printk(KERN_WARNING, ha, "Unable to initialize "
773 "EFT (%d).\n", rval); 772 "EFT (%d).\n", rval);
@@ -3240,7 +3239,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha)
3240 clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); 3239 clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags);
3241 3240
3242 if (ha->eft) { 3241 if (ha->eft) {
3243 rval = qla2x00_trace_control(ha, TC_ENABLE, 3242 rval = qla2x00_enable_eft_trace(ha,
3244 ha->eft_dma, EFT_NUM_BUFFERS); 3243 ha->eft_dma, EFT_NUM_BUFFERS);
3245 if (rval) { 3244 if (rval) {
3246 qla_printk(KERN_WARNING, ha, 3245 qla_printk(KERN_WARNING, ha,
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index ee7899d31e18..7c6aa4ec8f4f 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2350,7 +2350,7 @@ qla2x00_stop_firmware(scsi_qla_host_t *ha)
2350} 2350}
2351 2351
2352int 2352int
2353qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma, 2353qla2x00_enable_eft_trace(scsi_qla_host_t *ha, dma_addr_t eft_dma,
2354 uint16_t buffers) 2354 uint16_t buffers)
2355{ 2355{
2356 int rval; 2356 int rval;
@@ -2363,22 +2363,47 @@ qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma,
2363 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); 2363 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
2364 2364
2365 mcp->mb[0] = MBC_TRACE_CONTROL; 2365 mcp->mb[0] = MBC_TRACE_CONTROL;
2366 mcp->mb[1] = ctrl; 2366 mcp->mb[1] = TC_EFT_ENABLE;
2367 mcp->out_mb = MBX_1|MBX_0; 2367 mcp->mb[2] = LSW(eft_dma);
2368 mcp->mb[3] = MSW(eft_dma);
2369 mcp->mb[4] = LSW(MSD(eft_dma));
2370 mcp->mb[5] = MSW(MSD(eft_dma));
2371 mcp->mb[6] = buffers;
2372 mcp->mb[7] = TC_AEN_DISABLE;
2373 mcp->out_mb = MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0;
2368 mcp->in_mb = MBX_1|MBX_0; 2374 mcp->in_mb = MBX_1|MBX_0;
2369 if (ctrl == TC_ENABLE) {
2370 mcp->mb[2] = LSW(eft_dma);
2371 mcp->mb[3] = MSW(eft_dma);
2372 mcp->mb[4] = LSW(MSD(eft_dma));
2373 mcp->mb[5] = MSW(MSD(eft_dma));
2374 mcp->mb[6] = buffers;
2375 mcp->mb[7] = 0;
2376 mcp->out_mb |= MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2;
2377 }
2378 mcp->tov = 30; 2375 mcp->tov = 30;
2379 mcp->flags = 0; 2376 mcp->flags = 0;
2380 rval = qla2x00_mailbox_command(ha, mcp); 2377 rval = qla2x00_mailbox_command(ha, mcp);
2378 if (rval != QLA_SUCCESS) {
2379 DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n",
2380 __func__, ha->host_no, rval, mcp->mb[0], mcp->mb[1]));
2381 } else {
2382 DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no));
2383 }
2384
2385 return rval;
2386}
2381 2387
2388int
2389qla2x00_disable_eft_trace(scsi_qla_host_t *ha)
2390{
2391 int rval;
2392 mbx_cmd_t mc;
2393 mbx_cmd_t *mcp = &mc;
2394
2395 if (!IS_FWI2_CAPABLE(ha))
2396 return QLA_FUNCTION_FAILED;
2397
2398 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
2399
2400 mcp->mb[0] = MBC_TRACE_CONTROL;
2401 mcp->mb[1] = TC_EFT_DISABLE;
2402 mcp->out_mb = MBX_1|MBX_0;
2403 mcp->in_mb = MBX_1|MBX_0;
2404 mcp->tov = 30;
2405 mcp->flags = 0;
2406 rval = qla2x00_mailbox_command(ha, mcp);
2382 if (rval != QLA_SUCCESS) { 2407 if (rval != QLA_SUCCESS) {
2383 DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", 2408 DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n",
2384 __func__, ha->host_no, rval, mcp->mb[0], mcp->mb[1])); 2409 __func__, ha->host_no, rval, mcp->mb[0], mcp->mb[1]));
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 23ee05913fc5..63938d74a571 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1856,7 +1856,7 @@ qla2x00_free_device(scsi_qla_host_t *ha)
1856 } 1856 }
1857 1857
1858 if (ha->eft) 1858 if (ha->eft)
1859 qla2x00_trace_control(ha, TC_DISABLE, 0, 0); 1859 qla2x00_disable_eft_trace(ha);
1860 1860
1861 ha->flags.online = 0; 1861 ha->flags.online = 0;
1862 1862