Port-arm 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
hi,
On 2019/05/03 03:23, Mayuresh wrote:
> On Thu, May 02, 2019 at 09:23:38PM +0530, Mayuresh wrote:
>> # uname -a
>> NetBSD pi 8.99.37 NetBSD 8.99.37 (RPI2) #1: Thu Apr 25 16:01:51 UTC 2019
>> root@pi:/usr/src/sys/arch/evbarm/compile/RPI2 evbarm
>>
>> # dmesg | grep urndis
>> [ 47.388677] urndis0 at uhub2 port 3 configuration 1 interface 0
>> [ 47.388677] urndis0: SAMSUNG (0x4e8) SAMSUNG_Android (0x6863), rev 2.00/4.00, addr 8
>> [ 47.388677] urndis0: IOERROR
>> [ 47.388677] urndis0: unable to get init response
>> [ 47.388677] urndis0: IOERROR
>> [ 47.388677] urndis0: unable to get query response
>> [ 47.388677] autoconfiguration error: urndis0: unable to get hardware address
>>
>>
>> The same mobile phone works fine as urndis0 on NetBSD 8.0 amd64.
>>
>> I do not know whether this is a problem with -current or with evbarm. (I
>> do not have amd64 -current or evbarm 8.0, unfortunately.)
>>
>> What more can I try out?
The urndis(4) driver transfers data on endpoint0 without
USBD_SHORT_XFER_OK to receive control messages.
If this transfer generates short condition, the ehci(4) allows it,
but dwctwo(4) does not.
Either of attached patch might help you.
> Marking current-users and port-arm.
>
> Mayuresh
>
--- src/sys/dev/usb/if_urndis.c Tue Mar 5 18:04:24 2019
+++ src/sys/dev/usb/if_urndis.c Fri May 10 05:10:18 2019
@@ -185,14 +185,17 @@ urndis_ctrl_msg(struct urndis_softc *sc,
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(sc->sc_udev, &req, buf);
+ return usbd_do_request_flags(sc->sc_udev, &req, buf, flags, NULL,
+ USBD_DEFAULT_TIMEOUT);
}
static usbd_status
--- src/sys/external/bsd/dwc2/dwc2.c Mon Aug 15 00:32:02 2016
+++ src/sys/external/bsd/dwc2/dwc2.c Thu Oct 6 20:23:24 2016
@@ -1445,11 +1445,13 @@ void dwc2_host_complete(struct dwc2_hsot
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