Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130406
b: refs/heads/master
c: 82d4b90
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Jan 28, 2009
1 parent 6b9a446 commit 0d63cc0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e747a5c0be3efe5465e45c8e326bc766b1288be6
refs/heads/master: 82d4b90debaa7ab3590335c1b641eb3d2ebb164e
4 changes: 1 addition & 3 deletions trunk/drivers/ieee1394/ieee1394.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@
#define IEEE1394_SPEED_800 0x03
#define IEEE1394_SPEED_1600 0x04
#define IEEE1394_SPEED_3200 0x05

/* The current highest tested speed supported by the subsystem */
#define IEEE1394_SPEED_MAX IEEE1394_SPEED_800
#define IEEE1394_SPEED_MAX IEEE1394_SPEED_3200

/* Maps speed values above to a string representation */
extern const char *hpsb_speedto_str[];
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/ieee1394/ieee1394_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
u8 cldcnt[nodecount];
u8 *map = host->speed_map;
u8 *speedcap = host->speed;
u8 local_link_speed = host->csr.lnk_spd;
struct selfid *sid;
struct ext_selfid *esid;
int i, j, n;
Expand Down Expand Up @@ -373,8 +374,8 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
if (sid->port2 == SELFID_PORT_CHILD) cldcnt[n]++;

speedcap[n] = sid->speed;
if (speedcap[n] > host->csr.lnk_spd)
speedcap[n] = host->csr.lnk_spd;
if (speedcap[n] > local_link_speed)
speedcap[n] = local_link_speed;
n--;
}
}
Expand Down Expand Up @@ -407,12 +408,11 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
}
}

#if SELFID_SPEED_UNKNOWN != IEEE1394_SPEED_MAX
/* assume maximum speed for 1394b PHYs, nodemgr will correct it */
for (n = 0; n < nodecount; n++)
if (speedcap[n] == SELFID_SPEED_UNKNOWN)
speedcap[n] = IEEE1394_SPEED_MAX;
#endif
/* assume a maximum speed for 1394b PHYs, nodemgr will correct it */
if (local_link_speed > SELFID_SPEED_UNKNOWN)
for (i = 0; i < nodecount; i++)
if (speedcap[i] == SELFID_SPEED_UNKNOWN)
speedcap[i] = local_link_speed;
}


Expand Down

0 comments on commit 0d63cc0

Please sign in to comment.