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 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? The thing is that disabling disk events doesn't necessarily have anything to do with PM, so tying synchronization to PM subsystem is a bit unexpected. How about making it an atomic_t? That way, disabling can stack and synchronization dependency to PM is removed. Thanks. -- tejun -- 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