* [PATCH 1/4] net usb asix: Simplify condition in rx_fixup()
2014-01-22 22:50 [PATCH 0/4] Asix AX88772B support Philipp Zabel
@ 2014-01-22 22:50 ` Philipp Zabel
2014-01-22 22:50 ` [PATCH 2/4] net usb asix: Use only 11 bits of header for data size Philipp Zabel
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2014-01-22 22:50 UTC (permalink / raw)
To: barebox; +Cc: Marek Vasut
From: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
---
drivers/net/usb/asix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 5975e2a..8b73bf9 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -408,7 +408,7 @@ static int asix_rx_fixup(struct usbnet *dev, void *buf, int len)
len -= 4;
while (len > 0) {
- if ((short)(header & 0x0000ffff) != ~((short)((header & 0xffff0000) >> 16)))
+ if ((header & 0xffff) != ((~header >> 16) & 0xffff))
dev_err(&dev->edev.dev, "asix_rx_fixup() Bad Header Length\n");
/* get the packet length */
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/4] net usb asix: Use only 11 bits of header for data size
2014-01-22 22:50 [PATCH 0/4] Asix AX88772B support Philipp Zabel
2014-01-22 22:50 ` [PATCH 1/4] net usb asix: Simplify condition in rx_fixup() Philipp Zabel
@ 2014-01-22 22:50 ` Philipp Zabel
2014-01-23 1:14 ` [PATCH 0/4] Asix AX88772B support Marek Vasut
2014-01-27 8:34 ` Sascha Hauer
3 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2014-01-22 22:50 UTC (permalink / raw)
To: barebox; +Cc: Marek Vasut
From: Marek Vasut <marek.vasut@gmail.com>
The AX88772B uses only 11 bits of the header for the actual size. The other bits
are used for something else. This causes dmesg full of messages:
asix_rx_fixup() Bad Header Length
This patch trims the check to only 11 bits. I believe on older chips, the
remaining 5 top bits are unused.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
---
drivers/net/usb/asix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 8b73bf9..003ebba 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -408,11 +408,11 @@ static int asix_rx_fixup(struct usbnet *dev, void *buf, int len)
len -= 4;
while (len > 0) {
- if ((header & 0xffff) != ((~header >> 16) & 0xffff))
+ if ((header & 0x07ff) != ((~header >> 16) & 0x07ff))
dev_err(&dev->edev.dev, "asix_rx_fixup() Bad Header Length\n");
/* get the packet length */
- size = (unsigned short) (header & 0x0000ffff);
+ size = (unsigned short) (header & 0x07ff);
if (size > 1514) {
dev_err(&dev->edev.dev, "asix_rx_fixup() Bad RX Length %d\n", size);
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] Asix AX88772B support
2014-01-22 22:50 [PATCH 0/4] Asix AX88772B support Philipp Zabel
2014-01-22 22:50 ` [PATCH 1/4] net usb asix: Simplify condition in rx_fixup() Philipp Zabel
2014-01-22 22:50 ` [PATCH 2/4] net usb asix: Use only 11 bits of header for data size Philipp Zabel
@ 2014-01-23 1:14 ` Marek Vasut
2014-01-23 9:30 ` Sascha Hauer
2014-01-27 8:34 ` Sascha Hauer
3 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2014-01-23 1:14 UTC (permalink / raw)
To: Philipp Zabel; +Cc: barebox
On Wednesday, January 22, 2014 at 11:50:45 PM, Philipp Zabel wrote:
> This patch series picks up some changes from the linux kernel
> to make Asix AX88772B based USB Ethernet dongles work.
>
> Marek Vasut (2):
> net usb asix: Simplify condition in rx_fixup()
> net usb asix: Use only 11 bits of header for data size
>
> Philipp Zabel (2):
> net usb asix: read MAC from EEPROM on AX88772B
> net usb asix: add AX88772B USB ID
>
> drivers/net/usb/asix.c | 36 +++++++++++++++++++++++++++++++-----
> 1 file changed, 31 insertions(+), 5 deletions(-)
Oh wow, am I now an official barebox contributor ? :-D
Best regards,
Marek Vasut
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] Asix AX88772B support
2014-01-23 1:14 ` [PATCH 0/4] Asix AX88772B support Marek Vasut
@ 2014-01-23 9:30 ` Sascha Hauer
0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2014-01-23 9:30 UTC (permalink / raw)
To: Marek Vasut; +Cc: barebox
On Thu, Jan 23, 2014 at 02:14:35AM +0100, Marek Vasut wrote:
> On Wednesday, January 22, 2014 at 11:50:45 PM, Philipp Zabel wrote:
> > This patch series picks up some changes from the linux kernel
> > to make Asix AX88772B based USB Ethernet dongles work.
> >
> > Marek Vasut (2):
> > net usb asix: Simplify condition in rx_fixup()
> > net usb asix: Use only 11 bits of header for data size
> >
> > Philipp Zabel (2):
> > net usb asix: read MAC from EEPROM on AX88772B
> > net usb asix: add AX88772B USB ID
> >
> > drivers/net/usb/asix.c | 36 +++++++++++++++++++++++++++++++-----
> > 1 file changed, 31 insertions(+), 5 deletions(-)
>
> Oh wow, am I now an official barebox contributor ? :-D
gotcha! ;)
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/4] Asix AX88772B support
2014-01-22 22:50 [PATCH 0/4] Asix AX88772B support Philipp Zabel
` (2 preceding siblings ...)
2014-01-23 1:14 ` [PATCH 0/4] Asix AX88772B support Marek Vasut
@ 2014-01-27 8:34 ` Sascha Hauer
3 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2014-01-27 8:34 UTC (permalink / raw)
To: Philipp Zabel; +Cc: barebox, Marek Vasut
On Wed, Jan 22, 2014 at 11:50:45PM +0100, Philipp Zabel wrote:
> This patch series picks up some changes from the linux kernel
> to make Asix AX88772B based USB Ethernet dongles work.
>
> Marek Vasut (2):
> net usb asix: Simplify condition in rx_fixup()
> net usb asix: Use only 11 bits of header for data size
>
> Philipp Zabel (2):
> net usb asix: read MAC from EEPROM on AX88772B
Applied three patches. Could you resend this one? It didn't make it to
the list.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 6+ messages in thread