diff options
Diffstat (limited to 'drivers/scsi/wd33c93.c')
-rw-r--r-- | drivers/scsi/wd33c93.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index b701bf2cc187..c0ee4ea28a19 100644 --- a/drivers/scsi/wd33c93.c +++ b/drivers/scsi/wd33c93.c | |||
@@ -371,8 +371,8 @@ calc_sync_msg(unsigned int period, unsigned int offset, unsigned int fast, | |||
371 | msg[1] = offset; | 371 | msg[1] = offset; |
372 | } | 372 | } |
373 | 373 | ||
374 | int | 374 | static int |
375 | wd33c93_queuecommand(struct scsi_cmnd *cmd, | 375 | wd33c93_queuecommand_lck(struct scsi_cmnd *cmd, |
376 | void (*done)(struct scsi_cmnd *)) | 376 | void (*done)(struct scsi_cmnd *)) |
377 | { | 377 | { |
378 | struct WD33C93_hostdata *hostdata; | 378 | struct WD33C93_hostdata *hostdata; |
@@ -381,7 +381,7 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd, | |||
381 | hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata; | 381 | hostdata = (struct WD33C93_hostdata *) cmd->device->host->hostdata; |
382 | 382 | ||
383 | DB(DB_QUEUE_COMMAND, | 383 | DB(DB_QUEUE_COMMAND, |
384 | printk("Q-%d-%02x-%ld( ", cmd->device->id, cmd->cmnd[0], cmd->serial_number)) | 384 | printk("Q-%d-%02x( ", cmd->device->id, cmd->cmnd[0])) |
385 | 385 | ||
386 | /* Set up a few fields in the scsi_cmnd structure for our own use: | 386 | /* Set up a few fields in the scsi_cmnd structure for our own use: |
387 | * - host_scribble is the pointer to the next cmd in the input queue | 387 | * - host_scribble is the pointer to the next cmd in the input queue |
@@ -462,12 +462,14 @@ wd33c93_queuecommand(struct scsi_cmnd *cmd, | |||
462 | 462 | ||
463 | wd33c93_execute(cmd->device->host); | 463 | wd33c93_execute(cmd->device->host); |
464 | 464 | ||
465 | DB(DB_QUEUE_COMMAND, printk(")Q-%ld ", cmd->serial_number)) | 465 | DB(DB_QUEUE_COMMAND, printk(")Q ")) |
466 | 466 | ||
467 | spin_unlock_irq(&hostdata->lock); | 467 | spin_unlock_irq(&hostdata->lock); |
468 | return 0; | 468 | return 0; |
469 | } | 469 | } |
470 | 470 | ||
471 | DEF_SCSI_QCMD(wd33c93_queuecommand) | ||
472 | |||
471 | /* | 473 | /* |
472 | * This routine attempts to start a scsi command. If the host_card is | 474 | * This routine attempts to start a scsi command. If the host_card is |
473 | * already connected, we give up immediately. Otherwise, look through | 475 | * already connected, we give up immediately. Otherwise, look through |
@@ -685,7 +687,7 @@ wd33c93_execute(struct Scsi_Host *instance) | |||
685 | */ | 687 | */ |
686 | 688 | ||
687 | DB(DB_EXECUTE, | 689 | DB(DB_EXECUTE, |
688 | printk("%s%ld)EX-2 ", (cmd->SCp.phase) ? "d:" : "", cmd->serial_number)) | 690 | printk("%s)EX-2 ", (cmd->SCp.phase) ? "d:" : "")) |
689 | } | 691 | } |
690 | 692 | ||
691 | static void | 693 | static void |
@@ -961,7 +963,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
961 | case CSR_XFER_DONE | PHS_COMMAND: | 963 | case CSR_XFER_DONE | PHS_COMMAND: |
962 | case CSR_UNEXP | PHS_COMMAND: | 964 | case CSR_UNEXP | PHS_COMMAND: |
963 | case CSR_SRV_REQ | PHS_COMMAND: | 965 | case CSR_SRV_REQ | PHS_COMMAND: |
964 | DB(DB_INTR, printk("CMND-%02x,%ld", cmd->cmnd[0], cmd->serial_number)) | 966 | DB(DB_INTR, printk("CMND-%02x", cmd->cmnd[0])) |
965 | transfer_pio(regs, cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, | 967 | transfer_pio(regs, cmd->cmnd, cmd->cmd_len, DATA_OUT_DIR, |
966 | hostdata); | 968 | hostdata); |
967 | hostdata->state = S_CONNECTED; | 969 | hostdata->state = S_CONNECTED; |
@@ -1005,7 +1007,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
1005 | switch (msg) { | 1007 | switch (msg) { |
1006 | 1008 | ||
1007 | case COMMAND_COMPLETE: | 1009 | case COMMAND_COMPLETE: |
1008 | DB(DB_INTR, printk("CCMP-%ld", cmd->serial_number)) | 1010 | DB(DB_INTR, printk("CCMP")) |
1009 | write_wd33c93_cmd(regs, WD_CMD_NEGATE_ACK); | 1011 | write_wd33c93_cmd(regs, WD_CMD_NEGATE_ACK); |
1010 | hostdata->state = S_PRE_CMP_DISC; | 1012 | hostdata->state = S_PRE_CMP_DISC; |
1011 | break; | 1013 | break; |
@@ -1172,7 +1174,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
1172 | 1174 | ||
1173 | write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER); | 1175 | write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER); |
1174 | if (phs == 0x60) { | 1176 | if (phs == 0x60) { |
1175 | DB(DB_INTR, printk("SX-DONE-%ld", cmd->serial_number)) | 1177 | DB(DB_INTR, printk("SX-DONE")) |
1176 | cmd->SCp.Message = COMMAND_COMPLETE; | 1178 | cmd->SCp.Message = COMMAND_COMPLETE; |
1177 | lun = read_wd33c93(regs, WD_TARGET_LUN); | 1179 | lun = read_wd33c93(regs, WD_TARGET_LUN); |
1178 | DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun)) | 1180 | DB(DB_INTR, printk(":%d.%d", cmd->SCp.Status, lun)) |
@@ -1198,8 +1200,8 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
1198 | wd33c93_execute(instance); | 1200 | wd33c93_execute(instance); |
1199 | } else { | 1201 | } else { |
1200 | printk | 1202 | printk |
1201 | ("%02x:%02x:%02x-%ld: Unknown SEL_XFER_DONE phase!!---", | 1203 | ("%02x:%02x:%02x: Unknown SEL_XFER_DONE phase!!---", |
1202 | asr, sr, phs, cmd->serial_number); | 1204 | asr, sr, phs); |
1203 | spin_unlock_irqrestore(&hostdata->lock, flags); | 1205 | spin_unlock_irqrestore(&hostdata->lock, flags); |
1204 | } | 1206 | } |
1205 | break; | 1207 | break; |
@@ -1264,7 +1266,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
1264 | spin_unlock_irqrestore(&hostdata->lock, flags); | 1266 | spin_unlock_irqrestore(&hostdata->lock, flags); |
1265 | return; | 1267 | return; |
1266 | } | 1268 | } |
1267 | DB(DB_INTR, printk("UNEXP_DISC-%ld", cmd->serial_number)) | 1269 | DB(DB_INTR, printk("UNEXP_DISC")) |
1268 | hostdata->connected = NULL; | 1270 | hostdata->connected = NULL; |
1269 | hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); | 1271 | hostdata->busy[cmd->device->id] &= ~(1 << cmd->device->lun); |
1270 | hostdata->state = S_UNCONNECTED; | 1272 | hostdata->state = S_UNCONNECTED; |
@@ -1290,7 +1292,7 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
1290 | */ | 1292 | */ |
1291 | 1293 | ||
1292 | write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER); | 1294 | write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER); |
1293 | DB(DB_INTR, printk("DISC-%ld", cmd->serial_number)) | 1295 | DB(DB_INTR, printk("DISC")) |
1294 | if (cmd == NULL) { | 1296 | if (cmd == NULL) { |
1295 | printk(" - Already disconnected! "); | 1297 | printk(" - Already disconnected! "); |
1296 | hostdata->state = S_UNCONNECTED; | 1298 | hostdata->state = S_UNCONNECTED; |
@@ -1489,7 +1491,6 @@ wd33c93_intr(struct Scsi_Host *instance) | |||
1489 | } else | 1491 | } else |
1490 | hostdata->state = S_CONNECTED; | 1492 | hostdata->state = S_CONNECTED; |
1491 | 1493 | ||
1492 | DB(DB_INTR, printk("-%ld", cmd->serial_number)) | ||
1493 | spin_unlock_irqrestore(&hostdata->lock, flags); | 1494 | spin_unlock_irqrestore(&hostdata->lock, flags); |
1494 | break; | 1495 | break; |
1495 | 1496 | ||
@@ -1635,8 +1636,8 @@ wd33c93_abort(struct scsi_cmnd * cmd) | |||
1635 | cmd->host_scribble = NULL; | 1636 | cmd->host_scribble = NULL; |
1636 | cmd->result = DID_ABORT << 16; | 1637 | cmd->result = DID_ABORT << 16; |
1637 | printk | 1638 | printk |
1638 | ("scsi%d: Abort - removing command %ld from input_Q. ", | 1639 | ("scsi%d: Abort - removing command from input_Q. ", |
1639 | instance->host_no, cmd->serial_number); | 1640 | instance->host_no); |
1640 | enable_irq(cmd->device->host->irq); | 1641 | enable_irq(cmd->device->host->irq); |
1641 | cmd->scsi_done(cmd); | 1642 | cmd->scsi_done(cmd); |
1642 | return SUCCESS; | 1643 | return SUCCESS; |
@@ -1660,8 +1661,8 @@ wd33c93_abort(struct scsi_cmnd * cmd) | |||
1660 | uchar sr, asr; | 1661 | uchar sr, asr; |
1661 | unsigned long timeout; | 1662 | unsigned long timeout; |
1662 | 1663 | ||
1663 | printk("scsi%d: Aborting connected command %ld - ", | 1664 | printk("scsi%d: Aborting connected command - ", |
1664 | instance->host_no, cmd->serial_number); | 1665 | instance->host_no); |
1665 | 1666 | ||
1666 | printk("stopping DMA - "); | 1667 | printk("stopping DMA - "); |
1667 | if (hostdata->dma == D_DMA_RUNNING) { | 1668 | if (hostdata->dma == D_DMA_RUNNING) { |
@@ -1727,8 +1728,8 @@ wd33c93_abort(struct scsi_cmnd * cmd) | |||
1727 | while (tmp) { | 1728 | while (tmp) { |
1728 | if (tmp == cmd) { | 1729 | if (tmp == cmd) { |
1729 | printk | 1730 | printk |
1730 | ("scsi%d: Abort - command %ld found on disconnected_Q - ", | 1731 | ("scsi%d: Abort - command found on disconnected_Q - ", |
1731 | instance->host_no, cmd->serial_number); | 1732 | instance->host_no); |
1732 | printk("Abort SNOOZE. "); | 1733 | printk("Abort SNOOZE. "); |
1733 | enable_irq(cmd->device->host->irq); | 1734 | enable_irq(cmd->device->host->irq); |
1734 | return FAILED; | 1735 | return FAILED; |
@@ -1841,7 +1842,7 @@ check_setup_args(char *key, int *flags, int *val, char *buf) | |||
1841 | * | 1842 | * |
1842 | * The original driver used to rely on a fixed sx_table, containing periods | 1843 | * The original driver used to rely on a fixed sx_table, containing periods |
1843 | * for (only) the lower limits of the respective input-clock-frequency ranges | 1844 | * for (only) the lower limits of the respective input-clock-frequency ranges |
1844 | * (8-10/12-15/16-20 MHz). Although it seems, that no problems ocurred with | 1845 | * (8-10/12-15/16-20 MHz). Although it seems, that no problems occurred with |
1845 | * this setting so far, it might be desirable to adjust the transfer periods | 1846 | * this setting so far, it might be desirable to adjust the transfer periods |
1846 | * closer to the really attached, possibly 25% higher, input-clock, since | 1847 | * closer to the really attached, possibly 25% higher, input-clock, since |
1847 | * - the wd33c93 may really use a significant shorter period, than it has | 1848 | * - the wd33c93 may really use a significant shorter period, than it has |
@@ -2050,8 +2051,7 @@ wd33c93_init(struct Scsi_Host *instance, const wd33c93_regs regs, | |||
2050 | for (i = 0; i < MAX_SETUP_ARGS; i++) | 2051 | for (i = 0; i < MAX_SETUP_ARGS; i++) |
2051 | printk("%s,", setup_args[i]); | 2052 | printk("%s,", setup_args[i]); |
2052 | printk("\n"); | 2053 | printk("\n"); |
2053 | printk(" Version %s - %s, Compiled %s at %s\n", | 2054 | printk(" Version %s - %s\n", WD33C93_VERSION, WD33C93_DATE); |
2054 | WD33C93_VERSION, WD33C93_DATE, __DATE__, __TIME__); | ||
2055 | } | 2055 | } |
2056 | 2056 | ||
2057 | int | 2057 | int |
@@ -2131,8 +2131,8 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off | |||
2131 | bp = buf; | 2131 | bp = buf; |
2132 | *bp = '\0'; | 2132 | *bp = '\0'; |
2133 | if (hd->proc & PR_VERSION) { | 2133 | if (hd->proc & PR_VERSION) { |
2134 | sprintf(tbuf, "\nVersion %s - %s. Compiled %s %s", | 2134 | sprintf(tbuf, "\nVersion %s - %s.", |
2135 | WD33C93_VERSION, WD33C93_DATE, __DATE__, __TIME__); | 2135 | WD33C93_VERSION, WD33C93_DATE); |
2136 | strcat(bp, tbuf); | 2136 | strcat(bp, tbuf); |
2137 | } | 2137 | } |
2138 | if (hd->proc & PR_INFO) { | 2138 | if (hd->proc & PR_INFO) { |
@@ -2178,8 +2178,8 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off | |||
2178 | strcat(bp, "\nconnected: "); | 2178 | strcat(bp, "\nconnected: "); |
2179 | if (hd->connected) { | 2179 | if (hd->connected) { |
2180 | cmd = (struct scsi_cmnd *) hd->connected; | 2180 | cmd = (struct scsi_cmnd *) hd->connected; |
2181 | sprintf(tbuf, " %ld-%d:%d(%02x)", | 2181 | sprintf(tbuf, " %d:%d(%02x)", |
2182 | cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); | 2182 | cmd->device->id, cmd->device->lun, cmd->cmnd[0]); |
2183 | strcat(bp, tbuf); | 2183 | strcat(bp, tbuf); |
2184 | } | 2184 | } |
2185 | } | 2185 | } |
@@ -2187,8 +2187,8 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off | |||
2187 | strcat(bp, "\ninput_Q: "); | 2187 | strcat(bp, "\ninput_Q: "); |
2188 | cmd = (struct scsi_cmnd *) hd->input_Q; | 2188 | cmd = (struct scsi_cmnd *) hd->input_Q; |
2189 | while (cmd) { | 2189 | while (cmd) { |
2190 | sprintf(tbuf, " %ld-%d:%d(%02x)", | 2190 | sprintf(tbuf, " %d:%d(%02x)", |
2191 | cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); | 2191 | cmd->device->id, cmd->device->lun, cmd->cmnd[0]); |
2192 | strcat(bp, tbuf); | 2192 | strcat(bp, tbuf); |
2193 | cmd = (struct scsi_cmnd *) cmd->host_scribble; | 2193 | cmd = (struct scsi_cmnd *) cmd->host_scribble; |
2194 | } | 2194 | } |
@@ -2197,8 +2197,8 @@ wd33c93_proc_info(struct Scsi_Host *instance, char *buf, char **start, off_t off | |||
2197 | strcat(bp, "\ndisconnected_Q:"); | 2197 | strcat(bp, "\ndisconnected_Q:"); |
2198 | cmd = (struct scsi_cmnd *) hd->disconnected_Q; | 2198 | cmd = (struct scsi_cmnd *) hd->disconnected_Q; |
2199 | while (cmd) { | 2199 | while (cmd) { |
2200 | sprintf(tbuf, " %ld-%d:%d(%02x)", | 2200 | sprintf(tbuf, " %d:%d(%02x)", |
2201 | cmd->serial_number, cmd->device->id, cmd->device->lun, cmd->cmnd[0]); | 2201 | cmd->device->id, cmd->device->lun, cmd->cmnd[0]); |
2202 | strcat(bp, tbuf); | 2202 | strcat(bp, tbuf); |
2203 | cmd = (struct scsi_cmnd *) cmd->host_scribble; | 2203 | cmd = (struct scsi_cmnd *) cmd->host_scribble; |
2204 | } | 2204 | } |