Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/dev/usb Pull up following revision(s) (requested by s...



details:   https://anonhg.NetBSD.org/src/rev/ec1ce6ae4490
branches:  netbsd-9
changeset: 932492:ec1ce6ae4490
user:      martin <martin%NetBSD.org@localhost>
date:      Sat May 09 08:16:54 2020 +0000

description:
Pull up following revision(s) (requested by skrll in ticket #896):

        sys/dev/usb/if_cdce.c: revision 1.71

Search the descriptors of the appropriate interface to ensure correct
match.

PR kern/55240 cdce(4) error "no data interface" when ECM USB IF are
preceded by ACM USB IF

diffstat:

 sys/dev/usb/if_cdce.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r 9f5c6d50c08d -r ec1ce6ae4490 sys/dev/usb/if_cdce.c
--- a/sys/dev/usb/if_cdce.c     Thu May 07 18:27:19 2020 +0000
+++ b/sys/dev/usb/if_cdce.c     Sat May 09 08:16:54 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_cdce.c,v 1.53.2.1 2019/09/01 13:00:36 martin Exp $ */
+/*     $NetBSD: if_cdce.c,v 1.53.2.2 2020/05/09 08:16:54 martin Exp $ */
 
 /*
  * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul%windriver.com@localhost>
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.53.2.1 2019/09/01 13:00:36 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.53.2.2 2020/05/09 08:16:54 martin Exp $");
 
 #include <sys/param.h>
 
@@ -145,8 +145,9 @@
        if (un->un_flags & CDCE_NO_UNION)
                un->un_iface = uiaa->uiaa_iface;
        else {
-               ud = (const usb_cdc_union_descriptor_t *)usb_find_desc(un->un_udev,
-                   UDESC_CS_INTERFACE, UDESCSUB_CDC_UNION);
+               ud = (const usb_cdc_union_descriptor_t *)usb_find_desc_if(un->un_udev,
+                   UDESC_CS_INTERFACE, UDESCSUB_CDC_UNION,
+                   usbd_get_interface_descriptor(uiaa->uiaa_iface));
                if (ud == NULL) {
                        aprint_error_dev(self, "no union descriptor\n");
                        return;
@@ -236,8 +237,9 @@
                return;
        }
 
-       ue = (const usb_cdc_ethernet_descriptor_t *)usb_find_desc(dev,
-           UDESC_CS_INTERFACE, UDESCSUB_CDC_ENF);
+       ue = (const usb_cdc_ethernet_descriptor_t *)usb_find_desc_if(dev,
+           UDESC_CS_INTERFACE, UDESCSUB_CDC_ENF,
+           usbd_get_interface_descriptor(uiaa->uiaa_iface));
        if (!ue || usbd_get_string(dev, ue->iMacAddress, eaddr_str) ||
            ether_aton_r(un->un_eaddr, sizeof(un->un_eaddr), eaddr_str)) {
                aprint_normal_dev(self, "faking address\n");



Home | Main Index | Thread Index | Old Index