From b323e0e49fe9331ee3a7a336af879d6e303b16b3 Mon Sep 17 00:00:00 2001 From: Ron Mercer Date: Mon, 1 Oct 2007 11:43:22 -0700 Subject: [PATCH 1/4] qla3xxx: bugfix: Add memory barrier before accessing rx completion. Signed-off-by: Ron Mercer Signed-off-by: Jeff Garzik --- drivers/net/qla3xxx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 69da95b5ad0c..c3fe1c7c301c 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -2248,6 +2248,7 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev, qdev->rsp_consumer_index) && (work_done < work_to_do)) { net_rsp = qdev->rsp_current; + rmb(); switch (net_rsp->opcode) { case OPCODE_OB_MAC_IOCB_FN0: From 50626297b1beb0a29c0f174be39f36485533216c Mon Sep 17 00:00:00 2001 From: Ron Mercer Date: Mon, 1 Oct 2007 11:43:23 -0700 Subject: [PATCH 2/4] qla3xxx: bugfix: Fix VLAN rx completion handling. Fix 4032 chip undocumented "feature" where bit-8 is set if the inbound completion is for a VLAN. Signed-off-by: Ron Mercer Signed-off-by: Jeff Garzik --- drivers/net/qla3xxx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index c3fe1c7c301c..ea151315050c 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c @@ -2249,6 +2249,12 @@ static int ql_tx_rx_clean(struct ql3_adapter *qdev, net_rsp = qdev->rsp_current; rmb(); + /* + * Fix 4032 chipe undocumented "feature" where bit-8 is set if the + * inbound completion is for a VLAN. + */ + if (qdev->device_id == QL3032_DEVICE_ID) + net_rsp->opcode &= 0x7f; switch (net_rsp->opcode) { case OPCODE_OB_MAC_IOCB_FN0: From 593ff56ef2a23ed3a66ee87d9c9b33044b9fb193 Mon Sep 17 00:00:00 2001 From: Dale Farnsworth Date: Mon, 1 Oct 2007 16:02:18 -0700 Subject: [PATCH 3/4] mv643xx_eth: Do not modify struct netdev tx_queue_len This driver erroneously zeros dev->tx_queue_len, since mp->tx_ring_size has not yet been initialized. Actually, the driver shouldn't modify tx_queue_len at all and should leave the value set by alloc_etherdev(), currently 1000. Signed-off-by: Dale Farnsworth Signed-off-by: Jeff Garzik --- drivers/net/mv643xx_eth.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index 34288fe038c3..315335671f0f 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c @@ -1357,7 +1357,6 @@ static int mv643xx_eth_probe(struct platform_device *pdev) #endif dev->watchdog_timeo = 2 * HZ; - dev->tx_queue_len = mp->tx_ring_size; dev->base_addr = 0; dev->change_mtu = mv643xx_eth_change_mtu; dev->do_ioctl = mv643xx_eth_do_ioctl; From f662fe5a0b144efadbfc00e8040e603ec318746e Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 1 Oct 2007 13:36:07 +0200 Subject: [PATCH 4/4] dm9601: Fix receive MTU dm9601 didn't take the ethernet header into account when calculating RX MTU, causing packets bigger than 1486 to fail. Signed-off-by: Peter Korsgaard Signed-off-by: Jeff Garzik --- drivers/net/usb/dm9601.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 16c7a0e87850..a2de32fabc17 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c @@ -405,7 +405,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) dev->net->ethtool_ops = &dm9601_ethtool_ops; dev->net->hard_header_len += DM_TX_OVERHEAD; dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; - dev->rx_urb_size = dev->net->mtu + DM_RX_OVERHEAD; + dev->rx_urb_size = dev->net->mtu + ETH_HLEN + DM_RX_OVERHEAD; dev->mii.dev = dev->net; dev->mii.mdio_read = dm9601_mdio_read;