aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/ibmvnic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-04-17 12:57:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-04-17 12:57:45 -0400
commit2a3a028fc61d03e80ac57091330eb514280bd5be (patch)
treec0f98d752faa37fed4d11231f08d368dce120786 /drivers/net/ethernet/ibm/ibmvnic.c
parent444fe991353987c1c9bc5ab1f903d01f1b4ad415 (diff)
parente6986423d28362aafe64d3757bbbc493f2687f8f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Handle init flow failures properly in iwlwifi driver, from Shahar S Matityahu. 2) mac80211 TXQs need to be unscheduled on powersave start, from Felix Fietkau. 3) SKB memory accounting fix in A-MDSU aggregation, from Felix Fietkau. 4) Increase RCU lock hold time in mlx5 FPGA code, from Saeed Mahameed. 5) Avoid checksum complete with XDP in mlx5, also from Saeed. 6) Fix netdev feature clobbering in ibmvnic driver, from Thomas Falcon. 7) Partial sent TLS record leak fix from Jakub Kicinski. 8) Reject zero size iova range in vhost, from Jason Wang. 9) Allow pending work to complete before clcsock release from Karsten Graul. 10) Fix XDP handling max MTU in thunderx, from Matteo Croce. 11) A lot of protocols look at the sa_family field of a sockaddr before validating it's length is large enough, from Tetsuo Handa. 12) Don't write to free'd pointer in qede ptp error path, from Colin Ian King. 13) Have to recompile IP options in ipv4_link_failure because it can be invoked from ARP, from Stephen Suryaputra. 14) Doorbell handling fixes in qed from Denis Bolotin. 15) Revert net-sysfs kobject register leak fix, it causes new problems. From Wang Hai. 16) Spectre v1 fix in ATM code, from Gustavo A. R. Silva. 17) Fix put of BROPT_VLAN_STATS_PER_PORT in bridging code, from Nikolay Aleksandrov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (111 commits) socket: fix compat SO_RCVTIMEO_NEW/SO_SNDTIMEO_NEW tcp: tcp_grow_window() needs to respect tcp_space() ocelot: Clean up stats update deferred work ocelot: Don't sleep in atomic context (irqs_disabled()) net: bridge: fix netlink export of vlan_stats_per_port option qed: fix spelling mistake "faspath" -> "fastpath" tipc: set sysctl_tipc_rmem and named_timeout right range tipc: fix link established but not in session net: Fix missing meta data in skb with vlan packet net: atm: Fix potential Spectre v1 vulnerabilities net/core: work around section mismatch warning for ptp_classifier net: bridge: fix per-port af_packet sockets bnx2x: fix spelling mistake "dicline" -> "decline" route: Avoid crash from dereferencing NULL rt->from MAINTAINERS: normalize Woojung Huh's email address bonding: fix event handling for stacked bonds Revert "net-sysfs: Fix memory leak in netdev_register_kobject" rtnetlink: fix rtnl_valid_stats_req() nlmsg_len check qed: Fix the DORQ's attentions handling qed: Fix missing DORQ attentions ...
Diffstat (limited to 'drivers/net/ethernet/ibm/ibmvnic.c')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c32
1 files changed, 25 insertions, 7 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 51cfe95f3e24..3dfb2d131eb7 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -3762,6 +3762,7 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
3762{ 3762{
3763 struct device *dev = &adapter->vdev->dev; 3763 struct device *dev = &adapter->vdev->dev;
3764 struct ibmvnic_query_ip_offload_buffer *buf = &adapter->ip_offload_buf; 3764 struct ibmvnic_query_ip_offload_buffer *buf = &adapter->ip_offload_buf;
3765 netdev_features_t old_hw_features = 0;
3765 union ibmvnic_crq crq; 3766 union ibmvnic_crq crq;
3766 int i; 3767 int i;
3767 3768
@@ -3837,24 +3838,41 @@ static void handle_query_ip_offload_rsp(struct ibmvnic_adapter *adapter)
3837 adapter->ip_offload_ctrl.large_rx_ipv4 = 0; 3838 adapter->ip_offload_ctrl.large_rx_ipv4 = 0;
3838 adapter->ip_offload_ctrl.large_rx_ipv6 = 0; 3839 adapter->ip_offload_ctrl.large_rx_ipv6 = 0;
3839 3840
3840 adapter->netdev->features = NETIF_F_SG | NETIF_F_GSO; 3841 if (adapter->state != VNIC_PROBING) {
3842 old_hw_features = adapter->netdev->hw_features;
3843 adapter->netdev->hw_features = 0;
3844 }
3845
3846 adapter->netdev->hw_features = NETIF_F_SG | NETIF_F_GSO | NETIF_F_GRO;
3841 3847
3842 if (buf->tcp_ipv4_chksum || buf->udp_ipv4_chksum) 3848 if (buf->tcp_ipv4_chksum || buf->udp_ipv4_chksum)
3843 adapter->netdev->features |= NETIF_F_IP_CSUM; 3849 adapter->netdev->hw_features |= NETIF_F_IP_CSUM;
3844 3850
3845 if (buf->tcp_ipv6_chksum || buf->udp_ipv6_chksum) 3851 if (buf->tcp_ipv6_chksum || buf->udp_ipv6_chksum)
3846 adapter->netdev->features |= NETIF_F_IPV6_CSUM; 3852 adapter->netdev->hw_features |= NETIF_F_IPV6_CSUM;
3847 3853
3848 if ((adapter->netdev->features & 3854 if ((adapter->netdev->features &
3849 (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM))) 3855 (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM)))
3850 adapter->netdev->features |= NETIF_F_RXCSUM; 3856 adapter->netdev->hw_features |= NETIF_F_RXCSUM;
3851 3857
3852 if (buf->large_tx_ipv4) 3858 if (buf->large_tx_ipv4)
3853 adapter->netdev->features |= NETIF_F_TSO; 3859 adapter->netdev->hw_features |= NETIF_F_TSO;
3854 if (buf->large_tx_ipv6) 3860 if (buf->large_tx_ipv6)
3855 adapter->netdev->features |= NETIF_F_TSO6; 3861 adapter->netdev->hw_features |= NETIF_F_TSO6;
3856 3862
3857 adapter->netdev->hw_features |= adapter->netdev->features; 3863 if (adapter->state == VNIC_PROBING) {
3864 adapter->netdev->features |= adapter->netdev->hw_features;
3865 } else if (old_hw_features != adapter->netdev->hw_features) {
3866 netdev_features_t tmp = 0;
3867
3868 /* disable features no longer supported */
3869 adapter->netdev->features &= adapter->netdev->hw_features;
3870 /* turn on features now supported if previously enabled */
3871 tmp = (old_hw_features ^ adapter->netdev->hw_features) &
3872 adapter->netdev->hw_features;
3873 adapter->netdev->features |=
3874 tmp & adapter->netdev->wanted_features;
3875 }
3858 3876
3859 memset(&crq, 0, sizeof(crq)); 3877 memset(&crq, 0, sizeof(crq));
3860 crq.control_ip_offload.first = IBMVNIC_CRQ_CMD; 3878 crq.control_ip_offload.first = IBMVNIC_CRQ_CMD;