PnP Bug Fixes (12/13)
Subsystems (2)
PATCH 1/1 PnP Bug Fixes (12/13)
This patch contains numerous bugfixes discovered by myself and Shawn Starr.
Please apply,
Adam
drivers/pnp/driver.c +0 -3
@@ -107,9 +107,6 @@if (error <0 )return error; } - }else { -if ((pnp_drv->flags &PNP_DRIVER_DO_NOT_ACTIVATE )) -pnp_disable_dev (pnp_dev); } error =0 ;if (pnp_drv->probe && pnp_dev->active) {
drivers/pnp/interface.c +44 -15
117 lines not on this page · raw message
drivers/pnp/isapnp/core.c +3 -4
@@ -765,7 +765,7 @@/* * Parse resource map for ISA PnP card. */ - +static void __init isapnp_parse_resource_map (struct pnp_card *card) {unsigned char type, tmp[17 ];
@@ -822,7 +822,7 @@ {int i, j;unsigned char checksum =0x6a , bit, b; - +for (i =0 ; i <8 ; i++) { b = data[i];for (j =0 ; j <8 ; j++) {
@@ -900,7 +900,6 @@ }for (tmp =0 ; tmp <PNP_MAX_DMA ; tmp++) { ret =isapnp_read_byte (ISAPNP_CFG_DMA + tmp); -pnp_info ("dma %d" , tmp);if (ret ==4 )continue ;if (rule.dma[tmp]) {/* some isapnp systems forget to set this to 4 so we have to check */
@@ -1174,7 +1173,7 @@return 0 ; } -subsys_initcall (isapnp_init); +device_initcall (isapnp_init);/* format is: noisapnp */
drivers/pnp/manager.c +71 -60
292 lines not on this page · raw message
drivers/pnp/names.c +1 -1
@@ -33,7 +33,7 @@char *name = dev->dev.name;for (i=0 ; i<sizeof (pnp_id_eisaid)/sizeof (pnp_id_eisaid[0 ]); i++){if (compare_pnp_id (dev->id,pnp_id_eisaid[i])){ -sprintf (name,"%s" , pnp_id_names[i]); +snprintf (name,DEVICE_NAME_SIZE ,"%s" , pnp_id_names[i]);return ; } }
drivers/pnp/pnpbios/core.c +2 -2
@@ -146,9 +146,9 @@/* * At some point we want to use this stack frame pointer to unwind -* after PnP BIOS oopses. +* after PnP BIOS oopses. */ - +u32 pnp_bios_fault_esp;u32 pnp_bios_fault_eip;u32 pnp_bios_is_utter_crap =0 ;
drivers/pnp/resource.c +4 -3
@@ -2,7 +2,7 @@* resource.c - Contains functions for registering and analyzing resource information * * based on isapnp.c resource management (c) Jaroslav Kysela <[email protected]> -* Copyright 2002 Adam Belay <[email protected]> +* Copyright 2003 Adam Belay <[email protected]> * */
@@ -598,7 +598,7 @@struct pnp_irq * irq;struct pnp_dma * dma; -if (depnum <=0 || !rule) +if (depnum <0 || !rule)return -EINVAL ;/* independent */
@@ -631,6 +631,8 @@ }/* dependent */ +if (depnum ==0 ) +return 1 ; res =pnp_find_resources (dev, depnum);if (!res)return -ENODEV ;
@@ -680,7 +682,6 @@EXPORT_SYMBOL (pnp_add_dma_resource);EXPORT_SYMBOL (pnp_add_port_resource);EXPORT_SYMBOL (pnp_add_mem_resource); -EXPORT_SYMBOL (pnp_add_mem32_resource);EXPORT_SYMBOL (pnp_init_resource_table);EXPORT_SYMBOL (pnp_generate_rule);
drivers/pnp/support.c +11 -1
@@ -36,7 +36,7 @@#define LARGE_TAG_ANSISTR 0x02#define LARGE_TAG_UNICODESTR 0x03#define LARGE_TAG_VENDOR 0x04 -#define LARGE_TAG_MEM32 0x05 +#define LARGE_TAG_MEM32 0x05#define LARGE_TAG_FIXEDMEM32 0x06
@@ -143,6 +143,11 @@/* ignore this for now */ break ; } +case LARGE_TAG_VENDOR : + { +/* do nothing */ +break ; + }case LARGE_TAG_MEM32 : {int io = *(int *) &p[4 ];
@@ -204,6 +209,11 @@if (len !=7 ) goto sm_err;current_ioresource (res, io, size); +break ; + } +case SMALL_TAG_VENDOR : + { +/* do nothing */ break ; }case SMALL_TAG_FIXEDPORT :
drivers/pnp/system.c +1 -0
@@ -93,6 +93,7 @@static struct pnp_driver system_pnp_driver = { .name ="system" , + .flags =PNP_DRIVER_DO_NOT_ACTIVATE , .id_table = pnp_dev_table, .probe = system_pnp_probe, .remove =NULL ,