diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_dbg.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_dbg.c | 37 |
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 | |||
1328 | qla25xx_fw_dump_failed_0: | 1350 | qla25xx_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 | ||
1431 | void | ||
1432 | qla2x00_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 |