diff options
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index c06e0ec11556..e0bda9ff89cd 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); |