lkml.org 
[lkml]   [2005]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectsr.c media_changed handling
From
Date
I am working with a PowerFile DVD jukebox (firewire/sbp2) on kernel
2.6.10, and it works quite well except for media change handling. The
problem is sr limits reads of subsequent discs to the capacity of the
first disc opened. If I remove the line "if (cd->needs_sector_size)"
from sr_open() and make it always get the capacity when a disc is
opened, then it resolves my issues. Alternatively, I can send a
CDROM_MEDIA_CHANGED ioctl when no disc is loaded to force a Read
Capacity request when the next disc is mounted and opened. I have
another, non-changer sbp2 disc drive that does not exhibit this problem.
Therefore, I have two questions:

1) How does a SCSI device that reports media-changed capable
(CDC_MEDIA_CHANGED) actually send that signal or flag? Does it come up
through block device operation media_changed, or is that just a means to
query the driver's current status?

2) I suspect there are other devices that have a similar flaw. What is
the harm in sending an inexpensive Read Capacity command each time a
disc is opened? IOW, removing that line from sr.c in bitkeeper. It seems
it would improve compatibility for less well-behaved devices with
little-to-no impact on the majority.

p.s. please include my address in the reply; I am not subscribed.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.017 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site