Hi Greg,
the attached little patch fixes an endianess problem with the baud
rate selection of the USB serial converter MCT U232 (mct_u232) on
PowerPC systems. I have realized the problem on my iBook2 running
YellowDog Linux 2.1.
The patch is for version 2.4.10 but it should be ok for more recent
kernel versions as well.
Thanks,
Wolfgang.
+ diff -u linux-2.4.10/drivers/usb/serial/mct_u232.c.ORIG
+linux-2.4.10/drivers/usb/serial/mct_u232.c
--- linux-2.4.10/drivers/usb/serial/mct_u232.c.ORIG Fri Sep 14 23:04:07 2001
+++ linux-2.4.10/drivers/usb/serial/mct_u232.c Sat Nov 10 23:28:21 2001
@@ -24,6 +24,9 @@
* Basic tests have been performed with minicom/zmodem transfers and
* modem dialing under Linux 2.4.0-test10 (for me it works fine).
*
+ * 10-Nov-2001 Wolfgang Grandegger
+ * - Fixed an endianess problem with the baudrate selection for PowerPC.
+ *
* 30-May-2001 Greg Kroah-Hartman
* switched from using spinlock to a semaphore, which fixes lots of problems.
*
@@ -263,7 +266,7 @@
{
unsigned int divisor;
int rc;
- divisor = mct_u232_calculate_baud_rate(serial, value);
+ divisor = cpu_to_le32(mct_u232_calculate_baud_rate(serial, value));
rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
MCT_U232_SET_BAUD_RATE_REQUEST,
MCT_U232_SET_REQUEST_TYPE,