diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2008-01-17 12:02:16 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-23 12:29:32 -0500 |
commit | 00b6bd25166e2a4bad23c614c10c55993bb2489e (patch) | |
tree | 36211512cb406129d3b3b302cb83068153332e8d /drivers/scsi/qla2xxx/qla_mbx.c | |
parent | a824ebb37c1a1c5fd8e19b47bf5c14cb7b419b48 (diff) |
[SCSI] qla2xxx: Trace-Control naming cleanups.
In preparation for FCE (Fibre Channel Event) tracing support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 49 |
1 files changed, 37 insertions, 12 deletions
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 | ||
2352 | int | 2352 | int |
2353 | qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma, | 2353 | qla2x00_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 | ||
2388 | int | ||
2389 | qla2x00_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])); |