diff options
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/ieee1394.h | 4 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_core.c | 16 |
2 files changed, 9 insertions, 11 deletions
diff --git a/drivers/ieee1394/ieee1394.h b/drivers/ieee1394/ieee1394.h index e0ae0d3d747f..af320e2c5079 100644 --- a/drivers/ieee1394/ieee1394.h +++ b/drivers/ieee1394/ieee1394.h | |||
@@ -54,9 +54,7 @@ | |||
54 | #define IEEE1394_SPEED_800 0x03 | 54 | #define IEEE1394_SPEED_800 0x03 |
55 | #define IEEE1394_SPEED_1600 0x04 | 55 | #define IEEE1394_SPEED_1600 0x04 |
56 | #define IEEE1394_SPEED_3200 0x05 | 56 | #define IEEE1394_SPEED_3200 0x05 |
57 | 57 | #define IEEE1394_SPEED_MAX IEEE1394_SPEED_3200 | |
58 | /* The current highest tested speed supported by the subsystem */ | ||
59 | #define IEEE1394_SPEED_MAX IEEE1394_SPEED_800 | ||
60 | 58 | ||
61 | /* Maps speed values above to a string representation */ | 59 | /* Maps speed values above to a string representation */ |
62 | extern const char *hpsb_speedto_str[]; | 60 | extern const char *hpsb_speedto_str[]; |
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index dcdb71a7718d..2beb8d94f7bd 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c | |||
@@ -338,6 +338,7 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) | |||
338 | u8 cldcnt[nodecount]; | 338 | u8 cldcnt[nodecount]; |
339 | u8 *map = host->speed_map; | 339 | u8 *map = host->speed_map; |
340 | u8 *speedcap = host->speed; | 340 | u8 *speedcap = host->speed; |
341 | u8 local_link_speed = host->csr.lnk_spd; | ||
341 | struct selfid *sid; | 342 | struct selfid *sid; |
342 | struct ext_selfid *esid; | 343 | struct ext_selfid *esid; |
343 | int i, j, n; | 344 | int i, j, n; |
@@ -373,8 +374,8 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) | |||
373 | if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++; | 374 | if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++; |
374 | 375 | ||
375 | speedcap[n] = sid->speed; | 376 | speedcap[n] = sid->speed; |
376 | if (speedcap[n] > host->csr.lnk_spd) | 377 | if (speedcap[n] > local_link_speed) |
377 | speedcap[n] = host->csr.lnk_spd; | 378 | speedcap[n] = local_link_speed; |
378 | n--; | 379 | n--; |
379 | } | 380 | } |
380 | } | 381 | } |
@@ -407,12 +408,11 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) | |||
407 | } | 408 | } |
408 | } | 409 | } |
409 | 410 | ||
410 | #if SELFID_SPEED_UNKNOWN != IEEE1394_SPEED_MAX | 411 | /* assume a maximum speed for 1394b PHYs, nodemgr will correct it */ |
411 | /* assume maximum speed for 1394b PHYs, nodemgr will correct it */ | 412 | if (local_link_speed > SELFID_SPEED_UNKNOWN) |
412 | for (n = 0; n < nodecount; n++) | 413 | for (i = 0; i < nodecount; i++) |
413 | if (speedcap[n] == SELFID_SPEED_UNKNOWN) | 414 | if (speedcap[i] == SELFID_SPEED_UNKNOWN) |
414 | speedcap[n] = IEEE1394_SPEED_MAX; | 415 | speedcap[i] = local_link_speed; |
415 | #endif | ||
416 | } | 416 | } |
417 | 417 | ||
418 | 418 | ||