Re: driverfs bus_id, name (was: [PATCH] /proc/scsi/map)

From: David Brownell (david-b@pacbell.net)
Date: Tue Jun 25 2002 - 14:55:58 EST


>>- It'd be more appropriate for PCI devices to copy pci_device.name into
>> device.name and get the user-friendly names from the PCI device name
>> database (when available), and only fallback to those nasty strings
>> when the more user-friendly names aren't available.
>
>
> That is what happens with PCI devices. They're not appearing as meaningful
> names probably because CONFIG_PCI_NAMES isn't set. Whether or not that
> information belongs in the kernel is another debate.

ERm ... it wasn't on the systems I looked at. CONFIG_PCI_NAMES has
clearly been set, but the names were the user-unfriendly style. And
yet I know the kernel has them accessible, since they're presented
by the USB layer and by /proc/pci. But not in driverfs.

I now see some code (presumably yours) to set those two fields
to be identical, in pci_scan_device(), but the useful description
is instead set in pci_scan_slot(). Presumably this is a case of
various init paths in PCI not wholly agreeing with each other;
maybe pci_name_device() should set both name/description fields
instead of only the one. (Though ... why have two copies? :)

>>- Likewise it'd be more appropriate for USB devices to take the
>> descriptive strings from the devices, like "Philips USB Digital
>> Speaker System", than "USB device 0471:0104".
>
>
> Those are in the devices themselves, right? There is nothing stopping the
> USB people from doing that... ;)

Good, I was just sanity checking ... since the PCI names really
haven't worked to provide user-friendly names, and I couldn't tell
if that was intentional. I can provide a patch for USB easily.

You didn't respond to the question about changing the identifier
from "name" to be the more appropriate "description" ... is that
because you're still thinking (it'd cost to change) or because
you like using the (IMO ambiguous) identifier "name" there?

- Dave

-
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/



This archive was generated by hypermail 2b29 : Sun Jun 30 2002 - 22:00:10 EST