Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb move struct axen_chain, struct axen_cdata, struc...
details: https://anonhg.NetBSD.org/src/rev/6249566bdc4e
branches: trunk
changeset: 457269:6249566bdc4e
user: mrg <mrg%NetBSD.org@localhost>
date: Tue Jun 18 09:34:57 2019 +0000
description:
move struct axen_chain, struct axen_cdata, struct axen_softc,
struct axen_type, sc_if, GET_MII(), and GET_IFP() -- all the
software defined components from if_axenreg.h into if_axen.c.
diffstat:
sys/dev/usb/if_axen.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++-
sys/dev/usb/if_axenreg.h | 65 +---------------------------------------------
2 files changed, 66 insertions(+), 66 deletions(-)
diffs (171 lines):
diff -r e8cc98e9da1d -r 6249566bdc4e sys/dev/usb/if_axen.c
--- a/sys/dev/usb/if_axen.c Tue Jun 18 08:36:52 2019 +0000
+++ b/sys/dev/usb/if_axen.c Tue Jun 18 09:34:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axen.c,v 1.41 2019/05/28 07:41:50 msaitoh Exp $ */
+/* $NetBSD: if_axen.c,v 1.42 2019/06/18 09:34:57 mrg 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.41 2019/05/28 07:41:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.42 2019/06/18 09:34:57 mrg Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -73,6 +73,69 @@
#define DPRINTFN(n, x)
#endif
+struct axen_softc;
+
+struct axen_chain {
+ struct axen_softc *axen_sc;
+ struct usbd_xfer *axen_xfer;
+ uint8_t *axen_buf;
+};
+
+struct axen_cdata {
+ struct axen_chain axen_tx_chain[AXEN_TX_LIST_CNT];
+ struct axen_chain axen_rx_chain[AXEN_RX_LIST_CNT];
+ int axen_tx_prod;
+ int axen_tx_cnt;
+};
+
+struct axen_softc {
+ device_t axen_dev;
+ struct ethercom axen_ec;
+ struct mii_data axen_mii;
+ krndsource_t rnd_source;
+ struct usbd_device * axen_udev;
+ struct usbd_interface * axen_iface;
+
+ uint16_t axen_vendor;
+ uint16_t axen_product;
+ uint16_t axen_flags;
+
+ int axen_ed[AXEN_ENDPT_MAX];
+ struct usbd_pipe *axen_ep[AXEN_ENDPT_MAX];
+ int axen_if_flags;
+ struct axen_cdata axen_cdata;
+ struct callout axen_stat_ch;
+
+ int axen_refcnt;
+ bool axen_dying;
+ bool axen_attached;
+
+ struct usb_task axen_tick_task;
+
+ krwlock_t axen_mii_lock;
+
+ int axen_link;
+
+ 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;
+
+#define sc_if axen_ec.ec_if
+};
+
+#define GET_MII(sc) (&(sc)->axen_mii)
+#define GET_IFP(sc) (&(sc)->sc_if)
+
+struct axen_type {
+ struct usb_devno axen_dev;
+ uint16_t axen_flags;
+#define AX178A 0x0001 /* AX88178a */
+#define AX179 0x0002 /* AX88179 */
+};
+
/*
* Various supported device vendors/products.
*/
diff -r e8cc98e9da1d -r 6249566bdc4e sys/dev/usb/if_axenreg.h
--- a/sys/dev/usb/if_axenreg.h Tue Jun 18 08:36:52 2019 +0000
+++ b/sys/dev/usb/if_axenreg.h Tue Jun 18 09:34:57 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_axenreg.h,v 1.13 2019/05/28 08:59:35 msaitoh Exp $ */
+/* $NetBSD: if_axenreg.h,v 1.14 2019/06/18 09:34:57 mrg Exp $ */
/* $OpenBSD: if_axenreg.h,v 1.1 2013/10/07 05:37:41 yuo Exp $ */
/*
@@ -230,28 +230,6 @@
#define AXEN_ENDPT_INTR 0x2
#define AXEN_ENDPT_MAX 0x3
-struct axen_type {
- struct usb_devno axen_dev;
- uint16_t axen_flags;
-#define AX178A 0x0001 /* AX88178a */
-#define AX179 0x0002 /* AX88179 */
-};
-
-struct axen_softc;
-
-struct axen_chain {
- struct axen_softc *axen_sc;
- struct usbd_xfer *axen_xfer;
- uint8_t *axen_buf;
-};
-
-struct axen_cdata {
- struct axen_chain axen_tx_chain[AXEN_TX_LIST_CNT];
- struct axen_chain axen_rx_chain[AXEN_RX_LIST_CNT];
- int axen_tx_prod;
- int axen_tx_cnt;
-};
-
struct axen_qctrl {
uint8_t ctrl;
uint8_t timer_low;
@@ -264,44 +242,3 @@
uint32_t plen; /* packet length */
uint32_t gso;
} __packed;
-
-struct axen_softc {
- device_t axen_dev;
- struct ethercom axen_ec;
- struct mii_data axen_mii;
- krndsource_t rnd_source;
- struct usbd_device * axen_udev;
- struct usbd_interface * axen_iface;
-
- uint16_t axen_vendor;
- uint16_t axen_product;
- uint16_t axen_flags;
-
- int axen_ed[AXEN_ENDPT_MAX];
- struct usbd_pipe *axen_ep[AXEN_ENDPT_MAX];
- int axen_if_flags;
- struct axen_cdata axen_cdata;
- struct callout axen_stat_ch;
-
- int axen_refcnt;
- bool axen_dying;
- bool axen_attached;
-
- struct usb_task axen_tick_task;
-
- krwlock_t axen_mii_lock;
-
- int axen_link;
-
- 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;
-
-#define sc_if axen_ec.ec_if
-};
-
-#define GET_MII(sc) (&(sc)->axen_mii)
-#define GET_IFP(sc) (&(sc)->sc_if)
Home |
Main Index |
Thread Index |
Old Index