[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4E956C9F.6070304@mvista.com>
Date: Wed, 12 Oct 2011 14:31:59 +0400
From: Sergei Shtylyov <sshtylyov@...sta.com>
To: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
CC: Jeff Garzik <jgarzik@...ox.com>, linux-ide@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pata_atiixp: add proper ->prereset method
Hello.
On 11-10-2011 21:55, Bartlomiej Zolnierkiewicz wrote:
> From: Bartlomiej Zolnierkiewicz<bzolnier@...il.com>
> 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@...il.com>
> ---
> 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists