]> err.no Git - linux-2.6/blobdiff - drivers/scsi/in2000.c
[SCSI] use sfoo_printk() in drivers
[linux-2.6] / drivers / scsi / in2000.c
index fbb29f7971d7a48c7cae12691b2fa5743fd45f4b..fe387b5ce8bd5bda53d4cff2e18f43da0dd01c9b 100644 (file)
@@ -343,7 +343,7 @@ static int in2000_queuecommand(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
        instance = cmd->device->host;
        hostdata = (struct IN2000_hostdata *) instance->hostdata;
 
-       DB(DB_QUEUE_COMMAND, printk("Q-%d-%02x-%ld(", cmd->device->id, cmd->cmnd[0], cmd->pid))
+       DB(DB_QUEUE_COMMAND, scmd_printk(KERN_DEBUG, cmd, "Q-%02x-%ld(", cmd->cmnd[0], cmd->pid))
 
 /* Set up a few fields in the Scsi_Cmnd structure for our own use:
  *  - host_scribble is the pointer to the next cmd in the input queue
@@ -1644,14 +1644,16 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd)
        struct Scsi_Host *instance;
        struct IN2000_hostdata *hostdata;
        int x;
+       unsigned long flags;
 
        instance = cmd->device->host;
        hostdata = (struct IN2000_hostdata *) instance->hostdata;
 
        printk(KERN_WARNING "scsi%d: Reset. ", instance->host_no);
 
-       /* do scsi-reset here */
+       spin_lock_irqsave(instance->host_lock, flags);
 
+       /* do scsi-reset here */
        reset_hardware(instance, RESET_CARD_AND_BUS);
        for (x = 0; x < 8; x++) {
                hostdata->busy[x] = 0;
@@ -1668,6 +1670,8 @@ static int in2000_bus_reset(Scsi_Cmnd * cmd)
        hostdata->outgoing_len = 0;
 
        cmd->result = DID_RESET << 16;
+
+       spin_unlock_irqrestore(instance->host_lock, flags);
        return SUCCESS;
 }