aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rio.h
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2011-01-12 20:00:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 11:03:17 -0500
commita93192a5d245a262dc52fa426de5b20467308a77 (patch)
treef3231240286ef3d204375e047f6b2e1a8efbbcd2 /include/linux/rio.h
parente6d7202b66d99bf514c8e901db68386b1fcd6d56 (diff)
rapidio: use common destid storage for endpoints and switches
Change code to use one storage location common for switches and endpoints. This eliminates unnecessary device type checks during basic access operations. Logic that assigns destid to RIO devices stays unchanged - as before, switches use an associated destid because they do not have their own. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Thomas Moll <thomas.moll@sysgo.com> Cc: Micha Nelissen <micha@neli.hopto.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rio.h')
-rw-r--r--include/linux/rio.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/rio.h b/include/linux/rio.h
index 0bed941f9b13..f6e25b3a6967 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -98,7 +98,8 @@ union rio_pw_msg;
98 * @dev: Device model device 98 * @dev: Device model device
99 * @riores: RIO resources this device owns 99 * @riores: RIO resources this device owns
100 * @pwcback: port-write callback function for this device 100 * @pwcback: port-write callback function for this device
101 * @destid: Network destination ID 101 * @destid: Network destination ID (or associated destid for switch)
102 * @hopcount: Hopcount to this device
102 * @prev: Previous RIO device connected to the current one 103 * @prev: Previous RIO device connected to the current one
103 */ 104 */
104struct rio_dev { 105struct rio_dev {
@@ -126,6 +127,7 @@ struct rio_dev {
126 struct resource riores[RIO_MAX_DEV_RESOURCES]; 127 struct resource riores[RIO_MAX_DEV_RESOURCES];
127 int (*pwcback) (struct rio_dev *rdev, union rio_pw_msg *msg, int step); 128 int (*pwcback) (struct rio_dev *rdev, union rio_pw_msg *msg, int step);
128 u16 destid; 129 u16 destid;
130 u8 hopcount;
129 struct rio_dev *prev; 131 struct rio_dev *prev;
130}; 132};
131 133
@@ -229,8 +231,6 @@ struct rio_net {
229 * @node: Node in global list of switches 231 * @node: Node in global list of switches
230 * @rdev: Associated RIO device structure 232 * @rdev: Associated RIO device structure
231 * @switchid: Switch ID that is unique across a network 233 * @switchid: Switch ID that is unique across a network
232 * @hopcount: Hopcount to this switch
233 * @destid: Associated destid in the path
234 * @route_table: Copy of switch routing table 234 * @route_table: Copy of switch routing table
235 * @port_ok: Status of each port (one bit per port) - OK=1 or UNINIT=0 235 * @port_ok: Status of each port (one bit per port) - OK=1 or UNINIT=0
236 * @add_entry: Callback for switch-specific route add function 236 * @add_entry: Callback for switch-specific route add function
@@ -247,8 +247,6 @@ struct rio_switch {
247 struct list_head node; 247 struct list_head node;
248 struct rio_dev *rdev; 248 struct rio_dev *rdev;
249 u16 switchid; 249 u16 switchid;
250 u16 hopcount;
251 u16 destid;
252 u8 *route_table; 250 u8 *route_table;
253 u32 port_ok; 251 u32 port_ok;
254 int (*add_entry) (struct rio_mport * mport, u16 destid, u8 hopcount, 252 int (*add_entry) (struct rio_mport * mport, u16 destid, u8 hopcount,