diff options
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index c9c001490293..9871f8272df0 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -98,6 +98,7 @@ static const u8 def_control_mpage[CONTROL_MPAGE_LEN] = { | |||
98 | * It just needs the eh_timed_out hook. | 98 | * It just needs the eh_timed_out hook. |
99 | */ | 99 | */ |
100 | struct scsi_transport_template ata_scsi_transport_template = { | 100 | struct scsi_transport_template ata_scsi_transport_template = { |
101 | .eh_strategy_handler = ata_scsi_error, | ||
101 | .eh_timed_out = ata_scsi_timed_out, | 102 | .eh_timed_out = ata_scsi_timed_out, |
102 | }; | 103 | }; |
103 | 104 | ||
@@ -394,7 +395,7 @@ void ata_dump_status(unsigned id, struct ata_taskfile *tf) | |||
394 | 395 | ||
395 | int ata_scsi_device_resume(struct scsi_device *sdev) | 396 | int ata_scsi_device_resume(struct scsi_device *sdev) |
396 | { | 397 | { |
397 | struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; | 398 | struct ata_port *ap = ata_shost_to_port(sdev->host); |
398 | struct ata_device *dev = &ap->device[sdev->id]; | 399 | struct ata_device *dev = &ap->device[sdev->id]; |
399 | 400 | ||
400 | return ata_device_resume(ap, dev); | 401 | return ata_device_resume(ap, dev); |
@@ -402,7 +403,7 @@ int ata_scsi_device_resume(struct scsi_device *sdev) | |||
402 | 403 | ||
403 | int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) | 404 | int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) |
404 | { | 405 | { |
405 | struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; | 406 | struct ata_port *ap = ata_shost_to_port(sdev->host); |
406 | struct ata_device *dev = &ap->device[sdev->id]; | 407 | struct ata_device *dev = &ap->device[sdev->id]; |
407 | 408 | ||
408 | return ata_device_suspend(ap, dev, state); | 409 | return ata_device_suspend(ap, dev, state); |
@@ -703,7 +704,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev) | |||
703 | struct ata_port *ap; | 704 | struct ata_port *ap; |
704 | struct ata_device *dev; | 705 | struct ata_device *dev; |
705 | 706 | ||
706 | ap = (struct ata_port *) &sdev->host->hostdata[0]; | 707 | ap = ata_shost_to_port(sdev->host); |
707 | dev = &ap->device[sdev->id]; | 708 | dev = &ap->device[sdev->id]; |
708 | 709 | ||
709 | ata_scsi_dev_config(sdev, dev); | 710 | ata_scsi_dev_config(sdev, dev); |
@@ -2477,7 +2478,7 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) | |||
2477 | struct scsi_device *scsidev = cmd->device; | 2478 | struct scsi_device *scsidev = cmd->device; |
2478 | struct Scsi_Host *shost = scsidev->host; | 2479 | struct Scsi_Host *shost = scsidev->host; |
2479 | 2480 | ||
2480 | ap = (struct ata_port *) &shost->hostdata[0]; | 2481 | ap = ata_shost_to_port(shost); |
2481 | 2482 | ||
2482 | spin_unlock(shost->host_lock); | 2483 | spin_unlock(shost->host_lock); |
2483 | spin_lock(&ap->host_set->lock); | 2484 | spin_lock(&ap->host_set->lock); |