Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54831
b: refs/heads/master
c: a1e7e63
h: refs/heads/master
i:
  54829: 59a60af
  54827: 790766f
  54823: ad4dc5d
  54815: 1340df0
v: v3
  • Loading branch information
Bjorn Helgaas authored and Linus Torvalds committed May 8, 2007
1 parent aa21750 commit 1a785a2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f81dd149806bc53c68c92f34d61f88427079039
refs/heads/master: a1e7e636fe9fff531a4fc42e65c8e8416fde5220
30 changes: 30 additions & 0 deletions trunk/drivers/pnp/quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/pnp.h>
#include <linux/io.h>
#include "base.h"


Expand Down Expand Up @@ -106,6 +107,34 @@ static void quirk_sb16audio_resources(struct pnp_dev *dev)
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
Expand All @@ -126,6 +155,7 @@ static struct pnp_fixup pnp_fixups[] = {
{ "CTL0043", quirk_sb16audio_resources },
{ "CTL0044", quirk_sb16audio_resources },
{ "CTL0045", quirk_sb16audio_resources },
{ "SMCf010", quirk_smc_enable },
{ "" }
};

Expand Down

0 comments on commit 1a785a2

Please sign in to comment.