From: Samuel Ortiz <samuel@sortiz.org>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>,
"Linus Walleij \(LD/EAB\)" <linus.walleij@ericsson.com>,
linux-kernel@vger.kernel.org,
Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
ambx1@neo.rr.com
Subject: Re: 2.6.22-rc: regression: no irda0 interface (2.6.21 was OK), smsc does not find chip
Date: Thu, 7 Jun 2007 23:47:59 +0300 [thread overview]
Message-ID: <20070607204759.GA6809@sortiz.org> (raw)
In-Reply-To: <200706070952.36823.bjorn.helgaas@hp.com>
Hi Bjorn,
On 6/7/2007, "Bjorn Helgaas" <bjorn.helgaas@hp.com> wrote:
>On Wednesday 06 June 2007 02:45:01 pm Andrey Borzenkov wrote:
>> On Wednesday 06 June 2007, Bjorn Helgaas wrote:
>> > On Tuesday 05 June 2007 09:29:11 pm Andrey Borzenkov wrote:
>> > > On Wednesday 06 June 2007, Bjorn Helgaas wrote:
>> > > > Something's wrong with this strategy. The BIOS is telling us that an
>> > > > SMCf010 device is present, active, and responds at io ports 0x100-0x107
>> > > > and 0x2e8-0x2ef. The fact that it happens to be on the other side of
>> > > > an ISA or LPC bridge should be immaterial to the OS driver.
>> > >
>> > > I thought this as well.
>> >
>> > If this is really true, it also means we shouldn't twiddle with the
>> > bridge. If the BIOS left us a working setup, the preconfiguration
>> > is certainly going to change it to something incompatible with the
>> > PNP info.
>> >
>> > What if we try the following patch, which keeps the FIR/SIR swap and
>> > just removes the preconfiguration?
>>
>> I already tried different patch but with similar effect (switch off
>> preconfiguration) - it does not work. I am beginning to doubt whether drier
>> works on my system at all (i.e. before PnP change); have to find time to
>> test.
>
>OK. My patch wasn't the right approach anyway. Attached is what I
>think we should do instead -- do the preconfig if we're not using PNP.
Thats sounds good, yes.
Maybe we should also run the legacy probe when the PnP one fails. I
don't know how the preconfiguration stuff will behave with the device
being PnP enabled, but with your patch Andrey will still need to
modprobe smsc-ircc with smsc_nopnp.
So, here is the patch I propose (I had to move smsc_ircc_legacy_probe()
a bit earlier in the code to avoid forward declaration, but it's
basically your patch plus a call to smsc_ircc_legacy_probe() from the
pnp_probe() routine):
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index 9043bf4..1d7ab3f 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -366,6 +366,44 @@ static inline void register_bank(int iobase, int bank)
iobase + IRCC_MASTER);
}
+
+static int __init smsc_ircc_legacy_probe(void)
+{
+ int ret = 0;
+
+#ifdef CONFIG_PCI
+ if (smsc_ircc_preconfigure_subsystems(ircc_cfg, ircc_fir, ircc_sir,
+ ircc_dma, ircc_irq) < 0) {
+ /* Ignore errors from preconfiguration */
+ IRDA_ERROR("%s, Preconfiguration failed !\n", driver_name);
+ }
+#endif
+
+ if (ircc_fir > 0 && ircc_sir > 0) {
+ IRDA_MESSAGE(" Overriding FIR address 0x%04x\n", ircc_fir);
+ IRDA_MESSAGE(" Overriding SIR address 0x%04x\n", ircc_sir);
+
+ if (smsc_ircc_open(ircc_fir, ircc_sir, ircc_dma, ircc_irq))
+ ret = -ENODEV;
+ } else {
+ ret = -ENODEV;
+
+ /* try user provided configuration register base address */
+ if (ircc_cfg > 0) {
+ IRDA_MESSAGE(" Overriding configuration address "
+ "0x%04x\n", ircc_cfg);
+ if (!smsc_superio_fdc(ircc_cfg))
+ ret = 0;
+ if (!smsc_superio_lpc(ircc_cfg))
+ ret = 0;
+ }
+
+ if (smsc_ircc_look_for_chips() > 0)
+ ret = 0;
+ }
+ return ret;
+}
+
/* PNP hotplug support */
static const struct pnp_device_id smsc_ircc_pnp_table[] = {
{ .id = "SMCf010", .driver_data = 0 },
@@ -391,9 +429,14 @@ static int __init smsc_ircc_pnp_probe(struct pnp_dev *dev,
dma = pnp_dma(dev, 0);
irq = pnp_irq(dev, 0);
- if (smsc_ircc_open(firbase, sirbase, dma, irq))
- return -ENODEV;
-
+ if (smsc_ircc_open(firbase, sirbase, dma, irq)) {
+ IRDA_ERROR("PnP probe failed\n");
+ if (smsc_ircc_legacy_probe()) {
+ IRDA_ERROR("Legacy probe failed\n");
+ return -ENODEV;
+ }
+ }
+
return 0;
}
@@ -412,35 +455,6 @@ static struct pnp_driver smsc_ircc_pnp_driver = {
*
*******************************************************************************/
-static int __init smsc_ircc_legacy_probe(void)
-{
- int ret = 0;
-
- if (ircc_fir > 0 && ircc_sir > 0) {
- IRDA_MESSAGE(" Overriding FIR address 0x%04x\n", ircc_fir);
- IRDA_MESSAGE(" Overriding SIR address 0x%04x\n", ircc_sir);
-
- if (smsc_ircc_open(ircc_fir, ircc_sir, ircc_dma, ircc_irq))
- ret = -ENODEV;
- } else {
- ret = -ENODEV;
-
- /* try user provided configuration register base address */
- if (ircc_cfg > 0) {
- IRDA_MESSAGE(" Overriding configuration address "
- "0x%04x\n", ircc_cfg);
- if (!smsc_superio_fdc(ircc_cfg))
- ret = 0;
- if (!smsc_superio_lpc(ircc_cfg))
- ret = 0;
- }
-
- if (smsc_ircc_look_for_chips() > 0)
- ret = 0;
- }
- return ret;
-}
-
/*
* Function smsc_ircc_init ()
*
@@ -459,13 +473,6 @@ static int __init smsc_ircc_init(void)
return ret;
}
-#ifdef CONFIG_PCI
- if (smsc_ircc_preconfigure_subsystems(ircc_cfg, ircc_fir, ircc_sir, ircc_dma, ircc_irq) < 0) {
- /* Ignore errors from preconfiguration */
- IRDA_ERROR("%s, Preconfiguration failed !\n", driver_name);
- }
-#endif
-
dev_count = 0;
if (smsc_nopnp || !pnp_platform_devices ||
next prev parent reply other threads:[~2007-06-07 20:55 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-03 8:00 2.6.22-rc: regression: no irda0 interface (2.6.21 was OK), smsc does not find chip Andrey Borzenkov
2007-06-03 8:16 ` Andrey Borzenkov
2007-06-03 23:10 ` Samuel Ortiz
2007-06-04 2:33 ` Andrey Borzenkov
2007-06-04 20:44 ` Samuel Ortiz
2007-06-05 3:10 ` Andrey Borzenkov
2007-06-05 7:18 ` Linus Walleij (LD/EAB)
2007-06-05 7:57 ` Samuel Ortiz
2007-06-05 11:57 ` Linus Walleij (LD/EAB)
2007-06-05 13:04 ` Samuel Ortiz
2007-06-05 23:23 ` Bjorn Helgaas
2007-06-06 3:29 ` Andrey Borzenkov
2007-06-06 19:09 ` Bjorn Helgaas
2007-06-06 20:45 ` Andrey Borzenkov
2007-06-07 15:52 ` Bjorn Helgaas
2007-06-07 20:47 ` Samuel Ortiz [this message]
2007-06-10 6:47 ` Andrey Borzenkov
2007-06-10 21:03 ` Bjorn Helgaas
2007-06-11 14:04 ` Andrey Borzenkov
2007-06-14 21:30 ` Bjorn Helgaas
2007-06-15 13:44 ` Andrey Borzenkov
2007-06-15 15:19 ` Bjorn Helgaas
2007-06-16 16:38 ` Andrey Borzenkov
2007-06-19 23:31 ` Bjorn Helgaas
2007-06-28 3:56 ` Bjorn Helgaas
2007-06-30 2:41 ` Bjorn Helgaas
2007-06-30 7:16 ` Andrey Borzenkov
2007-06-30 11:45 ` Bjorn Helgaas
2007-06-30 14:47 ` Andrey Borzenkov
2007-06-30 21:13 ` Andrey Borzenkov
2007-07-01 3:30 ` Bjorn Helgaas
2007-07-01 7:08 ` Andrey Borzenkov
2007-07-01 13:57 ` Bjorn Helgaas
2007-08-11 18:39 ` Andrey Borzenkov
2007-08-13 16:09 ` Bjorn Helgaas
2007-08-13 17:39 ` Peter Stuge
2007-08-18 6:59 ` Andrey Borzenkov
2007-07-01 0:01 ` Michal Piotrowski
2007-07-01 0:04 ` Michal Piotrowski
2007-06-07 18:34 ` Bjorn Helgaas
2007-06-08 5:24 ` Andrey Borzenkov
2007-06-10 8:03 ` Andrey Borzenkov
2007-06-10 20:04 ` Bjorn Helgaas
2007-06-07 12:23 ` Linus Walleij (LD/EAB)
2007-06-07 15:44 ` Bjorn Helgaas
2007-06-05 12:06 ` Linus Walleij (LD/EAB)
2007-06-04 16:34 ` Bjorn Helgaas
2007-06-05 3:08 ` Andrey Borzenkov
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=20070607204759.GA6809@sortiz.org \
--to=samuel@sortiz.org \
--cc=ambx1@neo.rr.com \
--cc=arvidjaar@mail.ru \
--cc=bjorn.helgaas@hp.com \
--cc=linus.walleij@ericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.k.k.piotrowski@gmail.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.