diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 34 | ||||
-rw-r--r-- | drivers/ata/libata-eh.c | 1 | ||||
-rw-r--r-- | drivers/ata/libata-scsi.c | 13 | ||||
-rw-r--r-- | drivers/ata/libata-sff.c | 8 | ||||
-rw-r--r-- | drivers/ata/libata.h | 2 |
5 files changed, 37 insertions, 21 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c06e0ec1155..e0bda9ff89c 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -5936,29 +5936,31 @@ void ata_host_init(struct ata_host *host, struct device *dev, | |||
5936 | host->ops = ops; | 5936 | host->ops = ops; |
5937 | } | 5937 | } |
5938 | 5938 | ||
5939 | int ata_port_probe(struct ata_port *ap) | 5939 | void __ata_port_probe(struct ata_port *ap) |
5940 | { | 5940 | { |
5941 | int rc = 0; | 5941 | struct ata_eh_info *ehi = &ap->link.eh_info; |
5942 | unsigned long flags; | ||
5942 | 5943 | ||
5943 | /* probe */ | 5944 | /* kick EH for boot probing */ |
5944 | if (ap->ops->error_handler) { | 5945 | spin_lock_irqsave(ap->lock, flags); |
5945 | struct ata_eh_info *ehi = &ap->link.eh_info; | ||
5946 | unsigned long flags; | ||
5947 | 5946 | ||
5948 | /* kick EH for boot probing */ | 5947 | ehi->probe_mask |= ATA_ALL_DEVICES; |
5949 | spin_lock_irqsave(ap->lock, flags); | 5948 | ehi->action |= ATA_EH_RESET; |
5949 | ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET; | ||
5950 | 5950 | ||
5951 | ehi->probe_mask |= ATA_ALL_DEVICES; | 5951 | ap->pflags &= ~ATA_PFLAG_INITIALIZING; |
5952 | ehi->action |= ATA_EH_RESET; | 5952 | ap->pflags |= ATA_PFLAG_LOADING; |
5953 | ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET; | 5953 | ata_port_schedule_eh(ap); |
5954 | 5954 | ||
5955 | ap->pflags &= ~ATA_PFLAG_INITIALIZING; | 5955 | spin_unlock_irqrestore(ap->lock, flags); |
5956 | ap->pflags |= ATA_PFLAG_LOADING; | 5956 | } |
5957 | ata_port_schedule_eh(ap); | ||
5958 | 5957 | ||
5959 | spin_unlock_irqrestore(ap->lock, flags); | 5958 | int ata_port_probe(struct ata_port *ap) |
5959 | { | ||
5960 | int rc = 0; | ||
5960 | 5961 | ||
5961 | /* wait for EH to finish */ | 5962 | if (ap->ops->error_handler) { |
5963 | __ata_port_probe(ap); | ||
5962 | ata_port_wait_eh(ap); | 5964 | ata_port_wait_eh(ap); |
5963 | } else { | 5965 | } else { |
5964 | DPRINTK("ata%u: bus probe begin\n", ap->print_id); | 5966 | DPRINTK("ata%u: bus probe begin\n", ap->print_id); |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index a9b28203800..c61316e9d2f 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -863,6 +863,7 @@ void ata_port_wait_eh(struct ata_port *ap) | |||
863 | goto retry; | 863 | goto retry; |
864 | } | 864 | } |
865 | } | 865 | } |
866 | EXPORT_SYMBOL_GPL(ata_port_wait_eh); | ||
866 | 867 | ||
867 | static int ata_eh_nr_in_flight(struct ata_port *ap) | 868 | static int ata_eh_nr_in_flight(struct ata_port *ap) |
868 | { | 869 | { |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 508a60bfe5c..1ee00c8b5b0 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -3838,6 +3838,19 @@ void ata_sas_port_stop(struct ata_port *ap) | |||
3838 | } | 3838 | } |
3839 | EXPORT_SYMBOL_GPL(ata_sas_port_stop); | 3839 | EXPORT_SYMBOL_GPL(ata_sas_port_stop); |
3840 | 3840 | ||
3841 | int ata_sas_async_port_init(struct ata_port *ap) | ||
3842 | { | ||
3843 | int rc = ap->ops->port_start(ap); | ||
3844 | |||
3845 | if (!rc) { | ||
3846 | ap->print_id = ata_print_id++; | ||
3847 | __ata_port_probe(ap); | ||
3848 | } | ||
3849 | |||
3850 | return rc; | ||
3851 | } | ||
3852 | EXPORT_SYMBOL_GPL(ata_sas_async_port_init); | ||
3853 | |||
3841 | /** | 3854 | /** |
3842 | * ata_sas_port_init - Initialize a SATA device | 3855 | * ata_sas_port_init - Initialize a SATA device |
3843 | * @ap: SATA port to initialize | 3856 | * @ap: SATA port to initialize |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 9691dd0966d..d8af325a6bd 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -720,13 +720,13 @@ static void ata_pio_sector(struct ata_queued_cmd *qc) | |||
720 | 720 | ||
721 | /* FIXME: use a bounce buffer */ | 721 | /* FIXME: use a bounce buffer */ |
722 | local_irq_save(flags); | 722 | local_irq_save(flags); |
723 | buf = kmap_atomic(page, KM_IRQ0); | 723 | buf = kmap_atomic(page); |
724 | 724 | ||
725 | /* do the actual data transfer */ | 725 | /* do the actual data transfer */ |
726 | ap->ops->sff_data_xfer(qc->dev, buf + offset, qc->sect_size, | 726 | ap->ops->sff_data_xfer(qc->dev, buf + offset, qc->sect_size, |
727 | do_write); | 727 | do_write); |
728 | 728 | ||
729 | kunmap_atomic(buf, KM_IRQ0); | 729 | kunmap_atomic(buf); |
730 | local_irq_restore(flags); | 730 | local_irq_restore(flags); |
731 | } else { | 731 | } else { |
732 | buf = page_address(page); | 732 | buf = page_address(page); |
@@ -865,13 +865,13 @@ next_sg: | |||
865 | 865 | ||
866 | /* FIXME: use bounce buffer */ | 866 | /* FIXME: use bounce buffer */ |
867 | local_irq_save(flags); | 867 | local_irq_save(flags); |
868 | buf = kmap_atomic(page, KM_IRQ0); | 868 | buf = kmap_atomic(page); |
869 | 869 | ||
870 | /* do the actual data transfer */ | 870 | /* do the actual data transfer */ |
871 | consumed = ap->ops->sff_data_xfer(dev, buf + offset, | 871 | consumed = ap->ops->sff_data_xfer(dev, buf + offset, |
872 | count, rw); | 872 | count, rw); |
873 | 873 | ||
874 | kunmap_atomic(buf, KM_IRQ0); | 874 | kunmap_atomic(buf); |
875 | local_irq_restore(flags); | 875 | local_irq_restore(flags); |
876 | } else { | 876 | } else { |
877 | buf = page_address(page); | 877 | buf = page_address(page); |
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 814486d35c4..2e26fcaf635 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h | |||
@@ -105,6 +105,7 @@ extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg); | |||
105 | extern struct ata_port *ata_port_alloc(struct ata_host *host); | 105 | extern struct ata_port *ata_port_alloc(struct ata_host *host); |
106 | extern const char *sata_spd_string(unsigned int spd); | 106 | extern const char *sata_spd_string(unsigned int spd); |
107 | extern int ata_port_probe(struct ata_port *ap); | 107 | extern int ata_port_probe(struct ata_port *ap); |
108 | extern void __ata_port_probe(struct ata_port *ap); | ||
108 | 109 | ||
109 | /* libata-acpi.c */ | 110 | /* libata-acpi.c */ |
110 | #ifdef CONFIG_ATA_ACPI | 111 | #ifdef CONFIG_ATA_ACPI |
@@ -151,7 +152,6 @@ extern void ata_eh_acquire(struct ata_port *ap); | |||
151 | extern void ata_eh_release(struct ata_port *ap); | 152 | extern void ata_eh_release(struct ata_port *ap); |
152 | extern enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); | 153 | extern enum blk_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); |
153 | extern void ata_scsi_error(struct Scsi_Host *host); | 154 | extern void ata_scsi_error(struct Scsi_Host *host); |
154 | extern void ata_port_wait_eh(struct ata_port *ap); | ||
155 | extern void ata_eh_fastdrain_timerfn(unsigned long arg); | 155 | extern void ata_eh_fastdrain_timerfn(unsigned long arg); |
156 | extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc); | 156 | extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc); |
157 | extern void ata_dev_disable(struct ata_device *dev); | 157 | extern void ata_dev_disable(struct ata_device *dev); |