Hi Alan,
I have done more testing . I could find that if I add a 3~4 msec delay
before calling the ioctl, then the ioctl call does not get blocked.
But if I do not add any delay and call the ioctl then one of the
three instance at ioctl get blocked and would never come out. In a few
occations when starting the third instance it get blocked at the open
call of the third instance. Is this a normal behaviour when more and
more threads simultaneously try to access a usb cdrom device. I have
tested on usb cddrives connected directly to the system port . But did
not find any such problem.
fd = open("/dev/cdrom", O_RDONLY | O_NONBLOCK)
while (1)
ioctl (fd, CDROM_DRIVE_STATUS, &header)
shiju
On 4/14/05, Alan Stern <[EMAIL PROTECTED]> wrote:
> On Wed, 13 Apr 2005, Shiju Mathew wrote:
>
> > Hi Alan,
> > Here is the dmesg while the problem happens . The problem could be
> > easily reproduced on running the three instances of opening and
> > reading the status of cdrom device. On starting the third instance,
> > the ioctls calls of one of the first two instance will block until one
> > other instant is stoped. Looks like more than two instances of
> > opening and reading of usb cdrom fails.
>
> The dmesg log wasn't helpful. It just showed a long sequence of TEST UNIT
> READY commands, possibly the result of your device-status ioctls.
>
> It would be helpful to see which commands correspond to which ioctl calls.
> You could do this by making your program sleep for, say, 15 seconds
> between ioctls. Also have it send a message to the system log immediately
> before doing the ioctl and immediately afterward, and include in those
> messages an identification saying which instance is running. Be sure to
> set up your /etc/syslog.conf so that the kernel debug-level messages are
> captured to a file along with the messages from your program.
>
> > As I mentioned before my
> > cdrom(RW DVD) is connected to a hub which inturn is connected to the
> > system usb port connected to the root hub.
>
> The presence of an intermediate should make absolutely no difference. If
> you think it's important, try running your test with the drive plugged
> directly into the computer.
>
> Alan Stern
>
>
--
Regards,
Shiju
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel