diff options
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r-- | drivers/scsi/libata-core.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index bd147207f25d..b046ffa22101 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -864,6 +864,9 @@ static unsigned int ata_id_xfermask(const u16 *id) | |||
864 | /** | 864 | /** |
865 | * ata_port_queue_task - Queue port_task | 865 | * ata_port_queue_task - Queue port_task |
866 | * @ap: The ata_port to queue port_task for | 866 | * @ap: The ata_port to queue port_task for |
867 | * @fn: workqueue function to be scheduled | ||
868 | * @data: data value to pass to workqueue function | ||
869 | * @delay: delay time for workqueue function | ||
867 | * | 870 | * |
868 | * Schedule @fn(@data) for execution after @delay jiffies using | 871 | * Schedule @fn(@data) for execution after @delay jiffies using |
869 | * port_task. There is one port_task per port and it's the | 872 | * port_task. There is one port_task per port and it's the |
@@ -2739,6 +2742,8 @@ static unsigned int ata_dev_set_xfermode(struct ata_port *ap, | |||
2739 | * ata_dev_init_params - Issue INIT DEV PARAMS command | 2742 | * ata_dev_init_params - Issue INIT DEV PARAMS command |
2740 | * @ap: Port associated with device @dev | 2743 | * @ap: Port associated with device @dev |
2741 | * @dev: Device to which command will be sent | 2744 | * @dev: Device to which command will be sent |
2745 | * @heads: Number of heads (taskfile parameter) | ||
2746 | * @sectors: Number of sectors (taskfile parameter) | ||
2742 | * | 2747 | * |
2743 | * LOCKING: | 2748 | * LOCKING: |
2744 | * Kernel thread context (may sleep) | 2749 | * Kernel thread context (may sleep) |
@@ -3638,6 +3643,8 @@ static void ata_pio_block(struct ata_port *ap) | |||
3638 | 3643 | ||
3639 | ata_pio_sector(qc); | 3644 | ata_pio_sector(qc); |
3640 | } | 3645 | } |
3646 | |||
3647 | ata_altstatus(ap); /* flush */ | ||
3641 | } | 3648 | } |
3642 | 3649 | ||
3643 | static void ata_pio_error(struct ata_port *ap) | 3650 | static void ata_pio_error(struct ata_port *ap) |
@@ -3754,11 +3761,14 @@ static void atapi_packet_task(void *_data) | |||
3754 | spin_lock_irqsave(&ap->host_set->lock, flags); | 3761 | spin_lock_irqsave(&ap->host_set->lock, flags); |
3755 | ap->flags &= ~ATA_FLAG_NOINTR; | 3762 | ap->flags &= ~ATA_FLAG_NOINTR; |
3756 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); | 3763 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); |
3764 | ata_altstatus(ap); /* flush */ | ||
3765 | |||
3757 | if (qc->tf.protocol == ATA_PROT_ATAPI_DMA) | 3766 | if (qc->tf.protocol == ATA_PROT_ATAPI_DMA) |
3758 | ap->ops->bmdma_start(qc); /* initiate bmdma */ | 3767 | ap->ops->bmdma_start(qc); /* initiate bmdma */ |
3759 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | 3768 | spin_unlock_irqrestore(&ap->host_set->lock, flags); |
3760 | } else { | 3769 | } else { |
3761 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); | 3770 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); |
3771 | ata_altstatus(ap); /* flush */ | ||
3762 | 3772 | ||
3763 | /* PIO commands are handled by polling */ | 3773 | /* PIO commands are handled by polling */ |
3764 | ap->hsm_task_state = HSM_ST; | 3774 | ap->hsm_task_state = HSM_ST; |
@@ -4287,6 +4297,7 @@ static int ata_start_drive(struct ata_port *ap, struct ata_device *dev) | |||
4287 | int ata_device_resume(struct ata_port *ap, struct ata_device *dev) | 4297 | int ata_device_resume(struct ata_port *ap, struct ata_device *dev) |
4288 | { | 4298 | { |
4289 | if (ap->flags & ATA_FLAG_SUSPENDED) { | 4299 | if (ap->flags & ATA_FLAG_SUSPENDED) { |
4300 | ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000); | ||
4290 | ap->flags &= ~ATA_FLAG_SUSPENDED; | 4301 | ap->flags &= ~ATA_FLAG_SUSPENDED; |
4291 | ata_set_mode(ap); | 4302 | ata_set_mode(ap); |
4292 | } | 4303 | } |
@@ -4302,6 +4313,7 @@ int ata_device_resume(struct ata_port *ap, struct ata_device *dev) | |||
4302 | * ata_device_suspend - prepare a device for suspend | 4313 | * ata_device_suspend - prepare a device for suspend |
4303 | * @ap: port the device is connected to | 4314 | * @ap: port the device is connected to |
4304 | * @dev: the device to suspend | 4315 | * @dev: the device to suspend |
4316 | * @state: target power management state | ||
4305 | * | 4317 | * |
4306 | * Flush the cache on the drive, if appropriate, then issue a | 4318 | * Flush the cache on the drive, if appropriate, then issue a |
4307 | * standbynow command. | 4319 | * standbynow command. |