Skip to content

Commit 8e0ddc0

Browse files
Sudarsana Reddy Kallurudavem330
authored andcommitted
qede: prevent chip hang when increasing channels
qede requires qed to provide enough resources to accommodate 16 combined channels, but that upper-bound isn't actually being enforced by it. Instead, qed inform back to qede how many channels can be opened based on available resources - but that calculation doesn't really take into account the resources requested by qede; Instead it considers other FW/HW available resources. As a result, if a user would increase the number of channels to more than 16 [e.g., using ethtool] the chip would hang. This change increments the resources requested by qede to 64 combined channels instead of 16; This value is an upper bound on the possible available channels [due to other FW/HW resources]. Signed-off-by: Sudarsana Reddy Kalluru <[email protected]> Signed-off-by: Yuval Mintz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1d2f7b2 commit 8e0ddc0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/net/ethernet/qlogic/qede/qede_main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,8 +1938,6 @@ static struct qede_dev *qede_alloc_etherdev(struct qed_dev *cdev,
19381938
edev->q_num_rx_buffers = NUM_RX_BDS_DEF;
19391939
edev->q_num_tx_buffers = NUM_TX_BDS_DEF;
19401940

1941-
DP_INFO(edev, "Allocated netdev with 64 tx queues and 64 rx queues\n");
1942-
19431941
SET_NETDEV_DEV(ndev, &pdev->dev);
19441942

19451943
memset(&edev->stats, 0, sizeof(edev->stats));
@@ -2090,9 +2088,9 @@ static void qede_update_pf_params(struct qed_dev *cdev)
20902088
{
20912089
struct qed_pf_params pf_params;
20922090

2093-
/* 16 rx + 16 tx */
2091+
/* 64 rx + 64 tx */
20942092
memset(&pf_params, 0, sizeof(struct qed_pf_params));
2095-
pf_params.eth_pf_params.num_cons = 32;
2093+
pf_params.eth_pf_params.num_cons = 128;
20962094
qed_ops->common->update_pf_params(cdev, &pf_params);
20972095
}
20982096

0 commit comments

Comments
 (0)