1GbE Intel Wired LAN Driver Updates 2021-03-19
Subsystems (3)
Tony Nguyen
maintainerThis series contains updates to igc and e1000e drivers.
Sasha removes unused defines in igc driver.
Jiapeng Zhong changes bool assignments from 0/1 to false/true for igc.
Wei Yongjun marks e1000e_pm_prepare() as __maybe_unused to resolve a defined but not used warning under certain configurations.
The following are changes since commit c2ed62b9975e3e47a8b12f5fc4ed7958104b427b:
Merge branch 'net-xps-improve-the-xps-maps-handling'
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 1GbE
Jiapeng Zhong (1):
igc: Assign boolean values to a bool variable
Sasha Neftin (3):
igc: Remove unused MII_CR_RESET
igc: Remove unused MII_CR_SPEED
igc: Remove unused MII_CR_LOOPBACK
Wei Yongjun (1):
e1000e: Mark e1000e_pm_prepare() as __maybe_unused
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- drivers/net/ethernet/intel/igc/igc_defines.h | 5 ----- drivers/net/ethernet/intel/igc/igc_main.c | 16 ++++++++-------- 3 files changed, 9 insertions(+), 14 deletions(-)
Signature · 1 line
2.26.2
Tony Nguyen
maintainerPATCH 1/5 igc: Remove unused MII_CR_RESET
From: Sasha Neftin <[email protected]>
MII_CR_RESET mask not in use in i225 device and can be removed
--- drivers/net/ethernet/intel/igc/igc_defines.h | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_defines.h +0 -1
@@ -442,7 +442,6 @@#define MII_CR_POWER_DOWN 0x0800/* Power down */ #define MII_CR_AUTO_NEG_EN 0x1000/* Auto Neg Enable */ #define MII_CR_LOOPBACK 0x4000/* 0 = normal, 1 = loopback */ -#define MII_CR_RESET 0x8000/* 0 = normal, 1 = PHY reset */ #define MII_CR_SPEED_1000 0x0040#define MII_CR_SPEED_100 0x2000#define MII_CR_SPEED_10 0x0000
Signature · 1 line
2.26.2
Tony Nguyen
maintainerPATCH 2/5 igc: Remove unused MII_CR_SPEED
In reply to Tony NguyenFrom: Sasha Neftin <[email protected]>
Force PHY speed not supported for i225 devices. MII_CR_SPEED masks not in use in i225 device and can be removed.
--- drivers/net/ethernet/intel/igc/igc_defines.h | 3 --- 1 file changed, 3 deletions(-)
drivers/net/ethernet/intel/igc/igc_defines.h +0 -3
@@ -442,9 +442,6 @@#define MII_CR_POWER_DOWN 0x0800/* Power down */ #define MII_CR_AUTO_NEG_EN 0x1000/* Auto Neg Enable */ #define MII_CR_LOOPBACK 0x4000/* 0 = normal, 1 = loopback */ -#define MII_CR_SPEED_1000 0x0040 -#define MII_CR_SPEED_100 0x2000 -#define MII_CR_SPEED_10 0x0000/* PHY Status Register */ #define MII_SR_LINK_STATUS 0x0004/* Link Status 1 = link */
Signature · 1 line
2.26.2
Tony Nguyen
maintainerPATCH 3/5 igc: Remove unused MII_CR_LOOPBACK
In reply to Tony NguyenFrom: Sasha Neftin <[email protected]>
MII_CR_LOOPBACK masks not in use in i225 device and can be removed.
--- drivers/net/ethernet/intel/igc/igc_defines.h | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_defines.h +0 -1
@@ -441,7 +441,6 @@#define MII_CR_RESTART_AUTO_NEG 0x0200/* Restart auto negotiation */ #define MII_CR_POWER_DOWN 0x0800/* Power down */ #define MII_CR_AUTO_NEG_EN 0x1000/* Auto Neg Enable */ -#define MII_CR_LOOPBACK 0x4000/* 0 = normal, 1 = loopback */ /* PHY Status Register */ #define MII_SR_LINK_STATUS 0x0004/* Link Status 1 = link */
Signature · 1 line
2.26.2
Tony Nguyen
maintainerPATCH 4/5 igc: Assign boolean values to a bool variable
In reply to Tony NguyenFrom: Jiapeng Zhong <[email protected]>
Fix the following coccicheck warnings:
./drivers/net/ethernet/intel/igc/igc_main.c:4961:2-14: WARNING:
Assignment of 0/1 to bool variable.
./drivers/net/ethernet/intel/igc/igc_main.c:4955:2-14: WARNING:
Assignment of 0/1 to bool variable.
./drivers/net/ethernet/intel/igc/igc_main.c:4933:1-13: WARNING:
Assignment of 0/1 to bool variable.
./drivers/net/ethernet/intel/igc/igc_main.c:4592:1-24: WARNING:
Assignment of 0/1 to bool variable.
./drivers/net/ethernet/intel/igc/igc_main.c:4438:2-25: WARNING:
Assignment of 0/1 to bool variable.
./drivers/net/ethernet/intel/igc/igc_main.c:4396:2-25: WARNING:
Assignment of 0/1 to bool variable.
./drivers/net/ethernet/intel/igc/igc_main.c:4018:2-25: WARNING:
Assignment of 0/1 to bool variable.
--- drivers/net/ethernet/intel/igc/igc_main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/ethernet/intel/igc/igc_main.c +8 -8
@@ -3580,7 +3580,7 @@ void igc_up(struct igc_adapter *adapter)netif_tx_start_all_queues (adapter->netdev);/* start the watchdog. */ - hw->mac.get_link_status =1 ; + hw->mac.get_link_status = true;schedule_work (&adapter->watchdog_task); }
@@ -4000,7 +4000,7 @@ static irqreturn_t igc_msix_other(int irq, void *data) }if (icr &IGC_ICR_LSC ) { - hw->mac.get_link_status =1 ; + hw->mac.get_link_status = true;/* guard against interrupt when we're going down */ if (!test_bit (__IGC_DOWN, &adapter->state))mod_timer (&adapter->watchdog_timer, jiffies +1 );
@@ -4378,7 +4378,7 @@ static irqreturn_t igc_intr_msi(int irq, void *data) }if (icr & (IGC_ICR_RXSEQ |IGC_ICR_LSC )) { - hw->mac.get_link_status =1 ; + hw->mac.get_link_status = true;if (!test_bit (__IGC_DOWN, &adapter->state))mod_timer (&adapter->watchdog_timer, jiffies +1 ); }
@@ -4420,7 +4420,7 @@ static irqreturn_t igc_intr(int irq, void *data) }if (icr & (IGC_ICR_RXSEQ |IGC_ICR_LSC )) { - hw->mac.get_link_status =1 ; + hw->mac.get_link_status = true;/* guard against interrupt when we're going down */ if (!test_bit (__IGC_DOWN, &adapter->state))mod_timer (&adapter->watchdog_timer, jiffies +1 );
@@ -4574,7 +4574,7 @@ static int __igc_open(struct net_device *netdev, bool resuming)netif_tx_start_all_queues (netdev);/* start the watchdog. */ - hw->mac.get_link_status =1 ; + hw->mac.get_link_status = true;schedule_work (&adapter->watchdog_task);return IGC_SUCCESS ;
@@ -4915,7 +4915,7 @@ int igc_set_spd_dplx(struct igc_adapter *adapter, u32 spd, u8 dplx) {struct igc_mac_info *mac = &adapter->hw.mac; - mac->autoneg =0 ; + mac->autoneg = false;/* Make sure dplx is at most 1 bit and lsb of speed is not set * for the switch() below to work
@@ -4937,13 +4937,13 @@ int igc_set_spd_dplx(struct igc_adapter *adapter, u32 spd, u8 dplx) mac->forced_speed_duplex =ADVERTISE_100_FULL ;break ;case SPEED_1000 +DUPLEX_FULL : - mac->autoneg =1 ; + mac->autoneg = true; adapter->hw.phy.autoneg_advertised =ADVERTISE_1000_FULL ;break ;case SPEED_1000 +DUPLEX_HALF :/* not supported */ goto err_inval;case SPEED_2500 +DUPLEX_FULL : - mac->autoneg =1 ; + mac->autoneg = true; adapter->hw.phy.autoneg_advertised =ADVERTISE_2500_FULL ;break ;case SPEED_2500 +DUPLEX_HALF :/* not supported */
Signature · 1 line
2.26.2
Tony Nguyen
maintainerPATCH 5/5 e1000e: Mark e1000e_pm_prepare() as __maybe_unused
In reply to Tony NguyenFrom: Wei Yongjun <[email protected]>
The function e1000e_pm_prepare() may have no callers depending on configuration, so it must be marked __maybe_unused to avoid harmless warning:
drivers/net/ethernet/intel/e1000e/netdev.c:6926:12:
warning: 'e1000e_pm_prepare' defined but not used [-Wunused-function] 6926 | static int e1000e_pm_prepare(struct device *dev)
| ^~~~~~~~~~~~~~~~~
--- drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/e1000e/netdev.c +1 -1
@@ -6919,7 +6919,7 @@ static int __e1000_resume(struct pci_dev *pdev)return 0 ; } -static int e1000e_pm_prepare (struct device *dev) +static __maybe_unused int e1000e_pm_prepare (struct device *dev) {return pm_runtime_suspended (dev) &&pm_suspend_via_firmware ();
Signature · 1 line
2.26.2
This series was applied to netdev/net-next.git (refs/heads/master):
Hello:
This series was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Fri, 19 Mar 2021 14:17:18 -0700 you wrote:
This series contains updates to igc and e1000e drivers.
Sasha removes unused defines in igc driver.
Jiapeng Zhong changes bool assignments from 0/1 to false/true for igc.
Wei Yongjun marks
e1000e_pm_prepare()as__maybe_unusedto resolve a defined but not used warning under certain configurations.[...]
Here is the summary with links:
- [net-next,1/5] igc: Remove unused MII_CR_RESET
https://git.kernel.org/netdev/net-next/c/a4e39b999a58 - [net-next,2/5] igc: Remove unused MII_CR_SPEED https://git.kernel.org/netdev/net-next/c/1fa81e259b49 - [net-next,3/5] igc: Remove unused MII_CR_LOOPBACK https://git.kernel.org/netdev/net-next/c/a5d86bd969ea - [net-next,4/5] igc: Assign boolean values to a bool variable https://git.kernel.org/netdev/net-next/c/501f23092ddb - [net-next,5/5] e1000e: Mark e1000e_pm_prepare() as __maybe_unused https://git.kernel.org/netdev/net-next/c/f2d75b178532
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html