sis190 driver
No major change from previous version. I'm quietly merging bits from the SiS driver that Lars kindly pointed out. The detection of the mac address is done differently.
I'll welcome feedback related to regressions and/or netconsole testing.
Single file patch:
http://www.zoreil.com/~romieu/sis190/20050722-2.6.13-rc2-sis190-test.patch
Patch-kit:
http://www.zoreil.com/~romieu/sis190/20050722-2.6.13-rc2/patches
Tarball:
http://www.zoreil.com/~romieu/sis190/20050722-2.6.13-rc2.tar.bz2
--
Ueimor
Quoted 8 lines · Francois Romieu
No major change from previous version. I'm quietly merging bits from the SiS driver that Lars kindly pointed out. The detection of the mac address is done differently.
I'll welcome feedback related to regressions and/or netconsole testing.
Single file patch:
http://www.zoreil.com/~romieu/sis190/20050722-2.6.13-rc2-sis190-test.patch
MAINTAINERS chunk isn't -p1 applicable. ;-)
sparse asks whether you have endianness bugs here:
----------------------------------------------------------------------------
450 static inline void sis190_make_unusable_by_asic(struct RxDesc *desc)
451 {
452 desc->PSize = 0x0;
453 ===> desc->addr = 0xdeadbeef; <===
454 desc->size &= cpu_to_le32(RingEnd);
455 wmb();
456 desc->status = 0x0;
457 }
drivers/net/sis190.c:453:13: warning: incorrect type in assignment (different base types)drivers/net/sis190.c:453:13: expected restricted unsigned int [assigned] [usertype] addrdrivers/net/sis190.c:453:13: got unsigned int
----------------------------------------------------------------------------
544 static int sis190_rx_interrupt(struct net_device *dev,
545 struct sis190_private *tp, void __iomem *ioaddr)
546 {
554 for (; rx_left > 0; rx_left--, cur_rx++) {
555 unsigned int entry = cur_rx % NUM_RX_DESC;
556 struct RxDesc *desc = tp->RxDescRing + entry;
557 u32 status;
558
559 ===> if (desc->status & OWNbit) <===
560 break;drivers/net/sis190.c:559:20: warning: incompatible types for operation (&)drivers/net/sis190.c:559:20: left side has type restricted unsigned int [assigned] [usertype] statusdrivers/net/sis190.c:559:20: right side has type unsigned int [unsigned] enum _DescStatusBit [unsigned] [toplevel] OWNbit
----------------------------------------------------------------------------
Add endian annotations.
drivers/net/sis190.c +9 -9
@@ -191,17 +191,17 @@ enum sis190_register_content { };struct TxDesc { -u32 PSize; -u32 status; -u32 addr; -u32 size; +__le32 PSize; +__le32 status; +__le32 addr; +__le32 size; };struct RxDesc { -u32 PSize; -u32 status; -u32 addr; -u32 size; +__le32 PSize; +__le32 status; +__le32 addr; +__le32 size; };enum _DescStatusBit {
@@ -1322,7 +1322,7 @@ static int __devinit sis190_get_mac_addr/* Get MAC address from EEPROM */ for (i =0 ; i <MAC_ADDR_LEN /2 ; i++) { -u16 w =sis190_read_eeprom (ioaddr, EEPROMMACAddr + i); +__le16 w =sis190_read_eeprom (ioaddr, EEPROMMACAddr + i); ((u16 *)dev->dev_addr)[0 ] =le16_to_cpu (w); }