Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Add ratecheck for TX errors for axen(4) and mue(4).
details: https://anonhg.NetBSD.org/src/rev/47d299e54bf4
branches: trunk
changeset: 448645:47d299e54bf4
user: rin <rin%NetBSD.org@localhost>
date: Wed Feb 06 08:38:41 2019 +0000
description:
Add ratecheck for TX errors for axen(4) and mue(4).
diffstat:
sys/dev/usb/if_axen.c | 12 ++++++------
sys/dev/usb/if_axenreg.h | 3 ++-
sys/dev/usb/if_mue.c | 7 ++++---
3 files changed, 12 insertions(+), 10 deletions(-)
diffs (87 lines):
diff -r 38dbe4a729cb -r 47d299e54bf4 sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c Wed Feb 06 08:37:12 2019 +0000
+++ b/sys/dev/usb/if_axen.c Wed Feb 06 08:38:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axen.c,v 1.34 2019/02/06 08:16:49 rin Exp $ */
+/* $NetBSD: if_axen.c,v 1.35 2019/02/06 08:38:41 rin Exp $ */
/* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.34 2019/02/06 08:16:49 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.35 2019/02/06 08:38:41 rin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1025,10 +1025,9 @@
return; /* XXX plugged out or down */
if (status == USBD_NOT_STARTED || status == USBD_CANCELLED)
return;
- if (usbd_ratecheck(&sc->axen_rx_notice)) {
+ if (usbd_ratecheck(&sc->axen_rx_notice))
aprint_error_dev(sc->axen_dev, "usb errors on rx: %s\n",
usbd_errstr(status));
- }
if (status == USBD_STALLED)
usbd_clear_endpoint_stall_async(sc->axen_ep[AXEN_ENDPT_RX]);
goto done;
@@ -1217,8 +1216,9 @@
return;
}
ifp->if_oerrors++;
- aprint_error_dev(sc->axen_dev, "usb error on tx: %s\n",
- usbd_errstr(status));
+ if (usbd_ratecheck(&sc->axen_tx_notice))
+ aprint_error_dev(sc->axen_dev, "usb error on tx: %s\n",
+ usbd_errstr(status));
if (status == USBD_STALLED)
usbd_clear_endpoint_stall_async(sc->axen_ep[AXEN_ENDPT_TX]);
splx(s);
diff -r 38dbe4a729cb -r 47d299e54bf4 sys/dev/usb/if_axenreg.h
--- a/sys/dev/usb/if_axenreg.h Wed Feb 06 08:37:12 2019 +0000
+++ b/sys/dev/usb/if_axenreg.h Wed Feb 06 08:38:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axenreg.h,v 1.9 2019/02/06 08:06:59 rin Exp $ */
+/* $NetBSD: if_axenreg.h,v 1.10 2019/02/06 08:38:41 rin Exp $ */
/* $OpenBSD: if_axenreg.h,v 1.1 2013/10/07 05:37:41 yuo Exp $ */
/*
@@ -299,6 +299,7 @@
int axen_phyno;
struct timeval axen_rx_notice;
+ struct timeval axen_tx_notice;
u_int axen_rx_bufsz;
u_int axen_tx_bufsz;
int axen_rev;
diff -r 38dbe4a729cb -r 47d299e54bf4 sys/dev/usb/if_mue.c
--- a/sys/dev/usb/if_mue.c Wed Feb 06 08:37:12 2019 +0000
+++ b/sys/dev/usb/if_mue.c Wed Feb 06 08:38:41 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mue.c,v 1.37 2019/02/06 08:31:38 rin Exp $ */
+/* $NetBSD: if_mue.c,v 1.38 2019/02/06 08:38:41 rin Exp $ */
/* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */
/*
@@ -20,7 +20,7 @@
/* Driver for Microchip LAN7500/LAN7800 chipsets. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.37 2019/02/06 08:31:38 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.38 2019/02/06 08:38:41 rin Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1634,7 +1634,8 @@
return;
}
ifp->if_oerrors++;
- MUE_PRINTF(sc, "%s\n", usbd_errstr(status));
+ if (usbd_ratecheck(&sc->mue_tx_notice))
+ MUE_PRINTF(sc, "%s\n", usbd_errstr(status));
if (status == USBD_STALLED)
usbd_clear_endpoint_stall_async(
sc->mue_ep[MUE_ENDPT_TX]);
Home |
Main Index |
Thread Index |
Old Index