From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Ashok Raj <ashok.raj@intel.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>,
pc300@cyclades.com, lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PC300 pci_enable_device fix
Date: Wed, 13 Apr 2005 16:45:31 -0300 [thread overview]
Message-ID: <20050413194531.GE11131@logos.cnet> (raw)
In-Reply-To: <20050413150243.A26360@unix-os.sc.intel.com>
On Wed, Apr 13, 2005 at 03:02:43PM -0700, Ashok Raj wrote:
> 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?
Yep the failure paths were wrong before, but Bjorn's patch moves
pci_enable_device() way up to the beginning of the function.
The failure path's err_release_ram etc. wont touch the resources
without pci_enable_pci(), with the fix.
> > 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);
next prev parent reply other threads:[~2005-04-14 0:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-13 21:31 [PATCH] PC300 pci_enable_device fix Bjorn Helgaas
2005-04-13 22:02 ` Ashok Raj
2005-04-13 19:45 ` Marcelo Tosatti [this message]
2005-04-14 12:39 ` Marcelo Tosatti
2005-04-14 18:17 ` Bjorn Helgaas
-- strict thread matches above, loose matches on Subject: below --
2005-04-26 14:41 Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050413194531.GE11131@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=ashok.raj@intel.com \
--cc=bjorn.helgaas@hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pc300@cyclades.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.