lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 21 Mar 2014 17:17:09 +0530
From:	Jagdish Gedia <>
To:	Alan Stern <>,
Cc:	"" <>,
	"" <>
Subject: Re: Check if usb device is suspended

I want to resume the usb device on some event, so i want to check if
it is suspended. I think by above method i can check if the device is
already suspended, but may be i will miss to resume the device if it
is suspending. Is there any way through which i can check if device is

On Thu, Mar 13, 2014 at 7:50 PM, Alan Stern <> wrote:
> On Thu, 13 Mar 2014, Jagdish Gedia wrote:
>> Hi,
>> I want to check in my driver if usb device is suspended or not?
> Why do you need to check?  Your driver gets told every time the device
> suspends and every time it resumes.  Therefore it should already know
> the answer.
>> currently i am doing it like
>> if(udev->state==USB_STATE_SUSPENDED)
>> Is this the proper way? Is this enough?
> Aside from the fact that the device's state may change immediately
> after you make this test, as Oliver pointed out, you also should
> realize that this test might not give the correct answer if the device
> is in the middle of suspending or resuming when the test runs.
> Alan Stern
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists