mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-03 17:44:54 +00:00
orinoco: Resume spectrum_cs in the same way as orinoco_cs
Retrieval of external firmware has been resolved, and should work with the standard orinoco resume algorithm. This fixes an issue where priv->hw_unavailable indicates the card is ready when firmware has not been loaded. Signed-off by: David Kilroy <kilroyd@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
2cea7b2619
commit
ac7cafd722
@ -450,10 +450,29 @@ spectrum_cs_resume(struct pcmcia_device *link)
|
|||||||
{
|
{
|
||||||
struct net_device *dev = link->priv;
|
struct net_device *dev = link->priv;
|
||||||
struct orinoco_private *priv = netdev_priv(dev);
|
struct orinoco_private *priv = netdev_priv(dev);
|
||||||
|
unsigned long flags;
|
||||||
|
int err;
|
||||||
|
|
||||||
|
err = orinoco_reinit_firmware(dev);
|
||||||
|
if (err) {
|
||||||
|
printk(KERN_ERR "%s: Error %d re-initializing firmware\n",
|
||||||
|
dev->name, err);
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_lock_irqsave(&priv->lock, flags);
|
||||||
|
|
||||||
netif_device_attach(dev);
|
netif_device_attach(dev);
|
||||||
priv->hw_unavailable--;
|
priv->hw_unavailable--;
|
||||||
schedule_work(&priv->reset_work);
|
|
||||||
|
if (priv->open && !priv->hw_unavailable) {
|
||||||
|
err = __orinoco_up(dev);
|
||||||
|
if (err)
|
||||||
|
printk(KERN_ERR "%s: Error %d restarting card\n",
|
||||||
|
dev->name, err);
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user