* [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
@ 2001-09-29 0:28 Thomas Hood
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Hood @ 2001-09-29 0:28 UTC (permalink / raw)
To: linux-kernel; +Cc: Stelian Pop
Here is a new patch against stock 2.4.9-ac16.
It is about the minimum change that is required to get
-ac16 working on Sony Vaio laptops. I omit the
other changes to the PnP BIOS driver that I submitted
earlier ... we should get this straightened out first.
Once Alan releases a kernel with this or a similar
patch, I'll submit a new patch that fixes the
disabled-device problems I was grappling with before.
(Did you know that 'Bios' is a Hindi word for 'quicksand'?
I'll bet you didn't. That's because I just made it up.)
The fix is required because Sony Vaio laptops' PnP BIOS
won't handle requests to get the "current" resource
configuration.
The fix:
In many cases it doesn't matter whether we get the
"current" or "boot" configuration of a device (e.g.,
when we are just looking for the PnP I.D.s), so for
the most part the fix consists of asking for the
"boot" rather than the "current" config.
One thing that had to be done, however, was to eliminate
the /proc/bus/pnp interface to "current" config values
for those laptops that can't supply them. Accordingly, now,
the PnP BIOS proc module is initialized with a flag that can
tell it to omit the "current" files. The PnP BIOS driver
calls with this flag set when the is_sony_vaio_laptop global
variable is nonzero. The DMI scan routine will set
is_sony_vaio_laptop to 1, but at present it runs
too late for this to be of use to the PnP BIOS driver.
With the patch the variable can also be set using the
"nobioscurrpnp" boot option; users of Sony Vaio laptops
will have to use this option until the DMI scan is put
earlier in the boot sequence.
--
Thomas
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
@ 2001-09-29 0:29 Thomas Hood
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Hood @ 2001-09-29 0:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Stelian Pop
[-- Attachment #1: Type: text/plain, Size: 1625 bytes --]
_Here_ is a new patch against stock 2.4.9-ac16.
It is about the minimum change that is required to get
-ac16 working on Sony Vaio laptops. I omit the
other changes to the PnP BIOS driver that I submitted
earlier ... we should get this straightened out first.
Once Alan releases a kernel with this or a similar
patch, I'll submit a new patch that fixes the
disabled-device problems I was grappling with before.
(Did you know that 'Bios' is a Hindi word for 'quicksand'?
I'll bet you didn't. That's because I just made it up.)
The fix is required because Sony Vaio laptops' PnP BIOS
won't handle requests to get the "current" resource
configuration.
The fix:
In many cases it doesn't matter whether we get the
"current" or "boot" configuration of a device (e.g.,
when we are just looking for the PnP I.D.s), so for
the most part the fix consists of asking for the
"boot" rather than the "current" config.
One thing that had to be done, however, was to eliminate
the /proc/bus/pnp interface to "current" config values
for those laptops that can't supply them. Accordingly, now,
the PnP BIOS proc module is initialized with a flag that can
tell it to omit the "current" files. The PnP BIOS driver
calls with this flag set when the is_sony_vaio_laptop global
variable is nonzero. The DMI scan routine will set
is_sony_vaio_laptop to 1, but at present it runs
too late for this to be of use to the PnP BIOS driver.
With the patch the variable can also be set using the
"nobioscurrpnp" boot option; users of Sony Vaio laptops
will have to use this option until the DMI scan is put
earlier in the boot sequence.
--
Thomas
[-- Attachment #2: thood-pnpbiosvaiofix-patch-20010928-1 --]
[-- Type: text/plain, Size: 6676 bytes --]
diff -Naur linux-2.4.9-ac16/drivers/pnp/pnp_bios.c linux-2.4.9-ac16-pnpbiosfix/drivers/pnp/pnp_bios.c
--- linux-2.4.9-ac16/drivers/pnp/pnp_bios.c Fri Sep 28 15:35:07 2001
+++ linux-2.4.9-ac16-pnpbiosfix/drivers/pnp/pnp_bios.c Fri Sep 28 17:32:24 2001
@@ -48,7 +48,8 @@
/* PnP bios signature: "$PnP" */
#define PNP_SIGNATURE (('$' << 0) + ('P' << 8) + ('n' << 16) + ('P' << 24))
-void pnp_proc_init(void);
+extern int is_sony_vaio_laptop;
+
static void pnpbios_build_devlist(void);
/*
@@ -560,6 +561,7 @@
*/
static int pnp_bios_disabled;
+static int pnp_bios_dont_use_current_config;
static int disable_pnp_bios(char *str)
{
@@ -567,7 +569,14 @@
return 0;
}
+static int disable_use_of_current_config(char *str)
+{
+ pnp_bios_dont_use_current_config=1;
+ return 0;
+}
+
__setup("nobiospnp", disable_pnp_bios);
+__setup("nobioscurrpnp", disable_use_of_current_config);
void pnp_bios_init(void)
{
@@ -582,6 +591,10 @@
printk(KERN_INFO "PNP BIOS services disabled.\n");
return;
}
+
+ if ( is_sony_vaio_laptop )
+ pnp_bios_dont_use_current_config = 1;
+
for (check = (union pnpbios *) __va(0xf0000);
check < (union pnpbios *) __va(0xffff0);
((void *) (check)) += 16) {
@@ -616,7 +629,7 @@
}
pnpbios_build_devlist();
#ifdef CONFIG_PROC_FS
- pnp_proc_init();
+ pnp_proc_init( pnp_bios_dont_use_current_config );
#endif
#ifdef CONFIG_HOTPLUG
init_completion(&unload_sem);
@@ -846,8 +859,10 @@
dev = kmalloc(sizeof (struct pci_dev), GFP_KERNEL);
if (!dev)
break;
-
- if (pnp_bios_get_dev_node((u8 *)&num, (char )0 , node))
+
+ // For now we scan the "boot" config because some BIOSes
+ // oops when their "current" configs are accessed
+ if (pnp_bios_get_dev_node((u8 *)&num, (char )1 , node))
continue;
devs++;
diff -Naur linux-2.4.9-ac16/drivers/pnp/pnp_proc.c linux-2.4.9-ac16-pnpbiosfix/drivers/pnp/pnp_proc.c
--- linux-2.4.9-ac16/drivers/pnp/pnp_proc.c Fri Sep 28 15:35:07 2001
+++ linux-2.4.9-ac16-pnpbiosfix/drivers/pnp/pnp_proc.c Fri Sep 28 16:53:47 2001
@@ -33,7 +33,7 @@
node = kmalloc(node_info.max_node_size, GFP_KERNEL);
if (!node) return -ENOMEM;
for (num = 0; num != 0xff; ) {
- pnp_bios_get_dev_node(&num, 0, node);
+ pnp_bios_get_dev_node(&num, 1, node);
p += sprintf(p, "%02x\t%08x\t%02x:%02x:%02x\t%04x\n",
node->handle, node->eisa_id,
node->type_code[0], node->type_code[1],
@@ -83,13 +83,17 @@
return count;
}
-void pnp_proc_init(void)
+static int pnp_proc_dont_use_current_config;
+
+void pnp_proc_init( int dont_use_current )
{
struct pnp_bios_node *node;
struct proc_dir_entry *ent;
char name[3];
u8 num;
+ pnp_proc_dont_use_current_config = dont_use_current;
+
if (!pnp_bios_present()) return;
if (pnp_bios_dev_node_info(&node_info) != 0)
return;
@@ -105,14 +109,16 @@
if (!node) return;
for (num = 0; num != 0xff; ) {
//sprintf(name, "%02x", num);
- if (pnp_bios_get_dev_node(&num, 0, node) != 0)
+ if (pnp_bios_get_dev_node(&num, 1, node) != 0)
break;
sprintf(name, "%02x", node->handle);
- ent = create_proc_entry(name, 0, proc_pnp);
- if (ent) {
- ent->read_proc = proc_read_node;
- ent->write_proc = proc_write_node;
- ent->data = (void *)(long)(node->handle);
+ if ( !dont_use_current ) {
+ ent = create_proc_entry(name, 0, proc_pnp);
+ if (ent) {
+ ent->read_proc = proc_read_node;
+ ent->write_proc = proc_write_node;
+ ent->data = (void *)(long)(node->handle);
+ }
}
ent = create_proc_entry(name, 0, proc_pnp_boot);
if (ent) {
@@ -132,7 +138,8 @@
if (!proc_pnp) return;
for (num = 0; num != 0xff; num++) {
sprintf(name, "%02x", num);
- remove_proc_entry(name, proc_pnp);
+ if ( !pnp_proc_dont_use_current_config )
+ remove_proc_entry(name, proc_pnp);
remove_proc_entry(name, proc_pnp_boot);
}
remove_proc_entry("boot", proc_pnp);
diff -Naur linux-2.4.9-ac16/include/linux/pnp_bios.h linux-2.4.9-ac16-pnpbiosfix/include/linux/pnp_bios.h
--- linux-2.4.9-ac16/include/linux/pnp_bios.h Fri Sep 28 15:35:42 2001
+++ linux-2.4.9-ac16-pnpbiosfix/include/linux/pnp_bios.h Fri Sep 28 16:55:47 2001
@@ -146,6 +146,8 @@
extern int pnp_bios_read_escd (char *data, u32 nvram_base);
extern int pnp_bios_write_escd (char *data, u32 nvram_base);
+extern void pnp_proc_init ( int dont_use_current );
+
#ifdef CONFIG_PNPBIOS
#define pnpbios_for_each_dev(dev) \
for(dev = pnpbios_dev_g(pnpbios_devices.next); dev != pnpbios_dev_g(&pnpbios_devices); dev = pnpbios_dev_g(dev->global_list.next))
diff -Naur linux-2.4.9-ac16/arch/i386/kernel/dmi_scan.c linux-2.4.9-ac16-pnpbiosfix/arch/i386/kernel/dmi_scan.c
--- linux-2.4.9-ac16/arch/i386/kernel/dmi_scan.c Fri Sep 28 15:34:12 2001
+++ linux-2.4.9-ac16-pnpbiosfix/arch/i386/kernel/dmi_scan.c Fri Sep 28 17:04:17 2001
@@ -313,14 +313,12 @@
return 0;
}
-#if defined(CONFIG_SONYPI) || defined(CONFIG_SONYPI_MODULE)
/*
- * Check for a Sony Vaio system in order to enable the use of
- * the sonypi driver (we don't want this driver to be used on
- * other systems, even if they have the good PCI IDs).
+ * Check for a Sony Vaio system
*
- * This one isn't a bug detect for those who asked, we simply want to
- * activate Sony specific goodies like the camera and jogdial..
+ * On a Sony system we want to enable the use of the sonypi
+ * driver for Sony-specific goodies like the camera and jogdial.
+ * We also want to avoid using certain functions of the PnP BIOS.
*/
int is_sony_vaio_laptop;
@@ -333,7 +331,6 @@
}
return 0;
}
-#endif
/*
* This bios swaps the APM minute reporting bytes over (Many sony laptops
@@ -459,13 +456,11 @@
MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
MATCH(DMI_BIOS_VERSION,"Version R2.08")
} },
-#if defined(CONFIG_SONYPI) || defined(CONFIG_SONYPI_MODULE)
{ sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
MATCH(DMI_PRODUCT_NAME, "PCG-"),
NO_MATCH, NO_MATCH,
} },
-#endif
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0206H"),
diff -Naur linux-2.4.9-ac16/arch/i386/kernel/i386_ksyms.c linux-2.4.9-ac16-pnpbiosfix/arch/i386/kernel/i386_ksyms.c
--- linux-2.4.9-ac16/arch/i386/kernel/i386_ksyms.c Fri Sep 28 15:34:12 2001
+++ linux-2.4.9-ac16-pnpbiosfix/arch/i386/kernel/i386_ksyms.c Fri Sep 28 17:41:12 2001
@@ -171,8 +171,6 @@
EXPORT_SYMBOL(do_BUG);
#endif
-#if defined(CONFIG_SONYPI) || defined(CONFIG_SONYPI_MODULE)
extern int is_sony_vaio_laptop;
EXPORT_SYMBOL(is_sony_vaio_laptop);
-#endif
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
@ 2001-09-30 17:46 Thomas Hood
2001-10-01 10:04 ` Stelian Pop
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Hood @ 2001-09-30 17:46 UTC (permalink / raw)
To: linux-kernel
Here's the patch to the PnP BIOS driver for Vaio laptops again,
this time against 2.4.9-ac18. It's unchanged, but as per the
"SubmittingPatches" file, I append rather than attach it.
// Thomas
diff -Naur linux-2.4.9-ac16/drivers/pnp/pnp_bios.c linux-2.4.9-ac16-pnpbiosfix/drivers/pnp/pnp_bios.c
--- linux-2.4.9-ac16/drivers/pnp/pnp_bios.c Fri Sep 28 15:35:07 2001
+++ linux-2.4.9-ac16-pnpbiosfix/drivers/pnp/pnp_bios.c Fri Sep 28 17:32:24 2001
@@ -48,7 +48,8 @@
/* PnP bios signature: "$PnP" */
#define PNP_SIGNATURE (('$' << 0) + ('P' << 8) + ('n' << 16) + ('P' << 24))
-void pnp_proc_init(void);
+extern int is_sony_vaio_laptop;
+
static void pnpbios_build_devlist(void);
/*
@@ -560,6 +561,7 @@
*/
static int pnp_bios_disabled;
+static int pnp_bios_dont_use_current_config;
static int disable_pnp_bios(char *str)
{
@@ -567,7 +569,14 @@
return 0;
}
+static int disable_use_of_current_config(char *str)
+{
+ pnp_bios_dont_use_current_config=1;
+ return 0;
+}
+
__setup("nobiospnp", disable_pnp_bios);
+__setup("nobioscurrpnp", disable_use_of_current_config);
void pnp_bios_init(void)
{
@@ -582,6 +591,10 @@
printk(KERN_INFO "PNP BIOS services disabled.\n");
return;
}
+
+ if ( is_sony_vaio_laptop )
+ pnp_bios_dont_use_current_config = 1;
+
for (check = (union pnpbios *) __va(0xf0000);
check < (union pnpbios *) __va(0xffff0);
((void *) (check)) += 16) {
@@ -616,7 +629,7 @@
}
pnpbios_build_devlist();
#ifdef CONFIG_PROC_FS
- pnp_proc_init();
+ pnp_proc_init( pnp_bios_dont_use_current_config );
#endif
#ifdef CONFIG_HOTPLUG
init_completion(&unload_sem);
@@ -846,8 +859,10 @@
dev = kmalloc(sizeof (struct pci_dev), GFP_KERNEL);
if (!dev)
break;
-
- if (pnp_bios_get_dev_node((u8 *)&num, (char )0 , node))
+
+ // For now we scan the "boot" config because some BIOSes
+ // oops when their "current" configs are accessed
+ if (pnp_bios_get_dev_node((u8 *)&num, (char )1 , node))
continue;
devs++;
diff -Naur linux-2.4.9-ac16/drivers/pnp/pnp_proc.c linux-2.4.9-ac16-pnpbiosfix/drivers/pnp/pnp_proc.c
--- linux-2.4.9-ac16/drivers/pnp/pnp_proc.c Fri Sep 28 15:35:07 2001
+++ linux-2.4.9-ac16-pnpbiosfix/drivers/pnp/pnp_proc.c Fri Sep 28 16:53:47 2001
@@ -33,7 +33,7 @@
node = kmalloc(node_info.max_node_size, GFP_KERNEL);
if (!node) return -ENOMEM;
for (num = 0; num != 0xff; ) {
- pnp_bios_get_dev_node(&num, 0, node);
+ pnp_bios_get_dev_node(&num, 1, node);
p += sprintf(p, "%02x\t%08x\t%02x:%02x:%02x\t%04x\n",
node->handle, node->eisa_id,
node->type_code[0], node->type_code[1],
@@ -83,13 +83,17 @@
return count;
}
-void pnp_proc_init(void)
+static int pnp_proc_dont_use_current_config;
+
+void pnp_proc_init( int dont_use_current )
{
struct pnp_bios_node *node;
struct proc_dir_entry *ent;
char name[3];
u8 num;
+ pnp_proc_dont_use_current_config = dont_use_current;
+
if (!pnp_bios_present()) return;
if (pnp_bios_dev_node_info(&node_info) != 0)
return;
@@ -105,14 +109,16 @@
if (!node) return;
for (num = 0; num != 0xff; ) {
//sprintf(name, "%02x", num);
- if (pnp_bios_get_dev_node(&num, 0, node) != 0)
+ if (pnp_bios_get_dev_node(&num, 1, node) != 0)
break;
sprintf(name, "%02x", node->handle);
- ent = create_proc_entry(name, 0, proc_pnp);
- if (ent) {
- ent->read_proc = proc_read_node;
- ent->write_proc = proc_write_node;
- ent->data = (void *)(long)(node->handle);
+ if ( !dont_use_current ) {
+ ent = create_proc_entry(name, 0, proc_pnp);
+ if (ent) {
+ ent->read_proc = proc_read_node;
+ ent->write_proc = proc_write_node;
+ ent->data = (void *)(long)(node->handle);
+ }
}
ent = create_proc_entry(name, 0, proc_pnp_boot);
if (ent) {
@@ -132,7 +138,8 @@
if (!proc_pnp) return;
for (num = 0; num != 0xff; num++) {
sprintf(name, "%02x", num);
- remove_proc_entry(name, proc_pnp);
+ if ( !pnp_proc_dont_use_current_config )
+ remove_proc_entry(name, proc_pnp);
remove_proc_entry(name, proc_pnp_boot);
}
remove_proc_entry("boot", proc_pnp);
diff -Naur linux-2.4.9-ac16/include/linux/pnp_bios.h linux-2.4.9-ac16-pnpbiosfix/include/linux/pnp_bios.h
--- linux-2.4.9-ac16/include/linux/pnp_bios.h Fri Sep 28 15:35:42 2001
+++ linux-2.4.9-ac16-pnpbiosfix/include/linux/pnp_bios.h Fri Sep 28 16:55:47 2001
@@ -146,6 +146,8 @@
extern int pnp_bios_read_escd (char *data, u32 nvram_base);
extern int pnp_bios_write_escd (char *data, u32 nvram_base);
+extern void pnp_proc_init ( int dont_use_current );
+
#ifdef CONFIG_PNPBIOS
#define pnpbios_for_each_dev(dev) \
for(dev = pnpbios_dev_g(pnpbios_devices.next); dev != pnpbios_dev_g(&pnpbios_devices); dev = pnpbios_dev_g(dev->global_list.next))
diff -Naur linux-2.4.9-ac16/arch/i386/kernel/dmi_scan.c linux-2.4.9-ac16-pnpbiosfix/arch/i386/kernel/dmi_scan.c
--- linux-2.4.9-ac16/arch/i386/kernel/dmi_scan.c Fri Sep 28 15:34:12 2001
+++ linux-2.4.9-ac16-pnpbiosfix/arch/i386/kernel/dmi_scan.c Fri Sep 28 17:04:17 2001
@@ -313,14 +313,12 @@
return 0;
}
-#if defined(CONFIG_SONYPI) || defined(CONFIG_SONYPI_MODULE)
/*
- * Check for a Sony Vaio system in order to enable the use of
- * the sonypi driver (we don't want this driver to be used on
- * other systems, even if they have the good PCI IDs).
+ * Check for a Sony Vaio system
*
- * This one isn't a bug detect for those who asked, we simply want to
- * activate Sony specific goodies like the camera and jogdial..
+ * On a Sony system we want to enable the use of the sonypi
+ * driver for Sony-specific goodies like the camera and jogdial.
+ * We also want to avoid using certain functions of the PnP BIOS.
*/
int is_sony_vaio_laptop;
@@ -333,7 +331,6 @@
}
return 0;
}
-#endif
/*
* This bios swaps the APM minute reporting bytes over (Many sony laptops
@@ -459,13 +456,11 @@
MATCH(DMI_BIOS_VENDOR,"SystemSoft"),
MATCH(DMI_BIOS_VERSION,"Version R2.08")
} },
-#if defined(CONFIG_SONYPI) || defined(CONFIG_SONYPI_MODULE)
{ sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
MATCH(DMI_PRODUCT_NAME, "PCG-"),
NO_MATCH, NO_MATCH,
} },
-#endif
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0206H"),
diff -Naur linux-2.4.9-ac16/arch/i386/kernel/i386_ksyms.c linux-2.4.9-ac16-pnpbiosfix/arch/i386/kernel/i386_ksyms.c
--- linux-2.4.9-ac16/arch/i386/kernel/i386_ksyms.c Fri Sep 28 15:34:12 2001
+++ linux-2.4.9-ac16-pnpbiosfix/arch/i386/kernel/i386_ksyms.c Fri Sep 28 17:41:12 2001
@@ -171,8 +171,6 @@
EXPORT_SYMBOL(do_BUG);
#endif
-#if defined(CONFIG_SONYPI) || defined(CONFIG_SONYPI_MODULE)
extern int is_sony_vaio_laptop;
EXPORT_SYMBOL(is_sony_vaio_laptop);
-#endif
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
2001-09-30 17:46 Thomas Hood
@ 2001-10-01 10:04 ` Stelian Pop
2001-10-01 13:50 ` St?phane List
0 siblings, 1 reply; 13+ messages in thread
From: Stelian Pop @ 2001-10-01 10:04 UTC (permalink / raw)
To: Thomas Hood; +Cc: Linux Kernel Mailing List
On Sun, Sep 30, 2001 at 01:46:26PM -0400, Thomas Hood wrote:
> Here's the patch to the PnP BIOS driver for Vaio laptops again,
> this time against 2.4.9-ac18. It's unchanged, but as per the
> "SubmittingPatches" file, I append rather than attach it.
> // Thomas
Ok, here I am again, sorry for not being able to react on
your patches this weekend...
I tested your latest patches with a 2.4.9-ac18 kernels, and,
surprise, the kernel now boots correctly, _without_ any
pnpbios* boot option.
Since the DMI / PNP order was not modified as of ac18, I
suppose the patches change something else which makes it
work...
Stelian.
--
Stelian Pop <stelian.pop@fr.alcove.com>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
@ 2001-10-01 12:54 Thomas Hood
2001-10-01 13:41 ` Stelian Pop
2001-10-01 13:44 ` Alan Cox
0 siblings, 2 replies; 13+ messages in thread
From: Thomas Hood @ 2001-10-01 12:54 UTC (permalink / raw)
To: linux-kernel
Stelian: Okay, thanks for testing it.
Stelian and others: So the fix works using is_sony_vaio_laptop
to set the pnp_bios_dont_use_current_config flag. (Alan can
shorten this name if he wants ;) The is_sony_vaio_laptop
flag is only found in the i386 and x86_64 arches. Is the
pnpbios driver used on other arches? If so then we'll have
to provide the flag in those arches or pnpbios won't link.
Alan?
Thomas
--
(Don't reply to the From: address but to jdthood_AT_yahoo.co.uk)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
2001-10-01 12:54 Thomas Hood
@ 2001-10-01 13:41 ` Stelian Pop
2001-10-01 19:21 ` J.D. Hood
2001-10-01 13:44 ` Alan Cox
1 sibling, 1 reply; 13+ messages in thread
From: Stelian Pop @ 2001-10-01 13:41 UTC (permalink / raw)
To: jdthood; +Cc: Linux Kernel Mailing List
On Mon, Oct 01, 2001 at 08:54:01AM -0400, Thomas Hood wrote:
> Stelian: Okay, thanks for testing it.
>
> Stelian and others: So the fix works using is_sony_vaio_laptop
> to set the pnp_bios_dont_use_current_config flag. i
As I said, the DMI scan routines are still *after* the PnP
driver initialization. I didn't really tested it, but I suspect
is_sony_vaio_laptop to be 0 when your routines are called.
Something else must have changed in your code to enable my Vaio to
boot...
Stelian.
--
Stelian Pop <stelian.pop@fr.alcove.com>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
2001-10-01 12:54 Thomas Hood
2001-10-01 13:41 ` Stelian Pop
@ 2001-10-01 13:44 ` Alan Cox
1 sibling, 0 replies; 13+ messages in thread
From: Alan Cox @ 2001-10-01 13:44 UTC (permalink / raw)
To: Thomas Hood; +Cc: linux-kernel
> Stelian and others: So the fix works using is_sony_vaio_laptop
> to set the pnp_bios_dont_use_current_config flag. (Alan can
> shorten this name if he wants ;) The is_sony_vaio_laptop
> flag is only found in the i386 and x86_64 arches. Is the
> pnpbios driver used on other arches? If so then we'll have
> to provide the flag in those arches or pnpbios won't link.
> Alan?
PnPBIOS is a PC specific affliction. Other platforms have more elegantly
designed but even buggier solutions
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
2001-10-01 10:04 ` Stelian Pop
@ 2001-10-01 13:50 ` St?phane List
0 siblings, 0 replies; 13+ messages in thread
From: St?phane List @ 2001-10-01 13:50 UTC (permalink / raw)
To: julien23; +Cc: Linux Kernel Mailing List
Le driver de stelian est tombé en marche ;-)
In alcove.lists.linux.kernel, you wrote:
> On Sun, Sep 30, 2001 at 01:46:26PM -0400, Thomas Hood wrote:
>
> > Here's the patch to the PnP BIOS driver for Vaio laptops again,
> > this time against 2.4.9-ac18. It's unchanged, but as per the
> > "SubmittingPatches" file, I append rather than attach it.
> > // Thomas
>
> Ok, here I am again, sorry for not being able to react on
> your patches this weekend...
>
> I tested your latest patches with a 2.4.9-ac18 kernels, and,
> surprise, the kernel now boots correctly, _without_ any
> pnpbios* boot option.
>
> Since the DMI / PNP order was not modified as of ac18, I
> suppose the patches change something else which makes it
> work...
>
> Stelian.
> --
> Stelian Pop <stelian.pop@fr.alcove.com>
> |---------------- Free Software Engineer -----------------|
> | Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
> |------------- Alcôve, liberating software ---------------|
> -
> 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/
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
2001-10-01 13:41 ` Stelian Pop
@ 2001-10-01 19:21 ` J.D. Hood
2001-10-02 8:35 ` Stelian Pop
0 siblings, 1 reply; 13+ messages in thread
From: J.D. Hood @ 2001-10-01 19:21 UTC (permalink / raw)
To: Stelian Pop; +Cc: Linux Kernel Mailing List
--- Stelian Pop <stelian.pop@fr.alcove.com> wrote:
> As I said, the DMI scan routines are still *after* the PnP
> driver initialization. I didn't really tested it, but I suspect
> is_sony_vaio_laptop to be 0 when your routines are called.
> Something else must have changed in your code to enable my Vaio to
> boot...
I changed the initialization routine so that it would
use "boot" rather than "current" config values as much as
possible.
However, if is_sony_vaio_laptop is 0 at pnpbios init
time then if you look in /proc/bus/pnp you'll see numerical
entries there. Want to crash your machine? Just read from
them. (The numerically named entries in /proc/bus/pnp/boot
should be okay to read and write, though.)
We need to know when is_sony_vaio_laptop so that we can
stop this from happening. So either we put the dmi scan
earlier (which Alan says is in the works) or else we allow
the creation of the proc entries at init time but reject
read/write accesses after init time. I'll make up a patch
that does the latter, but it would be nicest if the proc
entries were omitted altogether.
--
Thomas
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
@ 2001-10-02 1:54 Thomas Hood
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Hood @ 2001-10-02 1:54 UTC (permalink / raw)
To: linux-kernel
I wrote:
> We need to know when is_sony_vaio_laptop so that we can
> stop this from happening. So either we put the dmi scan
> earlier (which Alan says is in the works) or else we allow
> the creation of the proc entries at init time but reject
> read/write accesses after init time. I'll make up a patch
> that does the latter, but it would be nicest if the proc
> entries were omitted altogether.
On second thought I think I'll just wait for the dmi scan
to be moved and in the meantime warn Vaio users no to
read or write the numerically named files under /proc/bus/pnp.
That means not using lspnp or setpnp without the '-b' option
either.
--
Thomas Hood
(Don't reply to the From: address but to jdthood_AT_yahoo.co.uk)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
2001-10-01 19:21 ` J.D. Hood
@ 2001-10-02 8:35 ` Stelian Pop
0 siblings, 0 replies; 13+ messages in thread
From: Stelian Pop @ 2001-10-02 8:35 UTC (permalink / raw)
To: J.D. Hood; +Cc: Alan Cox, Linux Kernel Mailing List
On Mon, Oct 01, 2001 at 08:21:04PM +0100, J.D. Hood wrote:
> However, if is_sony_vaio_laptop is 0 at pnpbios init
> time then if you look in /proc/bus/pnp you'll see numerical
> entries there.
Yes:
# cd /proc/bus/pnp/
# ls
00 01 02 03 04 05 06 07 08 09 0b 0c 0d 0e boot devices
# ls boot
00 01 02 03 04 05 06 07 08 09 0b 0c 0d 0e
> Want to crash your machine? Just read from
> them. (The numerically named entries in /proc/bus/pnp/boot
> should be okay to read and write, though.)
It doesn't crash. I did a "cat /proc/bus/pnp/0* > /dev/null"
and the laptop is still alive.
> We need to know when is_sony_vaio_laptop so that we can
> stop this from happening.
See above.
> So either we put the dmi scan
> earlier (which Alan says is in the works)
This is the solution, as Alan said DMI idents will be needed for
some other boards (GX ?).
Alan: are you already working on this or you're waiting for a
patch ?
> or else we allow
> the creation of the proc entries at init time but reject
> read/write accesses after init time. I'll make up a patch
> that does the latter, but it would be nicest if the proc
> entries were omitted altogether.
If we cannot read nor write them, there is no point in showing
them... (we already have the devices file to show the list).
Stelian.
--
Stelian Pop <stelian.pop@fr.alcove.com>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
@ 2001-10-02 13:37 Thomas Hood
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Hood @ 2001-10-02 13:37 UTC (permalink / raw)
To: linux-kernel
>> However, if is_sony_vaio_laptop is 0 at pnpbios init
>> time then if you look in /proc/bus/pnp you'll see numerical
>> entries there.
>
>Yes:
># cd /proc/bus/pnp/
># ls
>00 01 02 03 04 05 06 07 08 09 0b 0c 0d 0e boot devices
># ls boot
>00 01 02 03 04 05 06 07 08 09 0b 0c 0d 0e
>
>> Want to crash your machine? Just read from
>> them. (The numerically named entries in /proc/bus/pnp/boot
>> should be okay to read and write, though.)
>
>It doesn't crash. I did a "cat /proc/bus/pnp/0* > /dev/null"
>and the laptop is still alive.
Well! That's interesting. Reading from those files
induces the same calls to the PnP BIOS that crashed
your system before. A mystery. Perhaps there's a way
to use the "current" config of your PnP BIOS after all---
so long as you avoid the particular [sequences of] calls that
cause crashes. You'll have to experiment with this yourself.
In the meantime, though, it's safest to disable use of
the "current" config entirely on Sony Vaio Laptops. I'll
test your patch now.
--
Thomas Hood
(Don't reply to the From: address but to jdthood_AT_yahoo.co.uk)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix
@ 2001-10-02 15:15 Thomas Hood
0 siblings, 0 replies; 13+ messages in thread
From: Thomas Hood @ 2001-10-02 15:15 UTC (permalink / raw)
To: linux-kernel
Stelian: Okay, the patch you submitted under the Subject heading
"[PATCH 2.4.10-ac3] move DMI scan before other subsystem init (especially PnP)"
applied cleanly over 2.4.10-ac3, built and ran correctly on my
ThinkPad 600.
Alan: I'd suggest that this patch (Stelian's dmi scan relocation)
go in next, if it's altogether kosher. I'll submit a new version
of the pnpbios "additional fixes" patch once that's done.
--
Thomas Hood
(Don't reply to the From: address but to jdthood_AT_yahoo.co.uk)
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2001-10-02 15:15 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-29 0:28 [PATCH] PnPBIOS 2.4.9-ac1[56] Vaio fix Thomas Hood
-- strict thread matches above, loose matches on Subject: below --
2001-09-29 0:29 Thomas Hood
2001-09-30 17:46 Thomas Hood
2001-10-01 10:04 ` Stelian Pop
2001-10-01 13:50 ` St?phane List
2001-10-01 12:54 Thomas Hood
2001-10-01 13:41 ` Stelian Pop
2001-10-01 19:21 ` J.D. Hood
2001-10-02 8:35 ` Stelian Pop
2001-10-01 13:44 ` Alan Cox
2001-10-02 1:54 Thomas Hood
2001-10-02 13:37 Thomas Hood
2001-10-02 15:15 Thomas Hood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox