generic: rtl8366_smi: add timeout message
authorGabor Juhos <juhosg@openwrt.org>
Sat, 7 Jan 2012 19:36:25 +0000 (19:36 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sat, 7 Jan 2012 19:36:25 +0000 (19:36 +0000)
SVN-Revision: 29676

target/linux/generic/files/drivers/net/phy/rtl8366_smi.c

index 281c4536707b39f5d2fe34511b50a3d8e3ac6f8a..f0a92bcd7f8185c15dc9abfa579eaea7b2c60268 100644 (file)
@@ -143,8 +143,10 @@ static int rtl8366_smi_wait_for_ack(struct rtl8366_smi *smi)
                if (ack == 0)
                        break;
 
-               if (++retry_cnt > RTL8366_SMI_ACK_RETRY_COUNT)
-                       return -EIO;
+               if (++retry_cnt > RTL8366_SMI_ACK_RETRY_COUNT) {
+                       dev_err(smi->parent, "ACK timeout\n");
+                       return -ETIMEDOUT;
+               }
        } while (1);
 
        return 0;