diff options
| -rw-r--r-- | drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 4 | ||||
| -rw-r--r-- | drivers/net/ethernet/ezchip/nps_enet.c | 30 | ||||
| -rw-r--r-- | drivers/net/ethernet/ezchip/nps_enet.h | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/renesas/ravb_main.c | 2 | ||||
| -rw-r--r-- | drivers/net/phy/phy.c | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 83 | ||||
| -rw-r--r-- | include/uapi/linux/if.h | 28 | ||||
| -rw-r--r-- | include/uapi/linux/libc-compat.h | 44 | ||||
| -rw-r--r-- | include/uapi/linux/tc_act/Kbuild | 1 | ||||
| -rw-r--r-- | net/ipv4/ip_gre.c | 7 | ||||
| -rw-r--r-- | net/ipv4/tcp_output.c | 6 | ||||
| -rw-r--r-- | net/netfilter/nf_conntrack_core.c | 2 | ||||
| -rw-r--r-- | net/netfilter/nfnetlink_acct.c | 2 | ||||
| -rw-r--r-- | net/netfilter/xt_IDLETIMER.c | 1 | ||||
| -rw-r--r-- | net/openvswitch/conntrack.c | 13 | ||||
| -rw-r--r-- | net/sched/act_ife.c | 14 | ||||
| -rw-r--r-- | net/sched/act_ipt.c | 19 | ||||
| -rw-r--r-- | net/sched/act_mirred.c | 19 | ||||
| -rw-r--r-- | net/sched/act_simple.c | 18 | ||||
| -rw-r--r-- | net/sched/act_skbedit.c | 18 | ||||
| -rw-r--r-- | net/sched/act_vlan.c | 22 | ||||
| -rw-r--r-- | net/x25/x25_facilities.c | 1 |
22 files changed, 258 insertions, 86 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c index fa05e347262f..06b819db51b1 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c | |||
| @@ -533,6 +533,7 @@ static void nicvf_rcv_queue_config(struct nicvf *nic, struct queue_set *qs, | |||
| 533 | nicvf_config_vlan_stripping(nic, nic->netdev->features); | 533 | nicvf_config_vlan_stripping(nic, nic->netdev->features); |
| 534 | 534 | ||
| 535 | /* Enable Receive queue */ | 535 | /* Enable Receive queue */ |
| 536 | memset(&rq_cfg, 0, sizeof(struct rq_cfg)); | ||
| 536 | rq_cfg.ena = 1; | 537 | rq_cfg.ena = 1; |
| 537 | rq_cfg.tcp_ena = 0; | 538 | rq_cfg.tcp_ena = 0; |
| 538 | nicvf_queue_reg_write(nic, NIC_QSET_RQ_0_7_CFG, qidx, *(u64 *)&rq_cfg); | 539 | nicvf_queue_reg_write(nic, NIC_QSET_RQ_0_7_CFG, qidx, *(u64 *)&rq_cfg); |
| @@ -565,6 +566,7 @@ void nicvf_cmp_queue_config(struct nicvf *nic, struct queue_set *qs, | |||
| 565 | qidx, (u64)(cq->dmem.phys_base)); | 566 | qidx, (u64)(cq->dmem.phys_base)); |
| 566 | 567 | ||
| 567 | /* Enable Completion queue */ | 568 | /* Enable Completion queue */ |
| 569 | memset(&cq_cfg, 0, sizeof(struct cq_cfg)); | ||
| 568 | cq_cfg.ena = 1; | 570 | cq_cfg.ena = 1; |
| 569 | cq_cfg.reset = 0; | 571 | cq_cfg.reset = 0; |
| 570 | cq_cfg.caching = 0; | 572 | cq_cfg.caching = 0; |
| @@ -613,6 +615,7 @@ static void nicvf_snd_queue_config(struct nicvf *nic, struct queue_set *qs, | |||
| 613 | qidx, (u64)(sq->dmem.phys_base)); | 615 | qidx, (u64)(sq->dmem.phys_base)); |
| 614 | 616 | ||
| 615 | /* Enable send queue & set queue size */ | 617 | /* Enable send queue & set queue size */ |
| 618 | memset(&sq_cfg, 0, sizeof(struct sq_cfg)); | ||
| 616 | sq_cfg.ena = 1; | 619 | sq_cfg.ena = 1; |
| 617 | sq_cfg.reset = 0; | 620 | sq_cfg.reset = 0; |
| 618 | sq_cfg.ldwb = 0; | 621 | sq_cfg.ldwb = 0; |
| @@ -649,6 +652,7 @@ static void nicvf_rbdr_config(struct nicvf *nic, struct queue_set *qs, | |||
| 649 | 652 | ||
| 650 | /* Enable RBDR & set queue size */ | 653 | /* Enable RBDR & set queue size */ |
| 651 | /* Buffer size should be in multiples of 128 bytes */ | 654 | /* Buffer size should be in multiples of 128 bytes */ |
| 655 | memset(&rbdr_cfg, 0, sizeof(struct rbdr_cfg)); | ||
| 652 | rbdr_cfg.ena = 1; | 656 | rbdr_cfg.ena = 1; |
| 653 | rbdr_cfg.reset = 0; | 657 | rbdr_cfg.reset = 0; |
| 654 | rbdr_cfg.ldwb = 0; | 658 | rbdr_cfg.ldwb = 0; |
diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c index 1f23845a0694..085f9125cf42 100644 --- a/drivers/net/ethernet/ezchip/nps_enet.c +++ b/drivers/net/ethernet/ezchip/nps_enet.c | |||
| @@ -145,7 +145,7 @@ static void nps_enet_tx_handler(struct net_device *ndev) | |||
| 145 | u32 tx_ctrl_nt = (tx_ctrl_value & TX_CTL_NT_MASK) >> TX_CTL_NT_SHIFT; | 145 | u32 tx_ctrl_nt = (tx_ctrl_value & TX_CTL_NT_MASK) >> TX_CTL_NT_SHIFT; |
| 146 | 146 | ||
| 147 | /* Check if we got TX */ | 147 | /* Check if we got TX */ |
| 148 | if (!priv->tx_packet_sent || tx_ctrl_ct) | 148 | if (!priv->tx_skb || tx_ctrl_ct) |
| 149 | return; | 149 | return; |
| 150 | 150 | ||
| 151 | /* Ack Tx ctrl register */ | 151 | /* Ack Tx ctrl register */ |
| @@ -160,7 +160,7 @@ static void nps_enet_tx_handler(struct net_device *ndev) | |||
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | dev_kfree_skb(priv->tx_skb); | 162 | dev_kfree_skb(priv->tx_skb); |
| 163 | priv->tx_packet_sent = false; | 163 | priv->tx_skb = NULL; |
| 164 | 164 | ||
| 165 | if (netif_queue_stopped(ndev)) | 165 | if (netif_queue_stopped(ndev)) |
| 166 | netif_wake_queue(ndev); | 166 | netif_wake_queue(ndev); |
| @@ -183,6 +183,9 @@ static int nps_enet_poll(struct napi_struct *napi, int budget) | |||
| 183 | work_done = nps_enet_rx_handler(ndev); | 183 | work_done = nps_enet_rx_handler(ndev); |
| 184 | if (work_done < budget) { | 184 | if (work_done < budget) { |
| 185 | u32 buf_int_enable_value = 0; | 185 | u32 buf_int_enable_value = 0; |
| 186 | u32 tx_ctrl_value = nps_enet_reg_get(priv, NPS_ENET_REG_TX_CTL); | ||
| 187 | u32 tx_ctrl_ct = | ||
| 188 | (tx_ctrl_value & TX_CTL_CT_MASK) >> TX_CTL_CT_SHIFT; | ||
| 186 | 189 | ||
| 187 | napi_complete(napi); | 190 | napi_complete(napi); |
| 188 | 191 | ||
| @@ -192,6 +195,18 @@ static int nps_enet_poll(struct napi_struct *napi, int budget) | |||
| 192 | 195 | ||
| 193 | nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, | 196 | nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, |
| 194 | buf_int_enable_value); | 197 | buf_int_enable_value); |
| 198 | |||
| 199 | /* in case we will get a tx interrupt while interrupts | ||
| 200 | * are masked, we will lose it since the tx is edge interrupt. | ||
| 201 | * specifically, while executing the code section above, | ||
| 202 | * between nps_enet_tx_handler and the interrupts enable, all | ||
| 203 | * tx requests will be stuck until we will get an rx interrupt. | ||
| 204 | * the two code lines below will solve this situation by | ||
| 205 | * re-adding ourselves to the poll list. | ||
| 206 | */ | ||
| 207 | |||
| 208 | if (priv->tx_skb && !tx_ctrl_ct) | ||
| 209 | napi_reschedule(napi); | ||
| 195 | } | 210 | } |
| 196 | 211 | ||
| 197 | return work_done; | 212 | return work_done; |
| @@ -217,7 +232,7 @@ static irqreturn_t nps_enet_irq_handler(s32 irq, void *dev_instance) | |||
| 217 | u32 tx_ctrl_ct = (tx_ctrl_value & TX_CTL_CT_MASK) >> TX_CTL_CT_SHIFT; | 232 | u32 tx_ctrl_ct = (tx_ctrl_value & TX_CTL_CT_MASK) >> TX_CTL_CT_SHIFT; |
| 218 | u32 rx_ctrl_cr = (rx_ctrl_value & RX_CTL_CR_MASK) >> RX_CTL_CR_SHIFT; | 233 | u32 rx_ctrl_cr = (rx_ctrl_value & RX_CTL_CR_MASK) >> RX_CTL_CR_SHIFT; |
| 219 | 234 | ||
| 220 | if ((!tx_ctrl_ct && priv->tx_packet_sent) || rx_ctrl_cr) | 235 | if ((!tx_ctrl_ct && priv->tx_skb) || rx_ctrl_cr) |
| 221 | if (likely(napi_schedule_prep(&priv->napi))) { | 236 | if (likely(napi_schedule_prep(&priv->napi))) { |
| 222 | nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0); | 237 | nps_enet_reg_set(priv, NPS_ENET_REG_BUF_INT_ENABLE, 0); |
| 223 | __napi_schedule(&priv->napi); | 238 | __napi_schedule(&priv->napi); |
| @@ -387,8 +402,6 @@ static void nps_enet_send_frame(struct net_device *ndev, | |||
| 387 | /* Write the length of the Frame */ | 402 | /* Write the length of the Frame */ |
| 388 | tx_ctrl_value |= length << TX_CTL_NT_SHIFT; | 403 | tx_ctrl_value |= length << TX_CTL_NT_SHIFT; |
| 389 | 404 | ||
| 390 | /* Indicate SW is done */ | ||
| 391 | priv->tx_packet_sent = true; | ||
| 392 | tx_ctrl_value |= NPS_ENET_ENABLE << TX_CTL_CT_SHIFT; | 405 | tx_ctrl_value |= NPS_ENET_ENABLE << TX_CTL_CT_SHIFT; |
| 393 | /* Send Frame */ | 406 | /* Send Frame */ |
| 394 | nps_enet_reg_set(priv, NPS_ENET_REG_TX_CTL, tx_ctrl_value); | 407 | nps_enet_reg_set(priv, NPS_ENET_REG_TX_CTL, tx_ctrl_value); |
| @@ -465,7 +478,7 @@ static s32 nps_enet_open(struct net_device *ndev) | |||
| 465 | s32 err; | 478 | s32 err; |
| 466 | 479 | ||
| 467 | /* Reset private variables */ | 480 | /* Reset private variables */ |
| 468 | priv->tx_packet_sent = false; | 481 | priv->tx_skb = NULL; |
| 469 | priv->ge_mac_cfg_2_value = 0; | 482 | priv->ge_mac_cfg_2_value = 0; |
| 470 | priv->ge_mac_cfg_3_value = 0; | 483 | priv->ge_mac_cfg_3_value = 0; |
| 471 | 484 | ||
| @@ -534,6 +547,11 @@ static netdev_tx_t nps_enet_start_xmit(struct sk_buff *skb, | |||
| 534 | 547 | ||
| 535 | priv->tx_skb = skb; | 548 | priv->tx_skb = skb; |
| 536 | 549 | ||
| 550 | /* make sure tx_skb is actually written to the memory | ||
| 551 | * before the HW is informed and the IRQ is fired. | ||
| 552 | */ | ||
| 553 | wmb(); | ||
| 554 | |||
| 537 | nps_enet_send_frame(ndev, skb); | 555 | nps_enet_send_frame(ndev, skb); |
| 538 | 556 | ||
| 539 | return NETDEV_TX_OK; | 557 | return NETDEV_TX_OK; |
diff --git a/drivers/net/ethernet/ezchip/nps_enet.h b/drivers/net/ethernet/ezchip/nps_enet.h index d0cab600bce8..3939ca20cc9f 100644 --- a/drivers/net/ethernet/ezchip/nps_enet.h +++ b/drivers/net/ethernet/ezchip/nps_enet.h | |||
| @@ -165,14 +165,12 @@ | |||
| 165 | * struct nps_enet_priv - Storage of ENET's private information. | 165 | * struct nps_enet_priv - Storage of ENET's private information. |
| 166 | * @regs_base: Base address of ENET memory-mapped control registers. | 166 | * @regs_base: Base address of ENET memory-mapped control registers. |
| 167 | * @irq: For RX/TX IRQ number. | 167 | * @irq: For RX/TX IRQ number. |
| 168 | * @tx_packet_sent: SW indication if frame is being sent. | ||
| 169 | * @tx_skb: socket buffer of sent frame. | 168 | * @tx_skb: socket buffer of sent frame. |
| 170 | * @napi: Structure for NAPI. | 169 | * @napi: Structure for NAPI. |
| 171 | */ | 170 | */ |
