- To: Aaron Lu <aaron.lu@xxxxxxx>
- Subject: Re: [PATCH v3 7/7] [SCSI] sr: adds Zero-power ODD support
- From: Lin Ming <ming.m.lin@xxxxxxxxx>
- Date: Thu, 5 Apr 2012 14:00:57 +0800
- Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>, Zhang Rui <rui.zhang@xxxxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx>, "Rafael J. Wysocki" <rjw@xxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-ide@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-acpi <linux-acpi@xxxxxxxxxxxxxxx>
- In-reply-to: <CAOzJMDRajsjHwCC66XB6Mv-Deuy-wD4GiZbeuEqCQePSLw-Xxw@mail.gmail.com>
- List-id: <linux-ide.vger.kernel.org>
On Thu, Mar 29, 2012 at 9:50 PM, Aaron Lu <aaron.lu@xxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Filesystems]
[Linux SCSI]
[Linux RAID]
[Git]
[Kernel Newbies]
[Linux Newbie]
[Share Photos]
[Security]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]