From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Keith Owens <kaos@ocs.com.au>
Cc: Len Brown <lenb@kernel.org>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Russell King <rmk+serial@arm.linux.org.uk>
Cc: linux-serial@vger.kernel.org
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: linux-kernel@vger.kernel.org
Subject: [patch 2/5] PNP: workaround HP BIOS defect that leaves SMCF010 device partly enabled
Date: Wed, 04 Apr 2007 16:45:38 -0600 [thread overview]
Message-ID: <20070404224608.613840000@ldl.fc.hp.com> (raw)
In-Reply-To: <20070404224536.337573000@ldl.fc.hp.com>
[-- Attachment #1: hp-smcf010-quirk.patch --]
[-- Type: text/plain, Size: 1753 bytes --]
Some HP/Compaq firmware reports via ACPI that the SMCF010 IR device is
enabled, but in fact, it leaves the device partly disabled.
HP nw8240 BIOS 68DTV Ver. F.0F, released 9/15/2005 is one BIOS that has
this problem.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Index: w/drivers/pnp/quirks.c
===================================================================
--- w.orig/drivers/pnp/quirks.c 2007-03-29 14:24:51.000000000 -0600
+++ w/drivers/pnp/quirks.c 2007-03-29 14:42:54.000000000 -0600
@@ -16,6 +16,7 @@
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/pnp.h>
+#include <linux/io.h>
#include "base.h"
@@ -106,6 +107,34 @@
return;
}
+static void quirk_smc_enable(struct pnp_dev *dev)
+{
+ unsigned int firbase;
+
+ if (!dev->active || !pnp_port_valid(dev, 1))
+ return;
+
+ /*
+ * On the HP/Compaq nw8240 (and probably other similar machines),
+ * there is an SMCF010 device with two I/O port regions:
+ *
+ * 0x3e8-0x3ef SIR
+ * 0x100-0x10f FIR
+ *
+ * _STA reports the device is enabled, but in fact, the BIOS
+ * neglects to enable the FIR range. Fortunately, it does fully
+ * enable the device if we call _SRS.
+ */
+ firbase = pnp_port_start(dev, 1);
+ if (inb(firbase + 0x7 /* IRCC_MASTER */) == 0xff) {
+ pnp_err("%s (%s) enabled but not responding, disabling and "
+ "re-enabling", dev->dev.bus_id, pnp_dev_name(dev));
+ pnp_disable_dev(dev);
+ pnp_activate_dev(dev);
+ }
+}
+
+
/*
* PnP Quirks
* Cards or devices that need some tweaking due to incomplete resource info
@@ -126,6 +155,7 @@
{ "CTL0043", quirk_sb16audio_resources },
{ "CTL0044", quirk_sb16audio_resources },
{ "CTL0045", quirk_sb16audio_resources },
+ { "SMCf010", quirk_smc_enable },
{ "" }
};
--
next prev parent reply other threads:[~2007-04-04 22:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-04 22:45 [patch 0/5] PNP: convert x86 legacy serial to platform devs, add SMC IR PNP probe Bjorn Helgaas
2007-04-04 22:45 ` [patch 1/5] PNP: notice whether we have PNP devices (PNPBIOS or PNPACPI) Bjorn Helgaas
2007-04-04 22:45 ` Bjorn Helgaas [this message]
2007-04-04 22:45 ` [patch 3/5] smsc-ircc2: tidy up module parameter checking Bjorn Helgaas
2007-04-04 22:45 ` [patch 4/5] smsc-ircc2: add PNP support Bjorn Helgaas
2007-04-04 23:16 ` Randy Dunlap
2007-04-05 18:45 ` Bjorn Helgaas
2007-04-04 22:45 ` [patch 5/5] x86, serial: convert legacy COM ports to platform devices Bjorn Helgaas
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=20070404224608.613840000@ldl.fc.hp.com \
--to=bjorn.helgaas@hp.com \
--cc=akpm@linux-foundation.org \
--cc=kaos@ocs.com.au \
/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
Powered by JetHome