lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 27 Jun 2007 21:56:05 -0600
From:	Bjorn Helgaas <bjorn.helgaas@...com>
To:	Andrey Borzenkov <arvidjaar@...l.ru>
Cc:	Samuel Ortiz <samuel@...tiz.org>,
	"Linus Walleij (LD/EAB)" <linus.walleij@...csson.com>,
	linux-kernel@...r.kernel.org,
	Michal Piotrowski <michal.k.k.piotrowski@...il.com>,
	ambx1@....rr.com, linux-pcmcia@...ts.infradead.org
Subject: Re: 2.6.22-rc: regression: no irda0 interface (2.6.21 was OK), smsc does not find chip

Andrey,

Can you try the following patch?  It applies on top of the previous
two patches, and it is enough to make the driver find the device on
my Portege 4000.  Unfortunately, I can't tell whether it really works
because I don't have a clue about how to make two IR devices talk
to each other.

Bjorn

Index: w/drivers/pnp/quirks.c
===================================================================
--- w.orig/drivers/pnp/quirks.c	2007-06-27 20:07:45.000000000 -0600
+++ w/drivers/pnp/quirks.c	2007-06-27 20:57:47.000000000 -0600
@@ -136,11 +136,11 @@
 
 static void quirk_smc_enable(struct pnp_dev *dev)
 {
-	/*
-	 * If the BIOS left the device disabled, or it is enabled and
-	 * responding correctly, we're in good shape.
-	 */
-	if (!dev->active || quirk_smc_fir_enabled(dev))
+	unsigned int irq;
+	unsigned long flags;
+
+	pnp_activate_dev(dev);
+	if (quirk_smc_fir_enabled(dev))
 		return;
 
 	/*
@@ -159,9 +159,34 @@
 	pnp_init_resource_table(&dev->res);
 	pnp_auto_config_dev(dev);
 	pnp_activate_dev(dev);
+	if (quirk_smc_fir_enabled(dev))
+		return;
+
+	/*
+	 * The Toshiba Portege 4000 reports the IRQ as active high,
+	 * edge-triggered, but the device only seems to work when we
+	 * program it as something else.
+	 */
+	irq = pnp_irq(dev, 0);
+	flags = pnp_irq_flags(dev, 0);
+	pnp_disable_dev(dev);
+	dev->res.irq_resource[0].start = irq;
+	dev->res.irq_resource[0].end   = irq;
+	flags &= ~IORESOURCE_AUTO;
+	if ((flags & IORESOURCE_BITS) == IORESOURCE_IRQ_HIGHEDGE) {
+		flags &= ~IORESOURCE_BITS;
+		flags |= IORESOURCE_IRQ_LOWEDGE;
+		dev_err(&dev->dev, "still not responding, changing high-edge "
+			"IRQ to low-edge\n");
+	}
+	dev->res.irq_resource[0].flags = flags;
+	pnp_activate_dev(dev);
+
+	if (quirk_smc_fir_enabled(dev))
+		return;
 
-	if (!quirk_smc_fir_enabled(dev))
-		dev_err(&dev->dev, "giving up; try \"smsc-ircc2.nopnp\"\n");
+	dev_err(&dev->dev, "giving up; try \"smsc-ircc2.nopnp\" and "
+		"email bjorn.helgaas@...com\n");
 }
 
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ