25-akpm/drivers/pnp/pnpbios/bioscalls.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/pnp/pnpbios/bioscalls.c~pnp-bios-fix drivers/pnp/pnpbios/bioscalls.c --- 25/drivers/pnp/pnpbios/bioscalls.c~pnp-bios-fix Tue Dec 23 15:52:55 2003 +++ 25-akpm/drivers/pnp/pnpbios/bioscalls.c Tue Dec 23 15:52:55 2003 @@ -493,7 +493,7 @@ static int __pnp_bios_read_escd(char *da if (!pnp_bios_present()) return ESCD_FUNCTION_NOT_SUPPORTED; status = call_pnp_bios(PNP_READ_ESCD, 0, PNP_TS1, PNP_TS2, PNP_DS, 0, 0, 0, - data, 65536, (void *)nvram_base, 65536); + data, 65536, __va((void *)nvram_base), 65536); return status; } @@ -516,7 +516,7 @@ static int pnp_bios_write_escd(char *dat if (!pnp_bios_present()) return ESCD_FUNCTION_NOT_SUPPORTED; status = call_pnp_bios(PNP_WRITE_ESCD, 0, PNP_TS1, PNP_TS2, PNP_DS, 0, 0, 0, - data, 65536, nvram_base, 65536); + data, 65536, __va((void *)nvram_base), 65536); return status; } #endif drivers/pnp/Kconfig | 28 ++-------------------------- drivers/pnp/isapnp/Kconfig | 11 +++++++++++ drivers/pnp/pnpbios/Kconfig | 41 +++++++++++++++++++++++++++++++++++++++++ drivers/pnp/pnpbios/Makefile | 2 +- drivers/pnp/pnpbios/pnpbios.h | 4 ++-- 5 files changed, 57 insertions(+), 29 deletions(-) diff -puN /dev/null drivers/pnp/isapnp/Kconfig --- /dev/null 2002-08-30 16:31:37.000000000 -0700 +++ 25-akpm/drivers/pnp/isapnp/Kconfig 2003-11-15 23:03:06.000000000 -0800 @@ -0,0 +1,11 @@ +# +# ISA Plug and Play configuration +# +config ISAPNP + bool "ISA Plug and Play support (EXPERIMENTAL)" + depends on PNP && EXPERIMENTAL + help + Say Y here if you would like support for ISA Plug and Play devices. + Some information is in . + + If unsure, say Y. diff -puN drivers/pnp/Kconfig~pnp-fix-2 drivers/pnp/Kconfig --- 25/drivers/pnp/Kconfig~pnp-fix-2 2003-11-15 23:03:06.000000000 -0800 +++ 25-akpm/drivers/pnp/Kconfig 2003-11-15 23:03:06.000000000 -0800 @@ -30,33 +30,9 @@ config PNP_DEBUG comment "Protocols" depends on PNP -config ISAPNP - bool "ISA Plug and Play support (EXPERIMENTAL)" - depends on PNP && EXPERIMENTAL - help - Say Y here if you would like support for ISA Plug and Play devices. - Some information is in . +source "drivers/pnp/isapnp/Kconfig" - If unsure, say Y. - -config PNPBIOS - bool "Plug and Play BIOS support (EXPERIMENTAL)" - depends on PNP && EXPERIMENTAL - ---help--- - Linux uses the PNPBIOS as defined in "Plug and Play BIOS - Specification Version 1.0A May 5, 1994" to autodetect built-in - mainboard resources (e.g. parallel port resources). - - Some features (e.g. event notification, docking station information, - ISAPNP services) are not used. - - Note: ACPI is expected to supersede PNPBIOS some day, currently it - co-exists nicely. - - See latest pcmcia-cs (stand-alone package) for a nice "lspnp" tools, - or have a look at /proc/bus/pnp. - - If unsure, say Y. +source "drivers/pnp/pnpbios/Kconfig" endmenu diff -puN /dev/null drivers/pnp/pnpbios/Kconfig --- /dev/null 2002-08-30 16:31:37.000000000 -0700 +++ 25-akpm/drivers/pnp/pnpbios/Kconfig 2003-11-15 23:03:06.000000000 -0800 @@ -0,0 +1,41 @@ +# +# Plug and Play BIOS configuration +# +config PNPBIOS + bool "Plug and Play BIOS support (EXPERIMENTAL)" + depends on PNP && EXPERIMENTAL + ---help--- + Linux uses the PNPBIOS as defined in "Plug and Play BIOS + Specification Version 1.0A May 5, 1994" to autodetect built-in + mainboard resources (e.g. parallel port resources). + + Some features (e.g. event notification, docking station information, + ISAPNP services) are not currently implemented. + + If you would like the kernel to detect and allocate resources to + your mainboard devices (on some systems they are disabled by the + BIOS) say Y here. Also the PNPBIOS can help prevent resource + conflicts between mainboard devices and other bus devices. + + Note: ACPI is expected to supersede PNPBIOS some day, currently it + co-exists nicely. If you have a non-ISA system that supports ACPI, + you probably don't need PNPBIOS support. + +config PNPBIOS_PROC_FS + bool "Plug and Play BIOS /proc interface" + depends on PNPBIOS && PROC_FS + ---help--- + If you say Y here and to "/proc file system support", you will be + able to directly access the PNPBIOS. This includes resource + allocation, ESCD, and other PNPBIOS services. Using this + interface is potentially dangerous because the PNPBIOS driver will + not be notified of any resource changes made by writting directly. + Also some buggy systems will fault when accessing certain features + in the PNPBIOS /proc interface (e.g. ESCD). + + See the latest pcmcia-cs (stand-alone package) for a nice set of + PNPBIOS /proc interface tools (lspnp and setpnp). + + Unless you are debugging or have other specific reasons, it is + recommended that you say N here. + diff -puN drivers/pnp/pnpbios/Makefile~pnp-fix-2 drivers/pnp/pnpbios/Makefile --- 25/drivers/pnp/pnpbios/Makefile~pnp-fix-2 2003-11-15 23:03:06.000000000 -0800 +++ 25-akpm/drivers/pnp/pnpbios/Makefile 2003-11-15 23:03:06.000000000 -0800 @@ -2,6 +2,6 @@ # Makefile for the kernel PNPBIOS driver. # -pnpbios-proc-$(CONFIG_PROC_FS) = proc.o +pnpbios-proc-$(CONFIG_PNPBIOS_PROC_FS) = proc.o obj-y := core.o bioscalls.o rsparser.o $(pnpbios-proc-y) diff -puN drivers/pnp/pnpbios/pnpbios.h~pnp-fix-2 drivers/pnp/pnpbios/pnpbios.h --- 25/drivers/pnp/pnpbios/pnpbios.h~pnp-fix-2 2003-11-15 23:03:06.000000000 -0800 +++ 25-akpm/drivers/pnp/pnpbios/pnpbios.h 2003-11-15 23:03:06.000000000 -0800 @@ -36,7 +36,7 @@ extern void pnpid32_to_pnpid(u32 id, cha extern void pnpbios_print_status(const char * module, u16 status); extern void pnpbios_calls_init(union pnp_bios_install_struct * header); -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_PNPBIOS_PROC_FS extern int pnpbios_interface_attach_device(struct pnp_bios_node * node); extern int pnpbios_proc_init (void); extern void pnpbios_proc_exit (void); @@ -44,4 +44,4 @@ extern void pnpbios_proc_exit (void); static inline int pnpbios_interface_attach_device(struct pnp_bios_node * node) { return 0; } static inline int pnpbios_proc_init (void) { return 0; } static inline void pnpbios_proc_exit (void) { ; } -#endif /* CONFIG_PROC */ +#endif /* CONFIG_PNPBIOS_PROC_FS */ drivers/pnp/isapnp/core.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff -puN drivers/pnp/isapnp/core.c~pnp-fix-3 drivers/pnp/isapnp/core.c --- 25/drivers/pnp/isapnp/core.c~pnp-fix-3 2003-11-15 23:03:07.000000000 -0800 +++ 25-akpm/drivers/pnp/isapnp/core.c 2003-11-15 23:03:07.000000000 -0800 @@ -890,11 +890,9 @@ static int __init isapnp_build_device_li header[4], header[5], header[6], header[7], header[8]); printk(KERN_DEBUG "checksum = 0x%x\n", checksum); #endif - /* Don't be strict on the checksum, here ! - e.g. 'SCM SwapBox Plug and Play' has header[8]==0 (should be: b7)*/ - if (header[8] == 0) - ; - else if (checksum == 0x00 || checksum != header[8]) /* not valid CSN */ + /* Per Section 6.1 of the Plug and Play ISA Specification (Version 1.0a), */ + /* Bit[7] of Vendor ID Byte 0 must be 0 */ + if (header[0] & 0x80) /* not valid CSN */ continue; if ((card = isapnp_alloc(sizeof(struct pnp_card))) == NULL) continue;