Re: [PATCH v4] usb: dwc3: debugfs: Prevent any register access when devices

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

 





On 4/4/23 5:13 PM, Johan Hovold wrote:
On Tue, Apr 04, 2023 at 01:09:19PM +0200, Oliver Neukum wrote:
On 04.04.23 13:05, Johan Hovold wrote:

This is backwards. If you need the device to be active to access these
registers then you should resume it unconditionally instead of failing.

usually you would be right. But this is debugfs. It is intended to observe
the system in the state it is actually in. If by the act of observation you
wake up the device, you change the experiment.

I admittedly didn't look to closely at what this particular debugfs
interface is used for, but I generally do not agree with that reasoning.

The device is being used; by the driver and ultimately by a user telling
the driver to do something on their behalf. The fact that the user is
initiating an action through an interface which intended for debugging
should not matter (and the user always has the option to check the
runtime pm state before initiating the action if that matters at all) >
Johan

Hi Johan,

for instance, lets say user is trying to dump the value of link_state register through dwc3_link_state_show, wouldn't a pm_runtime_get would change the link_state? or I'm assuming it wrong?

Thanks,
-Udipto



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

  Powered by Linux