diff options
author | Steve French <sfrench@us.ibm.com> | 2006-06-20 16:36:38 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-06-20 16:36:38 -0400 |
commit | 75ba632a01d4dc70d0a0f3a92b5ec9b4a3644b2d (patch) | |
tree | c2f02ee30609d0d69308b4ca80d68d02a5f85552 /drivers/net/wireless/orinoco_cs.c | |
parent | 0fd1ffe0633b4b039b343b753598e6df435e034d (diff) | |
parent | 25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/net/wireless/orinoco_cs.c')
-rw-r--r-- | drivers/net/wireless/orinoco_cs.c | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index 434f7d7ad841..b2aec4d9fbb1 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c | |||
@@ -147,14 +147,11 @@ static void orinoco_cs_detach(struct pcmcia_device *link) | |||
147 | { | 147 | { |
148 | struct net_device *dev = link->priv; | 148 | struct net_device *dev = link->priv; |
149 | 149 | ||
150 | if (link->dev_node) | ||
151 | unregister_netdev(dev); | ||
152 | |||
150 | orinoco_cs_release(link); | 153 | orinoco_cs_release(link); |
151 | 154 | ||
152 | DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node); | ||
153 | if (link->dev_node) { | ||
154 | DEBUG(0, PFX "About to unregister net device %p\n", | ||
155 | dev); | ||
156 | unregister_netdev(dev); | ||
157 | } | ||
158 | free_orinocodev(dev); | 155 | free_orinocodev(dev); |
159 | } /* orinoco_cs_detach */ | 156 | } /* orinoco_cs_detach */ |
160 | 157 | ||
@@ -178,13 +175,10 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
178 | int last_fn, last_ret; | 175 | int last_fn, last_ret; |
179 | u_char buf[64]; | 176 | u_char buf[64]; |
180 | config_info_t conf; | 177 | config_info_t conf; |
181 | cisinfo_t info; | ||
182 | tuple_t tuple; | 178 | tuple_t tuple; |
183 | cisparse_t parse; | 179 | cisparse_t parse; |
184 | void __iomem *mem; | 180 | void __iomem *mem; |
185 | 181 | ||
186 | CS_CHECK(ValidateCIS, pcmcia_validate_cis(link, &info)); | ||
187 | |||
188 | /* | 182 | /* |
189 | * This reads the card's CONFIG tuple to find its | 183 | * This reads the card's CONFIG tuple to find its |
190 | * configuration registers. | 184 | * configuration registers. |
@@ -234,12 +228,6 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
234 | goto next_entry; | 228 | goto next_entry; |
235 | link->conf.ConfigIndex = cfg->index; | 229 | link->conf.ConfigIndex = cfg->index; |
236 | 230 | ||
237 | /* Does this card need audio output? */ | ||
238 | if (cfg->flags & CISTPL_CFTABLE_AUDIO) { | ||
239 | link->conf.Attributes |= CONF_ENABLE_SPKR; | ||
240 | link->conf.Status = CCSR_AUDIO_ENA; | ||
241 | } | ||
242 | |||
243 | /* Use power settings for Vcc and Vpp if present */ | 231 | /* Use power settings for Vcc and Vpp if present */ |
244 | /* Note that the CIS values need to be rescaled */ | 232 | /* Note that the CIS values need to be rescaled */ |
245 | if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { | 233 | if (cfg->vcc.present & (1 << CISTPL_POWER_VNOM)) { |
@@ -355,19 +343,10 @@ orinoco_cs_config(struct pcmcia_device *link) | |||
355 | net_device has been registered */ | 343 | net_device has been registered */ |
356 | 344 | ||
357 | /* Finally, report what we've done */ | 345 | /* Finally, report what we've done */ |
358 | printk(KERN_DEBUG "%s: index 0x%02x: ", | 346 | printk(KERN_DEBUG "%s: " DRIVER_NAME " at %s, irq %d, io " |
359 | dev->name, link->conf.ConfigIndex); | 347 | "0x%04x-0x%04x\n", dev->name, dev->class_dev.dev->bus_id, |
360 | if (link->conf.Vpp) | 348 | link->irq.AssignedIRQ, link->io.BasePort1, |
361 | printk(", Vpp %d.%d", link->conf.Vpp / 10, | 349 | link->io.BasePort1 + link->io.NumPorts1 - 1); |
362 | link->conf.Vpp % 10); | ||
363 | printk(", irq %d", link->irq.AssignedIRQ); | ||
364 | if (link->io.NumPorts1) | ||
365 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | ||
366 | link->io.BasePort1 + link->io.NumPorts1 - 1); | ||
367 | if (link->io.NumPorts2) | ||
368 | printk(" & 0x%04x-0x%04x", link->io.BasePort2, | ||
369 | link->io.BasePort2 + link->io.NumPorts2 - 1); | ||
370 | printk("\n"); | ||
371 | 350 | ||
372 | return 0; | 351 | return 0; |
373 | 352 | ||
@@ -436,7 +415,6 @@ static int orinoco_cs_resume(struct pcmcia_device *link) | |||
436 | struct orinoco_private *priv = netdev_priv(dev); | 415 | struct orinoco_private *priv = netdev_priv(dev); |
437 | struct orinoco_pccard *card = priv->card; | 416 | struct orinoco_pccard *card = priv->card; |
438 | int err = 0; | 417 | int err = 0; |
439 | unsigned long flags; | ||
440 | 418 | ||
441 | if (! test_bit(0, &card->hard_reset_in_progress)) { | 419 | if (! test_bit(0, &card->hard_reset_in_progress)) { |
442 | err = orinoco_reinit_firmware(dev); | 420 | err = orinoco_reinit_firmware(dev); |
@@ -446,7 +424,7 @@ static int orinoco_cs_resume(struct pcmcia_device *link) | |||
446 | return -EIO; | 424 | return -EIO; |
447 | } | 425 | } |
448 | 426 | ||
449 | spin_lock_irqsave(&priv->lock, flags); | 427 | spin_lock(&priv->lock); |
450 | 428 | ||
451 | netif_device_attach(dev); | 429 | netif_device_attach(dev); |
452 | priv->hw_unavailable--; | 430 | priv->hw_unavailable--; |
@@ -458,10 +436,10 @@ static int orinoco_cs_resume(struct pcmcia_device *link) | |||
458 | dev->name, err); | 436 | dev->name, err); |
459 | } | 437 | } |
460 | 438 | ||
461 | spin_unlock_irqrestore(&priv->lock, flags); | 439 | spin_unlock(&priv->lock); |
462 | } | 440 | } |
463 | 441 | ||
464 | return 0; | 442 | return err; |
465 | } | 443 | } |
466 | 444 | ||
467 | 445 | ||