diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-31 04:32:03 (GMT) |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-31 04:32:03 (GMT) |
commit | ce1eeb95fc4eb25109c00bea3e83a87eeff6b07d (patch) | |
tree | d7a1be22432740af1b9ea4330dd95d5915fdb0c3 /drivers/scsi/libata-scsi.c | |
parent | 95dbf5c4be080e94880ead13773d1a14eec8f4de (diff) | |
parent | 005a5a06a6dd13a0ca3f2c6a0218e8d94ed36d8a (diff) | |
download | linux-fsl-qoriq-ce1eeb95fc4eb25109c00bea3e83a87eeff6b07d.tar.xz |
Merge branch 'upstream'
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 5574520..eb604b0 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -39,6 +39,7 @@ #include <scsi/scsi.h> #include "scsi.h" #include <scsi/scsi_host.h> +#include <scsi/scsi_device.h> #include <linux/libata.h> #include <linux/hdreg.h> #include <asm/uaccess.h> @@ -2415,8 +2416,12 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) struct ata_port *ap; struct ata_device *dev; struct scsi_device *scsidev = cmd->device; + struct Scsi_Host *shost = scsidev->host; - ap = (struct ata_port *) &scsidev->host->hostdata[0]; + ap = (struct ata_port *) &shost->hostdata[0]; + + spin_unlock(shost->host_lock); + spin_lock(&ap->host_set->lock); ata_scsi_dump_cdb(ap, cmd); @@ -2439,6 +2444,8 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) ata_scsi_translate(ap, dev, cmd, done, atapi_xlat); out_unlock: + spin_unlock(&ap->host_set->lock); + spin_lock(shost->host_lock); return 0; } |