diff options
Diffstat (limited to 'drivers/scsi/u14-34f.c')
-rw-r--r-- | drivers/scsi/u14-34f.c | 47 |
1 files changed, 22 insertions, 25 deletions
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c index b0b6cdf02cbd..cfab8f197084 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 | } |
@@ -1823,7 +1822,7 @@ static irqreturn_t ihdlr(int irq, unsigned int j) { | |||
1823 | 1822 | ||
1824 | /* If there was a bus reset, redo operation on each target */ | 1823 | /* If there was a bus reset, redo operation on each target */ |
1825 | else if (tstatus != GOOD && SCpnt->device->type == TYPE_DISK | 1824 | else if (tstatus != GOOD && SCpnt->device->type == TYPE_DISK |
1826 | && HD(j)->target_redo[SCpnt->device->id][SCpnt->device->channel]) | 1825 | && HD(j)->target_redo[scmd_id(SCpnt)][scmd_channel(SCpnt)]) |
1827 | status = DID_BUS_BUSY << 16; | 1826 | status = DID_BUS_BUSY << 16; |
1828 | 1827 | ||
1829 | /* Works around a flaw in scsi.c */ | 1828 | /* Works around a flaw in scsi.c */ |
@@ -1836,29 +1835,28 @@ static irqreturn_t ihdlr(int irq, unsigned int j) { | |||
1836 | status = DID_OK << 16; | 1835 | status = DID_OK << 16; |
1837 | 1836 | ||
1838 | if (tstatus == GOOD) | 1837 | if (tstatus == GOOD) |
1839 | HD(j)->target_redo[SCpnt->device->id][SCpnt->device->channel] = FALSE; | 1838 | HD(j)->target_redo[scmd_id(SCpnt)][scmd_channel(SCpnt)] = FALSE; |
1840 | 1839 | ||
1841 | if (spp->target_status && SCpnt->device->type == TYPE_DISK && | 1840 | if (spp->target_status && SCpnt->device->type == TYPE_DISK && |
1842 | (!(tstatus == CHECK_CONDITION && HD(j)->iocount <= 1000 && | 1841 | (!(tstatus == CHECK_CONDITION && HD(j)->iocount <= 1000 && |
1843 | (SCpnt->sense_buffer[2] & 0xf) == NOT_READY))) | 1842 | (SCpnt->sense_buffer[2] & 0xf) == NOT_READY))) |
1844 | printk("%s: ihdlr, target %d.%d:%d, pid %ld, "\ | 1843 | scmd_printk(KERN_INFO, SCpnt, |
1845 | "target_status 0x%x, sense key 0x%x.\n", BN(j), | 1844 | "ihdlr, pid %ld, target_status 0x%x, sense key 0x%x.\n", |
1846 | SCpnt->device->channel, SCpnt->device->id, SCpnt->device->lun, | ||
1847 | SCpnt->pid, spp->target_status, | 1845 | SCpnt->pid, spp->target_status, |
1848 | SCpnt->sense_buffer[2]); | 1846 | SCpnt->sense_buffer[2]); |
1849 | 1847 | ||
1850 | HD(j)->target_to[SCpnt->device->id][SCpnt->device->channel] = 0; | 1848 | HD(j)->target_to[scmd_id(SCpnt)][scmd_channel(SCpnt)] = 0; |
1851 | 1849 | ||
1852 | if (HD(j)->last_retried_pid == SCpnt->pid) HD(j)->retries = 0; | 1850 | if (HD(j)->last_retried_pid == SCpnt->pid) HD(j)->retries = 0; |
1853 | 1851 | ||
1854 | break; | 1852 | break; |
1855 | case ASST: /* Selection Time Out */ | 1853 | case ASST: /* Selection Time Out */ |
1856 | 1854 | ||
1857 | if (HD(j)->target_to[SCpnt->device->id][SCpnt->device->channel] > 1) | 1855 | if (HD(j)->target_to[scmd_id(SCpnt)][scmd_channel(SCpnt)] > 1) |
1858 | status = DID_ERROR << 16; | 1856 | status = DID_ERROR << 16; |
1859 | else { | 1857 | else { |
1860 | status = DID_TIME_OUT << 16; | 1858 | status = DID_TIME_OUT << 16; |
1861 | HD(j)->target_to[SCpnt->device->id][SCpnt->device->channel]++; | 1859 | HD(j)->target_to[scmd_id(SCpnt)][scmd_channel(SCpnt)]++; |
1862 | } | 1860 | } |
1863 | 1861 | ||
1864 | break; | 1862 | break; |
@@ -1914,10 +1912,9 @@ static irqreturn_t ihdlr(int irq, unsigned int j) { | |||
1914 | spp->adapter_status != ASST && HD(j)->iocount <= 1000) || | 1912 | spp->adapter_status != ASST && HD(j)->iocount <= 1000) || |
1915 | do_trace || msg_byte(spp->target_status)) | 1913 | do_trace || msg_byte(spp->target_status)) |
1916 | #endif | 1914 | #endif |
1917 | printk("%s: ihdlr, mbox %2d, err 0x%x:%x,"\ | 1915 | 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", | 1916 | " pid %ld, reg 0x%x, count %d.\n", |
1919 | BN(j), i, spp->adapter_status, spp->target_status, | 1917 | 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); | 1918 | reg, HD(j)->iocount); |
1922 | 1919 | ||
1923 | unmap_dma(i, j); | 1920 | unmap_dma(i, j); |