aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/libata-core.c18
-rw-r--r--drivers/ata/libata-sff.c2
2 files changed, 15 insertions, 5 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 1c9315401f7a..bb66a12c84e5 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5269,11 +5269,19 @@ void ata_port_init(struct ata_port *ap, struct ata_host *host,
5269 ap->host = host; 5269 ap->host = host;
5270 ap->dev = ent->dev; 5270 ap->dev = ent->dev;
5271 ap->port_no = port_no; 5271 ap->port_no = port_no;
5272 ap->pio_mask = ent->pio_mask; 5272 if (port_no == 1 && ent->pinfo2) {
5273 ap->mwdma_mask = ent->mwdma_mask; 5273 ap->pio_mask = ent->pinfo2->pio_mask;
5274 ap->udma_mask = ent->udma_mask; 5274 ap->mwdma_mask = ent->pinfo2->mwdma_mask;
5275 ap->flags |= ent->port_flags; 5275 ap->udma_mask = ent->pinfo2->udma_mask;
5276 ap->ops = ent->port_ops; 5276 ap->flags |= ent->pinfo2->flags;
5277 ap->ops = ent->pinfo2->port_ops;
5278 } else {
5279 ap->pio_mask = ent->pio_mask;
5280 ap->mwdma_mask = ent->mwdma_mask;
5281 ap->udma_mask = ent->udma_mask;
5282 ap->flags |= ent->port_flags;
5283 ap->ops = ent->port_ops;
5284 }
5277 ap->hw_sata_spd_limit = UINT_MAX; 5285 ap->hw_sata_spd_limit = UINT_MAX;
5278 ap->active_tag = ATA_TAG_POISON; 5286 ap->active_tag = ATA_TAG_POISON;
5279 ap->last_ctl = 0xFF; 5287 ap->last_ctl = 0xFF;
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index d51dc41fa195..688bb55e197a 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -858,6 +858,7 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int
858 probe_ent->port[p].bmdma_addr = bmdma; 858 probe_ent->port[p].bmdma_addr = bmdma;
859 } 859 }
860 ata_std_ports(&probe_ent->port[p]); 860 ata_std_ports(&probe_ent->port[p]);
861 probe_ent->pinfo2 = port[1];
861 p++; 862 p++;
862 } 863 }
863 864
@@ -907,6 +908,7 @@ static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev,
907 probe_ent->_host_flags |= ATA_HOST_SIMPLEX; 908 probe_ent->_host_flags |= ATA_HOST_SIMPLEX;
908 } 909 }
909 ata_std_ports(&probe_ent->port[1]); 910 ata_std_ports(&probe_ent->port[1]);
911 probe_ent->pinfo2 = port[1];
910 } else 912 } else
911 probe_ent->dummy_port_mask |= ATA_PORT_SECONDARY; 913 probe_ent->dummy_port_mask |= ATA_PORT_SECONDARY;
912 914