Re: file2alias - incorrect? aliases for USB

From: Greg KH (greg_at_kroah.com)
Date: 11/10/03

  • Next message: Oliver M. Bolzer: "Success with Promise FastTrak S150 TX4 (Re: [BK PATCHES] libata fixes)"
    Date:	Mon, 10 Nov 2003 01:37:03 -0800
    To: Andrey Borzenkov <arvidjaar@mail.ru>, rusty@rustcorp.com.au
    
    

    On Sun, Nov 09, 2003 at 09:55:19PM +0300, Andrey Borzenkov wrote:
    > file2aliases puts in alias device ID high and low numbers directly from match
    > specifications. E.g. for this match table entry:
    >
    > usb-storage 0x000f 0x04e6 0x0006 0x0100 0x0205 ...
    >
    > it generates alias
    >
    > alias usb:v04E6p0006dl0100dh0205dc*dsc*dp*ic*isc*ip* usb_storage
    >
    > unfortunately real device attribute does not include high and low - rather it
    > has single device ID (as part of PRODUCT) that should be contained in these
    > bounds:
    >
    > length += snprintf (scratch, buffer_size - length, "PRODUCT=%x/%x/%x",
    > usb_dev->descriptor.idVendor,
    > usb_dev->descriptor.idProduct,
    > usb_dev->descriptor.bcdDevice);
    >
    > or bcdDevice file in sysfs.
    >
    > This makes those aliases rather useless for the purpose of matching reported
    > device. It may take the same route as PCI and reject all device ID table
    > entries that have High != Low but there are quite a few of them available.
    >
    > I am rather confused because I do not see how this condition (low <= bcdDevice
    > <= high) can be expressed using simple glob pattern (unless we are going to
    > take glob library from Zsh :)

    I would suggest just ignoring the bcdDevice value, and loading all
    modules that match the idVendor and idProduct values, and let the kernel
    sort it out :)

    So for your example, you would just:
            modprobe usb:v04E6p0006dl*dh*dc*dsc*dp*ic*isc*ip*

    Hm, but that's no good either, because the visor driver trips over that
    with its entry:
            MODULE_ALIAS("usb:v*p*dl*dh*dc*dsc*dp*ic*isc*ip*");
    and the improper module is loaded. That needs to be fixed up...

    Rusty, any reason why the module alias code is turning an empty
    MODULE_PARAM structure, as is declared in drivers/usb/serial/visor.c
    with the line:
            { }, /* optional parameter entry */

    Into the above MODULE_ALIAS? I don't think that's correct.

    thanks,

    greg k-h
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Oliver M. Bolzer: "Success with Promise FastTrak S150 TX4 (Re: [BK PATCHES] libata fixes)"

    Relevant Pages

    • Re[2]: file2alias - incorrectQ=20?=aliases for USB
      ... >> or bcdDevice file in sysfs. ... any reason we put in alias fields that apparently won't be used ... any reason why the module alias code is turning an empty ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: ppc/ppc64 and x86 vsyscalls
      ... But you don't actually need the stub functions. ... > just need a symbol table entry which can be arranged via an alias to any ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: RCU issue with SELinux (Re: SELINUX performance issues)
      ... to control the audit-log floods. ... This adverse effect is only that audit-logs are printed twice. ... if an entry with the same ssid/tsid/tclass as new ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Hey it worked!! autocomplete: account passwords not saved
      ... to new profile is ... you should see an entry ... >Please do not send email directly to this alias. ... >> AutoComplete Does Not Save Username and Password ...
      (microsoft.public.windowsxp.security_admin)
    • Re: module-init-tools/udev and module auto-loading
      ... the device node and alias exists. ... You can check the mail to Rusty for more what I mean (hopefully it ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)