Tue Aug 27 17:24:51 2019 UTC ()
Fix bug, remove {0,0} because we switched to usb_lookup().


(maxv)
diff -r1.66 -r1.67 src/sys/dev/usb/if_upl.c

cvs diff -r1.66 -r1.67 src/sys/dev/usb/if_upl.c (expand / switch to unified diff)

--- src/sys/dev/usb/if_upl.c 2019/08/20 06:37:06 1.66
+++ src/sys/dev/usb/if_upl.c 2019/08/27 17:24:51 1.67
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_upl.c,v 1.66 2019/08/20 06:37:06 mrg Exp $ */ 1/* $NetBSD: if_upl.c,v 1.67 2019/08/27 17:24:51 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 The NetBSD Foundation, Inc. 4 * Copyright (c) 2000 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Lennart Augustsson (lennart@augustsson.net) at 8 * by Lennart Augustsson (lennart@augustsson.net) at
9 * Carlstedt Research & Technology. 9 * Carlstedt Research & Technology.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -25,27 +25,27 @@ @@ -25,27 +25,27 @@
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE. 30 * POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33/* 33/*
34 * Prolific PL2301/PL2302 driver 34 * Prolific PL2301/PL2302 driver
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.66 2019/08/20 06:37:06 mrg Exp $"); 38__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.67 2019/08/27 17:24:51 maxv Exp $");
39 39
40#ifdef _KERNEL_OPT 40#ifdef _KERNEL_OPT
41#include "opt_inet.h" 41#include "opt_inet.h"
42#include "opt_usb.h" 42#include "opt_usb.h"
43#endif 43#endif
44 44
45#include <sys/param.h> 45#include <sys/param.h>
46 46
47#include <dev/usb/usbnet.h> 47#include <dev/usb/usbnet.h>
48 48
49#include <net/if_types.h> 49#include <net/if_types.h>
50 50
51#ifdef INET 51#ifdef INET
@@ -85,28 +85,27 @@ int upldebug = 0; @@ -85,28 +85,27 @@ int upldebug = 0;
85#else 85#else
86#define DPRINTF(x) 86#define DPRINTF(x)
87#define DPRINTFN(n,x) 87#define DPRINTFN(n,x)
88#endif 88#endif
89 89
90/* 90/*
91 * Various supported device vendors/products. 91 * Various supported device vendors/products.
92 */ 92 */
93static struct usb_devno sc_devs[] = { 93static struct usb_devno sc_devs[] = {
94 { USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301 }, 94 { USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301 },
95 { USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302 }, 95 { USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302 },
96 { USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL25A1 }, 96 { USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL25A1 },
97 { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U258 }, 97 { USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U258 },
98 { USB_VENDOR_NI, USB_PRODUCT_NI_HTOH_7825 }, 98 { USB_VENDOR_NI, USB_PRODUCT_NI_HTOH_7825 }
99 { 0, 0 } 
100}; 99};
101 100
102int upl_match(device_t, cfdata_t, void *); 101int upl_match(device_t, cfdata_t, void *);
103void upl_attach(device_t, device_t, void *); 102void upl_attach(device_t, device_t, void *);
104 103
105CFATTACH_DECL_NEW(upl, sizeof(struct usbnet), upl_match, upl_attach, 104CFATTACH_DECL_NEW(upl, sizeof(struct usbnet), upl_match, upl_attach,
106 usbnet_detach, usbnet_activate); 105 usbnet_detach, usbnet_activate);
107 106
108#if 0 107#if 0
109static void upl_intr_cb(struct usbnet *, usbd_status); 108static void upl_intr_cb(struct usbnet *, usbd_status);
110#endif 109#endif
111static void upl_rx_loop(struct usbnet *, struct usbnet_chain *, uint32_t); 110static void upl_rx_loop(struct usbnet *, struct usbnet_chain *, uint32_t);
112static unsigned upl_tx_prepare(struct usbnet *, struct mbuf *, 111static unsigned upl_tx_prepare(struct usbnet *, struct mbuf *,