Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'qed-fixes'

Yuval Mintz says:

====================
qed*: Fixes series

This series contains several small fixes to driver behavior
[4th patch is the only one containing a 'fatal' fix, but the error
is only theoretical for qede; if would require another protocol
driver yet unsubmitted to reach it].
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+28 -11
+1
drivers/net/ethernet/qlogic/qed/qed_hsi.h
··· 3700 3700 #define MEDIA_DA_TWINAX 0x3 3701 3701 #define MEDIA_BASE_T 0x4 3702 3702 #define MEDIA_SFP_1G_FIBER 0x5 3703 + #define MEDIA_MODULE_FIBER 0x6 3703 3704 #define MEDIA_KR 0xf0 3704 3705 #define MEDIA_NOT_PRESENT 0xff 3705 3706
+3 -5
drivers/net/ethernet/qlogic/qed/qed_l2.c
··· 72 72 p_ramrod->mtu = cpu_to_le16(p_params->mtu); 73 73 p_ramrod->inner_vlan_removal_en = p_params->remove_inner_vlan; 74 74 p_ramrod->drop_ttl0_en = p_params->drop_ttl0; 75 + p_ramrod->untagged = p_params->only_untagged; 75 76 76 77 SET_FIELD(rx_mode, ETH_VPORT_RX_MODE_UCAST_DROP_ALL, 1); 77 78 SET_FIELD(rx_mode, ETH_VPORT_RX_MODE_MCAST_DROP_ALL, 1); ··· 247 246 248 247 SET_FIELD(state, ETH_VPORT_TX_MODE_UCAST_DROP_ALL, 249 248 !!(accept_filter & QED_ACCEPT_NONE)); 250 - 251 - SET_FIELD(state, ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL, 252 - (!!(accept_filter & QED_ACCEPT_UCAST_MATCHED) && 253 - !!(accept_filter & QED_ACCEPT_UCAST_UNMATCHED))); 254 249 255 250 SET_FIELD(state, ETH_VPORT_TX_MODE_MCAST_DROP_ALL, 256 251 !!(accept_filter & QED_ACCEPT_NONE)); ··· 1745 1748 start.vport_id, start.mtu); 1746 1749 } 1747 1750 1748 - qed_reset_vport_stats(cdev); 1751 + if (params->clear_stats) 1752 + qed_reset_vport_stats(cdev); 1749 1753 1750 1754 return 0; 1751 1755 }
+1
drivers/net/ethernet/qlogic/qed/qed_main.c
··· 1085 1085 case MEDIA_SFPP_10G_FIBER: 1086 1086 case MEDIA_SFP_1G_FIBER: 1087 1087 case MEDIA_XFP_FIBER: 1088 + case MEDIA_MODULE_FIBER: 1088 1089 case MEDIA_KR: 1089 1090 port_type = PORT_FIBRE; 1090 1091 break;
+18 -3
drivers/net/ethernet/qlogic/qed/qed_spq.c
··· 614 614 615 615 *p_en2 = *p_ent; 616 616 617 - kfree(p_ent); 617 + /* EBLOCK responsible to free the allocated p_ent */ 618 + if (p_ent->comp_mode != QED_SPQ_MODE_EBLOCK) 619 + kfree(p_ent); 618 620 619 621 p_ent = p_en2; 620 622 } ··· 751 749 * Thus, after gaining the answer perform the cleanup here. 752 750 */ 753 751 rc = qed_spq_block(p_hwfn, p_ent, fw_return_code); 752 + 753 + if (p_ent->queue == &p_spq->unlimited_pending) { 754 + /* This is an allocated p_ent which does not need to 755 + * return to pool. 756 + */ 757 + kfree(p_ent); 758 + return rc; 759 + } 760 + 754 761 if (rc) 755 762 goto spq_post_fail2; 756 763 ··· 855 844 found->comp_cb.function(p_hwfn, found->comp_cb.cookie, p_data, 856 845 fw_return_code); 857 846 858 - if (found->comp_mode != QED_SPQ_MODE_EBLOCK) 859 - /* EBLOCK is responsible for freeing its own entry */ 847 + if ((found->comp_mode != QED_SPQ_MODE_EBLOCK) || 848 + (found->queue == &p_spq->unlimited_pending)) 849 + /* EBLOCK is responsible for returning its own entry into the 850 + * free list, unless it originally added the entry into the 851 + * unlimited pending list. 852 + */ 860 853 qed_spq_return_entry(p_hwfn, found); 861 854 862 855 /* Attempt to post pending requests */
+4 -3
drivers/net/ethernet/qlogic/qede/qede_main.c
··· 3231 3231 return rc; 3232 3232 } 3233 3233 3234 - static int qede_start_queues(struct qede_dev *edev) 3234 + static int qede_start_queues(struct qede_dev *edev, bool clear_stats) 3235 3235 { 3236 3236 int rc, tc, i; 3237 3237 int vlan_removal_en = 1; ··· 3462 3462 3463 3463 enum qede_load_mode { 3464 3464 QEDE_LOAD_NORMAL, 3465 + QEDE_LOAD_RELOAD, 3465 3466 }; 3466 3467 3467 3468 static int qede_load(struct qede_dev *edev, enum qede_load_mode mode) ··· 3501 3500 goto err3; 3502 3501 DP_INFO(edev, "Setup IRQs succeeded\n"); 3503 3502 3504 - rc = qede_start_queues(edev); 3503 + rc = qede_start_queues(edev, mode != QEDE_LOAD_RELOAD); 3505 3504 if (rc) 3506 3505 goto err4; 3507 3506 DP_INFO(edev, "Start VPORT, RXQ and TXQ succeeded\n"); ··· 3556 3555 if (func) 3557 3556 func(edev, args); 3558 3557 3559 - qede_load(edev, QEDE_LOAD_NORMAL); 3558 + qede_load(edev, QEDE_LOAD_RELOAD); 3560 3559 3561 3560 mutex_lock(&edev->qede_lock); 3562 3561 qede_config_rx_mode(edev->ndev);
+1
include/linux/qed/qed_eth_if.h
··· 49 49 bool drop_ttl0; 50 50 u8 vport_id; 51 51 u16 mtu; 52 + bool clear_stats; 52 53 }; 53 54 54 55 struct qed_stop_rxq_params {