summaryrefslogtreecommitdiffstats
path: root/sys/dev/re/if_re.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/re/if_re.c')
-rw-r--r--sys/dev/re/if_re.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c
index 92db00a..c825091 100644
--- a/sys/dev/re/if_re.c
+++ b/sys/dev/re/if_re.c
@@ -2622,6 +2622,16 @@ re_init_locked(struct rl_softc *sc)
re_reset(sc);
/*
+ * For C+ mode, initialize the RX descriptors and mbufs.
+ */
+ if (re_rx_list_init(sc) != 0) {
+ device_printf(sc->rl_dev, "no memory for RX buffers\n");
+ re_stop(sc);
+ return;
+ }
+ re_tx_list_init(sc);
+
+ /*
* Enable C+ RX and TX mode, as well as VLAN stripping and
* RX checksum offload. We must configure the C+ register
* before all others.
@@ -2673,12 +2683,6 @@ re_init_locked(struct rl_softc *sc)
CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
/*
- * For C+ mode, initialize the RX descriptors and mbufs.
- */
- re_rx_list_init(sc);
- re_tx_list_init(sc);
-
- /*
* Load the addresses of the RX and TX lists into the chip.
*/
OpenPOWER on IntegriCloud