> There can be bus resets at any given time (for example think of a
firewire disk that is powered up). Are you shure that this will not
happen in your app?
As far as I know there might be also a reset storm from time to time.
How do you handle that case?
Uwe
Multiple bus resets (even reset storms are not a problem). Once the
resets settle down communication will get back to normal and will sort
itself out. The application will, of course, experience a moment of
unavoidable disruption in such a case but will then proceed normally.
Following a reset (or reset storm) the driver will detect if the PC is
not the root node and if necessary reset the bus once more with the
force root bit set. This is currently a requirement as Windows has
abdicated the roll of ensuring that the root node is cycle master
capable (a non-optional requirement for any node claiming to be IRM
capable).
In XP-SP2 bus resets always come in pairs. For example, submitting a
REQUEST_BUS_RESET IRB to the bus driver will result in 2 bus resets
rather than 1. If the IRB is submitted with the
BUS_RESET_FLAGS_FORCE_ROOT flag the first reset will result, as
expected in the host PC becoming root. However, the second reset which
immediately follows the first will nullify this result. In some bus
configurations it now becomes impossible to ever force the PC to be
the root node.
Ironically, it is easy to guarantee that my device becomes root since
I can send it a PhyConfigurationPacket (REQUEST_SEND_PHY_CONFIG_PACKET
IRB) following each bus reset setting its force root bit ready for the
next bus reset (whenever it occurs). This option
is not available, however, for the local node where the only API
provided (as far as I know) to set the force root bit is in the
REQUEST_BUS_RESET itself.
I can see that the long term solution to this problem is to add more
capability to my device so that the requirement to have the host PC be
root can be relaxed. This, however, involves a firmware update and is
a fairly major undertaking that will take some time.
In the short term, I have determined that if the NIC1394 virtual
device is gone the double reset
behavior also goes. Strangely enough, just disabled it does not help.
I haven’t yet
tried issuing an IOCTL_IEEE1394_API_REQUEST on the bus driver to make
the NIC1394 device go away so I don’t know if that will work (Some OS
component could be monitoring and re-add the device). Besides, I would
prefer an nice, friendly, documented way over a nasty hack. In our
case, our device is always used in a carefully setup installation with
a dedicated PC and I have no problem with the idea of making the
turning off of 1394 networking one of the setup steps if I have to.
Robert Newton
VX Technologies