aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-12-18 15:00:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-18 15:00:46 -0500
commitb3806c3b940540ba9386a334ff0cc2597a5af60e (patch)
tree86da1fe926fa6051201046f5d351f0b46aa101b3 /drivers
parent3653b9a8db41299a8735008026dad82035f8ca9b (diff)
parent3298a7388c00227e736d1037328788073c80c7b4 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: bnx2: Fix bug in bnx2_free_rx_mem(). irda: Add irda_skb_cb qdisc related padding jme: Fixed a typo net: kernel BUG at drivers/net/phy/mdio_bus.c:165! drivers/net: starfire: Fix napi ->poll() weight handling tlan: Fix pci memory unmapping enc28j60: use netif_rx_ni() to deliver RX packets tlan: Fix small (< 64 bytes) datagram transmissions netfilter: ctnetlink: fix missing CTA_NAT_SEQ_UNSPEC
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/bnx2.c6
-rw-r--r--drivers/net/enc28j60.c2
-rw-r--r--drivers/net/jme.h2
-rw-r--r--drivers/net/phy/mdio_bus.c5
-rw-r--r--drivers/net/starfire.c5
-rw-r--r--drivers/net/tlan.c23
6 files changed, 28 insertions, 15 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index a1a3d0e5d2b4..9e8222f9e90e 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -543,9 +543,9 @@ bnx2_free_rx_mem(struct bnx2 *bp)
543 for (j = 0; j < bp->rx_max_pg_ring; j++) { 543 for (j = 0; j < bp->rx_max_pg_ring; j++) {
544 if (rxr->rx_pg_desc_ring[j]) 544 if (rxr->rx_pg_desc_ring[j])
545 pci_free_consistent(bp->pdev, RXBD_RING_SIZE, 545 pci_free_consistent(bp->pdev, RXBD_RING_SIZE,
546 rxr->rx_pg_desc_ring[i], 546 rxr->rx_pg_desc_ring[j],
547 rxr->rx_pg_desc_mapping[i]); 547 rxr->rx_pg_desc_mapping[j]);
548 rxr->rx_pg_desc_ring[i] = NULL; 548 rxr->rx_pg_desc_ring[j] = NULL;
549 } 549 }
550 if (rxr->rx_pg_ring) 550 if (rxr->rx_pg_ring)
551 vfree(rxr->rx_pg_ring); 551 vfree(rxr->rx_pg_ring);
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index c414554ac321..36cb6e95b465 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -959,7 +959,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
959 ndev->stats.rx_packets++; 959 ndev->stats.rx_packets++;
960 ndev->stats.rx_bytes += len; 960 ndev->stats.rx_bytes += len;
961 ndev->last_rx = jiffies; 961 ndev->last_rx = jiffies;
962 netif_rx(skb); 962 netif_rx_ni(skb);
963 } 963 }
964 } 964 }
965 /* 965 /*
diff --git a/drivers/net/jme.h b/drivers/net/jme.h
index f863aee6648b..3f5d91543246 100644
--- a/drivers/net/jme.h
+++ b/drivers/net/jme.h
@@ -22,7 +22,7 @@
22 */ 22 */
23 23
24#ifndef __JME_H_INCLUDED__ 24#ifndef __JME_H_INCLUDED__
25#define __JME_H_INCLUDEE__ 25#define __JME_H_INCLUDED__
26 26
27#define DRV_NAME "jme" 27#define DRV_NAME "jme"
28#define DRV_VERSION "1.0.3" 28#define DRV_VERSION "1.0.3"
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 536bda1f428b..289fc267edf3 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -105,8 +105,6 @@ int mdiobus_register(struct mii_bus *bus)
105 return -EINVAL; 105 return -EINVAL;
106 } 106 }
107 107
108 bus->state = MDIOBUS_REGISTERED;
109
110 mutex_init(&bus->mdio_lock); 108 mutex_init(&bus->mdio_lock);
111 109
112 if (bus->reset) 110 if (bus->reset)
@@ -123,6 +121,9 @@ int mdiobus_register(struct mii_bus *bus)
123 } 121 }
124 } 122 }
125 123
124 if (!err)
125 bus->state = MDIOBUS_REGISTERED;
126
126 pr_info("%s: probed\n", bus->name); 127 pr_info("%s: probed\n", bus->name);
127 128
128 return err; 129 return err;
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index 1d2ef8f47780..5a40f2d78beb 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -1509,6 +1509,11 @@ static int __netdev_rx(struct net_device *dev, int *quota)
1509 desc->status = 0; 1509 desc->status = 0;
1510 np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE; 1510 np->rx_done = (np->rx_done + 1) % DONE_Q_SIZE;
1511 } 1511 }
1512
1513 if (*quota == 0) { /* out of rx quota */
1514 retcode = 1;
1515 goto out;
1516 }
1512 writew(np->rx_done, np->base + CompletionQConsumerIdx); 1517 writew(np->rx_done, np->base + CompletionQConsumerIdx);
1513 1518
1514 out: 1519 out:
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
index c41d68761364..e60498232b94 100644
--- a/drivers/net/tlan.c
+++ b/drivers/net/tlan.c
@@ -1098,6 +1098,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
1098 dma_addr_t tail_list_phys; 1098 dma_addr_t tail_list_phys;
1099 u8 *tail_buffer; 1099 u8 *tail_buffer;
1100 unsigned long flags; 1100 unsigned long flags;
1101 unsigned int txlen;
1101 1102
1102 if ( ! priv->phyOnline ) { 1103 if ( ! priv->phyOnline ) {
1103 TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s PHY is not ready\n", 1104 TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s PHY is not ready\n",
@@ -1108,6 +1109,7 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
1108 1109
1109 if (skb_padto(skb, TLAN_MIN_FRAME_SIZE)) 1110 if (skb_padto(skb, TLAN_MIN_FRAME_SIZE))
1110 return 0; 1111 return 0;
1112 txlen = max(skb->len, (unsigned int)TLAN_MIN_FRAME_SIZE);
1111 1113
1112 tail_list = priv->txList + priv->txTail; 1114 tail_list = priv->txList + priv->txTail;
1113 tail_list_phys = priv->txListDMA + sizeof(TLanList) * priv->txTail; 1115 tail_list_phys = priv->txListDMA + sizeof(TLanList) * priv->txTail;
@@ -1125,16 +1127,16 @@ static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev )
1125 1127
1126 if ( bbuf ) { 1128 if ( bbuf ) {
1127 tail_buffer = priv->txBuffer + ( priv->txTail * TLAN_MAX_FRAME_SIZE ); 1129 tail_buffer = priv->txBuffer + ( priv->txTail * TLAN_MAX_FRAME_SIZE );
1128 skb_copy_from_linear_data(skb, tail_buffer, skb->len); 1130 skb_copy_from_linear_data(skb, tail_buffer, txlen);
1129 } else { 1131 } else {
1130 tail_list->buffer[0].address = pci_map_single(priv->pciDev, 1132 tail_list->buffer[0].address = pci_map_single(priv->pciDev,
1131 skb->data, skb->len, 1133 skb->data, txlen,
1132 PCI_DMA_TODEVICE); 1134 PCI_DMA_TODEVICE);
1133 TLan_StoreSKB(tail_list, skb); 1135 TLan_StoreSKB(tail_list, skb);
1134 } 1136 }
1135 1137
1136 tail_list->frameSize = (u16) skb->len; 1138 tail_list->frameSize = (u16) txlen;
1137 tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len; 1139 tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) txlen;
1138 tail_list->buffer[1].count = 0; 1140 tail_list->buffer[1].count = 0;
1139 tail_list->buffer[1].address = 0; 1141 tail_list->buffer[1].address = 0;
1140 1142
@@ -1431,7 +1433,9 @@ static u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int )
1431 if ( ! bbuf ) { 1433 if ( ! bbuf ) {
1432 struct sk_buff *skb = TLan_GetSKB(head_list); 1434 struct sk_buff *skb = TLan_GetSKB(head_list);
1433 pci_unmap_single(priv->pciDev, head_list->buffer[0].address, 1435 pci_unmap_single(priv->pciDev, head_list->buffer[0].address,
1434 skb->len, PCI_DMA_TODEVICE); 1436 max(skb->len,
1437 (unsigned int)TLAN_MIN_FRAME_SIZE),
1438 PCI_DMA_TODEVICE);
1435 dev_kfree_skb_any(skb); 1439 dev_kfree_skb_any(skb);
1436 head_list->buffer[8].address = 0; 1440 head_list->buffer[8].address = 0;
1437 head_list->buffer[9].address = 0; 1441 head_list->buffer[9].address = 0;
@@ -2055,9 +2059,12 @@ static void TLan_FreeLists( struct net_device *dev )
2055 list = priv->txList + i; 2059 list = priv->txList + i;
2056 skb = TLan_GetSKB(list); 2060 skb = TLan_GetSKB(list);
2057 if ( skb ) { 2061 if ( skb ) {
2058 pci_unmap_single(priv->pciDev, 2062 pci_unmap_single(
2059 list->buffer[0].address, skb->len, 2063 priv->pciDev,
2060 PCI_DMA_TODEVICE); 2064 list->buffer[0].address,
2065 max(skb->len,
2066 (unsigned int)TLAN_MIN_FRAME_SIZE),
2067 PCI_DMA_TODEVICE);
2061 dev_kfree_skb_any( skb ); 2068 dev_kfree_skb_any( skb );
2062 list->buffer[8].address = 0; 2069 list->buffer[8].address = 0;
2063 list->buffer[9].address = 0; 2070 list->buffer[9].address = 0;