Commit 82d4b90d authored by Stefan Richter's avatar Stefan Richter

ieee1394: support for speeds greater than S800

The hard-wired configuration of the top speed (until now S800) was
unnecessary, remove it.

If the local link layer controller supports S1600 or S3200, we now
assume this speed for all present 1394b PHYs (except if they are
behind 1394a repeaters) until nodemgr figured out the actual speed
while fetching the config ROM.
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent e747a5c0
...@@ -54,9 +54,7 @@ ...@@ -54,9 +54,7 @@
#define IEEE1394_SPEED_800 0x03 #define IEEE1394_SPEED_800 0x03
#define IEEE1394_SPEED_1600 0x04 #define IEEE1394_SPEED_1600 0x04
#define IEEE1394_SPEED_3200 0x05 #define IEEE1394_SPEED_3200 0x05
#define IEEE1394_SPEED_MAX IEEE1394_SPEED_3200
/* The current highest tested speed supported by the subsystem */
#define IEEE1394_SPEED_MAX IEEE1394_SPEED_800
/* Maps speed values above to a string representation */ /* Maps speed values above to a string representation */
extern const char *hpsb_speedto_str[]; extern const char *hpsb_speedto_str[];
......
...@@ -338,6 +338,7 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) ...@@ -338,6 +338,7 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
u8 cldcnt[nodecount]; u8 cldcnt[nodecount];
u8 *map = host->speed_map; u8 *map = host->speed_map;
u8 *speedcap = host->speed; u8 *speedcap = host->speed;
u8 local_link_speed = host->csr.lnk_spd;
struct selfid *sid; struct selfid *sid;
struct ext_selfid *esid; struct ext_selfid *esid;
int i, j, n; int i, j, n;
...@@ -373,8 +374,8 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) ...@@ -373,8 +374,8 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++; if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++;
speedcap[n] = sid->speed; speedcap[n] = sid->speed;
if (speedcap[n] > host->csr.lnk_spd) if (speedcap[n] > local_link_speed)
speedcap[n] = host->csr.lnk_spd; speedcap[n] = local_link_speed;
n--; n--;
} }
} }
...@@ -407,12 +408,11 @@ static void build_speed_map(struct hpsb_host *host, int nodecount) ...@@ -407,12 +408,11 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
} }
} }
#if SELFID_SPEED_UNKNOWN != IEEE1394_SPEED_MAX /* assume a maximum speed for 1394b PHYs, nodemgr will correct it */
/* assume maximum speed for 1394b PHYs, nodemgr will correct it */ if (local_link_speed > SELFID_SPEED_UNKNOWN)
for (n = 0; n < nodecount; n++) for (i = 0; i < nodecount; i++)
if (speedcap[n] == SELFID_SPEED_UNKNOWN) if (speedcap[i] == SELFID_SPEED_UNKNOWN)
speedcap[n] = IEEE1394_SPEED_MAX; speedcap[i] = local_link_speed;
#endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment