Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-22 Thread Aaron Lu
On 01/22/2013 05:13 PM, Oliver Neukum wrote: > On Tuesday 22 January 2013 10:25:31 Aaron Lu wrote: >> On Mon, Jan 21, 2013 at 03:56:43PM +0100, Oliver Neukum wrote: >>> On Monday 21 January 2013 17:11:04 Aaron Lu wrote: It is not easy for the OS to tell if the drive is being used or not s

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-22 Thread Oliver Neukum
On Tuesday 22 January 2013 10:25:31 Aaron Lu wrote: > On Mon, Jan 21, 2013 at 03:56:43PM +0100, Oliver Neukum wrote: > > On Monday 21 January 2013 17:11:04 Aaron Lu wrote: > > > It is not easy for the OS to tell if the drive is being used or not > > > sometimes > > > > > > Alan has reminded me it

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
On Mon, Jan 21, 2013 at 03:56:43PM +0100, Oliver Neukum wrote: > On Monday 21 January 2013 17:11:04 Aaron Lu wrote: > > It is not easy for the OS to tell if the drive is being used or not > > sometimes > > > > Alan has reminded me it is possible for an app to open the block device > > file(/dev/s

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Oliver Neukum
On Monday 21 January 2013 17:11:04 Aaron Lu wrote: > It is not easy for the OS to tell if the drive is being used or not > sometimes > > Alan has reminded me it is possible for an app to open the block device > file(/dev/sr0), issue a command(play audio), then close the device file. > From the OS

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
On 01/20/2013 02:46 AM, Alan Stern wrote: On Sat, 19 Jan 2013, Aaron Lu wrote: Then we indeed have a problem. But I didn't find any such app in Fedora's repo or by searching the internet. http://rpm.pbone.net/index.php3/stat/4/idpl/2392183/dir/redhat_5.x/com/cdp-0.33-10.i386.rpm.html Now tha

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
Hi Julian, On Mon, Jan 21, 2013 at 07:55:20PM +1100, Julian Calaby wrote: > Hi Aaron, > > On Mon, Jan 21, 2013 at 7:14 PM, Aaron Lu wrote: > > On Mon, Jan 21, 2013 at 02:31:50PM +1100, Julian Calaby wrote: > >> Hi Alan, > >> > >> On Sun, Jan 20, 2013 at 5:46 AM, Alan Stern > >> wrote: > >> > O

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Julian Calaby
Hi Aaron, On Mon, Jan 21, 2013 at 7:14 PM, Aaron Lu wrote: > On Mon, Jan 21, 2013 at 02:31:50PM +1100, Julian Calaby wrote: >> Hi Alan, >> >> On Sun, Jan 20, 2013 at 5:46 AM, Alan Stern >> wrote: >> > On Sat, 19 Jan 2013, Aaron Lu wrote: >> >> > closed. Do we want to drop support for that kind

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
On Mon, Jan 21, 2013 at 02:31:50PM +1100, Julian Calaby wrote: > Hi Alan, > > On Sun, Jan 20, 2013 at 5:46 AM, Alan Stern wrote: > > On Sat, 19 Jan 2013, Aaron Lu wrote: > >> > closed. Do we want to drop support for that kind of behavior? > >> > >> I don't think we should drop such support. > >>

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-21 Thread Aaron Lu
On Sat, Jan 19, 2013 at 01:46:15PM -0500, Alan Stern wrote: > On Sat, 19 Jan 2013, Aaron Lu wrote: > > > > What happens if you're not running a desktop graphical environment, so > > > gvfs doesn't mount the disc? Basically, I'm worried that the drive may > > > remain suspended after sr_open() ret

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-20 Thread Julian Calaby
Hi Alan, On Sun, Jan 20, 2013 at 5:46 AM, Alan Stern wrote: > On Sat, 19 Jan 2013, Aaron Lu wrote: >> > closed. Do we want to drop support for that kind of behavior? >> >> I don't think we should drop such support. >> And the safest way to avoid such break is we refine the suspend >> condition f

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-19 Thread Alan Stern
On Sat, 19 Jan 2013, Aaron Lu wrote: > > What happens if you're not running a desktop graphical environment, so > > gvfs doesn't mount the disc? Basically, I'm worried that the drive may > > remain suspended after sr_open() returns. > > Tried on my notebook with a normal ODD, using mplayer under

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-19 Thread Aaron Lu
On 01/18/2013 11:24 PM, Alan Stern wrote: On Fri, 18 Jan 2013, Aaron Lu wrote: Aaron, have you checked whether this patch works okay when you play a track on an audio-only CD on the computer? The block interface looks okay but I'm not sure about the cdrom_device interface. Just verified it w

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-18 Thread Alan Stern
On Fri, 18 Jan 2013, Aaron Lu wrote: > > Aaron, have you checked whether this patch works okay when you play a > > track on an audio-only CD on the computer? The block interface looks > > okay but I'm not sure about the cdrom_device interface. > > Just verified it works OK with the whole patchs

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-17 Thread Aaron Lu
On Wed, Jan 16, 2013 at 11:31:31AM -0500, Alan Stern wrote: > On Wed, 16 Jan 2013, James Bottomley wrote: > > > On Tue, 2013-01-15 at 17:20 +0800, Aaron Lu wrote: > > > This patch adds runtime pm support for sr. > > > > > > It did this by increasing the runtime usage_count of the device when: > >

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-16 Thread Alan Stern
On Wed, 16 Jan 2013, James Bottomley wrote: > On Tue, 2013-01-15 at 17:20 +0800, Aaron Lu wrote: > > This patch adds runtime pm support for sr. > > > > It did this by increasing the runtime usage_count of the device when: > > - its block device is opened; > > - the events checking is to run. > >

Re: [PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-16 Thread James Bottomley
On Tue, 2013-01-15 at 17:20 +0800, Aaron Lu wrote: > This patch adds runtime pm support for sr. > > It did this by increasing the runtime usage_count of the device when: > - its block device is opened; > - the events checking is to run. > > And decreasing the runtime usage_count of the device whe