Skip to content

Commit 8a67b47

Browse files
diandersdavem330
authored andcommitted
r8152: Add RTL8152_INACCESSIBLE to r8156b_wait_loading_flash()
Delay loops in r8152 should break out if RTL8152_INACCESSIBLE is set so that they don't delay too long if the device becomes inaccessible. Add the break to the loop in r8156b_wait_loading_flash(). Fixes: 195aae3 ("r8152: support new chips") Reviewed-by: Grant Grundler <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Acked-by: Hayes Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 32a574c commit 8a67b47

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/usb/r8152.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5521,6 +5521,8 @@ static void r8156b_wait_loading_flash(struct r8152 *tp)
55215521
int i;
55225522

55235523
for (i = 0; i < 100; i++) {
5524+
if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
5525+
break;
55245526
if (ocp_read_word(tp, MCU_TYPE_USB, USB_GPHY_CTRL) & GPHY_PATCH_DONE)
55255527
break;
55265528
usleep_range(1000, 2000);

0 commit comments

Comments
 (0)