disestablish the interupt if we fail to (among other things) download
the firmware successfully. This prevents the kernel from crashing later at interupt enable time, if firmware download fails like with my 3c990B card.
This commit is contained in:
parent
aeb58ad6a0
commit
020c431dc5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_txp.c,v 1.6 2004/04/23 21:13:06 itojun Exp $ */
|
||||
/* $NetBSD: if_txp.c,v 1.7 2004/07/01 08:34:24 is Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.6 2004/04/23 21:13:06 itojun Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_txp.c,v 1.7 2004/07/01 08:34:24 is Exp $");
|
||||
|
||||
#include "bpfilter.h"
|
||||
#include "opt_inet.h"
|
||||
@ -268,21 +268,21 @@ txp_attach(parent, self, aux)
|
||||
printf(": interrupting at %s\n", intrstr);
|
||||
|
||||
if (txp_chip_init(sc))
|
||||
return;
|
||||
goto cleanupintr;
|
||||
|
||||
if (txp_download_fw(sc))
|
||||
return;
|
||||
goto cleanupintr;
|
||||
|
||||
if (txp_alloc_rings(sc))
|
||||
return;
|
||||
goto cleanupintr;
|
||||
|
||||
if (txp_command(sc, TXP_CMD_MAX_PKT_SIZE_WRITE, TXP_MAX_PKTLEN, 0, 0,
|
||||
NULL, NULL, NULL, 1))
|
||||
return;
|
||||
goto cleanupintr;
|
||||
|
||||
if (txp_command(sc, TXP_CMD_STATION_ADDRESS_READ, 0, 0, 0,
|
||||
&p1, &p2, NULL, 1))
|
||||
return;
|
||||
goto cleanupintr;
|
||||
|
||||
txp_set_filter(sc);
|
||||
|
||||
@ -352,6 +352,15 @@ txp_attach(parent, self, aux)
|
||||
ether_ifattach(ifp, enaddr);
|
||||
|
||||
shutdownhook_establish(txp_shutdown, sc);
|
||||
|
||||
|
||||
return;
|
||||
|
||||
cleanupintr:
|
||||
pci_intr_disestablish(pc,sc->sc_ih);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user