Merge pull request #580 from wigyori/cc-libpcap
[15.05/openwrt.git] / target / linux / cns3xxx / patches-3.18 / 080-sata_support.patch
1 --- a/drivers/ata/ahci_platform.c
2 +++ b/drivers/ata/ahci_platform.c
3 @@ -29,12 +29,23 @@ static const struct ata_port_info ahci_p
4         .port_ops       = &ahci_platform_ops,
5  };
6  
7 +static const struct ata_port_info cns3xxx_port_info = {
8 +       .flags          = AHCI_FLAG_COMMON,
9 +       .pio_mask       = ATA_PIO4,
10 +       .udma_mask      = ATA_UDMA6,
11 +       .port_ops       = &ahci_pmp_retry_srst_ops,
12 +};
13 +
14  static int ahci_probe(struct platform_device *pdev)
15  {
16         struct device *dev = &pdev->dev;
17         struct ahci_host_priv *hpriv;
18 +       const struct ata_port_info *info = &ahci_port_info;
19         int rc;
20  
21 +       if (IS_ENABLED(CONFIG_ARCH_CNS3XXX))
22 +               info = &cns3xxx_port_info;
23 +
24         hpriv = ahci_platform_get_resources(pdev);
25         if (IS_ERR(hpriv))
26                 return PTR_ERR(hpriv);