aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2010-10-27 18:34:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:15 -0400
commitac38d7232dfa3c71b129bab3318ba327bbcf8405 (patch)
tree3cc63d0140a40fb72169b19c7320266ad8af08f8 /include
parentdd5648c9f53b5cbd9f948d752624400545f979fb (diff)
rapidio: modify sysfs initialization for switches
1. Change to create attribute "routes" only for switches. 2. Add a switch-specific callback to create/remove proprietary attributes. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Thomas Moll <thomas.moll@sysgo.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Kumar Gala <galak@kernel.crashing.org> 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')
-rw-r--r--include/linux/rio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/rio.h b/include/linux/rio.h
index 8d9e66dc7969..4fa5e3d2b117 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -218,6 +218,10 @@ struct rio_net {
218 unsigned char id; /* RIO network ID */ 218 unsigned char id; /* RIO network ID */
219}; 219};
220 220
221/* Definitions used by switch sysfs initialization callback */
222#define RIO_SW_SYSFS_CREATE 1 /* Create switch attributes */
223#define RIO_SW_SYSFS_REMOVE 0 /* Remove switch attributes */
224
221/** 225/**
222 * struct rio_switch - RIO switch info 226 * struct rio_switch - RIO switch info
223 * @node: Node in global list of switches 227 * @node: Node in global list of switches
@@ -234,6 +238,7 @@ struct rio_net {
234 * @get_domain: Callback for switch-specific domain get function 238 * @get_domain: Callback for switch-specific domain get function
235 * @em_init: Callback for switch-specific error management initialization function 239 * @em_init: Callback for switch-specific error management initialization function
236 * @em_handle: Callback for switch-specific error management handler function 240 * @em_handle: Callback for switch-specific error management handler function
241 * @sw_sysfs: Callback that initializes switch-specific sysfs attributes
237 * @nextdev: Array of per-port pointers to the next attached device 242 * @nextdev: Array of per-port pointers to the next attached device
238 */ 243 */
239struct rio_switch { 244struct rio_switch {
@@ -256,6 +261,7 @@ struct rio_switch {
256 u8 *sw_domain); 261 u8 *sw_domain);
257 int (*em_init) (struct rio_dev *dev); 262 int (*em_init) (struct rio_dev *dev);
258 int (*em_handle) (struct rio_dev *dev, u8 swport); 263 int (*em_handle) (struct rio_dev *dev, u8 swport);
264 int (*sw_sysfs) (struct rio_dev *dev, int create);
259 struct rio_dev *nextdev[0]; 265 struct rio_dev *nextdev[0];
260}; 266};
261 267