* [NETDRV] Fixed MCA resource bugs in at1700
@ 2004-06-05 8:38 Herbert Xu
2004-06-08 18:33 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Herbert Xu @ 2004-06-05 8:38 UTC (permalink / raw)
To: Jeff Garzik, netdev
[-- Attachment #1: Type: text/plain, Size: 316 bytes --]
Hi Jeff:
This patch fixes an incorrect MCA check as well as a leak on probe
failure in at1700.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
[-- Attachment #2: p --]
[-- Type: text/plain, Size: 1005 bytes --]
===== drivers/net/at1700.c 1.22 vs edited =====
--- 1.22/drivers/net/at1700.c 2004-05-22 17:28:45 +10:00
+++ edited/drivers/net/at1700.c 2004-06-05 18:34:29 +10:00
@@ -244,7 +244,7 @@
{
#ifdef CONFIG_MCA
struct net_local *lp = netdev_priv(dev);
- if (lp->mca_slot)
+ if (lp->mca_slot >= 0)
mca_mark_as_unused(lp->mca_slot);
#endif
free_irq(dev->irq, NULL);
@@ -446,11 +446,11 @@
break;
}
if (i == 8) {
- goto err_out;
+ goto err_mca;
}
} else {
if (fmv18x_probe_list[inb(ioaddr + IOCONFIG) & 0x07] != ioaddr)
- goto err_out;
+ goto err_mca;
irq = fmv_irqmap[(inb(ioaddr + IOCONFIG)>>6) & 0x03];
}
}
@@ -548,11 +548,16 @@
if (ret) {
printk (" AT1700 at %#3x is unusable due to a conflict on"
"IRQ %d.\n", ioaddr, irq);
- goto err_out;
+ goto err_mca;
}
return 0;
+err_mca:
+#ifdef CONFIG_MCA
+ if (slot >= 0)
+ mca_mark_as_unused(slot);
+#endif
err_out:
#ifndef CONFIG_X86_PC9800
release_region(ioaddr, AT1700_IO_EXTENT);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-08 18:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-05 8:38 [NETDRV] Fixed MCA resource bugs in at1700 Herbert Xu
2004-06-08 18:33 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).