Bus resets
Brought to you by:
aeb,
bencollins
From: <And...@no...> - 2000-05-11 09:07:53
|
Hi, I am writing a program for handling changes on the bus after bus resets, i.e. detecting type of nodes (SBP2, AVC, ...) and building a topology tree. I use a DV camera (Sony DCRPC7E) and two SBP2 hard drives from VST and have come up with some strange behaviour when connecting/disconnecting these devices. The problems are consistant, i.e. I am able to repeate them, but it is difficult to say why they occur. This is my setup: * 1394 subsystem checked out from CVS yesterday * Kernel version 2.2.14 * Red Hat 6.1 * P166 PC with TI OHCI adapter card I use the following small test program: ---------------------------------------------------------------------------- ----- #include <stdio.h> #include <libraw1394/raw1394.h> int i = 0; void reset_handler( raw1394handle_t handle ) { printf("\nBus reset #%d detected!\n", i); i++; } int main( void ) { raw1394handle_t handle; handle = raw1394_get_handle(); raw1394_set_port(handle, 0); raw1394_set_bus_reset_handler( handle, (bus_reset_handler_t) reset_handler ); while(1) raw1394_loop_iterate(handle); return 0; } ---------------------------------------------------------------------------- -------- I also do a 'cat /proc/kmsg' to get the debugging information from the ohci and ieee modules. Please see my observations below. It is possible that the problems are hardware related, e.g. slow PC, inconsistant PHY and/or LINK chips etc but it would be interesting to see if someone else has encountered the same problems with other type of setups. In that case, it could be software related bugs. #1. A device is disconnected Sometimes reset_handler() is called but I do not get any debugging information from /proc/kmsg. #2. One SBP2 drive already connected to PC, DV camera is connected reset_handler() is called twice but /proc/kmsg only indicates one bus reset: <6>ohci1394_0: Bus reset <6>ohci1394_0: PhyControl: 000001FF <6>ohci1394_0: SelfID process finished (phyid 4, not root) <6>ohci1394_0: selfid packet 0x806c8094 rcvd <7>ieee1394: including selfid 0x94806c80 <6>ohci1394_0: selfid packet 0x812c849c rcvd <7>ieee1394: including selfid 0x9c842c81 <6>ohci1394_0: selfid packet 0x826c8094 rcvd <7>ieee1394: including selfid 0x94806c82 <6>ohci1394_0: selfid packet 0x832c84ec rcvd <7>ieee1394: including selfid 0xec842c83 <6>ohci1394_0: selfid packet 0x846c84b4 rcvd <7>ieee1394: including selfid 0xb4846c84 <6>ohci1394_0: This node self-id is 0x846c84b4 <6>ohci1394_0: selfid packet 0x856c08c2 rcvd <7>ieee1394: including selfid 0xc2086c85 <6>ohci1394_0: calling self-id complete <6>ohci1394_0: Got phy packet ctx=0 ... discarded #3. A device is connected to the PC, no other devices are connected No bus reset is generated at all. #4. DV camera already connected to PC, SBP2 drive is connected or disconnected reset_handler() is not called and /proc/kmsg says: <3>ohci1394_0: SelfID process finished but NodeID not valid: 0800FFC0 <6>ohci1394_0: PhyControl: 000001FF <6>ohci1394_0: Got phy packet ctx=0 ... discarded <6>ohci1394_0: Got phy packet ctx=0 ... discarded _____________________________________________________________________ Anders Weitman, M.Sc Phone : +46 (0)13 4611341 Development Engineer Fax : +46 (0)13 4611001 Nokia Home Communications Mobile : +46 (0)70 2141319 Diskettgatan 11 E-mail : and...@no... SE-583 35 Linkoping, Sweden Internet : www.nokia.com/multimedia/ |