aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_mbx.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2006-06-23 19:10:29 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-26 17:20:44 -0400
commita7a167bf7e2d196fc33f292e7b02e90fee03bc9a (patch)
tree1e62085065440e012a7cd2d48cd161bfac408adc /drivers/scsi/qla2xxx/qla_mbx.c
parent9ea7290902abcf22f796e9aeae4dc2e71d3f7e67 (diff)
[SCSI] qla2xxx: Rework firmware-trace facilities.
- Defer firmware dump-data raw-to-textual conversion to user-space. - Add module parameter (ql2xallocfwdump) to allow for per-HBA allocations of firmware dump memory. - Dump request and response queue data as per firmware group request. - Add extended firmware trace support for ISP24XX/ISP54XX chips. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index d6cb3bd1a29a..39ddd38e7475 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2460,3 +2460,45 @@ qla2x00_stop_firmware(scsi_qla_host_t *ha)
2460 2460
2461 return rval; 2461 return rval;
2462} 2462}
2463
2464int
2465qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma,
2466 uint16_t buffers)
2467{
2468 int rval;
2469 mbx_cmd_t mc;
2470 mbx_cmd_t *mcp = &mc;
2471
2472 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))
2473 return QLA_FUNCTION_FAILED;
2474
2475 DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
2476
2477 mcp->mb[0] = MBC_TRACE_CONTROL;
2478 mcp->mb[1] = ctrl;
2479 mcp->out_mb = MBX_1|MBX_0;
2480 mcp->in_mb = MBX_1|MBX_0;
2481 if (ctrl == TC_ENABLE) {
2482 mcp->mb[2] = LSW(eft_dma);
2483 mcp->mb[3] = MSW(eft_dma);
2484 mcp->mb[4] = LSW(MSD(eft_dma));
2485 mcp->mb[5] = MSW(MSD(eft_dma));
2486 mcp->mb[6] = buffers;
2487 mcp->mb[7] = buffers;
2488 mcp->out_mb |= MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2;
2489 }
2490 mcp->tov = 30;
2491 mcp->flags = 0;
2492 rval = qla2x00_mailbox_command(ha, mcp);
2493
2494 if (rval != QLA_SUCCESS) {
2495 DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n",
2496 __func__, ha->host_no, rval, mcp->mb[0], mcp->mb[1]));
2497 } else {
2498 DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no));
2499 }
2500
2501 return rval;
2502}
2503
2504