From: Stelian Pop <stelian@popies.net>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Adrian Bunk <bunk@fs.tum.de>,
Jozef Kruger <jozefkruger@hotmail.com>
Subject: [PATCH 2.4.21-pre6] sonypi driver update
Date: Sun, 30 Mar 2003 16:57:37 +0200 [thread overview]
Message-ID: <20030330165737.D10928@deep-space-9.dsnet> (raw)
Hi,
This is the 2.4 version of the previous patch, which:
* fixes a hang problem when loading the driver on (at least) a
PCG-FX105k. Thanks to Jozef Kruger for reporting the problem
and testing different versions of this fix.
* fixes a .text.exit problem in the sonypi driver related to the
recent PM changes (thanks to Adrian Bunk for the patch).
Marcelo, please apply.
Stelian.
===== drivers/char/sonypi.h 1.16 vs edited =====
--- 1.16/drivers/char/sonypi.h Fri Feb 21 11:22:44 2003
+++ edited/drivers/char/sonypi.h Sun Mar 30 15:10:53 2003
@@ -37,7 +37,7 @@
#ifdef __KERNEL__
#define SONYPI_DRIVER_MAJORVERSION 1
-#define SONYPI_DRIVER_MINORVERSION 18
+#define SONYPI_DRIVER_MINORVERSION 19
#define SONYPI_DEVICE_MODEL_TYPE1 1
#define SONYPI_DEVICE_MODEL_TYPE2 2
===== drivers/char/sonypi.c 1.14 vs edited =====
--- 1.14/drivers/char/sonypi.c Tue Feb 18 12:33:33 2003
+++ edited/drivers/char/sonypi.c Sun Mar 30 15:10:30 2003
@@ -162,7 +162,7 @@
}
/* Disables the device - this comes from the AML code in the ACPI bios */
-static void __devexit sonypi_type1_dis(void) {
+static void sonypi_type1_dis(void) {
u32 v;
pci_read_config_dword(sonypi_device.dev, SONYPI_G10A, &v);
@@ -174,7 +174,7 @@
outl(v, SONYPI_IRQ_PORT);
}
-static void __devexit sonypi_type2_dis(void) {
+static void sonypi_type2_dis(void) {
if (ec_write(SONYPI_SHIB, 0))
printk(KERN_WARNING "ec_write failed\n");
if (ec_write(SONYPI_SLOB, 0))
@@ -696,14 +696,36 @@
}
for (i = 0; irq_list[i].irq; i++) {
- if (!request_irq(irq_list[i].irq, sonypi_irq,
- SA_SHIRQ, "sonypi", sonypi_irq)) {
- sonypi_device.irq = irq_list[i].irq;
- sonypi_device.bits = irq_list[i].bits;
+
+ sonypi_device.irq = irq_list[i].irq;
+ sonypi_device.bits = irq_list[i].bits;
+
+ /* Enable sonypi IRQ settings */
+ if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2)
+ sonypi_type2_srs();
+ else
+ sonypi_type1_srs();
+
+ sonypi_call1(0x82);
+ sonypi_call2(0x81, 0xff);
+ if (compat)
+ sonypi_call1(0x92);
+ else
+ sonypi_call1(0x82);
+
+ /* Now try requesting the irq from the system */
+ if (!request_irq(sonypi_device.irq, sonypi_irq,
+ SA_SHIRQ, "sonypi", sonypi_irq))
break;
- }
+
+ /* If request_irq failed, disable sonypi IRQ settings */
+ if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2)
+ sonypi_type2_dis();
+ else
+ sonypi_type1_dis();
}
- if (!sonypi_device.irq ) {
+
+ if (!irq_list[i].irq) {
printk(KERN_ERR "sonypi: request_irq failed\n");
ret = -ENODEV;
goto out3;
@@ -715,17 +737,6 @@
outb(0xf0, 0xb2);
#endif
- if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2)
- sonypi_type2_srs();
- else
- sonypi_type1_srs();
-
- sonypi_call1(0x82);
- sonypi_call2(0x81, 0xff);
- if (compat)
- sonypi_call1(0x92);
- else
- sonypi_call1(0x82);
printk(KERN_INFO "sonypi: Sony Programmable I/O Controller Driver v%d.%d.\n",
SONYPI_DRIVER_MAJORVERSION,
--
Stelian Pop <stelian@popies.net>
reply other threads:[~2003-03-30 14:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20030330165737.D10928@deep-space-9.dsnet \
--to=stelian@popies.net \
--cc=bunk@fs.tum.de \
--cc=jozefkruger@hotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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®