o) Tear down receive interrupt on detach.

Submitted by:	Bhanu Prakash
This commit is contained in:
Juli Mallett 2011-03-16 08:56:22 +00:00
parent 64974004ec
commit 26de5f20cc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=219695
4 changed files with 7 additions and 7 deletions

View File

@ -39,7 +39,7 @@ void cvm_oct_common_set_multicast_list(struct ifnet *ifp);
void cvm_oct_common_set_mac_address(struct ifnet *ifp, const void *);
int cvm_oct_init_module(device_t);
void cvm_oct_cleanup_module(void);
void cvm_oct_cleanup_module(device_t);
/*
* XXX/juli

View File

@ -250,7 +250,7 @@ static void cvm_oct_configure_common_hw(device_t bus)
error = bus_setup_intr(bus, sc->sc_rx_irq, INTR_TYPE_NET | INTR_MPSAFE,
cvm_oct_do_interrupt, NULL, cvm_oct_device,
NULL);
&sc->sc_rx_intr_cookie);
if (error != 0) {
device_printf(bus, "could not setup workq irq");
return;
@ -473,17 +473,16 @@ int cvm_oct_init_module(device_t bus)
*
* @return Zero on success
*/
void cvm_oct_cleanup_module(void)
void cvm_oct_cleanup_module(device_t bus)
{
int port;
struct octebus_softc *sc = device_get_softc(bus);
/* Disable POW interrupt */
cvmx_write_csr(CVMX_POW_WQ_INT_THRX(pow_receive_group), 0);
#if 0
/* Free the interrupt handler */
free_irq(8 + pow_receive_group, cvm_oct_device);
#endif
bus_teardown_intr(bus, sc->sc_rx_irq, sc->sc_rx_intr_cookie);
callout_stop(&cvm_oct_poll_timer);
cvm_oct_rx_shutdown();

View File

@ -112,7 +112,7 @@ octebus_attach(device_t dev)
static int
octebus_detach(device_t dev)
{
cvm_oct_cleanup_module();
cvm_oct_cleanup_module(dev);
return (0);
}

View File

@ -33,6 +33,7 @@ struct octebus_softc {
device_t sc_dev;
struct resource *sc_rx_irq;
void *sc_rx_intr_cookie;
struct resource *sc_rgmii_irq;
struct resource *sc_spi_irq;