]> git.baikalelectronics.ru Git - kernel.git/commit
8139too: fix HW initial flow
authorJianjun kong <jianjun@zeuux.org>
Mon, 20 Apr 2009 23:48:25 +0000 (23:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2009 07:43:24 +0000 (00:43 -0700)
commit311eabd8f289c6e79b947c5a56871db1d64b4075
tree86b401379c1503486813914201ac78b55fdc55a2
parent9dd588f2c363c7acb44b3ba570fbda627b60c2be
8139too: fix HW initial flow

While ifconfig eth0 up kernel calls open() of 8139 driver(8139too.c).
In rtl8139_hw_start() of rtl8139_open(), 8139 driver enable RX before
setting up the DMA buffer address. In this interval where RX was
enabled and DMA buffer address is not yet set up, any incoming
broadcast packet would be send to a strange physical address:
0x003e8800 which is the default value of DMA buffer address.
Unfortunately, this address is used by Linux kernel. So kernel panics.
This patch fix it by setting up DMA buffer address before RX enabled
and everything is fine even under broadcast packets attack.

Signed-off-by: Jonathan Lin <jon.lin@vatics.com>
Signed-off-by: Amos Kong <jianjun@zeuux.org>
Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/8139too.c