sr.c media_changed handling

From: Dan Dennedy (dan_at_dennedy.org)
Date: 01/07/05

  • Next message: B: "Re: [2.6 patch] net/ipv6/: misc cleanups"
    To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
    Date:	Thu, 06 Jan 2005 22:00:20 -0500
    
    

    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/


  • Next message: B: "Re: [2.6 patch] net/ipv6/: misc cleanups"

    Relevant Pages

    • Re: Somewhat OT: Data backup using Blu Ray
      ... The capacity was enormous. ... The disc based device may well happen, but it will be years off, and ... There is a reason that hard drives have come as far as they have. ... Even though optical is non contact, burned media is not actually ...
      (sci.electronics.design)
    • Re: wrong capacities in optical drives
      ... There is nothing to fix. ... When that CD/DVD disc is finalized, it is done, no more can be added, it ... Other burner software will burn a new session to a CD. ... A new session can be burned until the total capacity ...
      (microsoft.public.windowsxp.general)
    • Re: Cannot burn 3.7 GB .DMG file?
      ... I have a 3.7 GB DMG file. ... It recognizes it as a 4.7 GB disc, ... Not all DVD-R media are of equal capacity. ...
      (comp.sys.mac.system)
    • Re: 500GB SATA-2 hard disks
      ... they lined up the magnetic particles side by side instead of end to end ... which should at least double the capacity of the disc.. ... (the jargon is ...
      (uk.adverts.computer)
    • Re: DVD burning still have problems
      ... /dev/hdc: writing lead-out ... Then, ejecting the disc and trying again, it went through. ... "And every dream, every, is just a dream after all" ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)