Re: PATCH: linux-2.4.7-pre3/drivers/char/sonypi.c would hang some non-Sony notebooks

Robert J.Dunlop (rjd@xyzzy.clara.co.uk)
Sun, 8 Jul 2001 10:42:55 +0100


Hi,

First off, it works for me on my VAIO PCG-Z600NE.

On Sun, Jul 08, 2001 at 09:30:44AM +0100, Adam J. Richter wrote:
> The pci_device_id tables in linux-2.4.7-pre3/drivers/char/sonypi.c
> claims that the driver wants to be loaded on all computers that have
> an that have a PCI device with vendor id PCI_VENDOR_ID_INTEL and
...
> "lspci -v" on my Sony Vaio Picturebook, I see that, while none of the
> PCI devices have Sony's vendor ID, a number of them have Sony's
> vendor ID as their subsystem vendor ID's. So, I have implemented the

Just a niggle however. This still isn't a very good test to finding a
Sony laptop. What'll happen on machines that have any sort of Sony
plugin device ?

How's about we test for a machine that has a host bridge with the Sony
subvendor ID, rather than any device.

WARNING!! untested code.

static int __init sonypi_init_module(void) {
struct pci_dev *dev;

if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) == NULL)
return -ENODEV; /* Bizzare. No host bridge */

if (dev->subsystem_vendor != PCI_VENDOR_ID_SONY)
return -ENODEV; /* Not a Sony machine */

return pci_module_init(&sonypi_driver);
}

I guess this'll still pickup Sony desktops.
Perhaps we need a survey of lspci -nv results for sony and non-sony
machines ?

-- 
        Bob Dunlop
        rjd@xyzzy.clara.co.uk
        www.xyzzy.clara.co.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/