fcp handling
Brought to you by:
aeb,
bencollins
From: Manfred W. <e95...@st...> - 2000-03-26 18:05:59
|
I still have not tested the new fcp-functions, but I had a look at the code and I think I discovered a flaw, which might cause errors in some situations, which are very difficult to locate. If I understood the code correctly, then by issuing raw1394_start_fcp_listen we tell the kernel to store the packets arriving in a buffer array which is located in raw1394_handle. BTW: That ist the same buffer which is used for iso packets, so it would probably be advisable for people, who are listening for iso_packets _and_ fcp_frames, to allocate two seperate handles for those two purposes (I think, that should be mentioned in a comment in raw1394.h). If a new packet arrives before the first one was read completly by the application, it would overwritten and the application either loses the first one completly or it reads a mixture (which can in worst case be a mixture fcp-commands, fcp-responses and iso-packets). I am also not quit sure, if it was a good idea to mix up the reception of fcp commands and responses into one handler, since an application might be interested in only listening to either commands or responses (of cource, if somebody wants to implement a fully AV/C-compliant unit, he will have to handle both). In that context I have another qestion: If two application (or one application using two raw-handles) register for listening at the FCP addresses, which buffer will be used? Or will the kernel create two copies of that packet in both raw-handle-buffers? I think that the kernel will do this, but I just wanted to ask, because I was not sure, and studying the source-code is not easy... greetings Manfred Weihs |