Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb aue(4): Enable rx/tx registers on init before us...



details:   https://anonhg.NetBSD.org/src/rev/3014f613a16c
branches:  trunk
changeset: 362533:3014f613a16c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Mar 03 05:53:41 2022 +0000

description:
aue(4): Enable rx/tx registers on init before usbnet_init_rx_tx.

This way, we still have exclusive access to the registers before
calls to aue_uno_mcast can start happening without the usbnet core
lock.

diffstat:

 sys/dev/usb/if_aue.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 58aae5da573a -r 3014f613a16c sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c      Thu Mar 03 05:53:33 2022 +0000
+++ b/sys/dev/usb/if_aue.c      Thu Mar 03 05:53:41 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_aue.c,v 1.182 2022/03/03 05:53:33 riastradh Exp $   */
+/*     $NetBSD: if_aue.c,v 1.183 2022/03/03 05:53:41 riastradh Exp $   */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.182 2022/03/03 05:53:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.183 2022/03/03 05:53:41 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -975,13 +975,13 @@
        else
                AUE_CLRBIT(sc, AUE_CTL2, AUE_CTL2_RX_PROMISC);
 
-       rv = usbnet_init_rx_tx(un);
-
        /* Enable RX and TX */
        aue_csr_write_1(sc, AUE_CTL0, AUE_CTL0_RXSTAT_APPEND | AUE_CTL0_RX_ENB);
        AUE_SETBIT(sc, AUE_CTL0, AUE_CTL0_TX_ENB);
        AUE_SETBIT(sc, AUE_CTL2, AUE_CTL2_EP3_CLR);
 
+       rv = usbnet_init_rx_tx(un);
+
        //mii_mediachg(mii);
 
        return rv;



Home | Main Index | Thread Index | Old Index