aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/ieee1394_core.c
diff options
context:
space:
mode:
authorBen Collins <bcollins@ubuntu.com>2006-06-12 18:12:37 -0400
committerBen Collins <bcollins@ubuntu.com>2006-06-12 18:12:37 -0400
commit647dcb5fae0ebb5da1272ed2773df0d3f152c303 (patch)
tree31d6a6ab3fd8acb2dc9335dfa181972f4433158a /drivers/ieee1394/ieee1394_core.c
parent57fdb58fa5a140bdd52cf4c4ffc30df73676f0a5 (diff)
ieee1394: support for slow links or slow 1394b phy ports
Add support for the following types of hardware: + nodes that have a link speed < PHY speed + 1394b PHYs that are less than S800 capable + 1394b/1394a adapter cable between two 1394b PHYs Also, S1600 and S3200 are now supported if IEEE1394_SPEED_MAX is raised. A probing function is added to nodemgr's config ROM fetching routine which adjusts the allowable speed if an access problem was encountered. Pros and Cons of the approach: + minimum code footprint to support this less widely used hardware + nearly no overhead for unaffected hardware - ineffective before nodemgr began to read the ROM of affected nodes - ineffective if ieee1394 is loaded with disable_nodemgr=1 The speed map CSRs which are published to the bus are not touched by the patch. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Hakan Ardo <hakan@debian.org> Cc: Calculex <linux@calculex.com> Cc: Robert J. Kosinski <robk@cmcherald.com> Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Diffstat (limited to 'drivers/ieee1394/ieee1394_core.c')
-rw-r--r--drivers/ieee1394/ieee1394_core.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
index be6854e25ad4..c83e2b8295e3 100644
--- a/drivers/ieee1394/ieee1394_core.c
+++ b/drivers/ieee1394/ieee1394_core.c
@@ -285,9 +285,9 @@ static int check_selfids(struct hpsb_host *host)
285 285
286static void build_speed_map(struct hpsb_host *host, int nodecount) 286static void build_speed_map(struct hpsb_host *host, int nodecount)
287{ 287{
288 u8 speedcap[nodecount];
289 u8 cldcnt[nodecount]; 288 u8 cldcnt[nodecount];
290 u8 *map = host->speed_map; 289 u8 *map = host->speed_map;
290 u8 *speedcap = host->speed;
291 struct selfid *sid; 291 struct selfid *sid;
292 struct ext_selfid *esid; 292 struct ext_selfid *esid;
293 int i, j, n; 293 int i, j, n;
@@ -354,6 +354,11 @@ static void build_speed_map(struct hpsb_host *host, int nodecount)
354 } 354 }
355 } 355 }
356 } 356 }
357
358 /* assume maximum speed for 1394b PHYs, nodemgr will correct it */
359 for (n = 0; n < nodecount; n++)
360 if (speedcap[n] == 3)
361 speedcap[n] = IEEE1394_SPEED_MAX;
357} 362}
358 363
359 364
@@ -554,11 +559,10 @@ int hpsb_send_packet(struct hpsb_packet *packet)
554 return 0; 559 return 0;
555 } 560 }
556 561
557 if (packet->type == hpsb_async && packet->node_id != ALL_NODES) { 562 if (packet->type == hpsb_async &&
563 NODEID_TO_NODE(packet->node_id) != ALL_NODES)
558 packet->speed_code = 564 packet->speed_code =
559 host->speed_map[NODEID_TO_NODE(host->node_id) * 64 565 host->speed[NODEID_TO_NODE(packet->node_id)];
560 + NODEID_TO_NODE(packet->node_id)];
561 }
562 566
563 dump_packet("send packet", packet->header, packet->header_size, packet->speed_code); 567 dump_packet("send packet", packet->header, packet->header_size, packet->speed_code);
564 568