lkml.org 
[lkml]   [2005]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] PC300 pci_enable_device fix
On Wed, Apr 13, 2005 at 02:31:43PM -0700, Bjorn Helgaas wrote:
>
> Call pci_enable_device() before looking at IRQ and resources.
> The driver requires this fix or the "pci=routeirq" workaround
> on 2.6.10 and later kernels.


the failure cases dont seem to worry about pci_disable_device()?

in err_release_ram: etc?

>
> Reported and tested by Artur Lipowski.
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
>
> ===== drivers/net/wan/pc300_drv.c 1.24 vs edited =====
> --- 1.24/drivers/net/wan/pc300_drv.c 2004-12-29 12:25:16 -07:00
> +++ edited/drivers/net/wan/pc300_drv.c 2005-04-13 13:35:21 -06:00
> @@ -3439,6 +3439,9 @@
> #endif
> }
>
> + if ((err = pci_enable_device(pdev)) != 0)
> + return err;
> +
> card = (pc300_t *) kmalloc(sizeof(pc300_t), GFP_KERNEL);
> if (card == NULL) {
> printk("PC300 found at RAM 0x%08lx, "
> @@ -3526,9 +3529,6 @@
> err = -ENODEV;
> goto err_release_ram;
> }
> -
> - if ((err = pci_enable_device(pdev)) != 0)
> - goto err_release_sca;
>
> card->hw.plxbase = ioremap(card->hw.plxphys,
> card->hw.plxsize);
> card->hw.rambase = ioremap(card->hw.ramphys,
> card->hw.alloc_ramsize);
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at [1]http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at [2]http://www.tux.org/lkml/
>
> References
>
> 1. http://vger.kernel.org/majordomo-info.html
> 2. http://www.tux.org/lkml/

--
Cheers,
Ashok Raj
- Open Source Technology Center
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-14 00:06    [W:0.047 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site