Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6:
[PATCH] pcmcia/pcmcia_resource.c: fix crash when using Cardbus cards
[PATCH] vrc4171: update config
[PATCH] pcmcia: fix oops in static mapping case
[PATCH] pcmcia: remove unneeded forward declarations
[PATCH] pcmcia: do not set dev_node to NULL too early
[PATCH] pcmcia: fix comment for pcmcia_load_firmware
[PATCH] pcmcia: unload second device first
[PATCH] pcmcia: add new ID to pcnet_cs

+20 -17
+1
drivers/net/pcmcia/pcnet_cs.c
··· 1639 1639 PCMCIA_DEVICE_PROD_ID12("CONTEC", "C-NET(PC)C-10L", 0x21cab552, 0xf6f90722), 1640 1640 PCMCIA_DEVICE_PROD_ID12("corega", "FEther PCC-TXF", 0x0a21501a, 0xa51564a2), 1641 1641 PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-T", 0x5261440f, 0xfa9d85bd), 1642 + PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-TD", 0x5261440f, 0xc49bd73d), 1642 1643 PCMCIA_DEVICE_PROD_ID12("Corega K.K.", "corega EtherII PCC-TD", 0xd4fdcbd8, 0xc49bd73d), 1643 1644 PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega Ether PCC-T", 0x5261440f, 0x6705fcaa), 1644 1645 PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FastEther PCC-TX", 0x5261440f, 0x485e85d9),
+1 -1
drivers/pcmcia/Kconfig
··· 250 250 251 251 config PCMCIA_VRC4171 252 252 tristate "NEC VRC4171 Card Controllers support" 253 - depends on VRC4171 && PCMCIA 253 + depends on CPU_VR41XX && ISA && PCMCIA 254 254 255 255 config PCMCIA_VRC4173 256 256 tristate "NEC VRC4173 CARDU support"
+7 -9
drivers/pcmcia/ds.c
··· 236 236 /** 237 237 * pcmcia_load_firmware - load CIS from userspace if device-provided is broken 238 238 * @dev - the pcmcia device which needs a CIS override 239 - * @filename - requested filename in /lib/firmware/cis/ 239 + * @filename - requested filename in /lib/firmware/ 240 240 * 241 241 * This uses the in-kernel firmware loading mechanism to use a "fake CIS" if 242 242 * the one provided by the card is broken. The firmware files reside in 243 - * /lib/firmware/cis/ in userspace. 243 + * /lib/firmware/ in userspace. 244 244 */ 245 245 static int pcmcia_load_firmware(struct pcmcia_device *dev, char * filename) 246 246 { ··· 298 298 * 299 299 * Registers a PCMCIA driver with the PCMCIA bus core. 300 300 */ 301 - static int pcmcia_device_probe(struct device *dev); 302 - static int pcmcia_device_remove(struct device * dev); 303 - 304 301 int pcmcia_register_driver(struct pcmcia_driver *driver) 305 302 { 306 303 if (!driver) ··· 397 400 * call which will then check whether there are two 398 401 * pseudo devices, and if not, add the second one. 399 402 */ 400 - did = (struct pcmcia_device_id *) p_dev->dev.driver_data; 403 + did = p_dev->dev.driver_data; 401 404 if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && 402 405 (p_dev->socket->device_count == 1) && (p_dev->device_no == 0)) 403 406 pcmcia_add_pseudo_device(p_dev->socket); ··· 445 448 return; 446 449 } 447 450 448 - 449 451 static int pcmcia_device_remove(struct device * dev) 450 452 { 451 453 struct pcmcia_device *p_dev; ··· 459 463 * pseudo multi-function card, we need to unbind 460 464 * all devices 461 465 */ 462 - did = (struct pcmcia_device_id *) p_dev->dev.driver_data; 466 + did = p_dev->dev.driver_data; 463 467 if (did && (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) && 464 468 (p_dev->socket->device_count != 0) && 465 469 (p_dev->device_no == 0)) ··· 471 475 472 476 if (p_drv->remove) 473 477 p_drv->remove(p_dev); 478 + 479 + p_dev->dev_node = NULL; 474 480 475 481 /* check for proper unloading */ 476 482 if (p_dev->_irq || p_dev->_io || p_dev->_locked) ··· 626 628 } 627 629 628 630 /* Add to the list in pcmcia_bus_socket */ 629 - list_add_tail(&p_dev->socket_device_list, &s->devices_list); 631 + list_add(&p_dev->socket_device_list, &s->devices_list); 630 632 631 633 spin_unlock_irqrestore(&pcmcia_dev_list_lock, flags); 632 634
+11 -7
drivers/pcmcia/pcmcia_resource.c
··· 88 88 } 89 89 if ((s->features & SS_CAP_STATIC_MAP) && s->io_offset) { 90 90 *base = s->io_offset | (*base & 0x0fff); 91 - s->io[0].res->flags = (s->io[0].res->flags & ~IORESOURCE_BITS) | (attr & IORESOURCE_BITS); 92 91 return 0; 93 92 } 94 93 /* Check for an already-allocated window that must conflict with ··· 208 209 if (!(s->state & SOCKET_PRESENT)) 209 210 return CS_NO_CARD; 210 211 211 - config->Function = p_dev->func; 212 212 213 213 #ifdef CONFIG_CARDBUS 214 214 if (s->state & SOCKET_CARDBUS) { ··· 221 223 config->AssignedIRQ = s->irq.AssignedIRQ; 222 224 if (config->AssignedIRQ) 223 225 config->Attributes |= CONF_ENABLE_IRQ; 224 - config->BasePort1 = s->io[0].res->start; 225 - config->NumPorts1 = s->io[0].res->end - config->BasePort1 + 1; 226 + if (s->io[0].res) { 227 + config->BasePort1 = s->io[0].res->start; 228 + config->NumPorts1 = s->io[0].res->end - config->BasePort1 + 1; 229 + } 226 230 } 227 231 return CS_SUCCESS; 228 232 } 229 233 #endif 230 234 231 - c = (p_dev) ? p_dev->function_config : NULL; 235 + if (p_dev) { 236 + c = p_dev->function_config; 237 + config->Function = p_dev->func; 238 + } else { 239 + c = NULL; 240 + config->Function = 0; 241 + } 232 242 233 243 if ((c == NULL) || !(c->state & CONFIG_LOCKED)) { 234 244 config->Attributes = 0; ··· 953 947 pcmcia_release_irq(p_dev, &p_dev->irq); 954 948 if (&p_dev->win) 955 949 pcmcia_release_window(p_dev->win); 956 - 957 - p_dev->dev_node = NULL; 958 950 } 959 951 EXPORT_SYMBOL(pcmcia_disable_device);