lkml.org 
[lkml]   [2011]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pata_atiixp: add proper ->prereset method
Hello.

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

> From: Bartlomiej Zolnierkiewicz<bzolnier@gmail.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@gmail.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


\
 
 \ /
  Last update: 2011-10-12 12:35    [W:0.066 / U:5.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site