080-sata_support.patch 692 B

1234567891011121314151617181920212223242526
  1. --- a/drivers/ata/ahci_platform.c
  2. +++ b/drivers/ata/ahci_platform.c
  3. @@ -37,12 +37,23 @@ static struct scsi_host_template ahci_pl
  4. AHCI_SHT(DRV_NAME),
  5. };
  6. +static const struct ata_port_info cns3xxx_port_info = {
  7. + .flags = AHCI_FLAG_COMMON,
  8. + .pio_mask = ATA_PIO4,
  9. + .udma_mask = ATA_UDMA6,
  10. + .port_ops = &ahci_pmp_retry_srst_ops,
  11. +};
  12. +
  13. static int ahci_probe(struct platform_device *pdev)
  14. {
  15. struct device *dev = &pdev->dev;
  16. struct ahci_host_priv *hpriv;
  17. + const struct ata_port_info *info = &ahci_port_info;
  18. int rc;
  19. + if (IS_ENABLED(CONFIG_ARCH_CNS3XXX))
  20. + info = &cns3xxx_port_info;
  21. +
  22. hpriv = ahci_platform_get_resources(pdev);
  23. if (IS_ERR(hpriv))
  24. return PTR_ERR(hpriv);