Commit 54299ef7 authored by Komuro's avatar Komuro Committed by Jeff Garzik

pcnet_cs, axnet_cs: clear bogus interrupt before request_irq

Signed-off-by: default avatarKomuro <komurojun-mbn@nifty.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 52cc3086
......@@ -525,12 +525,14 @@ static int axnet_open(struct net_device *dev)
int ret;
axnet_dev_t *info = PRIV(dev);
struct pcmcia_device *link = info->p_dev;
unsigned int nic_base = dev->base_addr;
DEBUG(2, "axnet_open('%s')\n", dev->name);
if (!pcmcia_dev_present(link))
return -ENODEV;
outb_p(0xFF, nic_base + EN0_ISR); /* Clear bogus intr. */
ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev);
if (ret)
return ret;
......
......@@ -969,6 +969,7 @@ static int pcnet_open(struct net_device *dev)
int ret;
pcnet_dev_t *info = PRIV(dev);
struct pcmcia_device *link = info->p_dev;
unsigned int nic_base = dev->base_addr;
DEBUG(2, "pcnet_open('%s')\n", dev->name);
......@@ -976,6 +977,8 @@ static int pcnet_open(struct net_device *dev)
return -ENODEV;
set_misc_reg(dev);
outb_p(0xFF, nic_base + EN0_ISR); /* Clear bogus intr. */
ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev);
if (ret)
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment