aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-30 23:33:54 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-10-30 23:33:54 -0500
commitc4811b151b6584a668de8ae59eb71c4890b9ad94 (patch)
tree152e0efddcfd882123757bbe36ae18249a9a9379 /drivers/scsi/libata-scsi.c
parent024b1432716c0d8332327a506cb0f64c9a2f6083 (diff)
parent005a5a06a6dd13a0ca3f2c6a0218e8d94ed36d8a (diff)
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 961b4bc3cc73..4f8a013a12f5 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -39,6 +39,7 @@
39#include <scsi/scsi.h> 39#include <scsi/scsi.h>
40#include "scsi.h" 40#include "scsi.h"
41#include <scsi/scsi_host.h> 41#include <scsi/scsi_host.h>
42#include <scsi/scsi_device.h>
42#include <linux/libata.h> 43#include <linux/libata.h>
43#include <linux/hdreg.h> 44#include <linux/hdreg.h>
44#include <asm/uaccess.h> 45#include <asm/uaccess.h>
@@ -2399,8 +2400,12 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
2399 struct ata_port *ap; 2400 struct ata_port *ap;
2400 struct ata_device *dev; 2401 struct ata_device *dev;
2401 struct scsi_device *scsidev = cmd->device; 2402 struct scsi_device *scsidev = cmd->device;
2403 struct Scsi_Host *shost = scsidev->host;
2402 2404
2403 ap = (struct ata_port *) &scsidev->host->hostdata[0]; 2405 ap = (struct ata_port *) &shost->hostdata[0];
2406
2407 spin_unlock(shost->host_lock);
2408 spin_lock(&ap->host_set->lock);
2404 2409
2405 ata_scsi_dump_cdb(ap, cmd); 2410 ata_scsi_dump_cdb(ap, cmd);
2406 2411
@@ -2423,6 +2428,8 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
2423 ata_scsi_translate(ap, dev, cmd, done, atapi_xlat); 2428 ata_scsi_translate(ap, dev, cmd, done, atapi_xlat);
2424 2429
2425out_unlock: 2430out_unlock:
2431 spin_unlock(&ap->host_set->lock);
2432 spin_lock(shost->host_lock);
2426 return 0; 2433 return 0;
2427} 2434}
2428 2435