aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/eata.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/eata.c')
-rw-r--r--drivers/scsi/eata.c66
1 files changed, 31 insertions, 35 deletions
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index 0eb4fe6a4c8a..94de88955a99 100644
--- a/drivers/scsi/eata.c
+++ b/drivers/scsi/eata.c
@@ -1766,8 +1766,8 @@ static int eata2x_queuecommand_lck(struct scsi_cmnd *SCpnt,
1766 struct mscp *cpp; 1766 struct mscp *cpp;
1767 1767
1768 if (SCpnt->host_scribble) 1768 if (SCpnt->host_scribble)
1769 panic("%s: qcomm, pid %ld, SCpnt %p already active.\n", 1769 panic("%s: qcomm, SCpnt %p already active.\n",
1770 ha->board_name, SCpnt->serial_number, SCpnt); 1770 ha->board_name, SCpnt);
1771 1771
1772 /* i is the mailbox number, look for the first free mailbox 1772 /* i is the mailbox number, look for the first free mailbox
1773 starting from last_cp_used */ 1773 starting from last_cp_used */
@@ -1801,7 +1801,7 @@ static int eata2x_queuecommand_lck(struct scsi_cmnd *SCpnt,
1801 1801
1802 if (do_trace) 1802 if (do_trace)
1803 scmd_printk(KERN_INFO, SCpnt, 1803 scmd_printk(KERN_INFO, SCpnt,
1804 "qcomm, mbox %d, pid %ld.\n", i, SCpnt->serial_number); 1804 "qcomm, mbox %d.\n", i);
1805 1805
1806 cpp->reqsen = 1; 1806 cpp->reqsen = 1;
1807 cpp->dispri = 1; 1807 cpp->dispri = 1;
@@ -1833,8 +1833,7 @@ static int eata2x_queuecommand_lck(struct scsi_cmnd *SCpnt,
1833 if (do_dma(shost->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) { 1833 if (do_dma(shost->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {
1834 unmap_dma(i, ha); 1834 unmap_dma(i, ha);
1835 SCpnt->host_scribble = NULL; 1835 SCpnt->host_scribble = NULL;
1836 scmd_printk(KERN_INFO, SCpnt, 1836 scmd_printk(KERN_INFO, SCpnt, "qcomm, adapter busy.\n");
1837 "qcomm, pid %ld, adapter busy.\n", SCpnt->serial_number);
1838 return 1; 1837 return 1;
1839 } 1838 }
1840 1839
@@ -1851,14 +1850,12 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
1851 unsigned int i; 1850 unsigned int i;
1852 1851
1853 if (SCarg->host_scribble == NULL) { 1852 if (SCarg->host_scribble == NULL) {
1854 scmd_printk(KERN_INFO, SCarg, 1853 scmd_printk(KERN_INFO, SCarg, "abort, cmd inactive.\n");
1855 "abort, pid %ld inactive.\n", SCarg->serial_number);
1856 return SUCCESS; 1854 return SUCCESS;
1857 } 1855 }
1858 1856
1859 i = *(unsigned int *)SCarg->host_scribble; 1857 i = *(unsigned int *)SCarg->host_scribble;
1860 scmd_printk(KERN_WARNING, SCarg, 1858 scmd_printk(KERN_WARNING, SCarg, "abort, mbox %d.\n", i);
1861 "abort, mbox %d, pid %ld.\n", i, SCarg->serial_number);
1862 1859
1863 if (i >= shost->can_queue) 1860 if (i >= shost->can_queue)
1864 panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name); 1861 panic("%s: abort, invalid SCarg->host_scribble.\n", ha->board_name);
@@ -1902,8 +1899,8 @@ static int eata2x_eh_abort(struct scsi_cmnd *SCarg)
1902 SCarg->result = DID_ABORT << 16; 1899 SCarg->result = DID_ABORT << 16;
1903 SCarg->host_scribble = NULL; 1900 SCarg->host_scribble = NULL;
1904 ha->cp_stat[i] = FREE; 1901 ha->cp_stat[i] = FREE;
1905 printk("%s, abort, mbox %d ready, DID_ABORT, pid %ld done.\n", 1902 printk("%s, abort, mbox %d ready, DID_ABORT, done.\n",
1906 ha->board_name, i, SCarg->serial_number); 1903 ha->board_name, i);
1907 SCarg->scsi_done(SCarg); 1904 SCarg->scsi_done(SCarg);
1908 return SUCCESS; 1905 return SUCCESS;
1909 } 1906 }
@@ -1919,13 +1916,12 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
1919 struct Scsi_Host *shost = SCarg->device->host; 1916 struct Scsi_Host *shost = SCarg->device->host;
1920 struct hostdata *ha = (struct hostdata *)shost->hostdata; 1917 struct hostdata *ha = (struct hostdata *)shost->hostdata;
1921 1918
1922 scmd_printk(KERN_INFO, SCarg, 1919 scmd_printk(KERN_INFO, SCarg, "reset, enter.\n");
1923 "reset, enter, pid %ld.\n", SCarg->serial_number);
1924 1920
1925 spin_lock_irq(shost->host_lock); 1921 spin_lock_irq(shost->host_lock);
1926 1922
1927 if (SCarg->host_scribble == NULL) 1923 if (SCarg->host_scribble == NULL)
1928 printk("%s: reset, pid %ld inactive.\n", ha->board_name, SCarg->serial_number); 1924 printk("%s: reset, inactive.\n", ha->board_name);
1929 1925
1930 if (ha->in_reset) { 1926 if (ha->in_reset) {
1931 printk("%s: reset, exit, already in reset.\n", ha->board_name); 1927 printk("%s: reset, exit, already in reset.\n", ha->board_name);
@@ -1964,14 +1960,14 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
1964 1960
1965 if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) { 1961 if (ha->cp_stat[i] == READY || ha->cp_stat[i] == ABORTING) {
1966 ha->cp_stat[i] = ABORTING; 1962 ha->cp_stat[i] = ABORTING;
1967 printk("%s: reset, mbox %d aborting, pid %ld.\n", 1963 printk("%s: reset, mbox %d aborting.\n",
1968 ha->board_name, i, SCpnt->serial_number); 1964 ha->board_name, i);
1969 } 1965 }
1970 1966
1971 else { 1967 else {
1972 ha->cp_stat[i] = IN_RESET; 1968 ha->cp_stat[i] = IN_RESET;
1973 printk("%s: reset, mbox %d in reset, pid %ld.\n", 1969 printk("%s: reset, mbox %d in reset.\n",
1974 ha->board_name, i, SCpnt->serial_number); 1970 ha->board_name, i);
1975 } 1971 }
1976 1972
1977 if (SCpnt->host_scribble == NULL) 1973 if (SCpnt->host_scribble == NULL)
@@ -2025,8 +2021,8 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
2025 ha->cp_stat[i] = LOCKED; 2021 ha->cp_stat[i] = LOCKED;
2026 2022
2027 printk 2023 printk
2028 ("%s, reset, mbox %d locked, DID_RESET, pid %ld done.\n", 2024 ("%s, reset, mbox %d locked, DID_RESET, done.\n",
2029 ha->board_name, i, SCpnt->serial_number); 2025 ha->board_name, i);
2030 } 2026 }
2031 2027
2032 else if (ha->cp_stat[i] == ABORTING) { 2028 else if (ha->cp_stat[i] == ABORTING) {
@@ -2039,8 +2035,8 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
2039 ha->cp_stat[i] = FREE; 2035 ha->cp_stat[i] = FREE;
2040 2036
2041 printk 2037 printk
2042 ("%s, reset, mbox %d aborting, DID_RESET, pid %ld done.\n", 2038 ("%s, reset, mbox %d aborting, DID_RESET, done.\n",
2043 ha->board_name, i, SCpnt->serial_number); 2039 ha->board_name, i);
2044 } 2040 }
2045 2041
2046 else 2042 else
@@ -2054,7 +2050,7 @@ static int eata2x_eh_host_reset(struct scsi_cmnd *SCarg)
2054 do_trace = 0; 2050 do_trace = 0;
2055 2051
2056 if (arg_done) 2052 if (arg_done)
2057 printk("%s: reset, exit, pid %ld done.\n", ha->board_name, SCarg->serial_number); 2053 printk("%s: reset, exit, done.\n", ha->board_name);
2058 else 2054 else
2059 printk("%s: reset, exit.\n", ha->board_name); 2055 printk("%s: reset, exit.\n", ha->board_name);
2060 2056
@@ -2238,10 +2234,10 @@ static int reorder(struct hostdata *ha, unsigned long cursec,
2238 cpp = &ha->cp[k]; 2234 cpp = &ha->cp[k];
2239 SCpnt = cpp->SCpnt; 2235 SCpnt = cpp->SCpnt;
2240 scmd_printk(KERN_INFO, SCpnt, 2236 scmd_printk(KERN_INFO, SCpnt,
2241 "%s pid %ld mb %d fc %d nr %d sec %ld ns %u" 2237 "%s mb %d fc %d nr %d sec %ld ns %u"
2242 " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n", 2238 " cur %ld s:%c r:%c rev:%c in:%c ov:%c xd %d.\n",
2243 (ihdlr ? "ihdlr" : "qcomm"), 2239 (ihdlr ? "ihdlr" : "qcomm"),
2244 SCpnt->serial_number, k, flushcount, 2240 k, flushcount,
2245 n_ready, blk_rq_pos(SCpnt->request), 2241 n_ready, blk_rq_pos(SCpnt->request),
2246 blk_rq_sectors(SCpnt->request), cursec, YESNO(s), 2242 blk_rq_sectors(SCpnt->request), cursec, YESNO(s),
2247 YESNO(r), YESNO(rev), YESNO(input_only), 2243 YESNO(r), YESNO(rev), YESNO(input_only),
@@ -2285,10 +2281,10 @@ static void flush_dev(struct scsi_device *dev, unsigned long cursec,
2285 2281
2286 if (do_dma(dev->host->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) { 2282 if (do_dma(dev->host->io_port, cpp->cp_dma_addr, SEND_CP_DMA)) {
2287 scmd_printk(KERN_INFO, SCpnt, 2283 scmd_printk(KERN_INFO, SCpnt,
2288 "%s, pid %ld, mbox %d, adapter" 2284 "%s, mbox %d, adapter"
2289 " busy, will abort.\n", 2285 " busy, will abort.\n",
2290 (ihdlr ? "ihdlr" : "qcomm"), 2286 (ihdlr ? "ihdlr" : "qcomm"),
2291 SCpnt->serial_number, k); 2287 k);
2292 ha->cp_stat[k] = ABORTING; 2288 ha->cp_stat[k] = ABORTING;
2293 continue; 2289 continue;
2294 } 2290 }
@@ -2398,12 +2394,12 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost)
2398 panic("%s: ihdlr, mbox %d, SCpnt == NULL.\n", ha->board_name, i); 2394 panic("%s: ihdlr, mbox %d, SCpnt == NULL.\n", ha->board_name, i);
2399 2395
2400 if (SCpnt->host_scribble == NULL) 2396 if (SCpnt->host_scribble == NULL)
2401 panic("%s: ihdlr, mbox %d, pid %ld, SCpnt %p garbled.\n", ha->board_name, 2397 panic("%s: ihdlr, mbox %d, SCpnt %p garbled.\n", ha->board_name,
2402 i, SCpnt->serial_number, SCpnt); 2398 i, SCpnt);
2403 2399
2404 if (*(unsigned int *)SCpnt->host_scribble != i) 2400 if (*(unsigned int *)SCpnt->host_scribble != i)
2405 panic("%s: ihdlr, mbox %d, pid %ld, index mismatch %d.\n", 2401 panic("%s: ihdlr, mbox %d, index mismatch %d.\n",
2406 ha->board_name, i, SCpnt->serial_number, 2402 ha->board_name, i,
2407 *(unsigned int *)SCpnt->host_scribble); 2403 *(unsigned int *)SCpnt->host_scribble);
2408 2404
2409 sync_dma(i, ha); 2405 sync_dma(i, ha);
@@ -2449,11 +2445,11 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost)
2449 if (spp->target_status && SCpnt->device->type == TYPE_DISK && 2445 if (spp->target_status && SCpnt->device->type == TYPE_DISK &&
2450 (!(tstatus == CHECK_CONDITION && ha->iocount <= 1000 && 2446 (!(tstatus == CHECK_CONDITION && ha->iocount <= 1000 &&
2451 (SCpnt->sense_buffer[2] & 0xf) == NOT_READY))) 2447 (SCpnt->sense_buffer[2] & 0xf) == NOT_READY)))
2452 printk("%s: ihdlr, target %d.%d:%d, pid %ld, " 2448 printk("%s: ihdlr, target %d.%d:%d, "
2453 "target_status 0x%x, sense key 0x%x.\n", 2449 "target_status 0x%x, sense key 0x%x.\n",
2454 ha->board_name, 2450 ha->board_name,
2455 SCpnt->device->channel, SCpnt->device->id, 2451 SCpnt->device->channel, SCpnt->device->id,
2456 SCpnt->device->lun, SCpnt->serial_number, 2452 SCpnt->device->lun,
2457 spp->target_status, SCpnt->sense_buffer[2]); 2453 spp->target_status, SCpnt->sense_buffer[2]);
2458 2454
2459 ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0; 2455 ha->target_to[SCpnt->device->id][SCpnt->device->channel] = 0;
@@ -2522,9 +2518,9 @@ static irqreturn_t ihdlr(struct Scsi_Host *shost)
2522 do_trace || msg_byte(spp->target_status)) 2518 do_trace || msg_byte(spp->target_status))
2523#endif 2519#endif
2524 scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x," 2520 scmd_printk(KERN_INFO, SCpnt, "ihdlr, mbox %2d, err 0x%x:%x,"
2525 " pid %ld, reg 0x%x, count %d.\n", 2521 " reg 0x%x, count %d.\n",
2526 i, spp->adapter_status, spp->target_status, 2522 i, spp->adapter_status, spp->target_status,
2527 SCpnt->serial_number, reg, ha->iocount); 2523 reg, ha->iocount);
2528 2524
2529 unmap_dma(i, ha); 2525 unmap_dma(i, ha);
2530 2526