aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_dbg.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2008-04-03 16:13:20 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-07 13:19:14 -0400
commit587f4cae4a8ce1315c3def2229c2a912637269b6 (patch)
treec2657826cd5be8f28dcdc5a3adbe60b1ccbbf149 /drivers/scsi/qla2xxx/qla_dbg.c
parentcb8dacbf1110d8bd39413f3116ff1720f757854e (diff)
[SCSI] qla2xxx: Cruft cleanup of functions and structures.
Strip unused (DEBUG-ONLY) enabled functions, inlines, useless wrappers, and unused DPC flags from the code. Another step in the migration towards a cleaner (less-crusty) driver. 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_dbg.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c122
1 files changed, 0 insertions, 122 deletions
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 83dd68bacf2a..9d12d9f26209 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -1410,125 +1410,3 @@ qla2x00_dump_buffer(uint8_t * b, uint32_t size)
1410 if (cnt % 16) 1410 if (cnt % 16)
1411 printk("\n"); 1411 printk("\n");
1412} 1412}
1413
1414/**************************************************************************
1415 * qla2x00_print_scsi_cmd
1416 * Dumps out info about the scsi cmd and srb.
1417 * Input
1418 * cmd : struct scsi_cmnd
1419 **************************************************************************/
1420void
1421qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd)
1422{
1423 int i;
1424 struct scsi_qla_host *ha;
1425 srb_t *sp;
1426
1427 ha = shost_priv(cmd->device->host);
1428
1429 sp = (srb_t *) cmd->SCp.ptr;
1430 printk("SCSI Command @=0x%p, Handle=0x%p\n", cmd, cmd->host_scribble);
1431 printk(" chan=0x%02x, target=0x%02x, lun=0x%02x, cmd_len=0x%02x\n",
1432 cmd->device->channel, cmd->device->id, cmd->device->lun,
1433 cmd->cmd_len);
1434 printk(" CDB: ");
1435 for (i = 0; i < cmd->cmd_len; i++) {
1436 printk("0x%02x ", cmd->cmnd[i]);
1437 }
1438 printk("\n seg_cnt=%d, allowed=%d, retries=%d\n",
1439 scsi_sg_count(cmd), cmd->allowed, cmd->retries);
1440 printk(" request buffer=0x%p, request buffer len=0x%x\n",
1441 scsi_sglist(cmd), scsi_bufflen(cmd));
1442 printk(" tag=%d, transfersize=0x%x\n",
1443 cmd->tag, cmd->transfersize);
1444 printk(" serial_number=%lx, SP=%p\n", cmd->serial_number, sp);
1445 printk(" data direction=%d\n", cmd->sc_data_direction);
1446
1447 if (!sp)
1448 return;
1449
1450 printk(" sp flags=0x%x\n", sp->flags);
1451}
1452
1453#if defined(QL_DEBUG_ROUTINES)
1454/*
1455 * qla2x00_formatted_dump_buffer
1456 * Prints string plus buffer.
1457 *
1458 * Input:
1459 * string = Null terminated string (no newline at end).
1460 * buffer = buffer address.
1461 * wd_size = word size 8, 16, 32 or 64 bits
1462 * count = number of words.
1463 */
1464void
1465qla2x00_formatted_dump_buffer(char *string, uint8_t * buffer,
1466 uint8_t wd_size, uint32_t count)
1467{
1468 uint32_t cnt;
1469 uint16_t *buf16;
1470 uint32_t *buf32;
1471
1472 if (strcmp(string, "") != 0)
1473 printk("%s\n",string);
1474
1475 switch (wd_size) {
1476 case 8:
1477 printk(" 0 1 2 3 4 5 6 7 "
1478 "8 9 Ah Bh Ch Dh Eh Fh\n");
1479 printk("-----------------------------------------"
1480 "-------------------------------------\n");
1481
1482 for (cnt = 1; cnt <= count; cnt++, buffer++) {
1483 printk("%02x",*buffer);
1484 if (cnt % 16 == 0)
1485 printk("\n");
1486 else
1487 printk(" ");
1488 }
1489 if (cnt % 16 != 0)
1490 printk("\n");
1491 break;
1492 case 16:
1493 printk(" 0 2 4 6 8 Ah "
1494 " Ch Eh\n");
1495 printk("-----------------------------------------"
1496 "-------------\n");
1497
1498 buf16 = (uint16_t *) buffer;
1499 for (cnt = 1; cnt <= count; cnt++, buf16++) {
1500 printk("%4x",*buf16);
1501
1502 if (cnt % 8 == 0)
1503 printk("\n");
1504 else if (*buf16 < 10)
1505 printk(" ");
1506 else
1507 printk(" ");
1508 }
1509 if (cnt % 8 != 0)
1510 printk("\n");
1511 break;
1512 case 32:
1513 printk(" 0 4 8 Ch\n");
1514 printk("------------------------------------------\n");
1515
1516 buf32 = (uint32_t *) buffer;
1517 for (cnt = 1; cnt <= count; cnt++, buf32++) {
1518 printk("%8x", *buf32);
1519
1520 if (cnt % 4 == 0)
1521 printk("\n");
1522 else if (*buf32 < 10)
1523 printk(" ");
1524 else
1525 printk(" ");
1526 }
1527 if (cnt % 4 != 0)
1528 printk("\n");
1529 break;
1530 default:
1531 break;
1532 }
1533}
1534#endif