diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-24 18:04:36 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-10-28 22:04:15 -0400 |
commit | 017560fca496f72ed9dd734ffde63ce39dfe0411 (patch) | |
tree | e63ae9a28fc179e715eda32f12aaec4ca752651b /drivers | |
parent | 3bf743e7c891d8be8295650b7a6a9b5af083b096 (diff) |
[SCSI] use sfoo_printk() in drivers
Rejections fixed up and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/3w-9xxx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/3w-xxxx.c | 4 | ||||
-rw-r--r-- | drivers/scsi/53c700.c | 83 | ||||
-rw-r--r-- | drivers/scsi/53c700.h | 8 | ||||
-rw-r--r-- | drivers/scsi/NCR5380.c | 9 | ||||
-rw-r--r-- | drivers/scsi/aha152x.c | 3 | ||||
-rw-r--r-- | drivers/scsi/aha1542.c | 3 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 28 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 22 | ||||
-rw-r--r-- | drivers/scsi/atp870u.c | 7 | ||||
-rw-r--r-- | drivers/scsi/ch.c | 4 | ||||
-rw-r--r-- | drivers/scsi/eata.c | 56 | ||||
-rw-r--r-- | drivers/scsi/eata_pio.c | 21 | ||||
-rw-r--r-- | drivers/scsi/ibmmca.c | 5 | ||||
-rw-r--r-- | drivers/scsi/ide-scsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/in2000.c | 2 | ||||
-rw-r--r-- | drivers/scsi/ipr.h | 5 | ||||
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas.c | 5 | ||||
-rw-r--r-- | drivers/scsi/osst.c | 2 | ||||
-rw-r--r-- | drivers/scsi/tmscsim.c | 4 | ||||
-rw-r--r-- | drivers/scsi/u14-34f.c | 32 |
21 files changed, 149 insertions, 160 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c index a748fbfb6692..d06ee65d668d 100644 --- a/drivers/scsi/3w-9xxx.c +++ b/drivers/scsi/3w-9xxx.c | |||
@@ -1732,7 +1732,9 @@ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt) | |||
1732 | 1732 | ||
1733 | tw_dev->num_resets++; | 1733 | tw_dev->num_resets++; |
1734 | 1734 | ||
1735 | printk(KERN_WARNING "3w-9xxx: scsi%d: WARNING: (0x%02X:0x%04X): Unit #%d: Command (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, TW_DRIVER, 0x2c, SCpnt->device->id, SCpnt->cmnd[0]); | 1735 | sdev_printk(KERN_WARNING, SCpnt->device, |
1736 | "WARNING: (0x%02X:0x%04X): Command (0x%x) timed out, resetting card.\n", | ||
1737 | TW_DRIVER, 0x2c, SCpnt->cmnd[0]); | ||
1736 | 1738 | ||
1737 | /* Now reset the card and some of the device extension data */ | 1739 | /* Now reset the card and some of the device extension data */ |
1738 | if (twa_reset_device_extension(tw_dev, 0)) { | 1740 | if (twa_reset_device_extension(tw_dev, 0)) { |
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index ae9e0203e9de..283f6d25892b 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -1432,7 +1432,9 @@ static int tw_scsi_eh_reset(struct scsi_cmnd *SCpnt) | |||
1432 | 1432 | ||
1433 | tw_dev->num_resets++; | 1433 | tw_dev->num_resets++; |
1434 | 1434 | ||
1435 | printk(KERN_WARNING "3w-xxxx: scsi%d: WARNING: Unit #%d: Command (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, SCpnt->device->id, SCpnt->cmnd[0]); | 1435 | sdev_printk(KERN_WARNING, SCpnt->device, |
1436 | "WARNING: Command (0x%x) timed out, resetting card.\n", | ||
1437 | SCpnt->cmnd[0]); | ||
1436 | 1438 | ||
1437 | /* Now reset the card and some of the device extension data */ | 1439 | /* Now reset the card and some of the device extension data */ |
1438 | if (tw_reset_device_extension(tw_dev, 0)) { | 1440 | if (tw_reset_device_extension(tw_dev, 0)) { |
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index a7620fc368e7..523d2a97fd27 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -128,6 +128,7 @@ | |||
128 | #include <linux/blkdev.h> | 128 | #include <linux/blkdev.h> |
129 | #include <linux/module.h> | 129 | #include <linux/module.h> |
130 | #include <linux/interrupt.h> | 130 | #include <linux/interrupt.h> |
131 | #include <linux/device.h> | ||
131 | #include <asm/dma.h> | 132 | #include <asm/dma.h> |
132 | #include <asm/system.h> | 133 | #include <asm/system.h> |
133 | #include <asm/io.h> | 134 | #include <asm/io.h> |
@@ -831,8 +832,8 @@ process_extended_message(struct Scsi_Host *host, | |||
831 | 832 | ||
832 | } else { | 833 | } else { |
833 | /* SDTR message out of the blue, reject it */ | 834 | /* SDTR message out of the blue, reject it */ |
834 | printk(KERN_WARNING "scsi%d Unexpected SDTR msg\n", | 835 | shost_printk(KERN_WARNING, host, |
835 | host->host_no); | 836 | "Unexpected SDTR msg\n"); |
836 | hostdata->msgout[0] = A_REJECT_MSG; | 837 | hostdata->msgout[0] = A_REJECT_MSG; |
837 | dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); | 838 | dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); |
838 | script_patch_16(hostdata->script, MessageCount, 1); | 839 | script_patch_16(hostdata->script, MessageCount, 1); |
@@ -906,15 +907,17 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata | |||
906 | NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION); | 907 | NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION); |
907 | } else if(SCp != NULL && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION) { | 908 | } else if(SCp != NULL && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION) { |
908 | /* rejected our first simple tag message */ | 909 | /* rejected our first simple tag message */ |
909 | printk(KERN_WARNING "scsi%d (%d:%d) Rejected first tag queue attempt, turning off tag queueing\n", host->host_no, pun, lun); | 910 | scmd_printk(KERN_WARNING, SCp, |
911 | "Rejected first tag queue attempt, turning off tag queueing\n"); | ||
910 | /* we're done negotiating */ | 912 | /* we're done negotiating */ |
911 | NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION); | 913 | NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION); |
912 | hostdata->tag_negotiated &= ~(1<<SCp->device->id); | 914 | hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); |
913 | SCp->device->tagged_supported = 0; | 915 | SCp->device->tagged_supported = 0; |
914 | scsi_deactivate_tcq(SCp->device, host->cmd_per_lun); | 916 | scsi_deactivate_tcq(SCp->device, host->cmd_per_lun); |
915 | } else { | 917 | } else { |
916 | printk(KERN_WARNING "scsi%d (%d:%d) Unexpected REJECT Message %s\n", | 918 | shost_printk(KERN_WARNING, host, |
917 | host->host_no, pun, lun, | 919 | "(%d:%d) Unexpected REJECT Message %s\n", |
920 | pun, lun, | ||
918 | NCR_700_phase[(dsps & 0xf00) >> 8]); | 921 | NCR_700_phase[(dsps & 0xf00) >> 8]); |
919 | /* however, just ignore it */ | 922 | /* however, just ignore it */ |
920 | } | 923 | } |
@@ -983,7 +986,8 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
983 | if(SCp->cmnd[0] == REQUEST_SENSE) { | 986 | if(SCp->cmnd[0] == REQUEST_SENSE) { |
984 | /* OOPS: bad device, returning another | 987 | /* OOPS: bad device, returning another |
985 | * contingent allegiance condition */ | 988 | * contingent allegiance condition */ |
986 | printk(KERN_ERR "scsi%d (%d:%d) broken device is looping in contingent allegiance: ignoring\n", host->host_no, pun, lun); | 989 | scmd_printk(KERN_ERR, SCp, |
990 | "broken device is looping in contingent allegiance: ignoring\n"); | ||
987 | NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); | 991 | NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); |
988 | } else { | 992 | } else { |
989 | #ifdef NCR_DEBUG | 993 | #ifdef NCR_DEBUG |
@@ -1047,12 +1051,13 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
1047 | // SCp->request_bufflen, | 1051 | // SCp->request_bufflen, |
1048 | // DMA_FROM_DEVICE); | 1052 | // DMA_FROM_DEVICE); |
1049 | // if(((char *)SCp->request_buffer)[7] & 0x02) { | 1053 | // if(((char *)SCp->request_buffer)[7] & 0x02) { |
1050 | // printk(KERN_INFO "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", host->host_no, pun, lun); | 1054 | // scmd_printk(KERN_INFO, SCp, |
1051 | // hostdata->tag_negotiated |= (1<<SCp->device->id); | 1055 | // "Enabling Tag Command Queuing\n"); |
1056 | // hostdata->tag_negotiated |= (1<<scmd_id(SCp)); | ||
1052 | // NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); | 1057 | // NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); |
1053 | // } else { | 1058 | // } else { |
1054 | // NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); | 1059 | // NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); |
1055 | // hostdata->tag_negotiated &= ~(1<<SCp->device->id); | 1060 | // hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); |
1056 | // } | 1061 | // } |
1057 | //} | 1062 | //} |
1058 | NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); | 1063 | NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); |
@@ -1060,11 +1065,11 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
1060 | } else if((dsps & 0xfffff0f0) == A_UNEXPECTED_PHASE) { | 1065 | } else if((dsps & 0xfffff0f0) == A_UNEXPECTED_PHASE) { |
1061 | __u8 i = (dsps & 0xf00) >> 8; | 1066 | __u8 i = (dsps & 0xf00) >> 8; |
1062 | 1067 | ||
1063 | printk(KERN_ERR "scsi%d: (%d:%d), UNEXPECTED PHASE %s (%s)\n", | 1068 | scmd_printk(KERN_ERR, SCp, "UNEXPECTED PHASE %s (%s)\n", |
1064 | host->host_no, pun, lun, | ||
1065 | NCR_700_phase[i], | 1069 | NCR_700_phase[i], |
1066 | sbcl_to_string(NCR_700_readb(host, SBCL_REG))); | 1070 | sbcl_to_string(NCR_700_readb(host, SBCL_REG))); |
1067 | printk(KERN_ERR " len = %d, cmd =", SCp->cmd_len); | 1071 | scmd_printk(KERN_ERR, SCp, " len = %d, cmd =", |
1072 | SCp->cmd_len); | ||
1068 | scsi_print_command(SCp); | 1073 | scsi_print_command(SCp); |
1069 | 1074 | ||
1070 | NCR_700_internal_bus_reset(host); | 1075 | NCR_700_internal_bus_reset(host); |
@@ -1115,14 +1120,14 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, | |||
1115 | } | 1120 | } |
1116 | 1121 | ||
1117 | slot = (struct NCR_700_command_slot *)SCp->host_scribble; | 1122 | slot = (struct NCR_700_command_slot *)SCp->host_scribble; |
1118 | DEBUG(("53c700: %d:%d:%d, reselection is tag %d, slot %p(%d)\n", | 1123 | DDEBUG(KERN_DEBUG, SDp, |
1119 | host->host_no, SDp->id, SDp->lun, | 1124 | "reselection is tag %d, slot %p(%d)\n", |
1120 | hostdata->msgin[2], slot, slot->tag)); | 1125 | hostdata->msgin[2], slot, slot->tag); |
1121 | } else { | 1126 | } else { |
1122 | struct scsi_cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG); | 1127 | struct scsi_cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG); |
1123 | if(unlikely(SCp == NULL)) { | 1128 | if(unlikely(SCp == NULL)) { |
1124 | printk(KERN_ERR "scsi%d: (%d:%d) no saved request for untagged cmd\n", | 1129 | sdev_printk(KERN_ERR, SDp, |
1125 | host->host_no, reselection_id, lun); | 1130 | "no saved request for untagged cmd\n"); |
1126 | BUG(); | 1131 | BUG(); |
1127 | } | 1132 | } |
1128 | slot = (struct NCR_700_command_slot *)SCp->host_scribble; | 1133 | slot = (struct NCR_700_command_slot *)SCp->host_scribble; |
@@ -1764,17 +1769,15 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) | |||
1764 | * - The blk layer sent and untagged command | 1769 | * - The blk layer sent and untagged command |
1765 | */ | 1770 | */ |
1766 | if(NCR_700_get_depth(SCp->device) != 0 | 1771 | if(NCR_700_get_depth(SCp->device) != 0 |
1767 | && (!(hostdata->tag_negotiated & (1<<SCp->device->id)) | 1772 | && (!(hostdata->tag_negotiated & (1<<scmd_id(SCp))) |
1768 | || !blk_rq_tagged(SCp->request))) { | 1773 | || !blk_rq_tagged(SCp->request))) { |
1769 | DEBUG((KERN_ERR "scsi%d (%d:%d) has non zero depth %d\n", | 1774 | CDEBUG(KERN_ERR, SCp, "has non zero depth %d\n", |
1770 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun, | 1775 | NCR_700_get_depth(SCp->device)); |
1771 | NCR_700_get_depth(SCp->device))); | ||
1772 | return SCSI_MLQUEUE_DEVICE_BUSY; | 1776 | return SCSI_MLQUEUE_DEVICE_BUSY; |
1773 | } | 1777 | } |
1774 | if(NCR_700_get_depth(SCp->device) >= SCp->device->queue_depth) { | 1778 | if(NCR_700_get_depth(SCp->device) >= SCp->device->queue_depth) { |
1775 | DEBUG((KERN_ERR "scsi%d (%d:%d) has max tag depth %d\n", | 1779 | CDEBUG(KERN_ERR, SCp, "has max tag depth %d\n", |
1776 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun, | 1780 | NCR_700_get_depth(SCp->device)); |
1777 | NCR_700_get_depth(SCp->device))); | ||
1778 | return SCSI_MLQUEUE_DEVICE_BUSY; | 1781 | return SCSI_MLQUEUE_DEVICE_BUSY; |
1779 | } | 1782 | } |
1780 | NCR_700_set_depth(SCp->device, NCR_700_get_depth(SCp->device) + 1); | 1783 | NCR_700_set_depth(SCp->device, NCR_700_get_depth(SCp->device) + 1); |
@@ -1796,10 +1799,10 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) | |||
1796 | scsi_print_command(SCp); | 1799 | scsi_print_command(SCp); |
1797 | #endif | 1800 | #endif |
1798 | if(blk_rq_tagged(SCp->request) | 1801 | if(blk_rq_tagged(SCp->request) |
1799 | && (hostdata->tag_negotiated &(1<<SCp->device->id)) == 0 | 1802 | && (hostdata->tag_negotiated &(1<<scmd_id(SCp))) == 0 |
1800 | && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) { | 1803 | && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) { |
1801 | printk(KERN_ERR "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun); | 1804 | scmd_printk(KERN_ERR, SCp, "Enabling Tag Command Queuing\n"); |
1802 | hostdata->tag_negotiated |= (1<<SCp->device->id); | 1805 | hostdata->tag_negotiated |= (1<<scmd_id(SCp)); |
1803 | NCR_700_set_tag_neg_state(SCp->device, NCR_700_DURING_TAG_NEGOTIATION); | 1806 | NCR_700_set_tag_neg_state(SCp->device, NCR_700_DURING_TAG_NEGOTIATION); |
1804 | } | 1807 | } |
1805 | 1808 | ||
@@ -1810,17 +1813,16 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) | |||
1810 | * FIXME: This will royally screw up on multiple LUN devices | 1813 | * FIXME: This will royally screw up on multiple LUN devices |
1811 | * */ | 1814 | * */ |
1812 | if(!blk_rq_tagged(SCp->request) | 1815 | if(!blk_rq_tagged(SCp->request) |
1813 | && (hostdata->tag_negotiated &(1<<SCp->device->id))) { | 1816 | && (hostdata->tag_negotiated &(1<<scmd_id(SCp)))) { |
1814 | printk(KERN_INFO "scsi%d: (%d:%d) Disabling Tag Command Queuing\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun); | 1817 | scmd_printk(KERN_INFO, SCp, "Disabling Tag Command Queuing\n"); |
1815 | hostdata->tag_negotiated &= ~(1<<SCp->device->id); | 1818 | hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); |
1816 | } | 1819 | } |
1817 | 1820 | ||
1818 | if((hostdata->tag_negotiated &(1<<SCp->device->id)) | 1821 | if((hostdata->tag_negotiated &(1<<scmd_id(SCp))) |
1819 | && scsi_get_tag_type(SCp->device)) { | 1822 | && scsi_get_tag_type(SCp->device)) { |
1820 | slot->tag = SCp->request->tag; | 1823 | slot->tag = SCp->request->tag; |
1821 | DEBUG(("53c700 %d:%d:%d, sending out tag %d, slot %p\n", | 1824 | CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n", |
1822 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun, slot->tag, | 1825 | slot->tag, slot); |
1823 | slot)); | ||
1824 | } else { | 1826 | } else { |
1825 | slot->tag = SCSI_NO_TAG; | 1827 | slot->tag = SCSI_NO_TAG; |
1826 | /* must populate current_cmnd for scsi_find_tag to work */ | 1828 | /* must populate current_cmnd for scsi_find_tag to work */ |
@@ -1920,8 +1922,8 @@ NCR_700_abort(struct scsi_cmnd * SCp) | |||
1920 | { | 1922 | { |
1921 | struct NCR_700_command_slot *slot; | 1923 | struct NCR_700_command_slot *slot; |
1922 | 1924 | ||
1923 | printk(KERN_INFO "scsi%d (%d:%d) New error handler wants to abort command\n\t", | 1925 | scmd_printk(KERN_INFO, SCp, |
1924 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun); | 1926 | "New error handler wants to abort command\n\t"); |
1925 | scsi_print_command(SCp); | 1927 | scsi_print_command(SCp); |
1926 | 1928 | ||
1927 | slot = (struct NCR_700_command_slot *)SCp->host_scribble; | 1929 | slot = (struct NCR_700_command_slot *)SCp->host_scribble; |
@@ -1954,8 +1956,8 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp) | |||
1954 | struct NCR_700_Host_Parameters *hostdata = | 1956 | struct NCR_700_Host_Parameters *hostdata = |
1955 | (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; | 1957 | (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; |
1956 | 1958 | ||
1957 | printk(KERN_INFO "scsi%d (%d:%d) New error handler wants BUS reset, cmd %p\n\t", | 1959 | scmd_printk(KERN_INFO, SCp, |
1958 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun, SCp); | 1960 | "New error handler wants BUS reset, cmd %p\n\t", SCp); |
1959 | scsi_print_command(SCp); | 1961 | scsi_print_command(SCp); |
1960 | 1962 | ||
1961 | /* In theory, eh_complete should always be null because the | 1963 | /* In theory, eh_complete should always be null because the |
@@ -1987,8 +1989,7 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp) | |||
1987 | STATIC int | 1989 | STATIC int |
1988 | NCR_700_host_reset(struct scsi_cmnd * SCp) | 1990 | NCR_700_host_reset(struct scsi_cmnd * SCp) |
1989 | { | 1991 | { |
1990 | printk(KERN_INFO "scsi%d (%d:%d) New error handler wants HOST reset\n\t", | 1992 | scmd_printk(KERN_INFO, SCp, "New error handler wants HOST reset\n\t"); |
1991 | SCp->device->host->host_no, SCp->device->id, SCp->device->lun); | ||
1992 | scsi_print_command(SCp); | 1993 | scsi_print_command(SCp); |
1993 | 1994 | ||
1994 | spin_lock_irq(SCp->device->host->host_lock); | 1995 | spin_lock_irq(SCp->device->host->host_lock); |
diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h index e86012cf6ab7..362d78483d09 100644 --- a/drivers/scsi/53c700.h +++ b/drivers/scsi/53c700.h | |||
@@ -22,8 +22,14 @@ | |||
22 | 22 | ||
23 | #ifdef NCR_700_DEBUG | 23 | #ifdef NCR_700_DEBUG |
24 | #define DEBUG(x) printk x | 24 | #define DEBUG(x) printk x |
25 | #define DDEBUG(prefix, sdev, fmt, a...) \ | ||
26 | sdev_printk(prefix, sdev, fmt, ##a) | ||
27 | #define CDEBUG(prefix, scmd, fmt, a...) \ | ||
28 | scmd_printk(prefix, scmd, fmt, ##a) | ||
25 | #else | 29 | #else |
26 | #define DEBUG(x) | 30 | #define DEBUG(x) do {} while (0) |
31 | #define DDEBUG(prefix, scmd, fmt, a...) do {} while (0) | ||
32 | #define CDEBUG(prefix, scmd, fmt, a...) do {} while (0) | ||
27 | #endif | 33 | #endif |
28 | 34 | ||
29 | /* The number of available command slots */ | 35 | /* The number of available command slots */ |
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 23392ae7df8b..4368767929f6 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -2190,7 +2190,8 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { | |||
2190 | * If the watchdog timer fires, all future accesses to this | 2190 | * If the watchdog timer fires, all future accesses to this |
2191 | * device will use the polled-IO. | 2191 | * device will use the polled-IO. |
2192 | */ | 2192 | */ |
2193 | printk("scsi%d : switching target %d lun %d to slow handshake\n", instance->host_no, cmd->device->id, cmd->device->lun); | 2193 | scmd_printk(KERN_INFO, cmd, |
2194 | "switching to slow handshake\n"); | ||
2194 | cmd->device->borken = 1; | 2195 | cmd->device->borken = 1; |
2195 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); | 2196 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); |
2196 | sink = 1; | 2197 | sink = 1; |
@@ -2429,9 +2430,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { | |||
2429 | scsi_print_msg(extended_msg); | 2430 | scsi_print_msg(extended_msg); |
2430 | printk("\n"); | 2431 | printk("\n"); |
2431 | } else if (tmp != EXTENDED_MESSAGE) | 2432 | } else if (tmp != EXTENDED_MESSAGE) |
2432 | printk("scsi%d: rejecting unknown message %02x from target %d, lun %d\n", instance->host_no, tmp, cmd->device->id, cmd->device->lun); | 2433 | scmd_printk(KERN_INFO, cmd, |
2434 | "rejecting unknown message %02x\n",tmp); | ||
2433 | else | 2435 | else |
2434 | printk("scsi%d: rejecting unknown extended message code %02x, length %d from target %d, lun %d\n", instance->host_no, extended_msg[1], extended_msg[0], cmd->device->id, cmd->device->lun); | 2436 | scmd_printk(KERN_INFO, cmd, |
2437 | "rejecting unknown extended message code %02x, length %d\n", extended_msg[1], extended_msg[0]); | ||
2435 | 2438 | ||
2436 | msgout = MESSAGE_REJECT; | 2439 | msgout = MESSAGE_REJECT; |
2437 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); | 2440 | NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); |
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 630b11575230..9b7caf504a56 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -2921,8 +2921,7 @@ static void disp_enintr(struct Scsi_Host *shpnt) | |||
2921 | */ | 2921 | */ |
2922 | static void show_command(Scsi_Cmnd *ptr) | 2922 | static void show_command(Scsi_Cmnd *ptr) |
2923 | { | 2923 | { |
2924 | printk(KERN_DEBUG "0x%08x: target=%d; lun=%d; cmnd=(", | 2924 | scmd_printk(KERN_DEBUG, ptr, "%p: cmnd=(", ptr); |
2925 | (unsigned int) ptr, ptr->device->id, ptr->device->lun); | ||
2926 | 2925 | ||
2927 | __scsi_print_command(ptr->cmnd); | 2926 | __scsi_print_command(ptr->cmnd); |
2928 | 2927 | ||
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c index 9ec4641a6348..adda750412f2 100644 --- a/drivers/scsi/aha1542.c +++ b/drivers/scsi/aha1542.c | |||
@@ -1405,7 +1405,8 @@ static int aha1542_dev_reset(Scsi_Cmnd * SCpnt) | |||
1405 | */ | 1405 | */ |
1406 | aha1542_out(SCpnt->device->host->io_port, &ahacmd, 1); | 1406 | aha1542_out(SCpnt->device->host->io_port, &ahacmd, 1); |
1407 | 1407 | ||
1408 | printk(KERN_WARNING "aha1542.c: Trying device reset for target %d\n", SCpnt->device->id); | 1408 | scmd_printk(KERN_WARNING, SCpnt, |
1409 | "Trying device reset for target\n"); | ||
1409 | 1410 | ||
1410 | return SUCCESS; | 1411 | return SUCCESS; |
1411 | 1412 | ||
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index 95c285cc83e4..5e023dca4e52 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -52,6 +52,7 @@ static struct scsi_transport_template *ahd_linux_transport_template = NULL; | |||
52 | #include <linux/mm.h> /* For fetching system memory size */ | 52 | #include <linux/mm.h> /* For fetching system memory size */ |
53 | #include <linux/blkdev.h> /* For block_size() */ | 53 | #include <linux/blkdev.h> /* For block_size() */ |
54 | #include <linux/delay.h> /* For ssleep/msleep */ | 54 | #include <linux/delay.h> /* For ssleep/msleep */ |
55 | #include <linux/device.h> | ||
55 | 56 | ||
56 | /* | 57 | /* |
57 | * Bucket size for counting good commands in between bad ones. | 58 | * Bucket size for counting good commands in between bad ones. |
@@ -565,7 +566,7 @@ ahd_linux_slave_configure(struct scsi_device *sdev) | |||
565 | 566 | ||
566 | ahd = *((struct ahd_softc **)sdev->host->hostdata); | 567 | ahd = *((struct ahd_softc **)sdev->host->hostdata); |
567 | if (bootverbose) | 568 | if (bootverbose) |
568 | printf("%s: Slave Configure %d\n", ahd_name(ahd), sdev->id); | 569 | sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); |
569 | 570 | ||
570 | ahd_linux_device_queue_depth(sdev); | 571 | ahd_linux_device_queue_depth(sdev); |
571 | 572 | ||
@@ -2067,9 +2068,8 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2067 | wait = FALSE; | 2068 | wait = FALSE; |
2068 | ahd = *(struct ahd_softc **)cmd->device->host->hostdata; | 2069 | ahd = *(struct ahd_softc **)cmd->device->host->hostdata; |
2069 | 2070 | ||
2070 | printf("%s:%d:%d:%d: Attempting to queue a%s message:", | 2071 | scmd_printk(KERN_INFO, cmd, |
2071 | ahd_name(ahd), cmd->device->channel, | 2072 | "Attempting to queue a%s message:", |
2072 | cmd->device->id, cmd->device->lun, | ||
2073 | flag == SCB_ABORT ? "n ABORT" : " TARGET RESET"); | 2073 | flag == SCB_ABORT ? "n ABORT" : " TARGET RESET"); |
2074 | 2074 | ||
2075 | printf("CDB:"); | 2075 | printf("CDB:"); |
@@ -2093,9 +2093,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2093 | * No target device for this command exists, | 2093 | * No target device for this command exists, |
2094 | * so we must not still own the command. | 2094 | * so we must not still own the command. |
2095 | */ | 2095 | */ |
2096 | printf("%s:%d:%d:%d: Is not an active device\n", | 2096 | scmd_printk(KERN_INFO, cmd, "Is not an active device\n"); |
2097 | ahd_name(ahd), cmd->device->channel, cmd->device->id, | ||
2098 | cmd->device->lun); | ||
2099 | retval = SUCCESS; | 2097 | retval = SUCCESS; |
2100 | goto no_cmd; | 2098 | goto no_cmd; |
2101 | } | 2099 | } |
@@ -2121,9 +2119,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2121 | } | 2119 | } |
2122 | 2120 | ||
2123 | if (pending_scb == NULL) { | 2121 | if (pending_scb == NULL) { |
2124 | printf("%s:%d:%d:%d: Command not found\n", | 2122 | scmd_printk(KERN_INFO, cmd, "Command not found\n"); |
2125 | ahd_name(ahd), cmd->device->channel, cmd->device->id, | ||
2126 | cmd->device->lun); | ||
2127 | goto no_cmd; | 2123 | goto no_cmd; |
2128 | } | 2124 | } |
2129 | 2125 | ||
@@ -2146,9 +2142,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2146 | paused = TRUE; | 2142 | paused = TRUE; |
2147 | 2143 | ||
2148 | if ((pending_scb->flags & SCB_ACTIVE) == 0) { | 2144 | if ((pending_scb->flags & SCB_ACTIVE) == 0) { |
2149 | printf("%s:%d:%d:%d: Command already completed\n", | 2145 | scmd_printk(KERN_INFO, cmd, "Command already completed\n"); |
2150 | ahd_name(ahd), cmd->device->channel, cmd->device->id, | ||
2151 | cmd->device->lun); | ||
2152 | goto no_cmd; | 2146 | goto no_cmd; |
2153 | } | 2147 | } |
2154 | 2148 | ||
@@ -2214,9 +2208,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2214 | pending_scb->flags |= SCB_RECOVERY_SCB|flag; | 2208 | pending_scb->flags |= SCB_RECOVERY_SCB|flag; |
2215 | ahd_outb(ahd, MSG_OUT, HOST_MSG); | 2209 | ahd_outb(ahd, MSG_OUT, HOST_MSG); |
2216 | ahd_outb(ahd, SCSISIGO, last_phase|ATNO); | 2210 | ahd_outb(ahd, SCSISIGO, last_phase|ATNO); |
2217 | printf("%s:%d:%d:%d: Device is active, asserting ATN\n", | 2211 | scmd_printk(KERN_INFO, cmd, "Device is active, asserting ATN\n"); |
2218 | ahd_name(ahd), cmd->device->channel, | ||
2219 | cmd->device->id, cmd->device->lun); | ||
2220 | wait = TRUE; | 2212 | wait = TRUE; |
2221 | } else if (disconnected) { | 2213 | } else if (disconnected) { |
2222 | 2214 | ||
@@ -2277,9 +2269,7 @@ ahd_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2277 | printf("Device is disconnected, re-queuing SCB\n"); | 2269 | printf("Device is disconnected, re-queuing SCB\n"); |
2278 | wait = TRUE; | 2270 | wait = TRUE; |
2279 | } else { | 2271 | } else { |
2280 | printf("%s:%d:%d:%d: Unable to deliver message\n", | 2272 | scmd_printk(KERN_INFO, cmd, "Unable to deliver message\n"); |
2281 | ahd_name(ahd), cmd->device->channel, | ||
2282 | cmd->device->id, cmd->device->lun); | ||
2283 | retval = FAILED; | 2273 | retval = FAILED; |
2284 | goto done; | 2274 | goto done; |
2285 | } | 2275 | } |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 6ee1435d37fa..7074ab95d1cc 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -641,7 +641,7 @@ ahc_linux_slave_configure(struct scsi_device *sdev) | |||
641 | ahc = *((struct ahc_softc **)sdev->host->hostdata); | 641 | ahc = *((struct ahc_softc **)sdev->host->hostdata); |
642 | 642 | ||
643 | if (bootverbose) | 643 | if (bootverbose) |
644 | printf("%s: Slave Configure %d\n", ahc_name(ahc), sdev->id); | 644 | sdev_printk(KERN_INFO, sdev, "Slave Configure\n"); |
645 | 645 | ||
646 | ahc_linux_device_queue_depth(sdev); | 646 | ahc_linux_device_queue_depth(sdev); |
647 | 647 | ||
@@ -2117,9 +2117,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2117 | wait = FALSE; | 2117 | wait = FALSE; |
2118 | ahc = *(struct ahc_softc **)cmd->device->host->hostdata; | 2118 | ahc = *(struct ahc_softc **)cmd->device->host->hostdata; |
2119 | 2119 | ||
2120 | printf("%s:%d:%d:%d: Attempting to queue a%s message\n", | 2120 | scmd_printk(KERN_INFO, cmd, "Attempting to queue a%s message\n", |
2121 | ahc_name(ahc), cmd->device->channel, | ||
2122 | cmd->device->id, cmd->device->lun, | ||
2123 | flag == SCB_ABORT ? "n ABORT" : " TARGET RESET"); | 2121 | flag == SCB_ABORT ? "n ABORT" : " TARGET RESET"); |
2124 | 2122 | ||
2125 | printf("CDB:"); | 2123 | printf("CDB:"); |
@@ -2183,9 +2181,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2183 | } | 2181 | } |
2184 | 2182 | ||
2185 | if (pending_scb == NULL) { | 2183 | if (pending_scb == NULL) { |
2186 | printf("%s:%d:%d:%d: Command not found\n", | 2184 | scmd_printk(KERN_INFO, cmd, "Command not found\n"); |
2187 | ahc_name(ahc), cmd->device->channel, cmd->device->id, | ||
2188 | cmd->device->lun); | ||
2189 | goto no_cmd; | 2185 | goto no_cmd; |
2190 | } | 2186 | } |
2191 | 2187 | ||
@@ -2207,9 +2203,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2207 | paused = TRUE; | 2203 | paused = TRUE; |
2208 | 2204 | ||
2209 | if ((pending_scb->flags & SCB_ACTIVE) == 0) { | 2205 | if ((pending_scb->flags & SCB_ACTIVE) == 0) { |
2210 | printf("%s:%d:%d:%d: Command already completed\n", | 2206 | scmd_printk(KERN_INFO, cmd, "Command already completed\n"); |
2211 | ahc_name(ahc), cmd->device->channel, cmd->device->id, | ||
2212 | cmd->device->lun); | ||
2213 | goto no_cmd; | 2207 | goto no_cmd; |
2214 | } | 2208 | } |
2215 | 2209 | ||
@@ -2276,9 +2270,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2276 | pending_scb->flags |= SCB_RECOVERY_SCB|flag; | 2270 | pending_scb->flags |= SCB_RECOVERY_SCB|flag; |
2277 | ahc_outb(ahc, MSG_OUT, HOST_MSG); | 2271 | ahc_outb(ahc, MSG_OUT, HOST_MSG); |
2278 | ahc_outb(ahc, SCSISIGO, last_phase|ATNO); | 2272 | ahc_outb(ahc, SCSISIGO, last_phase|ATNO); |
2279 | printf("%s:%d:%d:%d: Device is active, asserting ATN\n", | 2273 | scmd_printk(KERN_INFO, cmd, "Device is active, asserting ATN\n"); |
2280 | ahc_name(ahc), cmd->device->channel, cmd->device->id, | ||
2281 | cmd->device->lun); | ||
2282 | wait = TRUE; | 2274 | wait = TRUE; |
2283 | } else if (disconnected) { | 2275 | } else if (disconnected) { |
2284 | 2276 | ||
@@ -2344,9 +2336,7 @@ ahc_linux_queue_recovery_cmd(struct scsi_cmnd *cmd, scb_flag flag) | |||
2344 | printf("Device is disconnected, re-queuing SCB\n"); | 2336 | printf("Device is disconnected, re-queuing SCB\n"); |
2345 | wait = TRUE; | 2337 | wait = TRUE; |
2346 | } else { | 2338 | } else { |
2347 | printf("%s:%d:%d:%d: Unable to deliver message\n", | 2339 | scmd_printk(KERN_INFO, cmd, "Unable to deliver message\n"); |
2348 | ahc_name(ahc), cmd->device->channel, cmd->device->id, | ||
2349 | cmd->device->lun); | ||
2350 | retval = FAILED; | 2340 | retval = FAILED; |
2351 | goto done; | 2341 | goto done; |
2352 | } | 2342 | } |
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c index a8cfbef304b5..b150bd8e254a 100644 --- a/drivers/scsi/atp870u.c +++ b/drivers/scsi/atp870u.c | |||
@@ -297,11 +297,10 @@ stop_dma: | |||
297 | } | 297 | } |
298 | workreq = dev->id[c][target_id].curr_req; | 298 | workreq = dev->id[c][target_id].curr_req; |
299 | #ifdef ED_DBGP | 299 | #ifdef ED_DBGP |
300 | printk(KERN_DEBUG "Channel = %d ID = %d LUN = %d CDB",c,workreq->device->id,workreq->device->lun); | 300 | scmd_printk(KERN_DEBUG, workreq, "CDB"); |
301 | for(l=0;l<workreq->cmd_len;l++) | 301 | for (l = 0; l < workreq->cmd_len; l++) |
302 | { | ||
303 | printk(KERN_DEBUG " %x",workreq->cmnd[l]); | 302 | printk(KERN_DEBUG " %x",workreq->cmnd[l]); |
304 | } | 303 | printk("\n"); |
305 | #endif | 304 | #endif |
306 | 305 | ||
307 | tmport = workport + 0x0f; | 306 | tmport = workport + 0x0f; |
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c index da6e51c7fe69..833241508070 100644 --- a/drivers/scsi/ch.c +++ b/drivers/scsi/ch.c | |||
@@ -940,9 +940,7 @@ static int ch_probe(struct device *dev) | |||
940 | MKDEV(SCSI_CHANGER_MAJOR,ch->minor), | 940 | MKDEV(SCSI_CHANGER_MAJOR,ch->minor), |
941 | dev, "s%s", ch->name); | 941 | dev, "s%s", ch->name); |
942 | 942 | ||
943 | printk(KERN_INFO "Attached scsi changer %s " | 943 | sdev_printk(KERN_INFO, sd, "Attached scsi changer %s\n", ch->name); |
944 | "at scsi%d, channel %d, id %d, lun %d\n", | ||
945 | ch->name, sd->host->host_no, sd->channel, sd->id, sd->lun); | ||
946 | 944 | ||
947 | spin_lock(&ch_devlist_lock); | 945 | spin_lock(&ch_devlist_lock); |
948 | list_add_tail(&ch->list,&ch_devlist); | 946 | list_add_tail(&ch->list,&ch_devlist); |
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c index 3d13fdee4fc2..b45a4c730230 100644 --- a/drivers/scsi/eata.c +++ b/drivers/scsi/eata.c | |||
@@ -941,8 +941,6 @@ static int eata2x_slave_configure(struct scsi_device *dev) | |||
941 | { | 941 | { |
942 | int tqd, utqd; | 942 | int tqd, utqd; |
943 | char *tag_suffix, *link_suffix; | 943 | char *tag_suffix, *link_suffix; |
944 | struct Scsi_Host *shost = dev->host; | ||
945 | struct hostdata *ha = (struct hostdata *)shost->hostdata; | ||
946 | 944 | ||
947 | utqd = MAX_CMD_PER_LUN; | 945 | utqd = MAX_CMD_PER_LUN; |
948 | tqd = max_queue_depth; | 946 | tqd = max_queue_depth; |
@@ -973,8 +971,8 @@ static int eata2x_slave_configure(struct scsi_device *dev) | |||
973 | else | 971 | else |
974 | link_suffix = ""; | 972 | link_suffix = ""; |
975 | 973 | ||
976 | printk("%s: scsi%d, channel %d, id %d, lun %d, cmds/lun %d%s%s.\n", | 974 | sdev_printk(KERN_INFO, dev, |
977 | ha->board_name, shost->host_no, dev->channel, dev->id, dev->lun, | 975 | "cmds/lun %d%s%s.\n", |
978 | dev->queue_depth, link_suffix, tag_suffix); | 976 | dev->queue_depth, link_suffix, tag_suffix); |
979 | 977 | ||
980 | return 0; | 978 | return 0; |
@@ -1813,9 +1811,8 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt, | |||
1813 | SCpnt->host_scribble = (unsigned char *)&cpp->cpp_index; | 1811 | SCpnt->host_scribble = (unsigned char *)&cpp->cpp_index; |
1814 | 1812 | ||
1815 | if (do_trace) | 1813 | if (do_trace) |
1816 | printk("%s: qcomm, mbox %d, target %d.%d:%d, pid %ld.\n", | 1814 | scmd_printk(KERN_INFO, SCpnt, |
1817 | ha->board_name, i, SCpnt->device->channel, SCpnt->device->id, | 1815 | "qcomm, mbox %d, pid %ld.\n", i, SCpnt->pid); |
1818 | SCpnt->device->lun, SCpnt->pid); | ||
1819 | 1816 | ||
1820 | cpp->reqsen = 1; | 1817 | cpp->reqsen = 1; |
1821 | cpp->dispri = 1; | 1818 | cpp->dispri = 1; |
@@ -1847,9 +1844,8 @@ static int eata2x_queuecommand(struct scsi_cmnd *SCpnt, | |||
1847 | if (do_dma(shost->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) { | 1844 | if (do_dma(shost->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) { |
1848 | unmap_dma(i, ha); | 1845 | unmap_dma(i, ha); |
1849 | SCpnt->host_scribble = NULL; | 1846 | SCpnt->host_scribble = NULL; |
1850 | printk("%s: qcomm, target %d.%d:%d, pid %ld, adapter busy.\n", | 1847 | scmd_printk(KERN_INFO, SCpnt, |
1851 | ha->board_name, SCpnt->device->channel, SCpnt->device->id, | 1848 | "qcomm, pid %ld, adapter busy.\n", SCpnt->pid); |
1852 | SCpnt->device->lun, SCpnt->pid); | ||
1853 | return 1; | 1849 | return 1; |
1854 | } | 1850 | } |
1855 | 1851 | ||
@@ -1864,16 +1860,14 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg) | |||
1864 | unsigned int i; | 1860 | unsigned int i; |
1865 | 1861 | ||
1866 | if (SCarg->host_scribble == NULL) { | 1862 | if (SCarg->host_scribble == NULL) { |
1867 | printk("%s: abort, target %d.%d:%d, pid %ld inactive.\n", | 1863 | scmd_printk(KERN_INFO, SCarg, |
1868 | ha->board_name, SCarg->device->channel, SCarg->device->id, | 1864 | "abort, pid %ld inactive.\n", SCarg->pid); |
1869 | SCarg->device->lun, SCarg->pid); | ||
1870 | return SUCCESS; | 1865 | return SUCCESS; |
1871 | } | 1866 | } |
1872 | 1867 | ||
1873 | i = *(unsigned int *)SCarg->host_scribble; | 1868 | i = *(unsigned int *)SCarg->host_scribble; |
1874 | printk("%s: abort, mbox %d, target %d.%d:%d, pid %ld.\n", | 1869 | scmd_printk(KERN_WARNING, SCarg, |
1875 | ha->board_name, i, SCarg->device->channel, SCarg->device->id, | 1870 | "abort, mbox %d, pid %ld.\n", i, SCarg->pid); |
1876 | SCarg->device->lun, SCarg->pid); | ||
1877 | 1871 | ||
1878 | if (i >= shost->can_queue) | 1872 | if (i >= shost->can_queue) |
1879 | panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name); | 1873 | panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name); |
@@ -1934,9 +1928,8 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg) | |||
1934 | struct Scsi_Host *shost = SCarg->device->host; | 1928 | struct Scsi_Host *shost = SCarg->device->host; |
1935 | struct hostdata *ha = (struct hostdata *)shost->hostdata; | 1929 | struct hostdata *ha = (struct hostdata *)shost->hostdata; |
1936 | 1930 | ||
1937 | printk("%s: reset, enter, target %d.%d:%d, pid %ld.\n", | 1931 | scmd_printk(KERN_INFO, SCarg, |
1938 | ha->board_name, SCarg->device->channel, SCarg->device->id, | 1932 | "reset, enter, pid %ld.\n", SCarg->pid); |
1939 | SCarg->device->lun, SCarg->pid); | ||
1940 | 1933 | ||
1941 | spin_lock_irq(shost->host_lock); | 1934 | spin_lock_irq(shost->host_lock); |
1942 | 1935 | ||
@@ -2253,12 +2246,11 @@ static int reorder(struct hostdata *ha, unsigned long cursec, | |||
2253 | k = il[n]; | 2246 | k = il[n]; |
2254 | cpp = &ha->cp[k]; | 2247 | cpp = &ha->cp[k]; |
2255 | SCpnt = cpp->SCpnt; | 2248 | SCpnt = cpp->SCpnt; |
2256 | printk | 2249 | scmd_printk(KERN_INFO, SCpnt, |
2257 | ("%s %d.%d:%d pid %ld mb %d fc %d nr %d sec %ld ns %ld" | 2250 | "%s pid %ld mb %d fc %d nr %d sec %ld ns %ld" |
2258 | " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", | 2251 | " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", |
2259 | (ihdlr ? "ihdlr" : "qcomm"), | 2252 | (ihdlr ? "ihdlr" : "qcomm"), |
2260 | SCpnt->device->channel, SCpnt->device->id, | 2253 | SCpnt->pid, k, flushcount, |
2261 | SCpnt->device->lun, SCpnt->pid, k, flushcount, | ||
2262 | n_ready, SCpnt->request->sector, | 2254 | n_ready, SCpnt->request->sector, |
2263 | SCpnt->request->nr_sectors, cursec, YESNO(s), | 2255 | SCpnt->request->nr_sectors, cursec, YESNO(s), |
2264 | YESNO(r), YESNO(rev), YESNO(input_only), | 2256 | YESNO(r), YESNO(rev), YESNO(input_only), |
@@ -2301,12 +2293,11 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec, | |||
2301 | SCpnt = cpp->SCpnt; | 2293 | SCpnt = cpp->SCpnt; |
2302 | 2294 | ||
2303 | if (do_dma(dev->host->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) { | 2295 | if (do_dma(dev->host->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) { |
2304 | printk | 2296 | scmd_printk(KERN_INFO, SCpnt, |
2305 | ("%s: %s, target %d.%d:%d, pid %ld, mbox %d, adapter" | 2297 | "%s, pid %ld, mbox %d, adapter" |
2306 | " busy, will abort.\n", ha->board_name, | 2298 | " busy, will abort.\n", |
2307 | (ihdlr ? "ihdlr" : "qcomm"), | 2299 | (ihdlr ? "ihdlr" : "qcomm"), |
2308 | SCpnt->device->channel, SCpnt->device->id, | 2300 | SCpnt->pid, k); |
2309 | SCpnt->device->lun, SCpnt->pid, k); | ||
2310 | ha->cp_stat[k] = ABORTING; | 2301 | ha->cp_stat[k] = ABORTING; |
2311 | continue; | 2302 | continue; |
2312 | } | 2303 | } |
@@ -2542,11 +2533,10 @@ static irqreturn_t ihdlr(int irq, struct Scsi_Host *shost) | |||
2542 | spp->adapter_status != ASST && ha->iocount <= 1000) || | 2533 | spp->adapter_status != ASST && ha->iocount <= 1000) || |
2543 | do_trace || msg_byte(spp->target_status)) | 2534 | do_trace || msg_byte(spp->target_status)) |
2544 | #endif | 2535 | #endif |
2545 | printk("%s: ihdlr, mbox %2d, err 0x%x:%x," | 2536 | scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x," |
2546 | " target %d.%d:%d, pid %ld, reg 0x%x, count %d.\n", | 2537 | " pid %ld, reg 0x%x, count %d.\n", |
2547 | ha->board_name, i, spp->adapter_status, spp->target_status, | 2538 | i, spp->adapter_status, spp->target_status, |
2548 | SCpnt->device->channel, SCpnt->device->id, | 2539 | SCpnt->pid, reg, ha->iocount); |
2549 | SCpnt->device->lun, SCpnt->pid, reg, ha->iocount); | ||
2550 | 2540 | ||
2551 | unmap_dma(i, ha); | 2541 | unmap_dma(i, ha); |
2552 | 2542 | ||
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index 42c6e35f801c..23beb48c79c5 100644 --- a/drivers/scsi/eata_pio.c +++ b/drivers/scsi/eata_pio.c | |||
@@ -384,7 +384,9 @@ static int eata_pio_queue(struct scsi_cmnd *cmd, | |||
384 | 384 | ||
385 | cp->status = USED; /* claim free slot */ | 385 | cp->status = USED; /* claim free slot */ |
386 | 386 | ||
387 | DBG(DBG_QUEUE, printk(KERN_DEBUG "eata_pio_queue pid %ld, target: %x, lun:" " %x, y %d\n", cmd->pid, cmd->device->id, cmd->device->lun, y)); | 387 | DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd, |
388 | "eata_pio_queue pid %ld, y %d\n", | ||
389 | cmd->pid, y)); | ||
388 | 390 | ||
389 | cmd->scsi_done = (void *) done; | 391 | cmd->scsi_done = (void *) done; |
390 | 392 | ||
@@ -427,7 +429,9 @@ static int eata_pio_queue(struct scsi_cmnd *cmd, | |||
427 | 429 | ||
428 | if (eata_pio_send_command(base, EATA_CMD_PIO_SEND_CP)) { | 430 | if (eata_pio_send_command(base, EATA_CMD_PIO_SEND_CP)) { |
429 | cmd->result = DID_BUS_BUSY << 16; | 431 | cmd->result = DID_BUS_BUSY << 16; |
430 | printk(KERN_NOTICE "eata_pio_queue target %d, pid %ld, HBA busy, " "returning DID_BUS_BUSY, done.\n", cmd->device->id, cmd->pid); | 432 | scmd_printk(KERN_NOTICE, cmd, |
433 | "eata_pio_queue pid %ld, HBA busy, " | ||
434 | "returning DID_BUS_BUSY, done.\n", cmd->pid); | ||
431 | done(cmd); | 435 | done(cmd); |
432 | cp->status = FREE; | 436 | cp->status = FREE; |
433 | return (0); | 437 | return (0); |
@@ -440,7 +444,9 @@ static int eata_pio_queue(struct scsi_cmnd *cmd, | |||
440 | for (x = 0; x < hd->cppadlen; x++) | 444 | for (x = 0; x < hd->cppadlen; x++) |
441 | outw(0, base + HA_RDATA); | 445 | outw(0, base + HA_RDATA); |
442 | 446 | ||
443 | DBG(DBG_QUEUE, printk(KERN_DEBUG "Queued base %#.4lx pid: %ld target: %x " "lun: %x slot %d irq %d\n", (long) sh->base, cmd->pid, cmd->device->id, cmd->device->lun, y, sh->irq)); | 447 | DBG(DBG_QUEUE, scmd_printk(KERN_DEBUG, cmd, |
448 | "Queued base %#.4lx pid: %ld " | ||
449 | "slot %d irq %d\n", (long) sh->base, cmd->pid, y, sh->irq)); | ||
444 | 450 | ||
445 | return (0); | 451 | return (0); |
446 | } | 452 | } |
@@ -449,8 +455,9 @@ static int eata_pio_abort(struct scsi_cmnd *cmd) | |||
449 | { | 455 | { |
450 | uint loop = HZ; | 456 | uint loop = HZ; |
451 | 457 | ||
452 | DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_abort called pid: %ld " "target: %x lun: %x\n", cmd->pid, cmd->device->id, cmd->device->lun)); | 458 | DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd, |
453 | 459 | "eata_pio_abort called pid: %ld\n", | |
460 | cmd->pid)); | ||
454 | 461 | ||
455 | while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY) | 462 | while (inb(cmd->device->host->base + HA_RAUXSTAT) & HA_ABUSY) |
456 | if (--loop == 0) { | 463 | if (--loop == 0) { |
@@ -484,7 +491,9 @@ static int eata_pio_host_reset(struct scsi_cmnd *cmd) | |||
484 | struct scsi_cmnd *sp; | 491 | struct scsi_cmnd *sp; |
485 | struct Scsi_Host *host = cmd->device->host; | 492 | struct Scsi_Host *host = cmd->device->host; |
486 | 493 | ||
487 | DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset called pid:%ld target:" " %x lun: %x\n", cmd->pid, cmd->device->id, cmd->device->lun)); | 494 | DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd, |
495 | "eata_pio_reset called pid:%ld\n", | ||
496 | cmd->pid)); | ||
488 | 497 | ||
489 | spin_lock_irq(host->host_lock); | 498 | spin_lock_irq(host->host_lock); |
490 | 499 | ||
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c index 19392f651272..887a5c3ded28 100644 --- a/drivers/scsi/ibmmca.c +++ b/drivers/scsi/ibmmca.c | |||
@@ -1860,7 +1860,10 @@ static int ibmmca_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) | |||
1860 | next_ldn(host_index) = 7; | 1860 | next_ldn(host_index) = 7; |
1861 | if (current_ldn == next_ldn(host_index)) { /* One circle done ? */ | 1861 | if (current_ldn == next_ldn(host_index)) { /* One circle done ? */ |
1862 | /* no non-processing ldn found */ | 1862 | /* no non-processing ldn found */ |
1863 | printk("IBM MCA SCSI: Cannot assign SCSI-device dynamically!\n" " On ldn 7-14 SCSI-commands everywhere in progress.\n" " Reporting DID_NO_CONNECT for device (%d,%d).\n", target, cmd->device->lun); | 1863 | scmd_printk(KERN_WARNING, cmd, |
1864 | "IBM MCA SCSI: Cannot assign SCSI-device dynamically!\n" | ||
1865 | " On ldn 7-14 SCSI-commands everywhere in progress.\n" | ||
1866 | " Reporting DID_NO_CONNECT for device.\n"); | ||
1864 | cmd->result = DID_NO_CONNECT << 16; /* return no connect */ | 1867 | cmd->result = DID_NO_CONNECT << 16; /* return no connect */ |
1865 | if (done) | 1868 | if (done) |
1866 | done(cmd); | 1869 | done(cmd); |
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 3d62c9bcbff7..01f8ebf8a42e 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c | |||
@@ -893,7 +893,7 @@ static int idescsi_queue (struct scsi_cmnd *cmd, | |||
893 | idescsi_pc_t *pc = NULL; | 893 | idescsi_pc_t *pc = NULL; |
894 | 894 | ||
895 | if (!drive) { | 895 | if (!drive) { |
896 | printk (KERN_ERR "ide-scsi: drive id %d not present\n", cmd->device->id); | 896 | scmd_printk (KERN_ERR, cmd, "drive not present\n"); |
897 | goto abort; | 897 | goto abort; |
898 | } | 898 | } |
899 | scsi = drive_to_idescsi(drive); | 899 | scsi = drive_to_idescsi(drive); |
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c index aed7e64865fa..fe387b5ce8bd 100644 --- a/drivers/scsi/in2000.c +++ b/drivers/scsi/in2000.c | |||
@@ -343,7 +343,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) | |||
343 | instance = cmd->device->host; | 343 | instance = cmd->device->host; |
344 | hostdata = (struct IN2000_hostdata *) instance->hostdata; | 344 | hostdata = (struct IN2000_hostdata *) instance->hostdata; |
345 | 345 | ||
346 | DB(DB_QUEUE_COMMAND, printk("Q-%d-%02x-%ld(", cmd->device->id, cmd->cmnd[0], cmd->pid)) | 346 | DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->pid)) |
347 | 347 | ||
348 | /* Set up a few fields in the Scsi_Cmnd structure for our own use: | 348 | /* Set up a few fields in the Scsi_Cmnd structure for our own use: |
349 | * - host_scribble is the pointer to the next cmd in the input queue | 349 | * - host_scribble is the pointer to the next cmd in the input queue |
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index cbff3ea3cd89..8cf967108500 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h | |||
@@ -1114,9 +1114,8 @@ struct ipr_ucode_image_header { | |||
1114 | #define ipr_warn(...) printk(KERN_WARNING IPR_NAME": "__VA_ARGS__) | 1114 | #define ipr_warn(...) printk(KERN_WARNING IPR_NAME": "__VA_ARGS__) |
1115 | #define ipr_dbg(...) IPR_DBG_CMD(printk(KERN_INFO IPR_NAME ": "__VA_ARGS__)) | 1115 | #define ipr_dbg(...) IPR_DBG_CMD(printk(KERN_INFO IPR_NAME ": "__VA_ARGS__)) |
1116 | 1116 | ||
1117 | #define ipr_sdev_printk(level, sdev, fmt, ...) \ | 1117 | #define ipr_sdev_printk(level, sdev, fmt, args...) \ |
1118 | printk(level IPR_NAME ": %d:%d:%d:%d: " fmt, sdev->host->host_no, \ | 1118 | sdev_printk(level, sdev, fmt, ## args) |
1119 | sdev->channel, sdev->id, sdev->lun, ##__VA_ARGS__) | ||
1120 | 1119 | ||
1121 | #define ipr_sdev_err(sdev, fmt, ...) \ | 1120 | #define ipr_sdev_err(sdev, fmt, ...) \ |
1122 | ipr_sdev_printk(KERN_ERR, sdev, fmt, ##__VA_ARGS__) | 1121 | ipr_sdev_printk(KERN_ERR, sdev, fmt, ##__VA_ARGS__) |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index c3f637395734..4245d05e628b 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -758,9 +758,8 @@ static int megasas_generic_reset(struct scsi_cmnd *scmd) | |||
758 | 758 | ||
759 | instance = (struct megasas_instance *)scmd->device->host->hostdata; | 759 | instance = (struct megasas_instance *)scmd->device->host->hostdata; |
760 | 760 | ||
761 | printk(KERN_NOTICE "megasas: RESET -%ld cmd=%x <c=%d t=%d l=%d>\n", | 761 | scmd_printk(KERN_NOTICE, scmd, "megasas: RESET -%ld cmd=%x\n", |
762 | scmd->serial_number, scmd->cmnd[0], scmd->device->channel, | 762 | scmd->serial_number, scmd->cmnd[0]); |
763 | scmd->device->id, scmd->device->lun); | ||
764 | 763 | ||
765 | if (instance->hw_crit_error) { | 764 | if (instance->hw_crit_error) { |
766 | printk(KERN_ERR "megasas: cannot recover from previous reset " | 765 | printk(KERN_ERR "megasas: cannot recover from previous reset " |
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index c1131c9cae64..011f3c8fe56f 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -5819,7 +5819,7 @@ static int osst_probe(struct device *dev) | |||
5819 | } | 5819 | } |
5820 | drive->number = devfs_register_tape(SDp->devfs_name); | 5820 | drive->number = devfs_register_tape(SDp->devfs_name); |
5821 | 5821 | ||
5822 | dev_printk(KERN_INFO, &SDp->sdev_gendev, | 5822 | sdev_printk(KERN_INFO, &SDp, |
5823 | "osst :I: Attached OnStream %.5s tape as %s\n", | 5823 | "osst :I: Attached OnStream %.5s tape as %s\n", |
5824 | SDp->model, tape_name(tpnt)); | 5824 | SDp->model, tape_name(tpnt)); |
5825 | 5825 | ||
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 386bd6c67e73..91322aff241d 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
@@ -2085,8 +2085,8 @@ static int DC390_abort(struct scsi_cmnd *cmd) | |||
2085 | struct dc390_acb *pACB = (struct dc390_acb*) cmd->device->host->hostdata; | 2085 | struct dc390_acb *pACB = (struct dc390_acb*) cmd->device->host->hostdata; |
2086 | struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata; | 2086 | struct dc390_dcb *pDCB = (struct dc390_dcb*) cmd->device->hostdata; |
2087 | 2087 | ||
2088 | printk("DC390: Abort command (pid %li, Device %02i-%02i)\n", | 2088 | scmd_printk(KERN_WARNING, cmd, |
2089 | cmd->pid, cmd->device->id, cmd->device->lun); | 2089 | "DC390: Abort command (pid %li)\n", cmd->pid); |
2090 | 2090 | ||
2091 | /* abort() is too stupid for already sent commands at the moment. | 2091 | /* abort() is too stupid for already sent commands at the moment. |
2092 | * If it's called we are in trouble anyway, so let's dump some info | 2092 | * If it's called we are in trouble anyway, so let's dump some info |
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index b0b6cdf02cbd..e778e17d57f0 100644 --- a/drivers/scsi/u14-34f.c +++ b/drivers/scsi/u14-34f.c | |||
@@ -726,8 +726,7 @@ static int u14_34f_slave_configure(struct scsi_device *dev) { | |||
726 | else | 726 | else |
727 | link_suffix = ""; | 727 | link_suffix = ""; |
728 | 728 | ||
729 | printk("%s: scsi%d, channel %d, id %d, lun %d, cmds/lun %d%s%s.\n", | 729 | sdev_printk(KERN_INFO, dev, "cmds/lun %d%s%s.\n", |
730 | BN(j), host->host_no, dev->channel, dev->id, dev->lun, | ||
731 | dev->queue_depth, link_suffix, tag_suffix); | 730 | dev->queue_depth, link_suffix, tag_suffix); |
732 | 731 | ||
733 | return FALSE; | 732 | return FALSE; |
@@ -1319,8 +1318,8 @@ static int u14_34f_queuecommand(struct scsi_cmnd *SCpnt, void (*done)(struct scs | |||
1319 | if (wait_on_busy(sh[j]->io_port, MAXLOOP)) { | 1318 | if (wait_on_busy(sh[j]->io_port, MAXLOOP)) { |
1320 | unmap_dma(i, j); | 1319 | unmap_dma(i, j); |
1321 | SCpnt->host_scribble = NULL; | 1320 | SCpnt->host_scribble = NULL; |
1322 | printk("%s: qcomm, target %d.%d:%d, pid %ld, adapter busy.\n", | 1321 | scmd_printk(KERN_INFO, SCpnt, |
1323 | BN(j), SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun, SCpnt->pid); | 1322 | "qcomm, pid %ld, adapter busy.\n", SCpnt->pid); |
1324 | return 1; | 1323 | return 1; |
1325 | } | 1324 | } |
1326 | 1325 | ||
@@ -1340,14 +1339,14 @@ static int u14_34f_eh_abort(struct scsi_cmnd *SCarg) { | |||
1340 | j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number; | 1339 | j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number; |
1341 | 1340 | ||
1342 | if (SCarg->host_scribble == NULL) { | 1341 | if (SCarg->host_scribble == NULL) { |
1343 | printk("%s: abort, target %d.%d:%d, pid %ld inactive.\n", | 1342 | scmd_printk(KERN_INFO, SCarg, "abort, pid %ld inactive.\n", |
1344 | BN(j), SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid); | 1343 | SCarg->pid); |
1345 | return SUCCESS; | 1344 | return SUCCESS; |
1346 | } | 1345 | } |
1347 | 1346 | ||
1348 | i = *(unsigned int *)SCarg->host_scribble; | 1347 | i = *(unsigned int *)SCarg->host_scribble; |
1349 | printk("%s: abort, mbox %d, target %d.%d:%d, pid %ld.\n", | 1348 | scmd_printk(KERN_INFO, SCarg, "abort, mbox %d, pid %ld.\n", |
1350 | BN(j), i, SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid); | 1349 | i, SCarg->pid); |
1351 | 1350 | ||
1352 | if (i >= sh[j]->can_queue) | 1351 | if (i >= sh[j]->can_queue) |
1353 | panic("%s: abort, invalid SCarg->host_scribble.\n", BN(j)); | 1352 | panic("%s: abort, invalid SCarg->host_scribble.\n", BN(j)); |
@@ -1405,8 +1404,7 @@ static int u14_34f_eh_host_reset(struct scsi_cmnd *SCarg) { | |||
1405 | struct scsi_cmnd *SCpnt; | 1404 | struct scsi_cmnd *SCpnt; |
1406 | 1405 | ||
1407 | j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number; | 1406 | j = ((struct hostdata *) SCarg->device->host->hostdata)->board_number; |
1408 | printk("%s: reset, enter, target %d.%d:%d, pid %ld.\n", | 1407 | scmd_printk(KERN_INFO, SCarg, "reset, enter, pid %ld.\n", SCarg->pid); |
1409 | BN(j), SCarg->device->channel, SCarg->device->id, SCarg->device->lun, SCarg->pid); | ||
1410 | 1408 | ||
1411 | spin_lock_irq(sh[j]->host_lock); | 1409 | spin_lock_irq(sh[j]->host_lock); |
1412 | 1410 | ||
@@ -1709,9 +1707,10 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec, unsigned in | |||
1709 | k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt; | 1707 | k = il[n]; cpp = &HD(j)->cp[k]; SCpnt = cpp->SCpnt; |
1710 | 1708 | ||
1711 | if (wait_on_busy(sh[j]->io_port, MAXLOOP)) { | 1709 | if (wait_on_busy(sh[j]->io_port, MAXLOOP)) { |
1712 | printk("%s: %s, target %d.%d:%d, pid %ld, mbox %d, adapter"\ | 1710 | scmd_printk(KERN_INFO, SCpnt, |
1713 | " busy, will abort.\n", BN(j), (ihdlr ? "ihdlr" : "qcomm"), | 1711 | "%s, pid %ld, mbox %d, adapter" |
1714 | SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun, SCpnt->pid, k); | 1712 | " busy, will abort.\n", (ihdlr ? "ihdlr" : "qcomm"), |
1713 | SCpnt->pid, k); | ||
1715 | HD(j)->cp_stat[k] = ABORTING; | 1714 | HD(j)->cp_stat[k] = ABORTING; |
1716 | continue; | 1715 | continue; |
1717 | } | 1716 | } |
@@ -1914,10 +1913,9 @@ static irqreturn_t ihdlr(int irq, unsigned int j) { | |||
1914 | spp->adapter_status != ASST && HD(j)->iocount <= 1000) || | 1913 | spp->adapter_status != ASST && HD(j)->iocount <= 1000) || |
1915 | do_trace || msg_byte(spp->target_status)) | 1914 | do_trace || msg_byte(spp->target_status)) |
1916 | #endif | 1915 | #endif |
1917 | printk("%s: ihdlr, mbox %2d, err 0x%x:%x,"\ | 1916 | scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"\ |
1918 | " target %d.%d:%d, pid %ld, reg 0x%x, count %d.\n", | 1917 | " pid %ld, reg 0x%x, count %d.\n", |
1919 | BN(j), i, spp->adapter_status, spp->target_status, | 1918 | i, spp->adapter_status, spp->target_status, SCpnt->pid, |
1920 | SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun, SCpnt->pid, | ||
1921 | reg, HD(j)->iocount); | 1919 | reg, HD(j)->iocount); |
1922 | 1920 | ||
1923 | unmap_dma(i, j); | 1921 | unmap_dma(i, j); |