diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl1.c | 12 | ||||
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl1.h | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atlx.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/e1000e/ich8lan.c | 15 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851.c | 8 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851_mll.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/realtek/8139cp.c | 10 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 14 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet.h | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | 6 | ||||
-rw-r--r-- | drivers/net/ppp/ppp_generic.c | 15 | ||||
-rw-r--r-- | drivers/vhost/net.c | 2 | ||||
-rw-r--r-- | drivers/vhost/vhost.c | 5 | ||||
-rw-r--r-- | drivers/vhost/vhost.h | 2 |
16 files changed, 62 insertions, 53 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index 7f1e498c3c06..5d10884e5080 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c | |||
@@ -2528,7 +2528,7 @@ static irqreturn_t atl1_intr(int irq, void *data) | |||
2528 | "pcie phy link down %x\n", status); | 2528 | "pcie phy link down %x\n", status); |
2529 | if (netif_running(adapter->netdev)) { /* reset MAC */ | 2529 | if (netif_running(adapter->netdev)) { /* reset MAC */ |
2530 | atlx_irq_disable(adapter); | 2530 | atlx_irq_disable(adapter); |
2531 | schedule_work(&adapter->pcie_dma_to_rst_task); | 2531 | schedule_work(&adapter->reset_dev_task); |
2532 | return IRQ_HANDLED; | 2532 | return IRQ_HANDLED; |
2533 | } | 2533 | } |
2534 | } | 2534 | } |
@@ -2540,7 +2540,7 @@ static irqreturn_t atl1_intr(int irq, void *data) | |||
2540 | "pcie DMA r/w error (status = 0x%x)\n", | 2540 | "pcie DMA r/w error (status = 0x%x)\n", |
2541 | status); | 2541 | status); |
2542 | atlx_irq_disable(adapter); | 2542 | atlx_irq_disable(adapter); |
2543 | schedule_work(&adapter->pcie_dma_to_rst_task); | 2543 | schedule_work(&adapter->reset_dev_task); |
2544 | return IRQ_HANDLED; | 2544 | return IRQ_HANDLED; |
2545 | } | 2545 | } |
2546 | 2546 | ||
@@ -2681,10 +2681,10 @@ static void atl1_down(struct atl1_adapter *adapter) | |||
2681 | atl1_clean_rx_ring(adapter); | 2681 | atl1_clean_rx_ring(adapter); |
2682 | } | 2682 | } |
2683 | 2683 | ||
2684 | static void atl1_tx_timeout_task(struct work_struct *work) | 2684 | static void atl1_reset_dev_task(struct work_struct *work) |
2685 | { | 2685 | { |
2686 | struct atl1_adapter *adapter = | 2686 | struct atl1_adapter *adapter = |
2687 | container_of(work, struct atl1_adapter, tx_timeout_task); | 2687 | container_of(work, struct atl1_adapter, reset_dev_task); |
2688 | struct net_device *netdev = adapter->netdev; | 2688 | struct net_device *netdev = adapter->netdev; |
2689 | 2689 | ||
2690 | netif_device_detach(netdev); | 2690 | netif_device_detach(netdev); |
@@ -3087,12 +3087,10 @@ static int __devinit atl1_probe(struct pci_dev *pdev, | |||
3087 | (unsigned long)adapter); | 3087 | (unsigned long)adapter); |
3088 | adapter->phy_timer_pending = false; | 3088 | adapter->phy_timer_pending = false; |
3089 | 3089 | ||
3090 | INIT_WORK(&adapter->tx_timeout_task, atl1_tx_timeout_task); | 3090 | INIT_WORK(&adapter->reset_dev_task, atl1_reset_dev_task); |
3091 | 3091 | ||
3092 | INIT_WORK(&adapter->link_chg_task, atlx_link_chg_task); | 3092 | INIT_WORK(&adapter->link_chg_task, atlx_link_chg_task); |
3093 | 3093 | ||
3094 | INIT_WORK(&adapter->pcie_dma_to_rst_task, atl1_tx_timeout_task); | ||
3095 | |||
3096 | err = register_netdev(netdev); | 3094 | err = register_netdev(netdev); |
3097 | if (err) | 3095 | if (err) |
3098 | goto err_common; | 3096 | goto err_common; |
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.h b/drivers/net/ethernet/atheros/atlx/atl1.h index 1cb658b2ff92..b1fb209b9dd9 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.h +++ b/drivers/net/ethernet/atheros/atlx/atl1.h | |||
@@ -764,8 +764,8 @@ struct atl1_adapter { | |||
764 | spinlock_t lock; | 764 | spinlock_t lock; |
765 | struct napi_struct napi; | 765 | struct napi_struct napi; |
766 | struct work_struct tx_timeout_task; | 766 | struct work_struct tx_timeout_task; |
767 | struct work_struct reset_dev_task; | ||
767 | struct work_struct link_chg_task; | 768 | struct work_struct link_chg_task; |
768 | struct work_struct pcie_dma_to_rst_task; | ||
769 | 769 | ||
770 | struct timer_list phy_config_timer; | 770 | struct timer_list phy_config_timer; |
771 | bool phy_timer_pending; | 771 | bool phy_timer_pending; |
diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c index 95975b5b7f70..b4f3aa49a7fc 100644 --- a/drivers/net/ethernet/atheros/atlx/atlx.c +++ b/drivers/net/ethernet/atheros/atlx/atlx.c | |||
@@ -201,7 +201,7 @@ static void atlx_tx_timeout(struct net_device *netdev) | |||
201 | { | 201 | { |
202 | struct atlx_adapter *adapter = netdev_priv(netdev); | 202 | struct atlx_adapter *adapter = netdev_priv(netdev); |
203 | /* Do the reset outside of interrupt context */ | 203 | /* Do the reset outside of interrupt context */ |
204 | schedule_work(&adapter->tx_timeout_task); | 204 | schedule_work(&adapter->reset_dev_task); |
205 | } | 205 | } |
206 | 206 | ||
207 | /* | 207 | /* |
diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c index 0f158a95d94f..14af3e22d8d9 100644 --- a/drivers/net/ethernet/intel/e1000e/ich8lan.c +++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c | |||
@@ -1310,10 +1310,6 @@ static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state) | |||
1310 | 1310 | ||
1311 | if (mac_reg & E1000_PHY_CTRL_D0A_LPLU) | 1311 | if (mac_reg & E1000_PHY_CTRL_D0A_LPLU) |
1312 | oem_reg |= HV_OEM_BITS_LPLU; | 1312 | oem_reg |= HV_OEM_BITS_LPLU; |
1313 | |||
1314 | /* Set Restart auto-neg to activate the bits */ | ||
1315 | if (!hw->phy.ops.check_reset_block(hw)) | ||
1316 | oem_reg |= HV_OEM_BITS_RESTART_AN; | ||
1317 | } else { | 1313 | } else { |
1318 | if (mac_reg & (E1000_PHY_CTRL_GBE_DISABLE | | 1314 | if (mac_reg & (E1000_PHY_CTRL_GBE_DISABLE | |
1319 | E1000_PHY_CTRL_NOND0A_GBE_DISABLE)) | 1315 | E1000_PHY_CTRL_NOND0A_GBE_DISABLE)) |
@@ -1324,6 +1320,11 @@ static s32 e1000_oem_bits_config_ich8lan(struct e1000_hw *hw, bool d0_state) | |||
1324 | oem_reg |= HV_OEM_BITS_LPLU; | 1320 | oem_reg |= HV_OEM_BITS_LPLU; |
1325 | } | 1321 | } |
1326 | 1322 | ||
1323 | /* Set Restart auto-neg to activate the bits */ | ||
1324 | if ((d0_state || (hw->mac.type != e1000_pchlan)) && | ||
1325 | !hw->phy.ops.check_reset_block(hw)) | ||
1326 | oem_reg |= HV_OEM_BITS_RESTART_AN; | ||
1327 | |||
1327 | ret_val = hw->phy.ops.write_reg_locked(hw, HV_OEM_BITS, oem_reg); | 1328 | ret_val = hw->phy.ops.write_reg_locked(hw, HV_OEM_BITS, oem_reg); |
1328 | 1329 | ||
1329 | release: | 1330 | release: |
@@ -3682,7 +3683,11 @@ void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw) | |||
3682 | 3683 | ||
3683 | if (hw->mac.type >= e1000_pchlan) { | 3684 | if (hw->mac.type >= e1000_pchlan) { |
3684 | e1000_oem_bits_config_ich8lan(hw, false); | 3685 | e1000_oem_bits_config_ich8lan(hw, false); |
3685 | e1000_phy_hw_reset_ich8lan(hw); | 3686 | |
3687 | /* Reset PHY to activate OEM bits on 82577/8 */ | ||
3688 | if (hw->mac.type == e1000_pchlan) | ||
3689 | e1000e_phy_hw_reset_generic(hw); | ||
3690 | |||
3686 | ret_val = hw->phy.ops.acquire(hw); | 3691 | ret_val = hw->phy.ops.acquire(hw); |
3687 | if (ret_val) | 3692 | if (ret_val) |
3688 | return; | 3693 | return; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 10606bdbb5ae..f3b849438b62 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -4865,6 +4865,16 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake) | |||
4865 | if (wufc) { | 4865 | if (wufc) { |
4866 | ixgbe_set_rx_mode(netdev); | 4866 | ixgbe_set_rx_mode(netdev); |
4867 | 4867 | ||
4868 | /* | ||
4869 | * enable the optics for both mult-speed fiber and | ||
4870 | * 82599 SFP+ fiber as we can WoL. | ||
4871 | */ | ||
4872 | if (hw->mac.ops.enable_tx_laser && | ||
4873 | (hw->phy.multispeed_fiber || | ||
4874 | (hw->mac.ops.get_media_type(hw) == ixgbe_media_type_fiber && | ||
4875 | hw->mac.type == ixgbe_mac_82599EB))) | ||
4876 | hw->mac.ops.enable_tx_laser(hw); | ||
4877 | |||
4868 | /* turn on all-multi mode if wake on multicast is enabled */ | 4878 | /* turn on all-multi mode if wake on multicast is enabled */ |
4869 | if (wufc & IXGBE_WUFC_MC) { | 4879 | if (wufc & IXGBE_WUFC_MC) { |
4870 | fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); | 4880 | fctrl = IXGBE_READ_REG(hw, IXGBE_FCTRL); |
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index c722aa607d07..e5dc0757f077 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c | |||
@@ -1418,6 +1418,7 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
1418 | struct net_device *ndev; | 1418 | struct net_device *ndev; |
1419 | struct ks8851_net *ks; | 1419 | struct ks8851_net *ks; |
1420 | int ret; | 1420 | int ret; |
1421 | unsigned cider; | ||
1421 | 1422 | ||
1422 | ndev = alloc_etherdev(sizeof(struct ks8851_net)); | 1423 | ndev = alloc_etherdev(sizeof(struct ks8851_net)); |
1423 | if (!ndev) | 1424 | if (!ndev) |
@@ -1484,8 +1485,8 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
1484 | ks8851_soft_reset(ks, GRR_GSR); | 1485 | ks8851_soft_reset(ks, GRR_GSR); |
1485 | 1486 | ||
1486 | /* simple check for a valid chip being connected to the bus */ | 1487 | /* simple check for a valid chip being connected to the bus */ |
1487 | 1488 | cider = ks8851_rdreg16(ks, KS_CIDER); | |
1488 | if ((ks8851_rdreg16(ks, KS_CIDER) & ~CIDER_REV_MASK) != CIDER_ID) { | 1489 | if ((cider & ~CIDER_REV_MASK) != CIDER_ID) { |
1489 | dev_err(&spi->dev, "failed to read device ID\n"); | 1490 | dev_err(&spi->dev, "failed to read device ID\n"); |
1490 | ret = -ENODEV; | 1491 | ret = -ENODEV; |
1491 | goto err_id; | 1492 | goto err_id; |
@@ -1516,8 +1517,7 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
1516 | } | 1517 | } |
1517 | 1518 | ||
1518 | netdev_info(ndev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n", | 1519 | netdev_info(ndev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n", |
1519 | CIDER_REV_GET(ks8851_rdreg16(ks, KS_CIDER)), | 1520 | CIDER_REV_GET(cider), ndev->dev_addr, ndev->irq, |
1520 | ndev->dev_addr, ndev->irq, | ||
1521 | ks->rc_ccr & CCR_EEPROM ? "has" : "no"); | 1521 | ks->rc_ccr & CCR_EEPROM ? "has" : "no"); |
1522 | 1522 | ||
1523 | return 0; | 1523 | return 0; |
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index b8104d9f4081..5ffde23ac8fb 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #define DRV_NAME "ks8851_mll" | 40 | #define DRV_NAME "ks8851_mll" |
41 | 41 | ||
42 | static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 }; | 42 | static u8 KS_DEFAULT_MAC_ADDRESS[] = { 0x00, 0x10, 0xA1, 0x86, 0x95, 0x11 }; |
43 | #define MAX_RECV_FRAMES 32 | 43 | #define MAX_RECV_FRAMES 255 |
44 | #define MAX_BUF_SIZE 2048 | 44 | #define MAX_BUF_SIZE 2048 |
45 | #define TX_BUF_SIZE 2000 | 45 | #define TX_BUF_SIZE 2000 |
46 | #define RX_BUF_SIZE 2000 | 46 | #define RX_BUF_SIZE 2000 |
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c index 69c7d695807c..5eef290997f9 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c | |||
@@ -961,6 +961,11 @@ static inline void cp_start_hw (struct cp_private *cp) | |||
961 | cpw8(Cmd, RxOn | TxOn); | 961 | cpw8(Cmd, RxOn | TxOn); |
962 | } | 962 | } |
963 | 963 | ||
964 | static void cp_enable_irq(struct cp_private *cp) | ||
965 | { | ||
966 | cpw16_f(IntrMask, cp_intr_mask); | ||
967 | } | ||
968 | |||
964 | static void cp_init_hw (struct cp_private *cp) | 969 | static void cp_init_hw (struct cp_private *cp) |
965 | { | 970 | { |
966 | struct net_device *dev = cp->dev; | 971 | struct net_device *dev = cp->dev; |
@@ -1000,8 +1005,6 @@ static void cp_init_hw (struct cp_private *cp) | |||
1000 | 1005 | ||
1001 | cpw16(MultiIntr, 0); | 1006 | cpw16(MultiIntr, 0); |
1002 | 1007 | ||
1003 | cpw16_f(IntrMask, cp_intr_mask); | ||
1004 | |||
1005 | cpw8_f(Cfg9346, Cfg9346_Lock); | 1008 | cpw8_f(Cfg9346, Cfg9346_Lock); |
1006 | } | 1009 | } |
1007 | 1010 | ||
@@ -1134,6 +1137,8 @@ static int cp_open (struct net_device *dev) | |||
1134 | if (rc) | 1137 | if (rc) |
1135 | goto err_out_hw; | 1138 | goto err_out_hw; |
1136 | 1139 | ||
1140 | cp_enable_irq(cp); | ||
1141 | |||
1137 | netif_carrier_off(dev); | 1142 | netif_carrier_off(dev); |
1138 | mii_check_media(&cp->mii_if, netif_msg_link(cp), true); | 1143 | mii_check_media(&cp->mii_if, netif_msg_link(cp), true); |
1139 | netif_start_queue(dev); | 1144 | netif_start_queue(dev); |
@@ -2032,6 +2037,7 @@ static int cp_resume (struct pci_dev *pdev) | |||
2032 | /* FIXME: sh*t may happen if the Rx ring buffer is depleted */ | 2037 | /* FIXME: sh*t may happen if the Rx ring buffer is depleted */ |
2033 | cp_init_rings_index (cp); | 2038 | cp_init_rings_index (cp); |
2034 | cp_init_hw (cp); | 2039 | cp_init_hw (cp); |
2040 | cp_enable_irq(cp); | ||
2035 | netif_start_queue (dev); | 2041 | netif_start_queue (dev); |
2036 | 2042 | ||
2037 | spin_lock_irqsave (&cp->lock, flags); | 2043 | spin_lock_irqsave (&cp->lock, flags); |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 519ed8ef54e0..480fd0822e4a 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -1166,10 +1166,8 @@ smsc911x_rx_counterrors(struct net_device *dev, unsigned int rxstat) | |||
1166 | 1166 | ||
1167 | /* Quickly dumps bad packets */ | 1167 | /* Quickly dumps bad packets */ |
1168 | static void | 1168 | static void |
1169 | smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktbytes) | 1169 | smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktwords) |
1170 | { | 1170 | { |
1171 | unsigned int pktwords = (pktbytes + NET_IP_ALIGN + 3) >> 2; | ||
1172 | |||
1173 | if (likely(pktwords >= 4)) { | 1171 | if (likely(pktwords >= 4)) { |
1174 | unsigned int timeout = 500; | 1172 | unsigned int timeout = 500; |
1175 | unsigned int val; | 1173 | unsigned int val; |
@@ -1233,7 +1231,7 @@ static int smsc911x_poll(struct napi_struct *napi, int budget) | |||
1233 | continue; | 1231 | continue; |
1234 | } | 1232 | } |
1235 | 1233 | ||
1236 | skb = netdev_alloc_skb(dev, pktlength + NET_IP_ALIGN); | 1234 | skb = netdev_alloc_skb(dev, pktwords << 2); |
1237 | if (unlikely(!skb)) { | 1235 | if (unlikely(!skb)) { |
1238 | SMSC_WARN(pdata, rx_err, | 1236 | SMSC_WARN(pdata, rx_err, |
1239 | "Unable to allocate skb for rx packet"); | 1237 | "Unable to allocate skb for rx packet"); |
@@ -1243,14 +1241,12 @@ static int smsc911x_poll(struct napi_struct *napi, int budget) | |||
1243 | break; | 1241 | break; |
1244 | } | 1242 | } |
1245 | 1243 | ||
1246 | skb->data = skb->head; | 1244 | pdata->ops->rx_readfifo(pdata, |
1247 | skb_reset_tail_pointer(skb); | 1245 | (unsigned int *)skb->data, pktwords); |
1248 | 1246 | ||
1249 | /* Align IP on 16B boundary */ | 1247 | /* Align IP on 16B boundary */ |
1250 | skb_reserve(skb, NET_IP_ALIGN); | 1248 | skb_reserve(skb, NET_IP_ALIGN); |
1251 | skb_put(skb, pktlength - 4); | 1249 | skb_put(skb, pktlength - 4); |
1252 | pdata->ops->rx_readfifo(pdata, | ||
1253 | (unsigned int *)skb->head, pktwords); | ||
1254 | skb->protocol = eth_type_trans(skb, dev); | 1250 | skb->protocol = eth_type_trans(skb, dev); |
1255 | skb_checksum_none_assert(skb); | 1251 | skb_checksum_none_assert(skb); |
1256 | netif_receive_skb(skb); | 1252 | netif_receive_skb(skb); |
@@ -1565,7 +1561,7 @@ static int smsc911x_open(struct net_device *dev) | |||
1565 | smsc911x_reg_write(pdata, FIFO_INT, temp); | 1561 | smsc911x_reg_write(pdata, FIFO_INT, temp); |
1566 | 1562 | ||
1567 | /* set RX Data offset to 2 bytes for alignment */ | 1563 | /* set RX Data offset to 2 bytes for alignment */ |
1568 | smsc911x_reg_write(pdata, RX_CFG, (2 << 8)); | 1564 | smsc911x_reg_write(pdata, RX_CFG, (NET_IP_ALIGN << 8)); |
1569 | 1565 | ||
1570 | /* enable NAPI polling before enabling RX interrupts */ | 1566 | /* enable NAPI polling before enabling RX interrupts */ |
1571 | napi_enable(&pdata->napi); | 1567 | napi_enable(&pdata->napi); |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet.h b/drivers/net/ethernet/xilinx/xilinx_axienet.h index cc83af083fd7..44b8d2bad8c3 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet.h +++ b/drivers/net/ethernet/xilinx/xilinx_axienet.h | |||
@@ -2,9 +2,7 @@ | |||
2 | * Definitions for Xilinx Axi Ethernet device driver. | 2 | * Definitions for Xilinx Axi Ethernet device driver. |
3 | * | 3 | * |
4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. | 4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. |
5 | * Copyright (c) 2010 Xilinx, Inc. All rights reserved. | 5 | * Copyright (c) 2010 - 2012 Xilinx, Inc. All rights reserved. |
6 | * Copyright (c) 2012 Daniel Borkmann, <daniel.borkmann@tik.ee.ethz.ch> | ||
7 | * Copyright (c) 2012 Ariane Keller, <ariane.keller@tik.ee.ethz.ch> | ||
8 | */ | 6 | */ |
9 | 7 | ||
10 | #ifndef XILINX_AXIENET_H | 8 | #ifndef XILINX_AXIENET_H |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 2fcbeba6814b..9c365e192a31 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
@@ -4,9 +4,9 @@ | |||
4 | * Copyright (c) 2008 Nissin Systems Co., Ltd., Yoshio Kashiwagi | 4 | * Copyright (c) 2008 Nissin Systems Co., Ltd., Yoshio Kashiwagi |
5 | * Copyright (c) 2005-2008 DLA Systems, David H. Lynch Jr. <dhlii@dlasys.net> | 5 | * Copyright (c) 2005-2008 DLA Systems, David H. Lynch Jr. <dhlii@dlasys.net> |
6 | * Copyright (c) 2008-2009 Secret Lab Technologies Ltd. | 6 | * Copyright (c) 2008-2009 Secret Lab Technologies Ltd. |
7 | * Copyright (c) 2010 Xilinx, Inc. All rights reserved. | 7 | * Copyright (c) 2010 - 2011 Michal Simek <monstr@monstr.eu> |
8 | * Copyright (c) 2012 Daniel Borkmann, <daniel.borkmann@tik.ee.ethz.ch> | 8 | * Copyright (c) 2010 - 2011 PetaLogix |
9 | * Copyright (c) 2012 Ariane Keller, <ariane.keller@tik.ee.ethz.ch> | 9 | * Copyright (c) 2010 - 2012 Xilinx, Inc. All rights reserved. |
10 | * | 10 | * |
11 | * This is a driver for the Xilinx Axi Ethernet which is used in the Virtex6 | 11 | * This is a driver for the Xilinx Axi Ethernet which is used in the Virtex6 |
12 | * and Spartan6. | 12 | * and Spartan6. |
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c index d70b6e79f6c0..e90e1f46121e 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_mdio.c | |||
@@ -2,9 +2,9 @@ | |||
2 | * MDIO bus driver for the Xilinx Axi Ethernet device | 2 | * MDIO bus driver for the Xilinx Axi Ethernet device |
3 | * | 3 | * |
4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. | 4 | * Copyright (c) 2009 Secret Lab Technologies, Ltd. |
5 | * Copyright (c) 2010 Xilinx, Inc. All rights reserved. | 5 | * Copyright (c) 2010 - 2011 Michal Simek <monstr@monstr.eu> |
6 | * Copyright (c) 2012 Daniel Borkmann, <daniel.borkmann@tik.ee.ethz.ch> | 6 | * Copyright (c) 2010 - 2011 PetaLogix |
7 | * Copyright (c) 2012 Ariane Keller, <ariane.keller@tik.ee.ethz.ch> | 7 | * Copyright (c) 2010 - 2012 Xilinx, Inc. All rights reserved. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <linux/of_address.h> | 10 | #include <linux/of_address.h> |
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 33f8c51968b6..21d7151fb0ab 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
@@ -235,7 +235,7 @@ struct ppp_net { | |||
235 | /* Prototypes. */ | 235 | /* Prototypes. */ |
236 | static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf, | 236 | static int ppp_unattached_ioctl(struct net *net, struct ppp_file *pf, |
237 | struct file *file, unsigned int cmd, unsigned long arg); | 237 | struct file *file, unsigned int cmd, unsigned long arg); |
238 | static int ppp_xmit_process(struct ppp *ppp); | 238 | static void ppp_xmit_process(struct ppp *ppp); |
239 | static void ppp_send_frame(struct ppp *ppp, struct sk_buff *skb); | 239 | static void ppp_send_frame(struct ppp *ppp, struct sk_buff *skb); |
240 | static void ppp_push(struct ppp *ppp); | 240 | static void ppp_push(struct ppp *ppp); |
241 | static void ppp_channel_push(struct channel *pch); | 241 | static void ppp_channel_push(struct channel *pch); |
@@ -969,8 +969,7 @@ ppp_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
969 | put_unaligned_be16(proto, pp); | 969 | put_unaligned_be16(proto, pp); |
970 | 970 | ||
971 | skb_queue_tail(&ppp->file.xq, skb); | 971 | skb_queue_tail(&ppp->file.xq, skb); |
972 | if (!ppp_xmit_process(ppp)) | 972 | ppp_xmit_process(ppp); |
973 | netif_stop_queue(dev); | ||
974 | return NETDEV_TX_OK; | 973 | return NETDEV_TX_OK; |
975 | 974 | ||
976 | outf: | 975 | outf: |
@@ -1048,11 +1047,10 @@ static void ppp_setup(struct net_device *dev) | |||
1048 | * Called to do any work queued up on the transmit side | 1047 | * Called to do any work queued up on the transmit side |
1049 | * that can now be done. | 1048 | * that can now be done. |
1050 | */ | 1049 | */ |
1051 | static int | 1050 | static void |
1052 | ppp_xmit_process(struct ppp *ppp) | 1051 | ppp_xmit_process(struct ppp *ppp) |
1053 | { | 1052 | { |
1054 | struct sk_buff *skb; | 1053 | struct sk_buff *skb; |
1055 | int ret = 0; | ||
1056 | 1054 | ||
1057 | ppp_xmit_lock(ppp); | 1055 | ppp_xmit_lock(ppp); |
1058 | if (!ppp->closing) { | 1056 | if (!ppp->closing) { |
@@ -1062,13 +1060,12 @@ ppp_xmit_process(struct ppp *ppp) | |||
1062 | ppp_send_frame(ppp, skb); | 1060 | ppp_send_frame(ppp, skb); |
1063 | /* If there's no work left to do, tell the core net | 1061 | /* If there's no work left to do, tell the core net |
1064 | code that we can accept some more. */ | 1062 | code that we can accept some more. */ |
1065 | if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) { | 1063 | if (!ppp->xmit_pending && !skb_peek(&ppp->file.xq)) |
1066 | netif_wake_queue(ppp->dev); | 1064 | netif_wake_queue(ppp->dev); |
1067 | ret = 1; | 1065 | else |
1068 | } | 1066 | netif_stop_queue(ppp->dev); |
1069 | } | 1067 | } |
1070 | ppp_xmit_unlock(ppp); | 1068 | ppp_xmit_unlock(ppp); |
1071 | return ret; | ||
1072 | } | 1069 | } |
1073 | 1070 | ||
1074 | static inline struct sk_buff * | 1071 | static inline struct sk_buff * |
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index f0da2c32fbde..1f21d2a1e528 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c | |||
@@ -238,7 +238,7 @@ static void handle_tx(struct vhost_net *net) | |||
238 | 238 | ||
239 | vq->heads[vq->upend_idx].len = len; | 239 | vq->heads[vq->upend_idx].len = len; |
240 | ubuf->callback = vhost_zerocopy_callback; | 240 | ubuf->callback = vhost_zerocopy_callback; |
241 | ubuf->arg = vq->ubufs; | 241 | ubuf->ctx = vq->ubufs; |
242 | ubuf->desc = vq->upend_idx; | 242 | ubuf->desc = vq->upend_idx; |
243 | msg.msg_control = ubuf; | 243 | msg.msg_control = ubuf; |
244 | msg.msg_controllen = sizeof(ubuf); | 244 | msg.msg_controllen = sizeof(ubuf); |
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 947f00d8e091..51e4c1eeec4f 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -1598,10 +1598,9 @@ void vhost_ubuf_put_and_wait(struct vhost_ubuf_ref *ubufs) | |||
1598 | kfree(ubufs); | 1598 | kfree(ubufs); |
1599 | } | 1599 | } |
1600 | 1600 | ||
1601 | void vhost_zerocopy_callback(void *arg) | 1601 | void vhost_zerocopy_callback(struct ubuf_info *ubuf) |
1602 | { | 1602 | { |
1603 | struct ubuf_info *ubuf = arg; | 1603 | struct vhost_ubuf_ref *ubufs = ubuf->ctx; |
1604 | struct vhost_ubuf_ref *ubufs = ubuf->arg; | ||
1605 | struct vhost_virtqueue *vq = ubufs->vq; | 1604 | struct vhost_virtqueue *vq = ubufs->vq; |
1606 | 1605 | ||
1607 | /* set len = 1 to mark this desc buffers done DMA */ | 1606 | /* set len = 1 to mark this desc buffers done DMA */ |
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 8dcf4cca6bf2..8de1fd5b8efb 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h | |||
@@ -188,7 +188,7 @@ bool vhost_enable_notify(struct vhost_dev *, struct vhost_virtqueue *); | |||
188 | 188 | ||
189 | int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, | 189 | int vhost_log_write(struct vhost_virtqueue *vq, struct vhost_log *log, |
190 | unsigned int log_num, u64 len); | 190 | unsigned int log_num, u64 len); |
191 | void vhost_zerocopy_callback(void *arg); | 191 | void vhost_zerocopy_callback(struct ubuf_info *); |
192 | int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq); | 192 | int vhost_zerocopy_signal_used(struct vhost_virtqueue *vq); |
193 | 193 | ||
194 | #define vq_err(vq, fmt, ...) do { \ | 194 | #define vq_err(vq, fmt, ...) do { \ |