Re: hpsb_write
Brought to you by:
aeb,
bencollins
From: Andreas B. <and...@mu...> - 2000-05-25 21:26:46
|
On Wed, May 24, 2000 at 10:45:33AM -0400, Ale...@ne... wrote: > > I am writing a new piece of driver to go on top of OHCI. I generate messages > and send them by calling hpsb_write(). > > My questions are: > 1. The hpsb_write() function exists but no-one in the existing stack calls it. > Is there any reason for that? See 3. It just stayed around. > 2. Eventuallt hpsb_write() calls hpsb_send_packet() which hangs the kernel > before the two calls to down(), even though the semaphore is initialized. This > is my major concern now and I will be happy if you have an idea why this > happens. It wasn't tested for a long time. Could be that a bug crept in. > 3. Are there any restrictions on using hpsb_write()? Are there prerequisits one > has to fulfill before calling it? It sleeps waiting for packet completion, you therefore need a process context to use it. This is only given if you call hpsb_write() in a kernel function that was called from user space. It can not be used in interrupt context (most of the stack works there, since it has no separate kernel thread). You have to use the other functions like hpsb_make_*packet for more flexible use. What are you trying to do exactly? -- Andreas E. Bombe <and...@mu...> DSA key 0x04880A44 http://home.pages.de/~andreas.bombe/ http://linux1394.sourceforge.net/ |