2.6.x net driver fixes
Subsystems (2)
PATCH 1/1 2.6.x net driver fixes
Got a big queue waiting for 2.6.9 release...
Please do a
bk pull bk://gkernel.bkbits.net/net-drivers-2.6
This will update the following files:
drivers/net/3c59x.c | 7 ++++ drivers/net/tokenring/Kconfig | 3 + drivers/net/tokenring/olympic.c | 63 +++++++++++----------------------------- drivers/net/via-velocity.c | 60 +++++++++++++++++++------------------- drivers/net/via-velocity.h | 7 +--- 5 files changed, 60 insertions(+), 80 deletions(-)
through these ChangeSets:
<[email protected]> (04/10/04 1.2057)
[PATCH] via-velocity: comment fixes
Comment fixes.
<[email protected]> (04/10/04 1.2056)
[PATCH] via-velocity: wrong buffer offset in velocity_init_td_ring()
Buffer offset calculation was incorrect in velocity_init_td_ring(). This didn't cause any trouble because we only use the first td ring.
<[email protected]> (04/10/04 1.2055)
[PATCH] via-velocity: removal of incomplete endianness handling
Removed cpu_to_le32 call on OWNED_BY_NIC. This will produce 0x01000000 on big endian machines while rdesc0.owner still evaluates to 0x00000000 or 0x00000001. BTW, unless we reorder bit fields on big endian machines or use u32's and cpu_to_le32'd bit mask macros, current code won't work on big endian machines.
<[email protected]> (04/10/04 1.2054)
[PATCH] via-velocity: early invocation of init_cam_filter()
In velocity_init_registers(), init_cam_filter() clears mCAMmask which might have been set by set_multi() (not sure if this can ever occur). Modified to invoke init_cam_filter() first. Also, clear_isr() is called twice. Removed the first invocation.
In velocity_found1(), there was a unneeded assignment from vptr to dev->priv. Removed.
<[email protected]> (04/10/04 1.2053)
[PATCH] via-velocity: received ring wrong index and missing barriers
There were several receive ring related bugs.
In velocity_give_many_rx_descs(), index calculation was incorrect. This and bugs in velocity_rx_srv() described in the following paragraph caused packet loss, truncation and infinite error interrupt generation.
In velocity_rx_srv(), velocity_rx_refill() could be called without any dirty slot. With proper timing, This can result in refilling yet unreceived packets and pushing dirty pointer ahead of the current pointer. And vptr->rd_curr which is used by velocity_rx_refill() was updated after calling velocity_rx_refill() thus screwing receive descriptor ring. Also, between checking owner and reading the packet, rmb() is missing.
<[email protected]> (04/10/04 1.2052)
[PATCH] via-velocity: velocity_give_rx_desc() removal
In velocity_give_rx_desc(), there should be a wmb() between resetting the first four bytes of rdesc0 and setting owner. As resetting the first four bytes isn't necessary, I just removed the function and directly set owner. Another rationale for removing the function:
The function doesn't handle synchronization. We should do wmb() before calling the function. So, I think using bare assignment makes the fact more explicit.
<[email protected]> (04/10/04 1.2051)
[PATCH] via-velocity: removal of unused velocity_info.xmit_lock
Removed unused velocity_info.xmit_lock.
<[email protected]> (04/10/04 1.2050)
[PATCH] via-velocity: properly manage the count of adapters
velocity_nics wasn't managed properly.
<[email protected]> (04/10/04 1.2009.4.3)
[PATCH] olympic driver: fix kernel oops on lobe fault
Hey-
I had submitted this awhile ago and after it didn't appear to get
accepted, I found that I had boned the submission format pretty bad. So I'm making another pass at it. Its the same patch, applies cleanly to 2.6.9-rc3, and it fixes the oops that olympic driver encounters when it gets a lobe fault. I've tested it, with good results.
Thanks
Neil
<[email protected]> (04/09/30 1.2009.4.2)
[PATCH] 3c59x: add invalid MAC address check
<[email protected]> (04/09/20 1.1923.1.6)
[PATCH] TMS380TR must select FW_LOADER
I got the following compile error with CONFIG_FW_LOADER=n:
<-- snip -->
...
LD .tmp_vmlinux1
drivers/built-in.o(.text+0x297944): In function `tms380tr_reset_adapter':
: undefined reference to request_firmware' drivers/built-in.o(.text+0x297aaf): In function tms380tr_reset_adapter':
: undefined reference to release_firmware' drivers/built-in.o(.text+0x297af9): In function tms380tr_reset_adapter':
: undefined reference to `release_firmware'
make: *** [.tmp_vmlinux1] Error 1
<-- snip -->
CONFIG_TMS380TR must select FW_LOADER (and therefore depend on HOTPLUG).
drivers/net/3c59x.c +7 -0
@@ -1297,6 +1297,13 @@for (i =0 ; i <6 ; i++)printk ("%c%2.2x" , i ?':' :' ' , dev->dev_addr[i]); } +/* Unfortunately an all zero eeprom passes the checksum and this +gets found in the wild in failure cases. Crypto is hard 8) */ +if (!is_valid_ether_addr (dev->dev_addr)) { + retval = -EINVAL ; +printk (KERN_ERR "*** EEPROM MAC address is invalid.\n" ); + goto free_ring;/* With every pack */ + }EL3WINDOW (2 );for (i =0 ; i <6 ; i++)outb (dev->dev_addr[i], ioaddr + i);
drivers/net/tokenring/Kconfig +2 -1
@@ -84,7 +84,8 @@ config TMS380TR tristate "Generic TMS380 Token Ring ISA/PCI adapter support" - depends on TR && (PCI || ISA) + depends on TR && (PCI || ISA) && HOTPLUG + select FW_LOADER ---help--- This driver provides generic support for token ring adapters based on the Texas Instruments TMS380 series chipsets. This
drivers/net/tokenring/olympic.c +18 -45
134 lines not on this page · raw message
drivers/net/via-velocity.c +30 -30
187 lines not on this page · raw message
drivers/net/via-velocity.h +3 -4
@@ -1319,7 +1319,7 @@/* disable CAMEN */ writeb (0 , ®s->CAMADDR); -/* Select CAM mask */ +/* Select mar */ BYTE_REG_BITS_SET (CAMCR_PS_MAR ,CAMCR_PS1 |CAMCR_PS0 , ®s->CAMCR); }
@@ -1360,7 +1360,7 @@writeb (0 , ®s->CAMADDR); -/* Select CAM mask */ +/* Select mar */ BYTE_REG_BITS_SET (CAMCR_PS_MAR ,CAMCR_PS1 |CAMCR_PS0 , ®s->CAMCR); }
@@ -1401,7 +1401,7 @@writeb (0 , ®s->CAMADDR); -/* Select CAM mask */ +/* Select mar */ BYTE_REG_BITS_SET (CAMCR_PS_MAR ,CAMCR_PS1 |CAMCR_PS0 , ®s->CAMCR); }
@@ -1792,7 +1792,6 @@u8 mCAMmask[(MCAM_SIZE /8 )];spinlock_t lock; -spinlock_t xmit_lock;int wol_opts;u8 wol_passwd[6 ];