X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=drivers%2Fscsi%2FNCR5380.c;h=d40ba0bd68a3b776699f62ff56e9b9ba89059950;hb=9ee0c0a2ccd66b90eaeb2f197c0a7da43071af52;hp=770fa841e389e9e60981a918957a160d84f4a1b1;hpb=1409277c4aad2e87ad27b2b8a6901ce78eaf8081;p=safe%2Fjmp%2Flinux-2.6 diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 770fa84..d40ba0b 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c @@ -88,6 +88,13 @@ */ #include +#ifndef NDEBUG +#define NDEBUG 0 +#endif +#ifndef NDEBUG +#define NDEBUG_ABORT 0 +#endif + #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); } #define REMOVE(w,x,y,z) {printk("LINE:%d Removing: %p->%p %p->%p \n", __LINE__, (void*)(w), (void*)(x), (void*)(y), (void*)(z)); if ((x)==(y)) udelay(5); } @@ -359,7 +366,7 @@ static struct { {PHASE_UNKNOWN, "UNKNOWN"} }; -#ifdef NDEBUG +#if NDEBUG static struct { unsigned char mask; const char *name; @@ -2825,39 +2832,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; }