All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Seegers <thierry.seegers@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: Can I reboot a USB device within a driver's probe function?
Date: Mon, 14 Sep 2020 11:10:30 +0200	[thread overview]
Message-ID: <CAJcZPhT9h2u68Yu8kqKUd0Ef-QAL4YLyuqvm=+uRhP6V5TuMyg@mail.gmail.com> (raw)
In-Reply-To: <20200914081750.GA1832024@kroah.com>

> Then you need to fix your script, as it can be determined from the
> environment variables that are passed to it by udev.  Otherwise udev and
> scripts that trigger off of device discovery would not work very well :)

Aaaah! That's the puzzle piece I was missing! Yes, it makes sense now
and, oh lookie here the information I get as environment variables when
the script is invoked:

DEVNAME=/dev/bus/usb/002/002
DEVPATH=/devices/pci0000:00/0000:00:0c.0/usb2/2-1

I think I can work with that. :)

Thanks!

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2020-09-14  9:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13 16:17 Can I reboot a USB device within a driver's probe function? Thierry Seegers
2020-09-14  5:26 ` Greg KH
2020-09-14  8:03   ` Thierry Seegers
2020-09-14  8:17     ` Greg KH
2020-09-14  9:10       ` Thierry Seegers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJcZPhT9h2u68Yu8kqKUd0Ef-QAL4YLyuqvm=+uRhP6V5TuMyg@mail.gmail.com' \
    --to=thierry.seegers@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.