endianess patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was having trouble with a FTDI 4232 chip on an IXP430  (armeb) in OpenWRT.

It appears the max packet size function was not byte swapping  appropriately.

The following fixed the problem for 2.6.32.16.

--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1397,7 +1397,7 @@
         }
 
         /* set max packet size based on descriptor */
-       priv->max_packet_size = ep_desc->wMaxPacketSize;
+       priv->max_packet_size =  le16_to_cpu(ep_desc->wMaxPacketSize);
 
         dev_info(&udev->dev, "Setting MaxPacketSize %d\n",  
priv->max_packet_size);
 }

Regards, 
Mike Wileczka
AIS, Inc.

PS - I apologize if this is in the wrong format, I've never used a mailing list 
or submitted a patch before.


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux