[patch 03/10] ieee1394: inherit ud vendor_id from node vendor_id

Stefan Richter stefanr at s5r6.in-berlin.de
Mon Sep 29 17:17:47 UTC 2008

Date: Wed, 27 Aug 2008 01:24:25 +0200 (CEST)
From: Stefan Richter <stefanr at s5r6.in-berlin.de>

While Module_Vendor_ID in the configuration ROM's root directory is
mandatory, there often aren't vendor IDs in unit directories.  This
affects the new firedtv driver which is meant to be auto-loaded and
matched only for vendor-specific devices.

We now always copy ne->vendor_id into ud->vendor_id before we scan a
unit directory (and fill in a possibly present vendor ID from there).
This way, the root directory's vendor ID is used as fallback in the
"uevent" environment for modprobe'ing per module alias when a node was
plugged in, and in the driver match routine when protocol drivers are
bound to unit directories.  It will however not be used as sysfs
attribute of a unit directory device.

Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
 drivers/ieee1394/nodemgr.c |    3 +++
 1 file changed, 3 insertions(+)

Index: linux/drivers/ieee1394/nodemgr.c
--- linux.orig/drivers/ieee1394/nodemgr.c
+++ linux/drivers/ieee1394/nodemgr.c
@@ -1010,6 +1010,9 @@ static struct unit_directory *nodemgr_pr
 	ud->ud_kv = ud_kv;
 	ud->id = (*id)++;
+	/* inherit vendor_id from root directory if none exists in unit dir */
+	ud->vendor_id = ne->vendor_id;
 	csr1212_for_each_dir_entry(ne->csr, kv, ud_kv, dentry) {
 		switch (kv->key.id) {
 		case CSR1212_KV_ID_VENDOR:

Stefan Richter
-=====-==--- =--= ===-=

More information about the devel mailing list