X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2FNCR5380.c;h=f8ec6fe7d85855a03457b0dabb80104f9f7d838f;hb=3db368f71a91f08c5a93a5bfb6ca1e2de2668e04;hp=5e71a0beafca9cb1e8857f53af68773510e771d1;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=linux-2.6 diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 5e71a0beaf..f8ec6fe7d8 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -86,6 +86,7 @@ * 5. Test linked command handling code after Eric is ready with * the high level code. */ +#include #if (NDEBUG & NDEBUG_LISTS) #define LIST(x,y) {printk("LINE:%d Adding %p to %p\n", __LINE__, (void*)(x), (void*)(y)); if ((x)==(y)) udelay(5); } @@ -2371,7 +2372,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { * 3..length+1 arguments * * Start the extended message buffer with the EXTENDED_MESSAGE - * byte, since print_msg() wants the whole thing. + * byte, since scsi_print_msg() wants the whole thing. */ extended_msg[0] = EXTENDED_MESSAGE; /* Accept first byte by clearing ACK */ @@ -2418,7 +2419,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { default: if (!tmp) { printk("scsi%d: rejecting message ", instance->host_no); - print_msg(extended_msg); + scsi_print_msg(extended_msg); printk("\n"); } 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); @@ -2552,7 +2553,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) { if (!(msg[0] & 0x80)) { printk(KERN_ERR "scsi%d : expecting IDENTIFY message, got ", instance->host_no); - print_msg(msg); + scsi_print_msg(msg); abort = 1; } else { /* Accept message by clearing ACK */ @@ -2677,7 +2678,7 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { Scsi_Cmnd *tmp, **prev; printk(KERN_WARNING "scsi%d : aborting command\n", instance->host_no); - print_Scsi_Cmnd(cmd); + scsi_print_command(cmd); NCR5380_print_status(instance); @@ -2824,39 +2825,17 @@ static int NCR5380_abort(Scsi_Cmnd * cmd) { * Locks: host lock taken by caller */ -static int NCR5380_bus_reset(Scsi_Cmnd * cmd) { - NCR5380_local_declare(); - NCR5380_setup(cmd->device->host); - - NCR5380_print_status(cmd->device->host); - do_reset(cmd->device->host); - return SUCCESS; -} - -/* - * Function : int NCR5380_device_reset (Scsi_Cmnd *cmd) - * - * Purpose : reset a SCSI device - * - * Returns : FAILED - * - * Locks: io_request_lock held by caller - */ +static int NCR5380_bus_reset(Scsi_Cmnd * cmd) +{ + struct Scsi_Host *instance = cmd->device->host; -static int NCR5380_device_reset(Scsi_Cmnd * cmd) { - return FAILED; -} + NCR5380_local_declare(); + NCR5380_setup(instance); + NCR5380_print_status(instance); -/* - * Function : int NCR5380_host_reset (Scsi_Cmnd *cmd) - * - * Purpose : reset a SCSI device - * - * Returns : FAILED - * - * Locks: io_request_lock held by caller - */ + spin_lock_irq(instance->host_lock); + do_reset(instance); + spin_unlock_irq(instance->host_lock); -static int NCR5380_host_reset(Scsi_Cmnd * cmd) { - return FAILED; + return SUCCESS; }