If ti_chipinit() fails in ti_stop(), ignore the error and release
all allocated TX/RX buffer resources. If the interface is brought to up again after the error, we will leak allocated TX/RX buffers.
This commit is contained in:
parent
4fce1b52ed
commit
aeeee7eec1
@ -3845,11 +3845,11 @@ ti_stop(struct ti_softc *sc)
|
|||||||
TI_DO_CMD(TI_CMD_HOST_STATE, TI_CMD_CODE_STACK_DOWN, 0);
|
TI_DO_CMD(TI_CMD_HOST_STATE, TI_CMD_CODE_STACK_DOWN, 0);
|
||||||
|
|
||||||
/* Halt and reinitialize. */
|
/* Halt and reinitialize. */
|
||||||
if (ti_chipinit(sc) != 0)
|
if (ti_chipinit(sc) == 0) {
|
||||||
return;
|
ti_mem_zero(sc, 0x2000, 0x100000 - 0x2000);
|
||||||
ti_mem_zero(sc, 0x2000, 0x100000 - 0x2000);
|
/* XXX ignore init errors. */
|
||||||
if (ti_chipinit(sc) != 0)
|
ti_chipinit(sc);
|
||||||
return;
|
}
|
||||||
|
|
||||||
/* Free the RX lists. */
|
/* Free the RX lists. */
|
||||||
ti_free_rx_ring_std(sc);
|
ti_free_rx_ring_std(sc);
|
||||||
|
Loading…
Reference in New Issue
Block a user