]> err.no Git - linux-2.6/blobdiff - drivers/scsi/BusLogic.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[linux-2.6] / drivers / scsi / BusLogic.c
index 41b5197ce4e6c01cb5de40f8482fb47f43aaa376..1c459343292bb6b910cf28322293df912bfb9323 100644 (file)
@@ -2216,6 +2216,7 @@ static int __init BusLogic_init(void)
                HostAdapter->PCI_Address = ProbeInfo->PCI_Address;
                HostAdapter->Bus = ProbeInfo->Bus;
                HostAdapter->Device = ProbeInfo->Device;
+               HostAdapter->PCI_Device = ProbeInfo->PCI_Device;
                HostAdapter->IRQ_Channel = ProbeInfo->IRQ_Channel;
                HostAdapter->AddressCount = BusLogic_HostAdapterAddressCount[HostAdapter->HostAdapterType];
                /*
@@ -2296,7 +2297,7 @@ static int __init BusLogic_init(void)
                                scsi_host_put(Host);
                        } else {
                                BusLogic_InitializeHostStructure(HostAdapter, Host);
-                               scsi_add_host(Host, NULL);
+                               scsi_add_host(Host, HostAdapter->PCI_Device ? &HostAdapter->PCI_Device->dev : NULL);
                                scsi_scan_host(Host);
                                BusLogicHostAdapterCount++;
                        }
@@ -2746,9 +2747,15 @@ static int BusLogic_host_reset(struct scsi_cmnd * SCpnt)
 
        unsigned int id = SCpnt->device->id;
        struct BusLogic_TargetStatistics *stats = &HostAdapter->TargetStatistics[id];
+       int rc;
+
+       spin_lock_irq(SCpnt->device->host->host_lock);
+
        BusLogic_IncrementErrorCounter(&stats->HostAdapterResetsRequested);
 
-       return BusLogic_ResetHostAdapter(HostAdapter, false);
+       rc = BusLogic_ResetHostAdapter(HostAdapter, false);
+       spin_unlock_irq(SCpnt->device->host->host_lock);
+       return rc;
 }
 
 /*
@@ -2957,13 +2964,6 @@ static int BusLogic_AbortCommand(struct scsi_cmnd *Command)
        int TargetID = Command->device->id;
        struct BusLogic_CCB *CCB;
        BusLogic_IncrementErrorCounter(&HostAdapter->TargetStatistics[TargetID].CommandAbortsRequested);
-       /*
-          If this Command has already completed, then no Abort is necessary.
-        */
-       if (Command->serial_number != Command->serial_number_at_timeout) {
-               BusLogic_Warning("Unable to Abort Command to Target %d - " "Already Completed\n", HostAdapter, TargetID);
-               return SUCCESS;
-       }
        /*
           Attempt to find an Active CCB for this Command.  If no Active CCB for this
           Command is found, then no Abort is necessary.