Re: [PATCH] pata_atiixp: add proper ->prereset method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 11-10-2011 21:55, Bartlomiej Zolnierkiewicz wrote:

From: Bartlomiej Zolnierkiewicz<bzolnier@xxxxxxxxx>
Subject: [PATCH] pata_atiixp: add proper ->prereset method

Fixes PCI access before PCI resources are allocated.

   Hm, didn't understand this...

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;

But this seems more safe method than prereset() as it should really avoid accessing the disabled IDE ports (which blows up on non-x86)... didn't understand why this is incorrect...

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux