| .. | .. |
|---|
| 52 | 52 | |
|---|
| 53 | 53 | #define BNX2X_PCI_ALLOC(y, size) \ |
|---|
| 54 | 54 | ({ \ |
|---|
| 55 | | - void *x = dma_zalloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \ |
|---|
| 55 | + void *x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \ |
|---|
| 56 | 56 | if (x) \ |
|---|
| 57 | 57 | DP(NETIF_MSG_HW, \ |
|---|
| 58 | 58 | "BNX2X_PCI_ALLOC: Physical %Lx Virtual %p\n", \ |
|---|
| .. | .. |
|---|
| 496 | 496 | int bnx2x_set_vf_mac(struct net_device *dev, int queue, u8 *mac); |
|---|
| 497 | 497 | int bnx2x_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos, |
|---|
| 498 | 498 | __be16 vlan_proto); |
|---|
| 499 | +int bnx2x_set_vf_spoofchk(struct net_device *dev, int idx, bool val); |
|---|
| 499 | 500 | |
|---|
| 500 | 501 | /* select_queue callback */ |
|---|
| 501 | 502 | u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb, |
|---|
| 502 | | - struct net_device *sb_dev, |
|---|
| 503 | | - select_queue_fallback_t fallback); |
|---|
| 503 | + struct net_device *sb_dev); |
|---|
| 504 | 504 | |
|---|
| 505 | 505 | static inline void bnx2x_update_rx_prod(struct bnx2x *bp, |
|---|
| 506 | 506 | struct bnx2x_fastpath *fp, |
|---|
| .. | .. |
|---|
| 528 | 528 | REG_WR_RELAXED(bp, fp->ustorm_rx_prods_offset + i * 4, |
|---|
| 529 | 529 | ((u32 *)&rx_prods)[i]); |
|---|
| 530 | 530 | |
|---|
| 531 | | - mmiowb(); /* keep prod updates ordered */ |
|---|
| 532 | | - |
|---|
| 533 | 531 | DP(NETIF_MSG_RX_STATUS, |
|---|
| 534 | 532 | "queue[%d]: wrote bd_prod %u cqe_prod %u sge_prod %u\n", |
|---|
| 535 | 533 | fp->index, bd_prod, rx_comp_prod, rx_sge_prod); |
|---|
| .. | .. |
|---|
| 543 | 541 | /* NAPI poll Tx part */ |
|---|
| 544 | 542 | int bnx2x_tx_int(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata); |
|---|
| 545 | 543 | |
|---|
| 546 | | -/* suspend/resume callbacks */ |
|---|
| 547 | | -int bnx2x_suspend(struct pci_dev *pdev, pm_message_t state); |
|---|
| 548 | | -int bnx2x_resume(struct pci_dev *pdev); |
|---|
| 544 | +extern const struct dev_pm_ops bnx2x_pm_ops; |
|---|
| 549 | 545 | |
|---|
| 550 | 546 | /* Release IRQ vectors */ |
|---|
| 551 | 547 | void bnx2x_free_irq(struct bnx2x *bp); |
|---|
| .. | .. |
|---|
| 619 | 615 | * |
|---|
| 620 | 616 | * @dev: net device |
|---|
| 621 | 617 | */ |
|---|
| 622 | | -void bnx2x_tx_timeout(struct net_device *dev); |
|---|
| 618 | +void bnx2x_tx_timeout(struct net_device *dev, unsigned int txqueue); |
|---|
| 623 | 619 | |
|---|
| 624 | 620 | /** bnx2x_get_c2s_mapping - read inner-to-outer vlan configuration |
|---|
| 625 | 621 | * c2s_map should have BNX2X_MAX_PRIORITY entries. |
|---|
| .. | .. |
|---|
| 654 | 650 | REG_WR(bp, igu_addr, cmd_data.sb_id_and_flags); |
|---|
| 655 | 651 | |
|---|
| 656 | 652 | /* Make sure that ACK is written */ |
|---|
| 657 | | - mmiowb(); |
|---|
| 658 | 653 | barrier(); |
|---|
| 659 | 654 | } |
|---|
| 660 | 655 | |
|---|
| .. | .. |
|---|
| 675 | 670 | REG_WR(bp, hc_addr, (*(u32 *)&igu_ack)); |
|---|
| 676 | 671 | |
|---|
| 677 | 672 | /* Make sure that ACK is written */ |
|---|
| 678 | | - mmiowb(); |
|---|
| 679 | 673 | barrier(); |
|---|
| 680 | 674 | } |
|---|
| 681 | 675 | |
|---|
| .. | .. |
|---|
| 831 | 825 | int i; |
|---|
| 832 | 826 | |
|---|
| 833 | 827 | for_each_rx_queue_cnic(bp, i) { |
|---|
| 834 | | - napi_hash_del(&bnx2x_fp(bp, i, napi)); |
|---|
| 835 | | - netif_napi_del(&bnx2x_fp(bp, i, napi)); |
|---|
| 828 | + __netif_napi_del(&bnx2x_fp(bp, i, napi)); |
|---|
| 836 | 829 | } |
|---|
| 830 | + synchronize_net(); |
|---|
| 837 | 831 | } |
|---|
| 838 | 832 | |
|---|
| 839 | 833 | static inline void bnx2x_del_all_napi(struct bnx2x *bp) |
|---|
| .. | .. |
|---|
| 841 | 835 | int i; |
|---|
| 842 | 836 | |
|---|
| 843 | 837 | for_each_eth_queue(bp, i) { |
|---|
| 844 | | - napi_hash_del(&bnx2x_fp(bp, i, napi)); |
|---|
| 845 | | - netif_napi_del(&bnx2x_fp(bp, i, napi)); |
|---|
| 838 | + __netif_napi_del(&bnx2x_fp(bp, i, napi)); |
|---|
| 846 | 839 | } |
|---|
| 840 | + synchronize_net(); |
|---|
| 847 | 841 | } |
|---|
| 848 | 842 | |
|---|
| 849 | 843 | int bnx2x_set_int_mode(struct bnx2x *bp); |
|---|
| .. | .. |
|---|
| 966 | 960 | start_params->network_cos_mode = STATIC_COS; |
|---|
| 967 | 961 | else /* CHIP_IS_E1X */ |
|---|
| 968 | 962 | start_params->network_cos_mode = FW_WRR; |
|---|
| 969 | | - if (bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN].count) { |
|---|
| 970 | | - port = bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN].dst_port; |
|---|
| 963 | + if (bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN]) { |
|---|
| 964 | + port = bp->udp_tunnel_ports[BNX2X_UDP_PORT_VXLAN]; |
|---|
| 971 | 965 | start_params->vxlan_dst_port = port; |
|---|
| 972 | 966 | } |
|---|
| 973 | | - if (bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE].count) { |
|---|
| 974 | | - port = bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE].dst_port; |
|---|
| 967 | + if (bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE]) { |
|---|
| 968 | + port = bp->udp_tunnel_ports[BNX2X_UDP_PORT_GENEVE]; |
|---|
| 975 | 969 | start_params->geneve_dst_port = port; |
|---|
| 976 | 970 | } |
|---|
| 977 | 971 | |
|---|