Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: urndis0 works on amd64-8.0 but not on evbarm-current
Le 2019-05-10 08:21, sc dying a écrit :
On Fri, May 10, 2019 at 6:08 AM Mayuresh <mayuresh%acm.org@localhost> wrote:
On Fri, May 10, 2019 at 06:05:34AM +0000, sc dying wrote:
> Attached files look bogus, I'll resend.
Due to some other compulsions (a lot of pkgs that I need not building
under current, discussed on various threads) I reverted my environment
to
8.0.
Is there any possibility to try things on 8.0?
8.0 looks like having same problems and I think the patches can be
applied.
I had the same problem on 8.1, then I tried HEAD. I applied the patches
(with a slight modification) and it seems to work:
$ uname -rms
NetBSD 9.99.32 evbarm
The device is attached correctly when plugged:
ugen0 at uhub1 port 2
ugen0: LGE (0x18d1) Nexus 5 (0x4ee1), rev 2.00/2.32, addr 6
But it is detached when I activate the connection sharing via USB:
ugen0: detached
ugen0: at uhub1 port 2 (addr 6) disconnected
I have to physically unplug the device, to re-plug it and to activate
the connection sharing to make it working:
ugen0 at uhub1 port 2
ugen0: LGE (0x18d1) Nexus 5 (0x4ee1), rev 2.00/2.32, addr 6
ugen0: detached
ugen0: at uhub1 port 2 (addr 6) disconnected
urndis0 at uhub1 port 2 configuration 1 interface 0
urndis0: LGE (0x18d1) Nexus 5 (0x4ee3), rev 2.00/2.32, addr 6
urndis0: Ethernet address 66:41:fa:b0:f0:d3
Index: dev/usb/if_urndis.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_urndis.c,v
retrieving revision 1.34
diff -u -r1.34 if_urndis.c
--- dev/usb/if_urndis.c 31 Oct 2019 11:59:40 -0000 1.34
+++ dev/usb/if_urndis.c 3 Jan 2020 19:04:34 -0000
@@ -111,14 +111,17 @@
uint16_t index, uint16_t value, void *buf, size_t buflen)
{
usb_device_request_t req;
+ uint16_t flags;
req.bmRequestType = rt;
+ flags = (UT_GET_DIR(rt) & UT_READ) ? USBD_SHORT_XFER_OK : 0;
req.bRequest = r;
USETW(req.wValue, value);
USETW(req.wIndex, index);
USETW(req.wLength, buflen);
- return usbd_do_request(un->un_udev, &req, buf);
+ return usbd_do_request_flags(un->un_udev, &req, buf, flags, NULL,
+ USBD_DEFAULT_TIMEOUT);
}
static usbd_status
Index: external/bsd/dwc2/dwc2.c
===================================================================
RCS file: /cvsroot/src/sys/external/bsd/dwc2/dwc2.c,v
retrieving revision 1.66
diff -u -r1.66 dwc2.c
--- external/bsd/dwc2/dwc2.c 4 Dec 2019 06:28:35 -0000 1.66
+++ external/bsd/dwc2/dwc2.c 3 Jan 2020 19:04:49 -0000
@@ -1525,11 +1525,13 @@
i, urb->iso_descs[i].status);
}
+#if 0
if (!status) {
if (!(xfer->ux_flags & USBD_SHORT_XFER_OK) &&
xfer->ux_actlen < xfer->ux_length)
status = -EIO;
}
+#endif
switch (status) {
case 0:
Home |
Main Index |
Thread Index |
Old Index