Subject: [RFC 2/3] mailbox: Introduce a new common API

From: [email-masked] (Suman Anna)
Date: Fri, 10 May 2013 11:41:42 -0500

Jassi,

>>> See how mailbox_startup() tries to balance mbox->ops->startup() and
>>> mailbox_fini() the mbox->ops->shutdown()  That's very fragile and the
>>> cause of imbalance between rpm enable/disable, unless your clients are
>>> buggy.
>>
>> Yeah, it is kinda messed up in the existing code, the startup defined
>> there is really for the controller and not the link, and that's why you
>> see all the ref-counting balancing logic. The rpm enable/disable being
>> called is on the controller's dev, not the link's dev - maybe that's
>> what confused you.
>>
> I wrote the driver for this api, so I do realize the rpm is on
> controller. Links are not devices anyways.
> 

You might be missing the minor detail. The pm_runtime_enable is in
startup, which is called for every link. So, I get an unbalanced
warning, when I have
	ipc_request_channel(client1);  -> link1.startup
	ipc_request_channel(clinet2);  -> link2.startup

Anyway, it is a non-issue since I understand the context and the fix.

regards
Suman