diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-03-16 19:27:08 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-16 19:27:08 -0500 |
commit | abc71c46dc0a12ab7fddc18cfe4f4aa26808c79b (patch) | |
tree | b0c846052b994d57d58713a0cc8da30a22baaf1c /drivers/net | |
parent | 30dcbf29cc6d92d70fa262e79e84011fe6913bed (diff) | |
parent | 232a347a444e687b5f8cf0f6485704db1c6024d3 (diff) |
Merge branch 'upstream-fixes'
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/chelsio/sge.c | 6 | ||||
-rw-r--r-- | drivers/net/e100.c | 5 | ||||
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 8 | ||||
-rw-r--r-- | drivers/net/tg3.c | 2 | ||||
-rw-r--r-- | drivers/net/tun.c | 5 |
5 files changed, 15 insertions, 11 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 2c5b849b7ba4..30ff8ea1a402 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -1021,7 +1021,7 @@ static void restart_tx_queues(struct sge *sge) | |||
1021 | if (test_and_clear_bit(nd->if_port, | 1021 | if (test_and_clear_bit(nd->if_port, |
1022 | &sge->stopped_tx_queues) && | 1022 | &sge->stopped_tx_queues) && |
1023 | netif_running(nd)) { | 1023 | netif_running(nd)) { |
1024 | sge->stats.cmdQ_restarted[3]++; | 1024 | sge->stats.cmdQ_restarted[2]++; |
1025 | netif_wake_queue(nd); | 1025 | netif_wake_queue(nd); |
1026 | } | 1026 | } |
1027 | } | 1027 | } |
@@ -1350,7 +1350,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, | |||
1350 | if (unlikely(credits < count)) { | 1350 | if (unlikely(credits < count)) { |
1351 | netif_stop_queue(dev); | 1351 | netif_stop_queue(dev); |
1352 | set_bit(dev->if_port, &sge->stopped_tx_queues); | 1352 | set_bit(dev->if_port, &sge->stopped_tx_queues); |
1353 | sge->stats.cmdQ_full[3]++; | 1353 | sge->stats.cmdQ_full[2]++; |
1354 | spin_unlock(&q->lock); | 1354 | spin_unlock(&q->lock); |
1355 | if (!netif_queue_stopped(dev)) | 1355 | if (!netif_queue_stopped(dev)) |
1356 | CH_ERR("%s: Tx ring full while queue awake!\n", | 1356 | CH_ERR("%s: Tx ring full while queue awake!\n", |
@@ -1358,7 +1358,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, | |||
1358 | return NETDEV_TX_BUSY; | 1358 | return NETDEV_TX_BUSY; |
1359 | } | 1359 | } |
1360 | if (unlikely(credits - count < q->stop_thres)) { | 1360 | if (unlikely(credits - count < q->stop_thres)) { |
1361 | sge->stats.cmdQ_full[3]++; | 1361 | sge->stats.cmdQ_full[2]++; |
1362 | netif_stop_queue(dev); | 1362 | netif_stop_queue(dev); |
1363 | set_bit(dev->if_port, &sge->stopped_tx_queues); | 1363 | set_bit(dev->if_port, &sge->stopped_tx_queues); |
1364 | } | 1364 | } |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index ed13f72ef8ef..31ac001f5517 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2154,6 +2154,9 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) | |||
2154 | 2154 | ||
2155 | msleep(10); | 2155 | msleep(10); |
2156 | 2156 | ||
2157 | pci_dma_sync_single_for_cpu(nic->pdev, nic->rx_to_clean->dma_addr, | ||
2158 | RFD_BUF_LEN, PCI_DMA_FROMDEVICE); | ||
2159 | |||
2157 | if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), | 2160 | if(memcmp(nic->rx_to_clean->skb->data + sizeof(struct rfd), |
2158 | skb->data, ETH_DATA_LEN)) | 2161 | skb->data, ETH_DATA_LEN)) |
2159 | err = -EAGAIN; | 2162 | err = -EAGAIN; |
@@ -2161,8 +2164,8 @@ static int e100_loopback_test(struct nic *nic, enum loopback loopback_mode) | |||
2161 | err_loopback_none: | 2164 | err_loopback_none: |
2162 | mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0); | 2165 | mdio_write(nic->netdev, nic->mii.phy_id, MII_BMCR, 0); |
2163 | nic->loopback = lb_none; | 2166 | nic->loopback = lb_none; |
2164 | e100_hw_init(nic); | ||
2165 | e100_clean_cbs(nic); | 2167 | e100_clean_cbs(nic); |
2168 | e100_hw_reset(nic); | ||
2166 | err_clean_rx: | 2169 | err_clean_rx: |
2167 | e100_rx_clean_list(nic); | 2170 | e100_rx_clean_list(nic); |
2168 | return err; | 2171 | return err; |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 4400117eb6c7..f39de16e6b97 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -3600,7 +3600,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
3600 | e1000_rx_checksum(adapter, | 3600 | e1000_rx_checksum(adapter, |
3601 | (uint32_t)(status) | | 3601 | (uint32_t)(status) | |
3602 | ((uint32_t)(rx_desc->errors) << 24), | 3602 | ((uint32_t)(rx_desc->errors) << 24), |
3603 | rx_desc->csum, skb); | 3603 | le16_to_cpu(rx_desc->csum), skb); |
3604 | 3604 | ||
3605 | skb->protocol = eth_type_trans(skb, netdev); | 3605 | skb->protocol = eth_type_trans(skb, netdev); |
3606 | #ifdef CONFIG_E1000_NAPI | 3606 | #ifdef CONFIG_E1000_NAPI |
@@ -3773,11 +3773,11 @@ e1000_clean_rx_irq_ps(struct e1000_adapter *adapter, | |||
3773 | 3773 | ||
3774 | copydone: | 3774 | copydone: |
3775 | e1000_rx_checksum(adapter, staterr, | 3775 | e1000_rx_checksum(adapter, staterr, |
3776 | rx_desc->wb.lower.hi_dword.csum_ip.csum, skb); | 3776 | le16_to_cpu(rx_desc->wb.lower.hi_dword.csum_ip.csum), skb); |
3777 | skb->protocol = eth_type_trans(skb, netdev); | 3777 | skb->protocol = eth_type_trans(skb, netdev); |
3778 | 3778 | ||
3779 | if (likely(rx_desc->wb.upper.header_status & | 3779 | if (likely(rx_desc->wb.upper.header_status & |
3780 | E1000_RXDPS_HDRSTAT_HDRSP)) | 3780 | cpu_to_le16(E1000_RXDPS_HDRSTAT_HDRSP))) |
3781 | adapter->rx_hdr_split++; | 3781 | adapter->rx_hdr_split++; |
3782 | #ifdef CONFIG_E1000_NAPI | 3782 | #ifdef CONFIG_E1000_NAPI |
3783 | if (unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) { | 3783 | if (unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) { |
@@ -3799,7 +3799,7 @@ copydone: | |||
3799 | netdev->last_rx = jiffies; | 3799 | netdev->last_rx = jiffies; |
3800 | 3800 | ||
3801 | next_desc: | 3801 | next_desc: |
3802 | rx_desc->wb.middle.status_error &= ~0xFF; | 3802 | rx_desc->wb.middle.status_error &= cpu_to_le32(~0xFF); |
3803 | buffer_info->skb = NULL; | 3803 | buffer_info->skb = NULL; |
3804 | 3804 | ||
3805 | /* return some buffers to hardware, one at a time is too slow */ | 3805 | /* return some buffers to hardware, one at a time is too slow */ |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 0f3798f81883..c0878f304e54 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -10543,8 +10543,6 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) | |||
10543 | strcat(str, "66MHz"); | 10543 | strcat(str, "66MHz"); |
10544 | else if (clock_ctrl == 6) | 10544 | else if (clock_ctrl == 6) |
10545 | strcat(str, "100MHz"); | 10545 | strcat(str, "100MHz"); |
10546 | else if (clock_ctrl == 7) | ||
10547 | strcat(str, "133MHz"); | ||
10548 | } else { | 10546 | } else { |
10549 | strcpy(str, "PCI:"); | 10547 | strcpy(str, "PCI:"); |
10550 | if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) | 10548 | if (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 50b8c6754b1e..a1ed2d983740 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -249,8 +249,11 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, | |||
249 | 249 | ||
250 | if (align) | 250 | if (align) |
251 | skb_reserve(skb, align); | 251 | skb_reserve(skb, align); |
252 | if (memcpy_fromiovec(skb_put(skb, len), iv, len)) | 252 | if (memcpy_fromiovec(skb_put(skb, len), iv, len)) { |
253 | tun->stats.rx_dropped++; | ||
254 | kfree_skb(skb); | ||
253 | return -EFAULT; | 255 | return -EFAULT; |
256 | } | ||
254 | 257 | ||
255 | skb->dev = tun->dev; | 258 | skb->dev = tun->dev; |
256 | switch (tun->flags & TUN_TYPE_MASK) { | 259 | switch (tun->flags & TUN_TYPE_MASK) { |