When ax88772_tx_fixup() routine in drivers/usb/net/asix.c prepares urb to 
be sent to device, it writes 32-bit words without proper endian 
conversion.

This causes incorrect data to be written on big-endian system.

This patch fixes it.

Signed-off-by: Nikita Youshchenko <[EMAIL PROTECTED]>
--- drivers/usb/net/asix.c~	2006-10-15 16:20:26.000000000 +0400
+++ drivers/usb/net/asix.c	2006-11-23 10:40:41.774230433 +0300
@@ -776,9 +776,11 @@
 
 	skb_push(skb, 4);
 	packet_len = (((skb->len - 4) ^ 0x0000ffff) << 16) + (skb->len - 4);
+	cpu_to_le32s(&packet_len);
 	memcpy(skb->data, &packet_len, sizeof(packet_len));
 
 	if ((skb->len % 512) == 0) {
+		cpu_to_le32s(&padbytes);
 		memcpy( skb->tail, &padbytes, sizeof(padbytes));
 		skb_put(skb, sizeof(padbytes));
 	}

Attachment: pgpYfDPFYyQW4.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to