aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_dbg.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 20:19:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-25 20:19:08 -0500
commit9b73e76f3cf63379dcf45fcd4f112f5812418d0a (patch)
tree4e6bef87cd0cd6d848fc39a5ae25b981dbbe035b /drivers/scsi/qla2xxx/qla_dbg.c
parent50d9a126240f9961cfdd063336bbeb91f77a7dce (diff)
parent23c3e290fb9ce38cabc2822b47583fc8702411bf (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (200 commits) [SCSI] usbstorage: use last_sector_bug flag universally [SCSI] libsas: abstract STP task status into a function [SCSI] ultrastor: clean up inline asm warnings [SCSI] aic7xxx: fix firmware build [SCSI] aacraid: fib context lock for management ioctls [SCSI] ch: remove forward declarations [SCSI] ch: fix device minor number management bug [SCSI] ch: handle class_device_create failure properly [SCSI] NCR5380: fix section mismatch [SCSI] sg: fix /proc/scsi/sg/devices when no SCSI devices [SCSI] IB/iSER: add logical unit reset support [SCSI] don't use __GFP_DMA for sense buffers if not required [SCSI] use dynamically allocated sense buffer [SCSI] scsi.h: add macro for enclosure bit of inquiry data [SCSI] sd: add fix for devices with last sector access problems [SCSI] fix pcmcia compile problem [SCSI] aacraid: add Voodoo Lite class of cards. [SCSI] aacraid: add new driver features flags [SCSI] qla2xxx: Update version number to 8.02.00-k7. [SCSI] qla2xxx: Issue correct MBC_INITIALIZE_FIRMWARE command. ...
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_dbg.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c37
1 files changed, 22 insertions, 15 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index eaa04dabcdf6..d88e98c476b0 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -1051,6 +1051,7 @@ qla25xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
1051 struct qla25xx_fw_dump *fw; 1051 struct qla25xx_fw_dump *fw;
1052 uint32_t ext_mem_cnt; 1052 uint32_t ext_mem_cnt;
1053 void *nxt; 1053 void *nxt;
1054 struct qla2xxx_fce_chain *fcec;
1054 1055
1055 risc_address = ext_mem_cnt = 0; 1056 risc_address = ext_mem_cnt = 0;
1056 flags = 0; 1057 flags = 0;
@@ -1321,10 +1322,31 @@ qla25xx_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
1321 if (rval != QLA_SUCCESS) 1322 if (rval != QLA_SUCCESS)
1322 goto qla25xx_fw_dump_failed_0; 1323 goto qla25xx_fw_dump_failed_0;
1323 1324
1325 /* Fibre Channel Trace Buffer. */
1324 nxt = qla2xxx_copy_queues(ha, nxt); 1326 nxt = qla2xxx_copy_queues(ha, nxt);
1325 if (ha->eft) 1327 if (ha->eft)
1326 memcpy(nxt, ha->eft, ntohl(ha->fw_dump->eft_size)); 1328 memcpy(nxt, ha->eft, ntohl(ha->fw_dump->eft_size));
1327 1329
1330 /* Fibre Channel Event Buffer. */
1331 if (!ha->fce)
1332 goto qla25xx_fw_dump_failed_0;
1333
1334 ha->fw_dump->version |= __constant_htonl(DUMP_CHAIN_VARIANT);
1335
1336 fcec = nxt + ntohl(ha->fw_dump->eft_size);
1337 fcec->type = __constant_htonl(DUMP_CHAIN_FCE | DUMP_CHAIN_LAST);
1338 fcec->chain_size = htonl(sizeof(struct qla2xxx_fce_chain) +
1339 fce_calc_size(ha->fce_bufs));
1340 fcec->size = htonl(fce_calc_size(ha->fce_bufs));
1341 fcec->addr_l = htonl(LSD(ha->fce_dma));
1342 fcec->addr_h = htonl(MSD(ha->fce_dma));
1343
1344 iter_reg = fcec->eregs;
1345 for (cnt = 0; cnt < 8; cnt++)
1346 *iter_reg++ = htonl(ha->fce_mb[cnt]);
1347
1348 memcpy(iter_reg, ha->fce, ntohl(fcec->size));
1349
1328qla25xx_fw_dump_failed_0: 1350qla25xx_fw_dump_failed_0:
1329 if (rval != QLA_SUCCESS) { 1351 if (rval != QLA_SUCCESS) {
1330 qla_printk(KERN_WARNING, ha, 1352 qla_printk(KERN_WARNING, ha,
@@ -1428,21 +1450,6 @@ qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd)
1428 printk(" sp flags=0x%x\n", sp->flags); 1450 printk(" sp flags=0x%x\n", sp->flags);
1429} 1451}
1430 1452
1431void
1432qla2x00_dump_pkt(void *pkt)
1433{
1434 uint32_t i;
1435 uint8_t *data = (uint8_t *) pkt;
1436
1437 for (i = 0; i < 64; i++) {
1438 if (!(i % 4))
1439 printk("\n%02x: ", i);
1440
1441 printk("%02x ", data[i]);
1442 }
1443 printk("\n");
1444}
1445
1446#if defined(QL_DEBUG_ROUTINES) 1453#if defined(QL_DEBUG_ROUTINES)
1447/* 1454/*
1448 * qla2x00_formatted_dump_buffer 1455 * qla2x00_formatted_dump_buffer