Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-14 Thread Aaron Lu
On Mon, Jan 14, 2013 at 01:01:47PM -0500, Jeff Garzik wrote: > On 01/11/2013 01:44 PM, Tejun Heo wrote: > >Hello, > > > >On Fri, Jan 11, 2013 at 11:16:26AM +0800, Aaron Lu wrote: > >>OK, will make it atomic in next version, thanks for the advice. > >> > >>Perhaps I can add two scsi helper functions

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-14 Thread Jeff Garzik
On 01/11/2013 01:44 PM, Tejun Heo wrote: Hello, On Fri, Jan 11, 2013 at 11:16:26AM +0800, Aaron Lu wrote: OK, will make it atomic in next version, thanks for the advice. Perhaps I can add two scsi helper functions in scsi_lib.c like: void sdev_disable_disk_events(struct scsi_device *sdev) {

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-11 Thread Tejun Heo
Hello, On Fri, Jan 11, 2013 at 11:16:26AM +0800, Aaron Lu wrote: > OK, will make it atomic in next version, thanks for the advice. > > Perhaps I can add two scsi helper functions in scsi_lib.c like: > > void sdev_disable_disk_events(struct scsi_device *sdev) > { > atomic_inc(&sdev->disk_ev

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Aaron Lu
Hi Tejun, On Thu, Jan 10, 2013 at 06:17:01PM -0800, Tejun Heo wrote: > Hello, Aaron. > > On Fri, Jan 11, 2013 at 10:11:10AM +0800, Aaron Lu wrote: > > > What's the synchronization rule for this field? > > > > I documented the rule in include/scsi/scsi_device.h. > > > > This field is modified in

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Tejun Heo
Hello, Aaron. On Fri, Jan 11, 2013 at 10:11:10AM +0800, Aaron Lu wrote: > > What's the synchronization rule for this field? > > I documented the rule in include/scsi/scsi_device.h. > > This field is modified in the ata port's runtime suspend and resume > callback, and is read accessed in the che

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Aaron Lu
On Thu, Jan 10, 2013 at 11:56:10AM -0800, Tejun Heo wrote: > On Thu, Jan 10, 2013 at 05:24:28PM +0800, Aaron Lu wrote: > > @@ -182,6 +182,13 @@ void zpodd_enable_run_wake(struct ata_device *dev) > > { > > struct zpodd *zpodd = dev->zpodd; > > > > + /* > > +* Silence the media change po

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Tejun Heo
On Thu, Jan 10, 2013 at 05:24:28PM +0800, Aaron Lu wrote: > @@ -182,6 +182,13 @@ void zpodd_enable_run_wake(struct ata_device *dev) > { > struct zpodd *zpodd = dev->zpodd; > > + /* > + * Silence the media change poll, as we will be notified when > + * user wants to use the OD