Skip to content

Commit 6008a52

Browse files
ajaykathatajaysk
authored andcommitted
wilc1000: fix chip wakeup sequence retry failure issue
Sometimes during iperf session with powersave enabled, the commands used to fail. Mostly the clock status bit was available but when it fails then wakeup bit reset is required. Added delay before calling the wakeup bit reset, to get the clock bit status correctly. Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
1 parent 0adea73 commit 6008a52

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

  • drivers/net/wireless/microchip/wilc1000

drivers/net/wireless/microchip/wilc1000/wlan.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,10 +844,14 @@ static void chip_wakeup_wilc3000(struct wilc *wilc, int source)
844844
/* in case of failure, Reset the wakeup bit to introduce a new
845845
* edge on the next loop
846846
*/
847-
if ((clk_status_reg_val & clk_status_bit) == 0)
847+
if ((clk_status_reg_val & clk_status_bit) == 0) {
848848
hif_func->hif_write_reg(wilc, wakeup_reg,
849849
wakeup_reg_val & (~wakeup_bit));
850-
} while (((clk_status_reg_val & clk_status_bit) == 0) && (wake_seq_trials-- > 0));
850+
/* added wait before wakeup sequence retry */
851+
usleep_range(200, 300);
852+
}
853+
} while (((clk_status_reg_val & clk_status_bit) == 0)
854+
&& (wake_seq_trials-- > 0));
851855
if (!wake_seq_trials)
852856
dev_err(wilc->dev, "clocks still OFF. Wake up failed\n");
853857
wilc->keep_awake[source] = true;

0 commit comments

Comments
 (0)