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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Stefan Richter
Date: Monday, September 29, 2008 - 10:17 am

Date: Wed, 27 Aug 2008 01:24:25 +0200 (CEST)
From: Stefan Richter <stefanr@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@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
-=====-==--- =--= ===-=
http://arcgraph.de/sr/

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[No subject], , (Wed Dec 31, 5:00 pm)
Dearest Beloved,, Mr. Kunio Uematsu, (Tue Mar 16, 12:52 pm)
Hope to hear from you soon., Christopher Green, (Tue Oct 26, 12:02 pm)
Kick off the Linux Driver Project (again, this time for real), Peter W. Morreale, (Thu Sep 27, 6:21 am)
Kick off the Linux Driver Project (again, this time for real), Peter W. Morreale, (Thu Sep 27, 6:55 am)
Kick off the Linux Driver Project (again, this time for real), Peter W. Morreale, (Thu Sep 27, 7:58 am)
Kick off the Linux Driver Project (again, this time for real), Tomasz Grzegurzko, (Thu Sep 27, 6:40 pm)
JOINT VENTURE., ming yang, (Sun Dec 23, 5:41 am)
broken mailing list, try 47..., Greg KH, (Fri Jan 11, 12:12 pm)
Re: broken mailing list, try 47..., Steven Le Roux, (Sat Jan 12, 11:10 am)
Re: broken mailing list, try 47..., stuart, (Sat Jan 12, 3:56 pm)
Mailing Lists, Tomasz Grzegurzko, (Fri Feb 8, 5:22 pm)
what is the status of this initiative ?, JoJo jojo, (Thu Mar 13, 12:20 am)
Re: what is the status of this initiative ?, Greg KH, (Thu Mar 13, 7:51 am)
Re: what is the status of this initiative ?, Javi Roman, (Thu Mar 13, 10:13 am)
Re: what is the status of this initiative ?, Davide Madrisan, (Thu Mar 13, 10:30 am)
Re: what is the status of this initiative ?, Greg KH, (Thu Mar 13, 10:36 am)
[patch 00/10] firedtv: a few more updates, Stefan Richter, (Mon Sep 29, 10:15 am)
[patch 03/10] ieee1394: inherit ud vendor_id from node ven ..., Stefan Richter, (Mon Sep 29, 10:17 am)
[patch 08/10] firedtv: remove unused struct members, Stefan Richter, (Mon Sep 29, 10:21 am)
Re: [patch 00/10] firedtv: a few more updates, Stefan Richter, (Mon Sep 29, 10:46 am)
Gettinng started with Linux drivers, Amit Uttamchandani, (Fri Apr 10, 3:04 pm)
Re: Gettinng started with Linux drivers, Stefan Richter, (Sat Apr 11, 3:00 am)
Re: Gettinng started with Linux drivers, Amit Uttamchandani, (Sun Apr 12, 6:08 pm)
Re: Gettinng started with Linux drivers, Stefan Richter, (Mon Apr 13, 12:39 am)
A tablet driver question, Steven Hunt, (Tue May 19, 9:49 pm)
Re: A tablet driver question, Greg KH, (Tue May 19, 10:12 pm)
Re: A tablet driver question, Steven Hunt, (Tue May 19, 11:16 pm)
Re: A tablet driver question, Jiri Slaby, (Wed May 20, 12:19 am)
Re: A tablet driver question, Steven Hunt, (Wed May 20, 8:58 am)
Re: A tablet driver question, Jiri Slaby, (Wed May 20, 9:24 am)
Re: A tablet driver question, Mohamed Ikbel Boulabiar, (Wed May 20, 9:50 am)
Re: A tablet driver question, Jiri Kosina, (Thu May 21, 1:33 am)