public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: asix: Fix AX88772B when used with DriverModel
@ 2016-09-06  4:03 Joshua Scott
  2016-09-06 19:15 ` Joe Hershberger
  2016-09-09 18:57 ` [U-Boot] " Joe Hershberger
  0 siblings, 2 replies; 16+ messages in thread
From: Joshua Scott @ 2016-09-06  4:03 UTC (permalink / raw)
  To: u-boot

A previous patch (net: asix: fix operation without eeprom) added a
two-byte shift to the packet buffer when receiving a packet on the
AX88772B.

This shift was not included when the driver was updated to work with
DriverModel. Testing on a Marvell DB-88F6820-ACM showed that the adapter
was not functioning correctly (EHCI timeouts).

This patch brings the two-byte shift to the DriverModel implementation
of ops->recv (asix_eth_recv).

Testing on the same board, we were able to TFTP a file over and confirm
that the crc32 was correct.

Signed-off-by: Joshua Scott <joshua.scott@alliedtelesis.co.nz>
---
 drivers/usb/eth/asix.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/usb/eth/asix.c b/drivers/usb/eth/asix.c
index ad083cf..a610ae4 100644
--- a/drivers/usb/eth/asix.c
+++ b/drivers/usb/eth/asix.c
@@ -819,6 +819,11 @@ int asix_eth_recv(struct udevice *dev, int flags, uchar **packetp)
 	}
 
 	*packetp = ptr + sizeof(packet_len);
+
+	if ((ueth->pusb_dev->descriptor.idVendor == ASIX_USB_VENDOR_ID) &&
+	    (ueth->pusb_dev->descriptor.idProduct == AX88772B_USB_PRODUCT_ID))
+		*packetp += 2;
+
 	return packet_len;
 
 err:
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-09-11 21:30 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-06  4:03 [U-Boot] [PATCH] net: asix: Fix AX88772B when used with DriverModel Joshua Scott
2016-09-06 19:15 ` Joe Hershberger
2016-09-09 18:57 ` [U-Boot] " Joe Hershberger
2016-09-09 21:06   ` Marcel Ziswiler
2016-09-09 23:04     ` Marek Vasut
2016-09-09 23:13       ` Marcel Ziswiler
2016-09-09 23:23         ` Marek Vasut
2016-09-10  0:18           ` Marcel Ziswiler
2016-09-10  1:34             ` Marcel Ziswiler
2016-09-10 10:01               ` Marek Vasut
2016-09-10 16:28                 ` Joe Hershberger
2016-09-10 16:51                   ` Marek Vasut
2016-09-10 17:24                     ` Joe Hershberger
2016-09-10 18:48                       ` Marek Vasut
2016-09-10 19:29                         ` Joe Hershberger
2016-09-11 21:30                           ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox