···731731 if (rc)732732 pr_err("Cannot set LLQ configuration: %d\n", rc);733733734734- return 0;734734+ return rc;735735}736736737737static int ena_com_wait_and_process_admin_cq_interrupts(struct ena_comp_ctx *comp_ctx,···21952195 if (unlikely(ret))21962196 return ret;2197219721982198- if (get_resp.u.flow_hash_func.supported_func & (1 << rss->hash_func)) {21982198+ if (!(get_resp.u.flow_hash_func.supported_func & BIT(rss->hash_func))) {21992199 pr_err("Func hash %d isn't supported by device, abort\n",22002200 rss->hash_func);22012201 return -EOPNOTSUPP;···22802280 return -EINVAL;22812281 }2282228222832283+ rss->hash_func = func;22832284 rc = ena_com_set_hash_function(ena_dev);2284228522852286 /* Restore the old function */···28032802 /* if moderation is supported by device we set adaptive moderation */28042803 delay_resolution = get_resp.u.intr_moderation.intr_delay_resolution;28052804 ena_com_update_intr_delay_resolution(ena_dev, delay_resolution);28062806- ena_com_enable_adaptive_moderation(ena_dev);28052805+28062806+ /* Disable adaptive moderation by default - can be enabled from28072807+ * ethtool28082808+ */28092809+ ena_com_disable_adaptive_moderation(ena_dev);2807281028082811 return 0;28092812err:
+2-2
drivers/net/ethernet/amazon/ena/ena_ethtool.c
···697697 if (indir) {698698 for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; i++) {699699 rc = ena_com_indirect_table_fill_entry(ena_dev,700700- ENA_IO_RXQ_IDX(indir[i]),701701- i);700700+ i,701701+ ENA_IO_RXQ_IDX(indir[i]));702702 if (unlikely(rc)) {703703 netif_err(adapter, drv, netdev,704704 "Cannot fill indirect table (index is too large)\n");
+17-11
drivers/net/ethernet/amazon/ena/ena_netdev.c
···224224 if (!tx_ring->tx_buffer_info) {225225 tx_ring->tx_buffer_info = vzalloc(size);226226 if (!tx_ring->tx_buffer_info)227227- return -ENOMEM;227227+ goto err_tx_buffer_info;228228 }229229230230 size = sizeof(u16) * tx_ring->ring_size;231231 tx_ring->free_tx_ids = vzalloc_node(size, node);232232 if (!tx_ring->free_tx_ids) {233233 tx_ring->free_tx_ids = vzalloc(size);234234- if (!tx_ring->free_tx_ids) {235235- vfree(tx_ring->tx_buffer_info);236236- return -ENOMEM;237237- }234234+ if (!tx_ring->free_tx_ids)235235+ goto err_free_tx_ids;238236 }239237240238 size = tx_ring->tx_max_header_size;241239 tx_ring->push_buf_intermediate_buf = vzalloc_node(size, node);242240 if (!tx_ring->push_buf_intermediate_buf) {243241 tx_ring->push_buf_intermediate_buf = vzalloc(size);244244- if (!tx_ring->push_buf_intermediate_buf) {245245- vfree(tx_ring->tx_buffer_info);246246- vfree(tx_ring->free_tx_ids);247247- return -ENOMEM;248248- }242242+ if (!tx_ring->push_buf_intermediate_buf)243243+ goto err_push_buf_intermediate_buf;249244 }250245251246 /* Req id ring for TX out of order completions */···254259 tx_ring->next_to_clean = 0;255260 tx_ring->cpu = ena_irq->cpu;256261 return 0;262262+263263+err_push_buf_intermediate_buf:264264+ vfree(tx_ring->free_tx_ids);265265+ tx_ring->free_tx_ids = NULL;266266+err_free_tx_ids:267267+ vfree(tx_ring->tx_buffer_info);268268+ tx_ring->tx_buffer_info = NULL;269269+err_tx_buffer_info:270270+ return -ENOMEM;257271}258272259273/* ena_free_tx_resources - Free I/O Tx Resources per Queue···382378 rx_ring->free_rx_ids = vzalloc(size);383379 if (!rx_ring->free_rx_ids) {384380 vfree(rx_ring->rx_buffer_info);381381+ rx_ring->rx_buffer_info = NULL;385382 return -ENOMEM;386383 }387384 }···18251820err_setup_tx:18261821 ena_free_io_irq(adapter);18271822err_req_irq:18231823+ ena_del_napi(adapter);1828182418291825 return rc;18301826}···22972291 host_info->bdf = (pdev->bus->number << 8) | pdev->devfn;22982292 host_info->os_type = ENA_ADMIN_OS_LINUX;22992293 host_info->kernel_ver = LINUX_VERSION_CODE;23002300- strncpy(host_info->kernel_ver_str, utsname()->version,22942294+ strlcpy(host_info->kernel_ver_str, utsname()->version,23012295 sizeof(host_info->kernel_ver_str) - 1);23022296 host_info->os_dist = 0;23032297 strncpy(host_info->os_dist_str, utsname()->release,
+3-3
drivers/net/ethernet/cadence/macb_main.c
···24272427 goto pm_exit;24282428 }2429242924302430- bp->macbgem_ops.mog_init_rings(bp);24312431- macb_init_hw(bp);24322432-24332430 for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)24342431 napi_enable(&queue->napi);24322432+24332433+ bp->macbgem_ops.mog_init_rings(bp);24342434+ macb_init_hw(bp);2435243524362436 /* schedule a link state check */24372437 phy_start(dev->phydev);
+12-3
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
···6160616061616161 ret = pci_register_driver(&cxgb4_driver);61626162 if (ret < 0)61636163- debugfs_remove(cxgb4_debugfs_root);61636163+ goto err_pci;6164616461656165#if IS_ENABLED(CONFIG_IPV6)61666166 if (!inet6addr_registered) {61676167- register_inet6addr_notifier(&cxgb4_inet6addr_notifier);61686168- inet6addr_registered = true;61676167+ ret = register_inet6addr_notifier(&cxgb4_inet6addr_notifier);61686168+ if (ret)61696169+ pci_unregister_driver(&cxgb4_driver);61706170+ else61716171+ inet6addr_registered = true;61696172 }61706173#endif61746174+61756175+ if (ret == 0)61766176+ return ret;61776177+61786178+err_pci:61796179+ debugfs_remove(cxgb4_debugfs_root);6171618061726181 return ret;61736182}
+1-1
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
···16481648 qm_sg_entry_get_len(&sgt[0]), dma_dir);1649164916501650 /* remaining pages were mapped with skb_frag_dma_map() */16511651- for (i = 1; i < nr_frags; i++) {16511651+ for (i = 1; i <= nr_frags; i++) {16521652 WARN_ON(qm_sg_entry_is_ext(&sgt[i]));1653165316541654 dma_unmap_page(dev, qm_sg_addr(&sgt[i]),
+3-5
drivers/net/ethernet/freescale/ucc_geth_ethtool.c
···252252 return -EINVAL;253253 }254254255255+ if (netif_running(netdev))256256+ return -EBUSY;257257+255258 ug_info->bdRingLenRx[queue] = ring->rx_pending;256259 ug_info->bdRingLenTx[queue] = ring->tx_pending;257257-258258- if (netif_running(netdev)) {259259- /* FIXME: restart automatically */260260- netdev_info(netdev, "Please re-open the interface\n");261261- }262260263261 return ret;264262}
+9-6
drivers/net/hyperv/netvsc.c
···875875 } else if (ret == -EAGAIN) {876876 netif_tx_stop_queue(txq);877877 ndev_ctx->eth_stats.stop_queue++;878878- if (atomic_read(&nvchan->queue_sends) < 1 &&879879- !net_device->tx_disable) {880880- netif_tx_wake_queue(txq);881881- ndev_ctx->eth_stats.wake_queue++;882882- ret = -ENOSPC;883883- }884878 } else {885879 netdev_err(ndev,886880 "Unable to send packet pages %u len %u, ret %d\n",887881 packet->page_buf_cnt, packet->total_data_buflen,888882 ret);883883+ }884884+885885+ if (netif_tx_queue_stopped(txq) &&886886+ atomic_read(&nvchan->queue_sends) < 1 &&887887+ !net_device->tx_disable) {888888+ netif_tx_wake_queue(txq);889889+ ndev_ctx->eth_stats.wake_queue++;890890+ if (ret == -EAGAIN)891891+ ret = -ENOSPC;889892 }890893891894 return ret;