From owner-freebsd-firewire@FreeBSD.ORG Fri Aug 29 01:02:15 2008 Return-Path: Delivered-To: freebsd-firewire@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E0C0106567C for ; Fri, 29 Aug 2008 01:02:15 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from parsely.rain.com (parsely.rain.com [199.26.172.196]) by mx1.freebsd.org (Postfix) with ESMTP id D42FD8FC21 for ; Fri, 29 Aug 2008 01:02:14 +0000 (UTC) (envelope-from freebsd@sopwith.solgatos.com) Received: from sopwith.solgatos.com (uucp@localhost) by parsely.rain.com (8.11.4/8.11.4) with UUCP id m7T125v80720; Thu, 28 Aug 2008 18:02:05 -0700 (PDT) (envelope-from freebsd@sopwith.solgatos.com) Received: from localhost by sopwith.solgatos.com (8.8.8/6.24) id BAA25511; Fri, 29 Aug 2008 01:01:09 GMT Message-Id: <200808290101.BAA25511@sopwith.solgatos.com> To: Sean Bruno In-reply-to: Your message of "Thu, 28 Aug 2008 16:49:05 PDT." <48B73971.90706@miralink.com> Date: Thu, 28 Aug 2008 18:01:09 +0100 From: Dieter Cc: freebsd-firewire@freebsd.org Subject: Re: This is where I'm going with fwcontrol X-BeenThere: freebsd-firewire@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Firewire support in FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Aug 2008 01:02:15 -0000 > send_phy_config() is causing the /dev/fwX device to generate a PHY > configuration Packet(IEEE 1394-1995 4.3.4.3) > > It is possible to optimize Serial Bus performance for particular > configurations in the following ways: > a) Setting the gap_count used by all nodes to a smaller value > (appropriate to the actual worst-case number of > hops between any two nodes) > b) Forcing a particular node to be the root after the next bus > initialization (for example, in isochronous systems, > the root shall be cycle-master capable) > Both of these actions shall be done for remote nodes using the PHY > configuration packet shown in figure 4.20. (For the > local node, the PH_CONT.request service is used) The procedures for > using this PHY packet are described in clause > 7.3.5.2.1. > > > So, I think you are correct adjust_gap_count should become set_root_node > as that is what it does. > > A PHY Config packet should look like this: > Message ID Root ID R T Gap Count > 00(2 bits) (5 bits) 1 1 (6 bits) > > So the Root ID(-f in fwcontrol) can't be set to a value greater than > 0x3f(63) and the Gap Count can't be greater than 0x7f(127). An "R" > value of 1 means that this is a message to set the root ID. An "T" > value of 1 means that this is a message to set the gap count for all > nodes. If "R" and "T" are both 0, then the message is ignored. Thank you, this makes much more sense now! I was looking at controller registers, but it is building a packet. Suggestion: put something like the text above in a comment at the start of send_phy_config().