[PATCH] ratelimit the ieee1394 IR legacy activated messages
[powerpc.git] / drivers / scsi / BusLogic.c
index 15e4b12..9d6040b 100644 (file)
@@ -2746,9 +2746,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;
 }
 
 /*