On Tuesday 11 September 2012 20:31:17 Aaron Lu wrote: > OK, I think I got your meaning. > > For a simpler scenario: > 1 User application did an ioctl to lock the door of the ODD when there > is no medium inside(but why? :-); > 2 The ODD is runtime suspended; > 3 The ODD is runtime powered off; > 4 User presses the eject button, and the door is ejected in sr_resume. > > Condition 1 is a must for this to happen, as if there is medium inside, > the ODD will never be powered off; or if the underlying block device is > opened by some process, it will not enter runtime suspend state. > > Looks like I need to record if the door is locked in scsi_cd structure > so that I did not mistakenly eject the door. Does this sound OK? Yes, that will do. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html