Hi, "Chip" identification of the pegasus driver does not work correctly on big endian machines, resulting in incorrect packet lengths for received ethernet packets. These patches (against 2.4.24-pre2 and 2.6.0) should fix it.
Dimitri --- linux-2.4.24-pre2/drivers/usb/pegasus.c.orig 2003-12-26 16:29:06.000000000 +0100 +++ linux-2.4.24-pre2/drivers/usb/pegasus.c 2003-12-26 16:29:20.000000000 +0100 @@ -532,7 +532,7 @@ if (!count) goto goon; - rx_status = le32_to_cpu(*(int *) (pegasus->rx_buff + count - 4)); + rx_status = le32_to_cpup((u32*)(pegasus->rx_buff + count - 4)); if (rx_status & 0x000e0000) { dbg("%s: RX packet error %x", net->name, rx_status & 0xe0000); pegasus->stats.rx_errors++; @@ -546,7 +546,7 @@ } if (pegasus->chip == 0x8513) { - pkt_len = le32_to_cpu(*(int *)pegasus->rx_buff); + pkt_len = le32_to_cpup((u32*)(pegasus->rx_buff)); pkt_len &= 0x0fff; } else { pkt_len = (rx_status & 0x0fff) - 8; @@ -1044,7 +1044,7 @@ static inline void setup_pegasus_II(pegasus_t * pegasus) { - u16 data = 0xa5; + u8 data = 0xa5; set_register(pegasus, Reg1d, 0); set_register(pegasus, Reg7b, 1); --- linux-2.6.0/drivers/usb/net/pegasus.c.orig 2003-12-26 16:32:17.000000000 +0100 +++ linux-2.6.0/drivers/usb/net/pegasus.c 2003-12-26 16:33:00.000000000 +0100 @@ -581,7 +581,7 @@ if (!count) goto goon; - rx_status = le32_to_cpu(*(int *) (urb->transfer_buffer + count - 4)); + rx_status = le32_to_cpup((u32*) (urb->transfer_buffer + count - 4)); if (rx_status & 0x000e0000) { dbg("%s: RX packet error %x", net->name, rx_status & 0xe0000); pegasus->stats.rx_errors++; @@ -594,7 +594,7 @@ goto goon; } if (pegasus->chip == 0x8513) { - pkt_len = le32_to_cpu(*(int *)urb->transfer_buffer); + pkt_len = le32_to_cpup((u32*)urb->transfer_buffer); pkt_len &= 0x0fff; pegasus->rx_skb->data += 2; } else { @@ -1176,7 +1176,7 @@ static inline void setup_pegasus_II(pegasus_t * pegasus) { - u16 data = 0xa5; + u8 data = 0xa5; set_register(pegasus, Reg1d, 0); set_register(pegasus, Reg7b, 1); -- Dimitri Torfs | NSCE [EMAIL PROTECTED] | Sint Stevens Woluwestraat 55 tel: +32 2 2908451 | 1130 Brussel fax: +32 2 7262686 | Belgium ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel