Loading drivers/scsi/3w-9xxx.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -1732,7 +1732,9 @@ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt) tw_dev->num_resets++; tw_dev->num_resets++; 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]); sdev_printk(KERN_WARNING, SCpnt->device, "WARNING: (0x%02X:0x%04X): Command (0x%x) timed out, resetting card.\n", TW_DRIVER, 0x2c, SCpnt->cmnd[0]); /* Now reset the card and some of the device extension data */ /* Now reset the card and some of the device extension data */ if (twa_reset_device_extension(tw_dev, 0)) { if (twa_reset_device_extension(tw_dev, 0)) { Loading drivers/scsi/3w-xxxx.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -1432,7 +1432,9 @@ static int tw_scsi_eh_reset(struct scsi_cmnd *SCpnt) tw_dev->num_resets++; tw_dev->num_resets++; 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]); sdev_printk(KERN_WARNING, SCpnt->device, "WARNING: Command (0x%x) timed out, resetting card.\n", SCpnt->cmnd[0]); /* Now reset the card and some of the device extension data */ /* Now reset the card and some of the device extension data */ if (tw_reset_device_extension(tw_dev, 0)) { if (tw_reset_device_extension(tw_dev, 0)) { Loading drivers/scsi/53c700.c +42 −41 Original line number Original line Diff line number Diff line Loading @@ -128,6 +128,7 @@ #include <linux/blkdev.h> #include <linux/blkdev.h> #include <linux/module.h> #include <linux/module.h> #include <linux/interrupt.h> #include <linux/interrupt.h> #include <linux/device.h> #include <asm/dma.h> #include <asm/dma.h> #include <asm/system.h> #include <asm/system.h> #include <asm/io.h> #include <asm/io.h> Loading Loading @@ -831,8 +832,8 @@ process_extended_message(struct Scsi_Host *host, } else { } else { /* SDTR message out of the blue, reject it */ /* SDTR message out of the blue, reject it */ printk(KERN_WARNING "scsi%d Unexpected SDTR msg\n", shost_printk(KERN_WARNING, host, host->host_no); "Unexpected SDTR msg\n"); hostdata->msgout[0] = A_REJECT_MSG; hostdata->msgout[0] = A_REJECT_MSG; dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); script_patch_16(hostdata->script, MessageCount, 1); script_patch_16(hostdata->script, MessageCount, 1); Loading Loading @@ -906,15 +907,17 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION); NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION); } else if(SCp != NULL && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION) { } else if(SCp != NULL && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION) { /* rejected our first simple tag message */ /* rejected our first simple tag message */ printk(KERN_WARNING "scsi%d (%d:%d) Rejected first tag queue attempt, turning off tag queueing\n", host->host_no, pun, lun); scmd_printk(KERN_WARNING, SCp, "Rejected first tag queue attempt, turning off tag queueing\n"); /* we're done negotiating */ /* we're done negotiating */ NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION); NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION); hostdata->tag_negotiated &= ~(1<<SCp->device->id); hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); SCp->device->tagged_supported = 0; SCp->device->tagged_supported = 0; scsi_deactivate_tcq(SCp->device, host->cmd_per_lun); scsi_deactivate_tcq(SCp->device, host->cmd_per_lun); } else { } else { printk(KERN_WARNING "scsi%d (%d:%d) Unexpected REJECT Message %s\n", shost_printk(KERN_WARNING, host, host->host_no, pun, lun, "(%d:%d) Unexpected REJECT Message %s\n", pun, lun, NCR_700_phase[(dsps & 0xf00) >> 8]); NCR_700_phase[(dsps & 0xf00) >> 8]); /* however, just ignore it */ /* however, just ignore it */ } } Loading Loading @@ -983,7 +986,8 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, if(SCp->cmnd[0] == REQUEST_SENSE) { if(SCp->cmnd[0] == REQUEST_SENSE) { /* OOPS: bad device, returning another /* OOPS: bad device, returning another * contingent allegiance condition */ * contingent allegiance condition */ printk(KERN_ERR "scsi%d (%d:%d) broken device is looping in contingent allegiance: ignoring\n", host->host_no, pun, lun); scmd_printk(KERN_ERR, SCp, "broken device is looping in contingent allegiance: ignoring\n"); NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); } else { } else { #ifdef NCR_DEBUG #ifdef NCR_DEBUG Loading Loading @@ -1047,12 +1051,13 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, // SCp->request_bufflen, // SCp->request_bufflen, // DMA_FROM_DEVICE); // DMA_FROM_DEVICE); // if(((char *)SCp->request_buffer)[7] & 0x02) { // if(((char *)SCp->request_buffer)[7] & 0x02) { // printk(KERN_INFO "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", host->host_no, pun, lun); // scmd_printk(KERN_INFO, SCp, // hostdata->tag_negotiated |= (1<<SCp->device->id); // "Enabling Tag Command Queuing\n"); // hostdata->tag_negotiated |= (1<<scmd_id(SCp)); // NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); // NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); // } else { // } else { // NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); // NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); // hostdata->tag_negotiated &= ~(1<<SCp->device->id); // hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); // } // } //} //} NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); Loading @@ -1060,11 +1065,11 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, } else if((dsps & 0xfffff0f0) == A_UNEXPECTED_PHASE) { } else if((dsps & 0xfffff0f0) == A_UNEXPECTED_PHASE) { __u8 i = (dsps & 0xf00) >> 8; __u8 i = (dsps & 0xf00) >> 8; printk(KERN_ERR "scsi%d: (%d:%d), UNEXPECTED PHASE %s (%s)\n", scmd_printk(KERN_ERR, SCp, "UNEXPECTED PHASE %s (%s)\n", host->host_no, pun, lun, NCR_700_phase[i], NCR_700_phase[i], sbcl_to_string(NCR_700_readb(host, SBCL_REG))); sbcl_to_string(NCR_700_readb(host, SBCL_REG))); printk(KERN_ERR " len = %d, cmd =", SCp->cmd_len); scmd_printk(KERN_ERR, SCp, " len = %d, cmd =", SCp->cmd_len); scsi_print_command(SCp); scsi_print_command(SCp); NCR_700_internal_bus_reset(host); NCR_700_internal_bus_reset(host); Loading Loading @@ -1115,14 +1120,14 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, } } slot = (struct NCR_700_command_slot *)SCp->host_scribble; slot = (struct NCR_700_command_slot *)SCp->host_scribble; DEBUG(("53c700: %d:%d:%d, reselection is tag %d, slot %p(%d)\n", DDEBUG(KERN_DEBUG, SDp, host->host_no, SDp->id, SDp->lun, "reselection is tag %d, slot %p(%d)\n", hostdata->msgin[2], slot, slot->tag)); hostdata->msgin[2], slot, slot->tag); } else { } else { struct scsi_cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG); struct scsi_cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG); if(unlikely(SCp == NULL)) { if(unlikely(SCp == NULL)) { printk(KERN_ERR "scsi%d: (%d:%d) no saved request for untagged cmd\n", sdev_printk(KERN_ERR, SDp, host->host_no, reselection_id, lun); "no saved request for untagged cmd\n"); BUG(); BUG(); } } slot = (struct NCR_700_command_slot *)SCp->host_scribble; slot = (struct NCR_700_command_slot *)SCp->host_scribble; Loading Loading @@ -1764,17 +1769,15 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) * - The blk layer sent and untagged command * - The blk layer sent and untagged command */ */ if(NCR_700_get_depth(SCp->device) != 0 if(NCR_700_get_depth(SCp->device) != 0 && (!(hostdata->tag_negotiated & (1<<SCp->device->id)) && (!(hostdata->tag_negotiated & (1<<scmd_id(SCp))) || !blk_rq_tagged(SCp->request))) { || !blk_rq_tagged(SCp->request))) { DEBUG((KERN_ERR "scsi%d (%d:%d) has non zero depth %d\n", CDEBUG(KERN_ERR, SCp, "has non zero depth %d\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun, NCR_700_get_depth(SCp->device)); NCR_700_get_depth(SCp->device))); return SCSI_MLQUEUE_DEVICE_BUSY; return SCSI_MLQUEUE_DEVICE_BUSY; } } if(NCR_700_get_depth(SCp->device) >= SCp->device->queue_depth) { if(NCR_700_get_depth(SCp->device) >= SCp->device->queue_depth) { DEBUG((KERN_ERR "scsi%d (%d:%d) has max tag depth %d\n", CDEBUG(KERN_ERR, SCp, "has max tag depth %d\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun, NCR_700_get_depth(SCp->device)); NCR_700_get_depth(SCp->device))); return SCSI_MLQUEUE_DEVICE_BUSY; return SCSI_MLQUEUE_DEVICE_BUSY; } } NCR_700_set_depth(SCp->device, NCR_700_get_depth(SCp->device) + 1); NCR_700_set_depth(SCp->device, NCR_700_get_depth(SCp->device) + 1); Loading @@ -1796,10 +1799,10 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) scsi_print_command(SCp); scsi_print_command(SCp); #endif #endif if(blk_rq_tagged(SCp->request) if(blk_rq_tagged(SCp->request) && (hostdata->tag_negotiated &(1<<SCp->device->id)) == 0 && (hostdata->tag_negotiated &(1<<scmd_id(SCp))) == 0 && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) { && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) { printk(KERN_ERR "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun); scmd_printk(KERN_ERR, SCp, "Enabling Tag Command Queuing\n"); hostdata->tag_negotiated |= (1<<SCp->device->id); hostdata->tag_negotiated |= (1<<scmd_id(SCp)); NCR_700_set_tag_neg_state(SCp->device, NCR_700_DURING_TAG_NEGOTIATION); NCR_700_set_tag_neg_state(SCp->device, NCR_700_DURING_TAG_NEGOTIATION); } } Loading @@ -1810,17 +1813,16 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) * FIXME: This will royally screw up on multiple LUN devices * FIXME: This will royally screw up on multiple LUN devices * */ * */ if(!blk_rq_tagged(SCp->request) if(!blk_rq_tagged(SCp->request) && (hostdata->tag_negotiated &(1<<SCp->device->id))) { && (hostdata->tag_negotiated &(1<<scmd_id(SCp)))) { printk(KERN_INFO "scsi%d: (%d:%d) Disabling Tag Command Queuing\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun); scmd_printk(KERN_INFO, SCp, "Disabling Tag Command Queuing\n"); hostdata->tag_negotiated &= ~(1<<SCp->device->id); hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); } } if((hostdata->tag_negotiated &(1<<SCp->device->id)) if((hostdata->tag_negotiated &(1<<scmd_id(SCp))) && scsi_get_tag_type(SCp->device)) { && scsi_get_tag_type(SCp->device)) { slot->tag = SCp->request->tag; slot->tag = SCp->request->tag; DEBUG(("53c700 %d:%d:%d, sending out tag %d, slot %p\n", CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun, slot->tag, slot->tag, slot); slot)); } else { } else { slot->tag = SCSI_NO_TAG; slot->tag = SCSI_NO_TAG; /* must populate current_cmnd for scsi_find_tag to work */ /* must populate current_cmnd for scsi_find_tag to work */ Loading Loading @@ -1920,8 +1922,8 @@ NCR_700_abort(struct scsi_cmnd * SCp) { { struct NCR_700_command_slot *slot; struct NCR_700_command_slot *slot; printk(KERN_INFO "scsi%d (%d:%d) New error handler wants to abort command\n\t", scmd_printk(KERN_INFO, SCp, SCp->device->host->host_no, SCp->device->id, SCp->device->lun); "New error handler wants to abort command\n\t"); scsi_print_command(SCp); scsi_print_command(SCp); slot = (struct NCR_700_command_slot *)SCp->host_scribble; slot = (struct NCR_700_command_slot *)SCp->host_scribble; Loading Loading @@ -1954,8 +1956,8 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp) struct NCR_700_Host_Parameters *hostdata = struct NCR_700_Host_Parameters *hostdata = (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; printk(KERN_INFO "scsi%d (%d:%d) New error handler wants BUS reset, cmd %p\n\t", scmd_printk(KERN_INFO, SCp, SCp->device->host->host_no, SCp->device->id, SCp->device->lun, SCp); "New error handler wants BUS reset, cmd %p\n\t", SCp); scsi_print_command(SCp); scsi_print_command(SCp); /* In theory, eh_complete should always be null because the /* In theory, eh_complete should always be null because the Loading Loading @@ -1987,8 +1989,7 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp) STATIC int STATIC int NCR_700_host_reset(struct scsi_cmnd * SCp) NCR_700_host_reset(struct scsi_cmnd * SCp) { { printk(KERN_INFO "scsi%d (%d:%d) New error handler wants HOST reset\n\t", scmd_printk(KERN_INFO, SCp, "New error handler wants HOST reset\n\t"); SCp->device->host->host_no, SCp->device->id, SCp->device->lun); scsi_print_command(SCp); scsi_print_command(SCp); spin_lock_irq(SCp->device->host->host_lock); spin_lock_irq(SCp->device->host->host_lock); Loading drivers/scsi/53c700.h +7 −1 Original line number Original line Diff line number Diff line Loading @@ -22,8 +22,14 @@ #ifdef NCR_700_DEBUG #ifdef NCR_700_DEBUG #define DEBUG(x) printk x #define DEBUG(x) printk x #define DDEBUG(prefix, sdev, fmt, a...) \ sdev_printk(prefix, sdev, fmt, ##a) #define CDEBUG(prefix, scmd, fmt, a...) \ scmd_printk(prefix, scmd, fmt, ##a) #else #else #define DEBUG(x) #define DEBUG(x) do {} while (0) #define DDEBUG(prefix, scmd, fmt, a...) do {} while (0) #define CDEBUG(prefix, scmd, fmt, a...) do {} while (0) #endif #endif /* The number of available command slots */ /* The number of available command slots */ Loading drivers/scsi/NCR5380.c +6 −3 Original line number Original line Diff line number Diff line Loading @@ -2190,7 +2190,8 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { * If the watchdog timer fires, all future accesses to this * If the watchdog timer fires, all future accesses to this * device will use the polled-IO. * device will use the polled-IO. */ */ printk("scsi%d : switching target %d lun %d to slow handshake\n", instance->host_no, cmd->device->id, cmd->device->lun); scmd_printk(KERN_INFO, cmd, "switching to slow handshake\n"); cmd->device->borken = 1; cmd->device->borken = 1; NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); sink = 1; sink = 1; Loading Loading @@ -2429,9 +2430,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { scsi_print_msg(extended_msg); scsi_print_msg(extended_msg); printk("\n"); printk("\n"); } else if (tmp != EXTENDED_MESSAGE) } else if (tmp != EXTENDED_MESSAGE) printk("scsi%d: rejecting unknown message %02x from target %d, lun %d\n", instance->host_no, tmp, cmd->device->id, cmd->device->lun); scmd_printk(KERN_INFO, cmd, "rejecting unknown message %02x\n",tmp); else else 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); scmd_printk(KERN_INFO, cmd, "rejecting unknown extended message code %02x, length %d\n", extended_msg[1], extended_msg[0]); msgout = MESSAGE_REJECT; msgout = MESSAGE_REJECT; NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); Loading Loading
drivers/scsi/3w-9xxx.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -1732,7 +1732,9 @@ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt) tw_dev->num_resets++; tw_dev->num_resets++; 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]); sdev_printk(KERN_WARNING, SCpnt->device, "WARNING: (0x%02X:0x%04X): Command (0x%x) timed out, resetting card.\n", TW_DRIVER, 0x2c, SCpnt->cmnd[0]); /* Now reset the card and some of the device extension data */ /* Now reset the card and some of the device extension data */ if (twa_reset_device_extension(tw_dev, 0)) { if (twa_reset_device_extension(tw_dev, 0)) { Loading
drivers/scsi/3w-xxxx.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -1432,7 +1432,9 @@ static int tw_scsi_eh_reset(struct scsi_cmnd *SCpnt) tw_dev->num_resets++; tw_dev->num_resets++; 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]); sdev_printk(KERN_WARNING, SCpnt->device, "WARNING: Command (0x%x) timed out, resetting card.\n", SCpnt->cmnd[0]); /* Now reset the card and some of the device extension data */ /* Now reset the card and some of the device extension data */ if (tw_reset_device_extension(tw_dev, 0)) { if (tw_reset_device_extension(tw_dev, 0)) { Loading
drivers/scsi/53c700.c +42 −41 Original line number Original line Diff line number Diff line Loading @@ -128,6 +128,7 @@ #include <linux/blkdev.h> #include <linux/blkdev.h> #include <linux/module.h> #include <linux/module.h> #include <linux/interrupt.h> #include <linux/interrupt.h> #include <linux/device.h> #include <asm/dma.h> #include <asm/dma.h> #include <asm/system.h> #include <asm/system.h> #include <asm/io.h> #include <asm/io.h> Loading Loading @@ -831,8 +832,8 @@ process_extended_message(struct Scsi_Host *host, } else { } else { /* SDTR message out of the blue, reject it */ /* SDTR message out of the blue, reject it */ printk(KERN_WARNING "scsi%d Unexpected SDTR msg\n", shost_printk(KERN_WARNING, host, host->host_no); "Unexpected SDTR msg\n"); hostdata->msgout[0] = A_REJECT_MSG; hostdata->msgout[0] = A_REJECT_MSG; dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); dma_cache_sync(hostdata->msgout, 1, DMA_TO_DEVICE); script_patch_16(hostdata->script, MessageCount, 1); script_patch_16(hostdata->script, MessageCount, 1); Loading Loading @@ -906,15 +907,17 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION); NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_SYNC_NEGOTIATION); } else if(SCp != NULL && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION) { } else if(SCp != NULL && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_DURING_TAG_NEGOTIATION) { /* rejected our first simple tag message */ /* rejected our first simple tag message */ printk(KERN_WARNING "scsi%d (%d:%d) Rejected first tag queue attempt, turning off tag queueing\n", host->host_no, pun, lun); scmd_printk(KERN_WARNING, SCp, "Rejected first tag queue attempt, turning off tag queueing\n"); /* we're done negotiating */ /* we're done negotiating */ NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION); NCR_700_set_tag_neg_state(SCp->device, NCR_700_FINISHED_TAG_NEGOTIATION); hostdata->tag_negotiated &= ~(1<<SCp->device->id); hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); SCp->device->tagged_supported = 0; SCp->device->tagged_supported = 0; scsi_deactivate_tcq(SCp->device, host->cmd_per_lun); scsi_deactivate_tcq(SCp->device, host->cmd_per_lun); } else { } else { printk(KERN_WARNING "scsi%d (%d:%d) Unexpected REJECT Message %s\n", shost_printk(KERN_WARNING, host, host->host_no, pun, lun, "(%d:%d) Unexpected REJECT Message %s\n", pun, lun, NCR_700_phase[(dsps & 0xf00) >> 8]); NCR_700_phase[(dsps & 0xf00) >> 8]); /* however, just ignore it */ /* however, just ignore it */ } } Loading Loading @@ -983,7 +986,8 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, if(SCp->cmnd[0] == REQUEST_SENSE) { if(SCp->cmnd[0] == REQUEST_SENSE) { /* OOPS: bad device, returning another /* OOPS: bad device, returning another * contingent allegiance condition */ * contingent allegiance condition */ printk(KERN_ERR "scsi%d (%d:%d) broken device is looping in contingent allegiance: ignoring\n", host->host_no, pun, lun); scmd_printk(KERN_ERR, SCp, "broken device is looping in contingent allegiance: ignoring\n"); NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); } else { } else { #ifdef NCR_DEBUG #ifdef NCR_DEBUG Loading Loading @@ -1047,12 +1051,13 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, // SCp->request_bufflen, // SCp->request_bufflen, // DMA_FROM_DEVICE); // DMA_FROM_DEVICE); // if(((char *)SCp->request_buffer)[7] & 0x02) { // if(((char *)SCp->request_buffer)[7] & 0x02) { // printk(KERN_INFO "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", host->host_no, pun, lun); // scmd_printk(KERN_INFO, SCp, // hostdata->tag_negotiated |= (1<<SCp->device->id); // "Enabling Tag Command Queuing\n"); // hostdata->tag_negotiated |= (1<<scmd_id(SCp)); // NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); // NCR_700_set_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); // } else { // } else { // NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); // NCR_700_clear_flag(SCp->device, NCR_700_DEV_BEGIN_TAG_QUEUEING); // hostdata->tag_negotiated &= ~(1<<SCp->device->id); // hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); // } // } //} //} NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); NCR_700_scsi_done(hostdata, SCp, hostdata->status[0]); Loading @@ -1060,11 +1065,11 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, } else if((dsps & 0xfffff0f0) == A_UNEXPECTED_PHASE) { } else if((dsps & 0xfffff0f0) == A_UNEXPECTED_PHASE) { __u8 i = (dsps & 0xf00) >> 8; __u8 i = (dsps & 0xf00) >> 8; printk(KERN_ERR "scsi%d: (%d:%d), UNEXPECTED PHASE %s (%s)\n", scmd_printk(KERN_ERR, SCp, "UNEXPECTED PHASE %s (%s)\n", host->host_no, pun, lun, NCR_700_phase[i], NCR_700_phase[i], sbcl_to_string(NCR_700_readb(host, SBCL_REG))); sbcl_to_string(NCR_700_readb(host, SBCL_REG))); printk(KERN_ERR " len = %d, cmd =", SCp->cmd_len); scmd_printk(KERN_ERR, SCp, " len = %d, cmd =", SCp->cmd_len); scsi_print_command(SCp); scsi_print_command(SCp); NCR_700_internal_bus_reset(host); NCR_700_internal_bus_reset(host); Loading Loading @@ -1115,14 +1120,14 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp, } } slot = (struct NCR_700_command_slot *)SCp->host_scribble; slot = (struct NCR_700_command_slot *)SCp->host_scribble; DEBUG(("53c700: %d:%d:%d, reselection is tag %d, slot %p(%d)\n", DDEBUG(KERN_DEBUG, SDp, host->host_no, SDp->id, SDp->lun, "reselection is tag %d, slot %p(%d)\n", hostdata->msgin[2], slot, slot->tag)); hostdata->msgin[2], slot, slot->tag); } else { } else { struct scsi_cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG); struct scsi_cmnd *SCp = scsi_find_tag(SDp, SCSI_NO_TAG); if(unlikely(SCp == NULL)) { if(unlikely(SCp == NULL)) { printk(KERN_ERR "scsi%d: (%d:%d) no saved request for untagged cmd\n", sdev_printk(KERN_ERR, SDp, host->host_no, reselection_id, lun); "no saved request for untagged cmd\n"); BUG(); BUG(); } } slot = (struct NCR_700_command_slot *)SCp->host_scribble; slot = (struct NCR_700_command_slot *)SCp->host_scribble; Loading Loading @@ -1764,17 +1769,15 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) * - The blk layer sent and untagged command * - The blk layer sent and untagged command */ */ if(NCR_700_get_depth(SCp->device) != 0 if(NCR_700_get_depth(SCp->device) != 0 && (!(hostdata->tag_negotiated & (1<<SCp->device->id)) && (!(hostdata->tag_negotiated & (1<<scmd_id(SCp))) || !blk_rq_tagged(SCp->request))) { || !blk_rq_tagged(SCp->request))) { DEBUG((KERN_ERR "scsi%d (%d:%d) has non zero depth %d\n", CDEBUG(KERN_ERR, SCp, "has non zero depth %d\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun, NCR_700_get_depth(SCp->device)); NCR_700_get_depth(SCp->device))); return SCSI_MLQUEUE_DEVICE_BUSY; return SCSI_MLQUEUE_DEVICE_BUSY; } } if(NCR_700_get_depth(SCp->device) >= SCp->device->queue_depth) { if(NCR_700_get_depth(SCp->device) >= SCp->device->queue_depth) { DEBUG((KERN_ERR "scsi%d (%d:%d) has max tag depth %d\n", CDEBUG(KERN_ERR, SCp, "has max tag depth %d\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun, NCR_700_get_depth(SCp->device)); NCR_700_get_depth(SCp->device))); return SCSI_MLQUEUE_DEVICE_BUSY; return SCSI_MLQUEUE_DEVICE_BUSY; } } NCR_700_set_depth(SCp->device, NCR_700_get_depth(SCp->device) + 1); NCR_700_set_depth(SCp->device, NCR_700_get_depth(SCp->device) + 1); Loading @@ -1796,10 +1799,10 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) scsi_print_command(SCp); scsi_print_command(SCp); #endif #endif if(blk_rq_tagged(SCp->request) if(blk_rq_tagged(SCp->request) && (hostdata->tag_negotiated &(1<<SCp->device->id)) == 0 && (hostdata->tag_negotiated &(1<<scmd_id(SCp))) == 0 && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) { && NCR_700_get_tag_neg_state(SCp->device) == NCR_700_START_TAG_NEGOTIATION) { printk(KERN_ERR "scsi%d: (%d:%d) Enabling Tag Command Queuing\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun); scmd_printk(KERN_ERR, SCp, "Enabling Tag Command Queuing\n"); hostdata->tag_negotiated |= (1<<SCp->device->id); hostdata->tag_negotiated |= (1<<scmd_id(SCp)); NCR_700_set_tag_neg_state(SCp->device, NCR_700_DURING_TAG_NEGOTIATION); NCR_700_set_tag_neg_state(SCp->device, NCR_700_DURING_TAG_NEGOTIATION); } } Loading @@ -1810,17 +1813,16 @@ NCR_700_queuecommand(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)) * FIXME: This will royally screw up on multiple LUN devices * FIXME: This will royally screw up on multiple LUN devices * */ * */ if(!blk_rq_tagged(SCp->request) if(!blk_rq_tagged(SCp->request) && (hostdata->tag_negotiated &(1<<SCp->device->id))) { && (hostdata->tag_negotiated &(1<<scmd_id(SCp)))) { printk(KERN_INFO "scsi%d: (%d:%d) Disabling Tag Command Queuing\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun); scmd_printk(KERN_INFO, SCp, "Disabling Tag Command Queuing\n"); hostdata->tag_negotiated &= ~(1<<SCp->device->id); hostdata->tag_negotiated &= ~(1<<scmd_id(SCp)); } } if((hostdata->tag_negotiated &(1<<SCp->device->id)) if((hostdata->tag_negotiated &(1<<scmd_id(SCp))) && scsi_get_tag_type(SCp->device)) { && scsi_get_tag_type(SCp->device)) { slot->tag = SCp->request->tag; slot->tag = SCp->request->tag; DEBUG(("53c700 %d:%d:%d, sending out tag %d, slot %p\n", CDEBUG(KERN_DEBUG, SCp, "sending out tag %d, slot %p\n", SCp->device->host->host_no, SCp->device->id, SCp->device->lun, slot->tag, slot->tag, slot); slot)); } else { } else { slot->tag = SCSI_NO_TAG; slot->tag = SCSI_NO_TAG; /* must populate current_cmnd for scsi_find_tag to work */ /* must populate current_cmnd for scsi_find_tag to work */ Loading Loading @@ -1920,8 +1922,8 @@ NCR_700_abort(struct scsi_cmnd * SCp) { { struct NCR_700_command_slot *slot; struct NCR_700_command_slot *slot; printk(KERN_INFO "scsi%d (%d:%d) New error handler wants to abort command\n\t", scmd_printk(KERN_INFO, SCp, SCp->device->host->host_no, SCp->device->id, SCp->device->lun); "New error handler wants to abort command\n\t"); scsi_print_command(SCp); scsi_print_command(SCp); slot = (struct NCR_700_command_slot *)SCp->host_scribble; slot = (struct NCR_700_command_slot *)SCp->host_scribble; Loading Loading @@ -1954,8 +1956,8 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp) struct NCR_700_Host_Parameters *hostdata = struct NCR_700_Host_Parameters *hostdata = (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; printk(KERN_INFO "scsi%d (%d:%d) New error handler wants BUS reset, cmd %p\n\t", scmd_printk(KERN_INFO, SCp, SCp->device->host->host_no, SCp->device->id, SCp->device->lun, SCp); "New error handler wants BUS reset, cmd %p\n\t", SCp); scsi_print_command(SCp); scsi_print_command(SCp); /* In theory, eh_complete should always be null because the /* In theory, eh_complete should always be null because the Loading Loading @@ -1987,8 +1989,7 @@ NCR_700_bus_reset(struct scsi_cmnd * SCp) STATIC int STATIC int NCR_700_host_reset(struct scsi_cmnd * SCp) NCR_700_host_reset(struct scsi_cmnd * SCp) { { printk(KERN_INFO "scsi%d (%d:%d) New error handler wants HOST reset\n\t", scmd_printk(KERN_INFO, SCp, "New error handler wants HOST reset\n\t"); SCp->device->host->host_no, SCp->device->id, SCp->device->lun); scsi_print_command(SCp); scsi_print_command(SCp); spin_lock_irq(SCp->device->host->host_lock); spin_lock_irq(SCp->device->host->host_lock); Loading
drivers/scsi/53c700.h +7 −1 Original line number Original line Diff line number Diff line Loading @@ -22,8 +22,14 @@ #ifdef NCR_700_DEBUG #ifdef NCR_700_DEBUG #define DEBUG(x) printk x #define DEBUG(x) printk x #define DDEBUG(prefix, sdev, fmt, a...) \ sdev_printk(prefix, sdev, fmt, ##a) #define CDEBUG(prefix, scmd, fmt, a...) \ scmd_printk(prefix, scmd, fmt, ##a) #else #else #define DEBUG(x) #define DEBUG(x) do {} while (0) #define DDEBUG(prefix, scmd, fmt, a...) do {} while (0) #define CDEBUG(prefix, scmd, fmt, a...) do {} while (0) #endif #endif /* The number of available command slots */ /* The number of available command slots */ Loading
drivers/scsi/NCR5380.c +6 −3 Original line number Original line Diff line number Diff line Loading @@ -2190,7 +2190,8 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { * If the watchdog timer fires, all future accesses to this * If the watchdog timer fires, all future accesses to this * device will use the polled-IO. * device will use the polled-IO. */ */ printk("scsi%d : switching target %d lun %d to slow handshake\n", instance->host_no, cmd->device->id, cmd->device->lun); scmd_printk(KERN_INFO, cmd, "switching to slow handshake\n"); cmd->device->borken = 1; cmd->device->borken = 1; NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); sink = 1; sink = 1; Loading Loading @@ -2429,9 +2430,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { scsi_print_msg(extended_msg); scsi_print_msg(extended_msg); printk("\n"); printk("\n"); } else if (tmp != EXTENDED_MESSAGE) } else if (tmp != EXTENDED_MESSAGE) printk("scsi%d: rejecting unknown message %02x from target %d, lun %d\n", instance->host_no, tmp, cmd->device->id, cmd->device->lun); scmd_printk(KERN_INFO, cmd, "rejecting unknown message %02x\n",tmp); else else 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); scmd_printk(KERN_INFO, cmd, "rejecting unknown extended message code %02x, length %d\n", extended_msg[1], extended_msg[0]); msgout = MESSAGE_REJECT; msgout = MESSAGE_REJECT; NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_ATN); Loading