mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>,
	"Samuel Ortiz" <samuel@sortiz.org>,
	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: Wed, 6 Jun 2007 13:09:28 -0600	[thread overview]
Message-ID: <200706061309.28633.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <200706060729.13338.arvidjaar@mail.ru>

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?

Index: linux-2.6/drivers/net/irda/smsc-ircc2.c
===================================================================
--- linux-2.6.orig/drivers/net/irda/smsc-ircc2.c	2007-06-04 10:35:03.000000000 -0600
+++ linux-2.6/drivers/net/irda/smsc-ircc2.c	2007-06-06 13:05:31.000000000 -0600
@@ -232,9 +232,7 @@
 #ifdef CONFIG_PCI
 static int __init preconfigure_smsc_chip(struct smsc_ircc_subsystem_configuration *conf);
 static int __init preconfigure_through_82801(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf);
-static void __init preconfigure_ali_port(struct pci_dev *dev,
 					 unsigned short port);
-static int __init preconfigure_through_ali(struct pci_dev *dev, struct smsc_ircc_subsystem_configuration *conf);
 static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
 						    unsigned short ircc_fir,
 						    unsigned short ircc_sir,
@@ -386,8 +384,8 @@
 	      pnp_dma_valid(dev, 0) && pnp_irq_valid(dev, 0)))
 		return -EINVAL;
 
-	sirbase = pnp_port_start(dev, 0);
-	firbase = pnp_port_start(dev, 1);
+	firbase = pnp_port_start(dev, 0);
+	sirbase = pnp_port_start(dev, 1);
 	dma = pnp_dma(dev, 0);
 	irq = pnp_irq(dev, 0);
 
@@ -2511,20 +2509,6 @@
 		.preconfigure = preconfigure_through_82801,
 		.name = "Toshiba laptop with Intel 8281DBM LPC bridge",
 	},
-	{
-		/* ALi M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+] */
-		.vendor = PCIID_VENDOR_ALI,
-		.device = 0x1533,
-		.subvendor = 0x1179,
-		.subdevice = 0xffff, /* 0xffff is "any" */
-		.sir_io = 0x02e8,
-		.fir_io = 0x02f8,
-		.fir_irq = 0x07,
-		.fir_dma = 0x03,
-		.cfg_base = 0x002e,
-		.preconfigure = preconfigure_through_ali,
-		.name = "Toshiba laptop with ALi ISA bridge",
-	},
 	{ } // Terminator
 };
 
@@ -2783,63 +2767,6 @@
 	return preconfigure_smsc_chip(conf);
 }
 
-/*
- * Pre-configure a certain port on the ALi 1533 bridge.
- * This is based on reverse-engineering since ALi does not
- * provide any data sheet for the 1533 chip.
- */
-static void __init preconfigure_ali_port(struct pci_dev *dev,
-					 unsigned short port)
-{
-	unsigned char reg;
-	/* These bits obviously control the different ports */
-	unsigned char mask;
-	unsigned char tmpbyte;
-
-	switch(port) {
-	case 0x0130:
-	case 0x0178:
-		reg = 0xb0;
-		mask = 0x80;
-		break;
-	case 0x03f8:
-		reg = 0xb4;
-		mask = 0x80;
-		break;
-	case 0x02f8:
-		reg = 0xb4;
-		mask = 0x30;
-		break;
-	case 0x02e8:
-		reg = 0xb4;
-		mask = 0x08;
-		break;
-	default:
-		IRDA_ERROR("Failed to configure unsupported port on ALi 1533 bridge: 0x%04x\n", port);
-		return;
-	}
-
-	pci_read_config_byte(dev, reg, &tmpbyte);
-	/* Turn on the right bits */
-	tmpbyte |= mask;
-	pci_write_config_byte(dev, reg, tmpbyte);
-	IRDA_MESSAGE("Activated ALi 1533 ISA bridge port 0x%04x.\n", port);
-	return;
-}
-
-static int __init preconfigure_through_ali(struct pci_dev *dev,
-					   struct
-					   smsc_ircc_subsystem_configuration
-					   *conf)
-{
-	/* Configure the two ports on the ALi 1533 */
-	preconfigure_ali_port(dev, conf->sir_io);
-	preconfigure_ali_port(dev, conf->fir_io);
-
-	/* Pre-configure chip */
-	return preconfigure_smsc_chip(conf);
-}
-
 static int __init smsc_ircc_preconfigure_subsystems(unsigned short ircc_cfg,
 						    unsigned short ircc_fir,
 						    unsigned short ircc_sir,

  reply	other threads:[~2007-06-06 19:10 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-03  8:00 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 [this message]
2007-06-06 20:45                       ` Andrey Borzenkov
2007-06-07 15:52                         ` Bjorn Helgaas
2007-06-07 20:47                           ` Samuel Ortiz
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=200706061309.28633.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=ambx1@neo.rr.com \
    --cc=arvidjaar@mail.ru \
    --cc=linus.walleij@ericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    --cc=samuel@sortiz.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®