Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH v1 1/1] igc: Fix BUG: scheduling while atomic: kworker/u64:0/9/0x00000002
@ 2022-03-08  9:24 Sasha Neftin
  2022-03-08  9:31 ` Maciej Fijalkowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sasha Neftin @ 2022-03-08  9:24 UTC (permalink / raw)
  To: intel-wired-lan

Replace usleep_range() method with udelay() method to allow atomic contects
in low-level MDIO access functions.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2014971
Fixes: 5586838fe9ce ("igc: Add code for PHY support")
Reported-by: Corinna Vinschen <vinschen@redhat.com>
Suggested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
---
 drivers/net/ethernet/intel/igc/igc_phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igc/igc_phy.c b/drivers/net/ethernet/intel/igc/igc_phy.c
index 40dbf4b43234..6961f65d36b9 100644
--- a/drivers/net/ethernet/intel/igc/igc_phy.c
+++ b/drivers/net/ethernet/intel/igc/igc_phy.c
@@ -581,7 +581,7 @@ static s32 igc_read_phy_reg_mdic(struct igc_hw *hw, u32 offset, u16 *data)
 	 * the lower time out
 	 */
 	for (i = 0; i < IGC_GEN_POLL_TIMEOUT; i++) {
-		usleep_range(500, 1000);
+		udelay(50);
 		mdic = rd32(IGC_MDIC);
 		if (mdic & IGC_MDIC_READY)
 			break;
@@ -638,7 +638,7 @@ static s32 igc_write_phy_reg_mdic(struct igc_hw *hw, u32 offset, u16 data)
 	 * the lower time out
 	 */
 	for (i = 0; i < IGC_GEN_POLL_TIMEOUT; i++) {
-		usleep_range(500, 1000);
+		udelay(50);
 		mdic = rd32(IGC_MDIC);
 		if (mdic & IGC_MDIC_READY)
 			break;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-24 10:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-08  9:24 [Intel-wired-lan] [PATCH v1 1/1] igc: Fix BUG: scheduling while atomic: kworker/u64:0/9/0x00000002 Sasha Neftin
2022-03-08  9:31 ` Maciej Fijalkowski
2022-03-08 15:49 ` Corinna Vinschen
2022-03-08 17:34   ` Neftin, Sasha
2022-03-24 10:23 ` naamax.meir

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox