Ignore:
Timestamp:
Apr 14, 2017, 9:41:36 PM (3 months ago)
Author:
brainslayer
Message:

kernel update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/linux/universal/linux-4.9/drivers/ata/ahci_da850.c

    r31574 r31859  
    5555}
    5656
     57static int ahci_da850_softreset(struct ata_link *link,
     58                                unsigned int *class, unsigned long deadline)
     59{
     60        int pmp, ret;
     61
     62        pmp = sata_srst_pmp(link);
     63
     64        /*
     65         * There's an issue with the SATA controller on da850 SoCs: if we
     66         * enable Port Multiplier support, but the drive is connected directly
     67         * to the board, it can't be detected. As a workaround: if PMP is
     68         * enabled, we first call ahci_do_softreset() and pass it the result of
     69         * sata_srst_pmp(). If this call fails, we retry with pmp = 0.
     70         */
     71        ret = ahci_do_softreset(link, class, pmp, deadline, ahci_check_ready);
     72        if (pmp && ret == -EBUSY)
     73                return ahci_do_softreset(link, class, 0,
     74                                         deadline, ahci_check_ready);
     75
     76        return ret;
     77}
     78
     79static struct ata_port_operations ahci_da850_port_ops = {
     80        .inherits = &ahci_platform_ops,
     81        .softreset = ahci_da850_softreset,
     82        /*
     83         * No need to override .pmp_softreset - it's only used for actual
     84         * PMP-enabled ports.
     85         */
     86};
     87
    5788static const struct ata_port_info ahci_da850_port_info = {
    5889        .flags          = AHCI_FLAG_COMMON,
    5990        .pio_mask       = ATA_PIO4,
    6091        .udma_mask      = ATA_UDMA6,
    61         .port_ops       = &ahci_platform_ops,
     92        .port_ops       = &ahci_da850_port_ops,
    6293};
    6394
Note: See TracChangeset for help on using the changeset viewer.