diff options
| -rw-r--r-- | drivers/ata/libata-core.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index eb59f167d666..606145eeba44 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -1850,8 +1850,11 @@ int ata_bus_probe(struct ata_port *ap) | |||
| 1850 | for (i = 0; i < ATA_MAX_DEVICES; i++) | 1850 | for (i = 0; i < ATA_MAX_DEVICES; i++) |
| 1851 | ap->device[i].pio_mode = XFER_PIO_0; | 1851 | ap->device[i].pio_mode = XFER_PIO_0; |
| 1852 | 1852 | ||
| 1853 | /* read IDENTIFY page and configure devices */ | 1853 | /* read IDENTIFY page and configure devices. We have to do the identify |
| 1854 | for (i = 0; i < ATA_MAX_DEVICES; i++) { | 1854 | specific sequence bass-ackwards so that PDIAG- is released by |
| 1855 | the slave device */ | ||
| 1856 | |||
| 1857 | for (i = ATA_MAX_DEVICES - 1; i >= 0; i--) { | ||
| 1855 | dev = &ap->device[i]; | 1858 | dev = &ap->device[i]; |
| 1856 | 1859 | ||
| 1857 | if (tries[i]) | 1860 | if (tries[i]) |
| @@ -1864,6 +1867,15 @@ int ata_bus_probe(struct ata_port *ap) | |||
| 1864 | dev->id); | 1867 | dev->id); |
| 1865 | if (rc) | 1868 | if (rc) |
| 1866 | goto fail; | 1869 | goto fail; |
| 1870 | } | ||
| 1871 | |||
| 1872 | /* After the identify sequence we can now set up the devices. We do | ||
| 1873 | this in the normal order so that the user doesn't get confused */ | ||
| 1874 | |||
| 1875 | for(i = 0; i < ATA_MAX_DEVICES; i++) { | ||
| 1876 | dev = &ap->device[i]; | ||
| 1877 | if (!ata_dev_enabled(dev)) | ||
| 1878 | continue; | ||
| 1867 | 1879 | ||
| 1868 | ap->eh_context.i.flags |= ATA_EHI_PRINTINFO; | 1880 | ap->eh_context.i.flags |= ATA_EHI_PRINTINFO; |
| 1869 | rc = ata_dev_configure(dev); | 1881 | rc = ata_dev_configure(dev); |
