diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ata/ahci.c | 8 | ||||
| -rw-r--r-- | drivers/ata/libahci.c | 6 | ||||
| -rw-r--r-- | drivers/ata/libata-core.c | 22 | ||||
| -rw-r--r-- | drivers/ata/libata-eh.c | 2 |
4 files changed, 24 insertions, 14 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 7862d17976b7..497912732566 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | 53 | ||
| 54 | enum { | 54 | enum { |
| 55 | AHCI_PCI_BAR_STA2X11 = 0, | 55 | AHCI_PCI_BAR_STA2X11 = 0, |
| 56 | AHCI_PCI_BAR_ENMOTUS = 2, | ||
| 56 | AHCI_PCI_BAR_STANDARD = 5, | 57 | AHCI_PCI_BAR_STANDARD = 5, |
| 57 | }; | 58 | }; |
| 58 | 59 | ||
| @@ -410,6 +411,9 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
| 410 | { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ | 411 | { PCI_VDEVICE(ASMEDIA, 0x0611), board_ahci }, /* ASM1061 */ |
| 411 | { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ | 412 | { PCI_VDEVICE(ASMEDIA, 0x0612), board_ahci }, /* ASM1062 */ |
| 412 | 413 | ||
| 414 | /* Enmotus */ | ||
| 415 | { PCI_DEVICE(0x1c44, 0x8000), board_ahci }, | ||
| 416 | |||
| 413 | /* Generic, PCI class code for AHCI */ | 417 | /* Generic, PCI class code for AHCI */ |
| 414 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 418 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
| 415 | PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci }, | 419 | PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci }, |
| @@ -1098,9 +1102,11 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 1098 | dev_info(&pdev->dev, | 1102 | dev_info(&pdev->dev, |
| 1099 | "PDC42819 can only drive SATA devices with this driver\n"); | 1103 | "PDC42819 can only drive SATA devices with this driver\n"); |
| 1100 | 1104 | ||
| 1101 | /* The Connext uses non-standard BAR */ | 1105 | /* Both Connext and Enmotus devices use non-standard BARs */ |
| 1102 | if (pdev->vendor == PCI_VENDOR_ID_STMICRO && pdev->device == 0xCC06) | 1106 | if (pdev->vendor == PCI_VENDOR_ID_STMICRO && pdev->device == 0xCC06) |
| 1103 | ahci_pci_bar = AHCI_PCI_BAR_STA2X11; | 1107 | ahci_pci_bar = AHCI_PCI_BAR_STA2X11; |
| 1108 | else if (pdev->vendor == 0x1c44 && pdev->device == 0x8000) | ||
| 1109 | ahci_pci_bar = AHCI_PCI_BAR_ENMOTUS; | ||
| 1104 | 1110 | ||
| 1105 | /* acquire resources */ | 1111 | /* acquire resources */ |
| 1106 | rc = pcim_enable_device(pdev); | 1112 | rc = pcim_enable_device(pdev); |
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 320712a7b9ea..6cd7805e47ca 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
| @@ -1951,13 +1951,13 @@ static void ahci_set_aggressive_devslp(struct ata_port *ap, bool sleep) | |||
| 1951 | /* Use the nominal value 10 ms if the read MDAT is zero, | 1951 | /* Use the nominal value 10 ms if the read MDAT is zero, |
| 1952 | * the nominal value of DETO is 20 ms. | 1952 | * the nominal value of DETO is 20 ms. |
| 1953 | */ | 1953 | */ |
| 1954 | if (dev->sata_settings[ATA_LOG_DEVSLP_VALID] & | 1954 | if (dev->devslp_timing[ATA_LOG_DEVSLP_VALID] & |
| 1955 | ATA_LOG_DEVSLP_VALID_MASK) { | 1955 | ATA_LOG_DEVSLP_VALID_MASK) { |
| 1956 | mdat = dev->sata_settings[ATA_LOG_DEVSLP_MDAT] & | 1956 | mdat = dev->devslp_timing[ATA_LOG_DEVSLP_MDAT] & |
| 1957 | ATA_LOG_DEVSLP_MDAT_MASK; | 1957 | ATA_LOG_DEVSLP_MDAT_MASK; |
| 1958 | if (!mdat) | 1958 | if (!mdat) |
| 1959 | mdat = 10; | 1959 | mdat = 10; |
| 1960 | deto = dev->sata_settings[ATA_LOG_DEVSLP_DETO]; | 1960 | deto = dev->devslp_timing[ATA_LOG_DEVSLP_DETO]; |
| 1961 | if (!deto) | 1961 | if (!deto) |
| 1962 | deto = 20; | 1962 | deto = 20; |
| 1963 | } else { | 1963 | } else { |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9e8b99af400d..46cd3f4c6aaa 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -2325,24 +2325,28 @@ int ata_dev_configure(struct ata_device *dev) | |||
| 2325 | } | 2325 | } |
| 2326 | } | 2326 | } |
| 2327 | 2327 | ||
| 2328 | /* check and mark DevSlp capability */ | 2328 | /* Check and mark DevSlp capability. Get DevSlp timing variables |
| 2329 | if (ata_id_has_devslp(dev->id)) | 2329 | * from SATA Settings page of Identify Device Data Log. |
| 2330 | dev->flags |= ATA_DFLAG_DEVSLP; | ||
| 2331 | |||
| 2332 | /* Obtain SATA Settings page from Identify Device Data Log, | ||
| 2333 | * which contains DevSlp timing variables etc. | ||
| 2334 | * Exclude old devices with ata_id_has_ncq() | ||
| 2335 | */ | 2330 | */ |
| 2336 | if (ata_id_has_ncq(dev->id)) { | 2331 | if (ata_id_has_devslp(dev->id)) { |
| 2332 | u8 sata_setting[ATA_SECT_SIZE]; | ||
| 2333 | int i, j; | ||
| 2334 | |||
| 2335 | dev->flags |= ATA_DFLAG_DEVSLP; | ||
| 2337 | err_mask = ata_read_log_page(dev, | 2336 | err_mask = ata_read_log_page(dev, |
| 2338 | ATA_LOG_SATA_ID_DEV_DATA, | 2337 | ATA_LOG_SATA_ID_DEV_DATA, |
| 2339 | ATA_LOG_SATA_SETTINGS, | 2338 | ATA_LOG_SATA_SETTINGS, |
| 2340 | dev->sata_settings, | 2339 | sata_setting, |
| 2341 | 1); | 2340 | 1); |
| 2342 | if (err_mask) | 2341 | if (err_mask) |
| 2343 | ata_dev_dbg(dev, | 2342 | ata_dev_dbg(dev, |
| 2344 | "failed to get Identify Device Data, Emask 0x%x\n", | 2343 | "failed to get Identify Device Data, Emask 0x%x\n", |
| 2345 | err_mask); | 2344 | err_mask); |
| 2345 | else | ||
| 2346 | for (i = 0; i < ATA_LOG_DEVSLP_SIZE; i++) { | ||
| 2347 | j = ATA_LOG_DEVSLP_OFFSET + i; | ||
| 2348 | dev->devslp_timing[i] = sata_setting[j]; | ||
| 2349 | } | ||
| 2346 | } | 2350 | } |
| 2347 | 2351 | ||
| 2348 | dev->cdb_len = 16; | 2352 | dev->cdb_len = 16; |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index bf039b0e97b7..bcf4437214f5 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -2094,7 +2094,7 @@ static unsigned int ata_eh_speed_down(struct ata_device *dev, | |||
| 2094 | */ | 2094 | */ |
| 2095 | static inline int ata_eh_worth_retry(struct ata_queued_cmd *qc) | 2095 | static inline int ata_eh_worth_retry(struct ata_queued_cmd *qc) |
| 2096 | { | 2096 | { |
| 2097 | if (qc->flags & AC_ERR_MEDIA) | 2097 | if (qc->err_mask & AC_ERR_MEDIA) |
| 2098 | return 0; /* don't retry media errors */ | 2098 | return 0; /* don't retry media errors */ |
| 2099 | if (qc->flags & ATA_QCFLAG_IO) | 2099 | if (qc->flags & ATA_QCFLAG_IO) |
| 2100 | return 1; /* otherwise retry anything from fs stack */ | 2100 | return 1; /* otherwise retry anything from fs stack */ |
