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 poll, as we will be notified when
> > + * user wants to use the ODD so there is no meaning to poll
> > + * it when it is powered off
> > + */
> > + dev->sdev->disable_disk_events = true;
>
> 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 check_events callback of the sr
block driver. The runtime PM callback is synchronized by PM core, in
that the two callbacks will never run concurrently. So I guess saying
synchronized by PM core is enough for this field?
This is what I've added in v12 for scsi_device structure:
+ bool disable_disk_events; /* disable poll for disk events, used in
+ * ATA layer, sychronized by PM core */
+
Or do you mean I should add a comment explaining the sync rule when it
is modifed, like in the above code?
Thanks,
Aaron
>
> Thanks.
>
> --
> tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html