linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Subject: Re: How to set USB_PORT_QUIRK_OLD_SCHEME on an usb-port ?
Date: Fri, 2 Oct 2020 22:12:33 +0200	[thread overview]
Message-ID: <c021bb2b-47d9-c3b2-807b-342bdb71064c@redhat.com> (raw)
In-Reply-To: <db64c49e-6e1a-c12d-7340-e88edb06c30e@redhat.com>

Hi,

On 10/2/20 10:10 PM, Hans de Goede wrote:

<snip>

>>> Still a bit slower then the old probe method, but much better then the
>>> new probe method with the default initial_descriptor_timeout.
>>
>> Yeah, okay, it's good to see that the patch helps.  But I'm doubtful
>> that the change it makes will become part of the standard (i.e., not
>> for embedded systems) kernel.
>>
>> I still think the udev approach will be best.  That will require adding
>> various *_uevent_* calls in usb_hub_create_port_device, and adding a
>> .uevent member to usb_port_device_type.
> 
> So I tried this and it does not work, the problem is that
> dev_uevent_filter() from drivers/base/core.c
> filters out uevents for anything which is not either a device
> on a bus or a class device:
> 
> static int dev_uevent_filter(struct kset *kset, struct kobject *kobj)
> {
>          struct kobj_type *ktype = get_ktype(kobj);
> 
>          if (ktype == &device_ktype) {
>                  struct device *dev = kobj_to_dev(kobj);
>                  if (dev->bus)
>                          return 1;
>                  if (dev->class)
>                          return 1;
>          }
>          return 0;
> }

p.s.

I guess that this means that it is best to just learn to live
with the somewhat long enumeration time with the new scheme in
this somewhat specific case, that is fine with me.

Regards,

Hans


  reply	other threads:[~2020-10-02 20:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-05 11:37 How to set USB_PORT_QUIRK_OLD_SCHEME on an usb-port ? Hans de Goede
2020-09-06  2:22 ` Alan Stern
2020-09-10 13:58   ` Hans de Goede
2020-09-10 15:41     ` Alan Stern
2020-09-17 17:27       ` Hans de Goede
2020-09-17 20:09         ` Alan Stern
2020-10-02 20:10           ` Hans de Goede
2020-10-02 20:12             ` Hans de Goede [this message]
2020-10-03  1:26               ` Alan Stern
2020-10-03  7:52             ` Greg Kroah-Hartman
2020-10-03 11:09               ` Hans de Goede

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=c021bb2b-47d9-c3b2-807b-342bdb71064c@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).