lkml.org 
[lkml]   [2001]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPATCH: linux-2.4.7-pre3/drivers/char/sonypi.c would hang some non-Sony notebooks
	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
a device ID of either PCI_DEVICE_ID_INTEL_82371AB_3 (0x7110) or
PCI_DEVICE_ID_INTEL_82801BA_10 (0x244c). My Kapok 1100m notebook
computer has an Intel 82371ab, so the sonypi module automatically
loads at boot time and hangs the computer.

sonypi_init_module needs to do some kind of test to figure out
if it is on a Sony Vaio and abort otherwise. Looking at the result of
"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
following test to cause sonypi only to be loadable on machines that
have at least one PCI device that has a subsystem vendor ID of
PCI_VENDOR_ID_SONY.

--
Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com \ / San Jose, California 95129-1034
+1 408 261-6630 | g g d r a s i l United States of America
fax +1 408 261-6631 "Free Software For The Rest Of Us."
--- linux-2.4.7-pre3/drivers/char/sonypi.c Sat Jul 7 18:00:12 2001
+++ linux/drivers/char/sonypi.c Sat Jul 7 18:00:28 2001
@@ -690,7 +690,11 @@
};

static int __init sonypi_init_module(void) {
- return pci_module_init(&sonypi_driver);
+ if (pci_find_subsys(PCI_ANY_ID, PCI_ANY_ID,
+ PCI_VENDOR_ID_SONY, PCI_ANY_ID, NULL) != NULL)
+ return pci_module_init(&sonypi_driver);
+ else
+ return -ENODEV;
}

static void __exit sonypi_cleanup_module(void) {
\
 
 \ /
  Last update: 2005-03-22 12:56    [W:0.492 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site