From: Bartlomiej Zolnierkiewicz<bzolnier@xxxxxxxxx>
Subject: [PATCH] pata_atiixp: add proper ->prereset method
Fixes PCI access before PCI resources are allocated.
Signed-off-by: Bartlomiej Zolnierkiewicz<bzolnier@xxxxxxxxx>
---
earlier references:
https://lkml.org/lkml/2009/11/25/320
drivers/ata/pata_atiixp.c | 35 ++++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)
Index: b/drivers/ata/pata_atiixp.c[...]
===================================================================
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -235,16 +261,7 @@ static int atiixp_init_one(struct pci_de
.udma_mask = ATA_UDMA5,
.port_ops =&atiixp_port_ops
};
- static const struct pci_bits atiixp_enable_bits[] = {
- { 0x48, 1, 0x01, 0x00 },
- { 0x48, 1, 0x08, 0x00 }
- };
const struct ata_port_info *ppi[] = {&info,&info };
- int i;
-
- for (i = 0; i< 2; i++)
- if (!pci_test_config_bits(pdev,&atiixp_enable_bits[i]))
- ppi[i] =&ata_dummy_port_info;