Shaohui Xie
5f6c99e0ab
net: phy: fix a bug in get_phy_c45_ids
...
When probing devices-in-package for a c45 phy, device zero is the last
device to probe, however, if driver reads 0 from device zero,
c45_ids->devices_in_package is set to '0', the loop condition of probing
will be matched again, see codes below:
for (i = 1;i < num_ids && c45_ids->devices_in_package == 0;i++)
driver will run in a dead loop.
This patch restructures the bug and confusing loop, it provides a helper
function get_phy_c45_devs_in_pkg which to read devices-in-package registers
of a MMD, and rewrites the loop with using the helper function.
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2015-11-02 23:45:20 -05:00
..
2015-10-14 22:48:13 +02:00
2015-09-10 13:29:01 -07:00
2015-09-03 16:55:55 -07:00
2015-09-17 21:29:07 -07:00
2015-10-23 17:55:10 +09:00
2015-10-30 19:25:02 +01:00
2015-08-28 21:09:14 +02:00
2015-10-15 17:10:15 +02:00
2015-09-26 21:05:23 -04:00
2015-10-28 07:24:53 +09:00
2015-09-29 14:33:51 +02:00
2015-10-15 22:46:33 +02:00
2015-09-11 19:11:06 -07:00
2015-09-26 21:05:23 -04:00
2015-10-02 11:05:58 +09:00
2015-10-02 14:46:15 -04:00
2015-09-11 16:21:12 -07:00
2015-09-21 15:07:19 +09:00
2015-10-01 12:51:28 +02:00
2015-09-18 08:11:42 -07:00
2015-10-25 05:02:33 +10:00
2015-09-04 12:02:11 -07:00
2015-09-10 13:29:01 -07:00
2015-09-20 22:44:51 -07:00
2015-09-20 17:50:19 -07:00
2015-10-23 22:26:28 +02:00
2015-09-10 14:03:44 -04:00
2015-10-03 10:27:18 +01:00
2015-10-24 07:28:05 +09:00
2015-10-30 18:49:44 -07:00
2015-10-27 07:44:13 +09:00
2015-10-04 11:40:09 +01:00
2015-11-02 16:25:00 -05:00
2015-09-17 10:02:20 +02:00
2015-09-03 16:41:38 -07:00
2015-09-05 18:11:04 -07:00
2015-10-05 05:10:01 +01:00
2015-10-27 07:41:48 +09:00
2015-10-22 15:48:28 -02:00
2015-10-12 16:23:34 -07:00
2015-08-26 07:11:45 -07:00
2015-10-01 16:31:42 +01:00
2015-10-16 12:07:43 -07:00
2015-10-21 10:18:11 +02:00
2015-10-07 09:35:15 +01:00
2015-11-02 23:45:20 -05:00
2015-09-04 10:07:45 -07:00
2015-09-07 15:27:12 -04:00
2015-09-17 11:49:28 -04:00
2015-10-04 12:09:43 +01:00
2015-09-26 06:01:33 -04:00
2015-09-15 13:18:04 -05:00
2015-10-30 18:47:18 -07:00
2015-09-03 16:01:03 +01:00
2015-10-15 17:11:23 +02:00
2015-09-25 17:01:14 +05:30
2015-10-02 04:06:26 -07:00
2015-09-17 21:41:02 -07:00
2015-09-17 12:25:42 -07:00
2015-08-29 01:46:40 +02:00
2015-09-09 10:55:32 -07:00
2015-10-06 12:00:42 +01:00
2015-09-01 14:48:40 +02:00
2015-09-05 19:37:31 +02:00
2015-09-18 09:28:20 -07:00
2015-10-11 10:02:30 -07:00
2015-09-21 12:02:27 -07:00
2015-09-16 15:47:51 +02:00
2015-10-07 11:43:39 +01:00
2015-09-16 15:47:51 +02:00
2015-10-24 07:51:13 +09:00
2015-09-24 23:24:46 -07:00
2015-10-21 17:02:13 +02:00
2015-09-20 15:20:11 -07:00
2015-10-17 21:24:46 -07:00
2015-10-17 00:04:18 -07:00
2015-10-27 20:17:03 -07:00
2015-10-17 22:00:39 -07:00
2015-09-08 13:32:11 +03:00
2015-09-01 18:46:42 -07:00
2015-09-28 10:56:10 +02:00
2015-09-10 18:19:42 -07:00
2015-09-03 16:27:01 -07:00
2015-09-04 10:22:09 -07:00