Re: permissible range of pm counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Jun 2009, Oliver Neukum wrote:

> Hi Alan,
> 
> are pm counters allowed to go negative?

Interface usage counters are; usbcore doesn't care what values they
hold -- drivers can do whatever they want.  The core only checks for
> 0 vs. <= 0.

Device usage counters are allowed to go negative but there's a WARN_ON 
if they do.

In Rafael's new runtime PM framework, things are different.  The final 
version hasn't been decided on yet.  However since the counter values 
will persist beyond driver unbinding, the increments and decrements 
need to remain balanced.  Thus the values should never become negative.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux