diff options
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 5574520bf1c2..eb604b0a8990 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> |
| @@ -2415,8 +2416,12 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) | |||
| 2415 | struct ata_port *ap; | 2416 | struct ata_port *ap; |
| 2416 | struct ata_device *dev; | 2417 | struct ata_device *dev; |
| 2417 | struct scsi_device *scsidev = cmd->device; | 2418 | struct scsi_device *scsidev = cmd->device; |
| 2419 | struct Scsi_Host *shost = scsidev->host; | ||
| 2418 | 2420 | ||
| 2419 | ap = (struct ata_port *) &scsidev->host->hostdata[0]; | 2421 | ap = (struct ata_port *) &shost->hostdata[0]; |
| 2422 | |||
| 2423 | spin_unlock(shost->host_lock); | ||
| 2424 | spin_lock(&ap->host_set->lock); | ||
| 2420 | 2425 | ||
| 2421 | ata_scsi_dump_cdb(ap, cmd); | 2426 | ata_scsi_dump_cdb(ap, cmd); |
| 2422 | 2427 | ||
| @@ -2439,6 +2444,8 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) | |||
| 2439 | ata_scsi_translate(ap, dev, cmd, done, atapi_xlat); | 2444 | ata_scsi_translate(ap, dev, cmd, done, atapi_xlat); |
| 2440 | 2445 | ||
| 2441 | out_unlock: | 2446 | out_unlock: |
| 2447 | spin_unlock(&ap->host_set->lock); | ||
| 2448 | spin_lock(shost->host_lock); | ||
| 2442 | return 0; | 2449 | return 0; |
| 2443 | } | 2450 | } |
| 2444 | 2451 | ||
