lkml.org 
[lkml]   [2012]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v3 7/7] [SCSI] sr: adds Zero-power ODD support
    From
    On Thu, Mar 29, 2012 at 9:50 PM, Aaron Lu <aaron.lu@amd.com> wrote:

    [.....]

    > For the ODD to be put into suspend state, the conditions should be:
    > 1 tray closed
    > 2 no media inside
    > I think we missed the condition 1 check now.
    >
    > And if we follow the two conditions, the events can be safely ignored.
    >
    > What do you think of blocking events for it when going to suspend and unblocking
    > when resume? This could erase the unnecessary calls of the check events function
    > when ODD is suspended.

    Good idea.
    Will try this.

    > But disk_(un)block_events are not exported and can't be used in sr
    > module. So I'm
    > not sure how to do this.

    We can simply export it.

    >
    > Another thing to consider is, user might want to eject the tray by
    > software like the
    > eject /dev/sr0 command or some UI mouse clicks against the cdrom icon. I'm still
    > thinking how to do this correctly.

    Assume eject /dev/sr0 is implemented as:

    int fd = open("/dev/sr0", ...)
    ioctl(fd, CDROMEJECT)

    We may need to resume ODD in the ioctl handler(scsi_cmd_ioctl).

    Thanks,
    Lin Ming


    \
     
     \ /
      Last update: 2012-04-05 08:03    [W:3.739 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site