Skip to content

Commit ccbd4b5

Browse files
committed
i40e: Remove unused i40e_commit_partition_bw_setting
JIRA: https://issues.redhat.com/browse/RHEL-83569 commit a324484 Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Thu Jan 2 17:37:15 2025 +0000 i40e: Remove unused i40e_commit_partition_bw_setting i40e_commit_partition_bw_setting() was added in 2017 by commit 4fc8c67 ("i40e: genericize the partition bandwidth control") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com> Link: https://patch.msgid.link/20250102173717.200359-8-linux@treblig.org Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Dennis Chen <dechen@redhat.com>
1 parent 104fc15 commit ccbd4b5

File tree

2 files changed

+0
-84
lines changed

2 files changed

+0
-84
lines changed

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,6 @@ int i40e_update_adq_vsi_queues(struct i40e_vsi *vsi, int vsi_offset);
13131313
int i40e_is_vsi_uplink_mode_veb(struct i40e_vsi *vsi);
13141314
int i40e_get_partition_bw_setting(struct i40e_pf *pf);
13151315
int i40e_set_partition_bw_setting(struct i40e_pf *pf);
1316-
int i40e_commit_partition_bw_setting(struct i40e_pf *pf);
13171316
void i40e_print_link_message(struct i40e_vsi *vsi, bool isup);
13181317

13191318
void i40e_set_fec_in_flags(u8 fec_cfg, unsigned long *flags);

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -12654,89 +12654,6 @@ int i40e_set_partition_bw_setting(struct i40e_pf *pf)
1265412654
return status;
1265512655
}
1265612656

12657-
/**
12658-
* i40e_commit_partition_bw_setting - Commit BW settings for this PF partition
12659-
* @pf: board private structure
12660-
**/
12661-
int i40e_commit_partition_bw_setting(struct i40e_pf *pf)
12662-
{
12663-
/* Commit temporary BW setting to permanent NVM image */
12664-
enum i40e_admin_queue_err last_aq_status;
12665-
u16 nvm_word;
12666-
int ret;
12667-
12668-
if (pf->hw.partition_id != 1) {
12669-
dev_info(&pf->pdev->dev,
12670-
"Commit BW only works on partition 1! This is partition %d",
12671-
pf->hw.partition_id);
12672-
ret = -EOPNOTSUPP;
12673-
goto bw_commit_out;
12674-
}
12675-
12676-
/* Acquire NVM for read access */
12677-
ret = i40e_acquire_nvm(&pf->hw, I40E_RESOURCE_READ);
12678-
last_aq_status = pf->hw.aq.asq_last_status;
12679-
if (ret) {
12680-
dev_info(&pf->pdev->dev,
12681-
"Cannot acquire NVM for read access, err %pe aq_err %s\n",
12682-
ERR_PTR(ret),
12683-
i40e_aq_str(&pf->hw, last_aq_status));
12684-
goto bw_commit_out;
12685-
}
12686-
12687-
/* Read word 0x10 of NVM - SW compatibility word 1 */
12688-
ret = i40e_aq_read_nvm(&pf->hw,
12689-
I40E_SR_NVM_CONTROL_WORD,
12690-
0x10, sizeof(nvm_word), &nvm_word,
12691-
false, NULL);
12692-
/* Save off last admin queue command status before releasing
12693-
* the NVM
12694-
*/
12695-
last_aq_status = pf->hw.aq.asq_last_status;
12696-
i40e_release_nvm(&pf->hw);
12697-
if (ret) {
12698-
dev_info(&pf->pdev->dev, "NVM read error, err %pe aq_err %s\n",
12699-
ERR_PTR(ret),
12700-
i40e_aq_str(&pf->hw, last_aq_status));
12701-
goto bw_commit_out;
12702-
}
12703-
12704-
/* Wait a bit for NVM release to complete */
12705-
msleep(50);
12706-
12707-
/* Acquire NVM for write access */
12708-
ret = i40e_acquire_nvm(&pf->hw, I40E_RESOURCE_WRITE);
12709-
last_aq_status = pf->hw.aq.asq_last_status;
12710-
if (ret) {
12711-
dev_info(&pf->pdev->dev,
12712-
"Cannot acquire NVM for write access, err %pe aq_err %s\n",
12713-
ERR_PTR(ret),
12714-
i40e_aq_str(&pf->hw, last_aq_status));
12715-
goto bw_commit_out;
12716-
}
12717-
/* Write it back out unchanged to initiate update NVM,
12718-
* which will force a write of the shadow (alt) RAM to
12719-
* the NVM - thus storing the bandwidth values permanently.
12720-
*/
12721-
ret = i40e_aq_update_nvm(&pf->hw,
12722-
I40E_SR_NVM_CONTROL_WORD,
12723-
0x10, sizeof(nvm_word),
12724-
&nvm_word, true, 0, NULL);
12725-
/* Save off last admin queue command status before releasing
12726-
* the NVM
12727-
*/
12728-
last_aq_status = pf->hw.aq.asq_last_status;
12729-
i40e_release_nvm(&pf->hw);
12730-
if (ret)
12731-
dev_info(&pf->pdev->dev,
12732-
"BW settings NOT SAVED, err %pe aq_err %s\n",
12733-
ERR_PTR(ret),
12734-
i40e_aq_str(&pf->hw, last_aq_status));
12735-
bw_commit_out:
12736-
12737-
return ret;
12738-
}
12739-
1274012657
/**
1274112658
* i40e_is_total_port_shutdown_enabled - read NVM and return value
1274212659
* if total port shutdown feature is enabled for this PF

0 commit comments

Comments
 (0)