mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: stelian.pop@fr.alcove.com, m.ashley@unsw.edu.au,
	jun1m@mars.dti.ne.jp, t-kinjo@tc4.so-net.ne.jp,
	tridge@valinux.com
Cc: linux-kernel@vger.kernel.org
Subject: PATCH: linux-2.4.7-pre3/drivers/char/sonypi.c would hang some non-Sony notebooks
Date: Sat, 7 Jul 2001 18:04:14 -0700	[thread overview]
Message-ID: <20010707180414.A3456@adam.yggdrasil.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

	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."

[-- Attachment #2: sony.patch --]
[-- Type: text/plain, Size: 465 bytes --]

--- 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) {

             reply	other threads:[~2001-07-08  1:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-08  1:04 Adam J. Richter [this message]
2001-07-08  9:42 ` Robert J.Dunlop
2001-07-08 10:51   ` arjan
2001-07-09  9:43     ` Stelian Pop
2001-07-09 10:39       ` Alan Cox
2001-07-09 13:31         ` Stelian Pop
2001-07-08 10:26 Adam J. Richter
2001-07-08 16:46 ` Robert J.Dunlop
2001-07-09  7:52   ` Alexander Griesser
2001-07-09  9:35 ` Stelian Pop
2001-07-09 12:54 Adam J. Richter

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=20010707180414.A3456@adam.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=jun1m@mars.dti.ne.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.ashley@unsw.edu.au \
    --cc=stelian.pop@fr.alcove.com \
    --cc=t-kinjo@tc4.so-net.ne.jp \
    --cc=tridge@valinux.com \
    /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

all inboxes | Powered by JetHome®