* Changes for new I2O API
*/
+#define OSM_NAME "proc-osm"
+#define OSM_VERSION "1.316"
+#define OSM_DESCRIPTION "I2O ProcFS OSM"
+
#define I2O_MAX_MODULES 4
// FIXME!
#define FMT_U64_HEX "0x%08x%08x"
/* proc OSM driver struct */
static struct i2o_driver i2o_proc_driver = {
- .name = "proc-osm",
+ .name = OSM_NAME,
};
static int print_serial_number(struct seq_file *seq, u8 * serialno, int max_len)
case I2O_CLASS_FLOPPY_DEVICE:
idx = 12;
break;
- case I2O_CLASS_BUS_ADAPTER_PORT:
+ case I2O_CLASS_BUS_ADAPTER:
idx = 13;
break;
case I2O_CLASS_PEER_TRANSPORT_AGENT:
"CARDBUS"
};
-int i2o_seq_show_hrt(struct seq_file *seq, void *v)
+static int i2o_seq_show_hrt(struct seq_file *seq, void *v)
{
struct i2o_controller *c = (struct i2o_controller *)seq->private;
i2o_hrt *hrt = (i2o_hrt *) c->hrt.virt;
return 0;
}
-int i2o_seq_show_lct(struct seq_file *seq, void *v)
+static int i2o_seq_show_lct(struct seq_file *seq, void *v)
{
struct i2o_controller *c = (struct i2o_controller *)seq->private;
i2o_lct *lct = (i2o_lct *) c->lct;
seq_printf(seq, ", Unknown Device Type");
break;
- case I2O_CLASS_BUS_ADAPTER_PORT:
+ case I2O_CLASS_BUS_ADAPTER:
if (lct->lct_entry[i].sub_class < BUS_TABLE_SIZE)
seq_printf(seq, ", %s",
bus_ports[lct->lct_entry[i].
return 0;
}
-int i2o_seq_show_status(struct seq_file *seq, void *v)
+static int i2o_seq_show_status(struct seq_file *seq, void *v)
{
struct i2o_controller *c = (struct i2o_controller *)seq->private;
char prodstr[25];
return 0;
}
-int i2o_seq_show_hw(struct seq_file *seq, void *v)
+static int i2o_seq_show_hw(struct seq_file *seq, void *v)
{
struct i2o_controller *c = (struct i2o_controller *)seq->private;
static u32 work32[5];
}
/* Executive group 0003h - Executing DDM List (table) */
-int i2o_seq_show_ddm_table(struct seq_file *seq, void *v)
+static int i2o_seq_show_ddm_table(struct seq_file *seq, void *v)
{
struct i2o_controller *c = (struct i2o_controller *)seq->private;
int token;
}
/* Executive group 0004h - Driver Store (scalar) */
-int i2o_seq_show_driver_store(struct seq_file *seq, void *v)
+static int i2o_seq_show_driver_store(struct seq_file *seq, void *v)
{
struct i2o_controller *c = (struct i2o_controller *)seq->private;
u32 work32[8];
}
/* Executive group 0005h - Driver Store Table (table) */
-int i2o_seq_show_drivers_stored(struct seq_file *seq, void *v)
+static int i2o_seq_show_drivers_stored(struct seq_file *seq, void *v)
{
typedef struct _i2o_driver_store {
u16 stored_ddm_index;
seq_printf(seq, " ");
}
-#if 0
- if (c->i2oversion == 0x02)
- seq_printf(seq, "%-d", dst->module_state);
-#endif
-
seq_printf(seq, "%-#7x", dst->i2o_vendor_id);
seq_printf(seq, "%-#8x", dst->module_id);
seq_printf(seq, "%-29s", chtostr(dst->module_name_version, 28));
seq_printf(seq, "%8d ", dst->module_size);
seq_printf(seq, "%8d ", dst->mpb_size);
seq_printf(seq, "0x%04x", dst->module_flags);
-#if 0
- if (c->i2oversion == 0x02)
- seq_printf(seq, "%d", dst->notification_level);
-#endif
seq_printf(seq, "\n");
}
}
/* Generic group F000h - Params Descriptor (table) */
-int i2o_seq_show_groups(struct seq_file *seq, void *v)
+static int i2o_seq_show_groups(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
}
/* Generic group F001h - Physical Device Table (table) */
-int i2o_seq_show_phys_device(struct seq_file *seq, void *v)
+static int i2o_seq_show_phys_device(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
}
/* Generic group F002h - Claimed Table (table) */
-int i2o_seq_show_claimed(struct seq_file *seq, void *v)
+static int i2o_seq_show_claimed(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
}
/* Generic group F003h - User Table (table) */
-int i2o_seq_show_users(struct seq_file *seq, void *v)
+static int i2o_seq_show_users(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
}
/* Generic group F005h - Private message extensions (table) (optional) */
-int i2o_seq_show_priv_msgs(struct seq_file *seq, void *v)
+static int i2o_seq_show_priv_msgs(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
}
/* Generic group F006h - Authorized User Table (table) */
-int i2o_seq_show_authorized_users(struct seq_file *seq, void *v)
+static int i2o_seq_show_authorized_users(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
}
/* Generic group F100h - Device Identity (scalar) */
-int i2o_seq_show_dev_identity(struct seq_file *seq, void *v)
+static int i2o_seq_show_dev_identity(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
static u32 work32[128]; // allow for "stuff" + up to 256 byte (max) serial number
return 0;
}
-int i2o_seq_show_dev_name(struct seq_file *seq, void *v)
+static int i2o_seq_show_dev_name(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
}
/* Generic group F101h - DDM Identity (scalar) */
-int i2o_seq_show_ddm_identity(struct seq_file *seq, void *v)
+static int i2o_seq_show_ddm_identity(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
}
/* Generic group F102h - User Information (scalar) */
-int i2o_seq_show_uinfo(struct seq_file *seq, void *v)
+static int i2o_seq_show_uinfo(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
}
/* Generic group F103h - SGL Operating Limits (scalar) */
-int i2o_seq_show_sgl_limits(struct seq_file *seq, void *v)
+static int i2o_seq_show_sgl_limits(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
static u32 work32[12];
}
/* Generic group F200h - Sensors (scalar) */
-int i2o_seq_show_sensors(struct seq_file *seq, void *v)
+static int i2o_seq_show_sensors(struct seq_file *seq, void *v)
{
struct i2o_device *d = (struct i2o_device *)seq->private;
int token;
sprintf(buff, "%03x", dev->lct_data.tid);
- pr_debug("Adding device /proc/i2o/iop%d/%s\n", dev->iop->unit, buff);
+ osm_debug("adding device /proc/i2o/%s/%s\n", dev->iop->name, buff);
devdir = proc_mkdir(buff, dir);
if (!devdir) {
- printk(KERN_WARNING "i2o: Could not allocate procdir!\n");
+ osm_warn("Could not allocate procdir!\n");
return;
}
{
struct proc_dir_entry *iopdir;
struct i2o_device *dev;
- char buff[10];
- snprintf(buff, 10, "iop%d", c->unit);
+ osm_debug("adding IOP /proc/i2o/%s\n", c->name);
- pr_debug("Adding IOP /proc/i2o/%s\n", buff);
-
- iopdir = proc_mkdir(buff, dir);
+ iopdir = proc_mkdir(c->name, dir);
if (!iopdir)
return -1;
i2o_proc_subdir_remove(pe);
remove_proc_entry(pe->name, dir);
}
- pr_debug("Removing IOP /proc/i2o/iop%d\n", c->unit);
+ osm_debug("removing IOP /proc/i2o/%s\n", c->name);
pe = tmp;
}
}
{
int rc;
+ printk(KERN_INFO OSM_DESCRIPTION " v" OSM_VERSION "\n");
+
rc = i2o_driver_register(&i2o_proc_driver);
if (rc)
return rc;
};
MODULE_AUTHOR("Deepak Saxena");
-MODULE_DESCRIPTION("I2O procfs Handler");
MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION(OSM_DESCRIPTION);
+MODULE_VERSION(OSM_VERSION);
module_init(i2o_proc_init);
module_exit(i2o_proc_exit);