30 #define OSM_NAME "proc-osm"
31 #define OSM_VERSION "1.316"
32 #define OSM_DESCRIPTION "I2O ProcFS OSM"
34 #define I2O_MAX_MODULES 4
36 #define FMT_U64_HEX "0x%08x%08x"
37 #define U64_VAL(pu64) *((u32*)(pu64)+1), *((u32*)(pu64))
39 #include <linux/types.h>
40 #include <linux/kernel.h>
41 #include <linux/pci.h>
43 #include <linux/slab.h>
47 #include <linux/module.h>
48 #include <linux/errno.h>
53 #include <asm/uaccess.h>
54 #include <asm/byteorder.h>
71 static int print_serial_number(
struct seq_file *seq,
u8 * serialno,
int max_len)
85 switch (serialno[0]) {
88 for (i = 0; i < serialno[1]; i++) {
94 if (serialno[1] <
' ') {
97 (max_len < serialno[1]) ? max_len : serialno[1];
98 serialno[1 + max_len] =
'\0';
104 for (i = 0; i < serialno[1]; i++) {
111 seq_printf(seq,
"UNICODE Format. Can't Display\n");
115 seq_printf(seq,
"LAN-48 MAC address @ %pM", &serialno[2]);
127 "LAN-64 MAC address @ [?:%02X:%02X:?] %pM",
128 serialno[8], serialno[9], &serialno[2]);
133 "DDM: Tid=%03Xh, Rsvd=%04Xh, OrgId=%04Xh",
134 *(
u16 *) & serialno[2],
135 *(
u16 *) & serialno[4], *(
u16 *) & serialno[6]);
142 "IEEE NodeName(hi,lo)=(%08Xh:%08Xh), PortName(hi,lo)=(%08Xh:%08Xh)\n",
143 *(
u32 *) & serialno[2],
144 *(
u32 *) & serialno[6],
145 *(
u32 *) & serialno[10], *(
u32 *) & serialno[14]);
151 seq_printf(seq,
"Unknown data format (0x%02x)", serialno[0]);
164 static const char *i2o_get_class_name(
int class)
167 static char *i2o_class_name[] = {
169 "Device Driver Module",
174 "Fibre Channel Port",
175 "Fibre Channel Device",
181 "Secondary Bus Port",
182 "Peer Transport Agent",
187 switch (
class & 0xfff) {
238 return i2o_class_name[
idx];
241 #define SCSI_TABLE_SIZE 13
242 static char *scsi_devices[] = {
243 "Direct-Access Read/Write",
244 "Sequential-Access Storage",
250 "Optical Memory Device",
251 "Medium Changer Device",
252 "Communications Device",
253 "Graphics Art Pre-Press Device",
254 "Graphics Art Pre-Press Device",
255 "Array Controller Device"
258 static char *chtostr(
char *
tmp,
u8 *chars,
int n)
261 return strncat(tmp, (
char *)chars, n);
267 switch (block_status) {
269 return seq_printf(seq,
"Timeout reading group %s.\n", group);
271 return seq_printf(seq,
"No free memory to read the table.\n");
273 return seq_printf(seq,
"Group %s not supported.\n", group);
276 "Error reading group %s. BlockStatus 0x%02X\n",
277 group, -block_status);
281 static char *bus_strings[] = {
291 static int i2o_seq_show_hrt(
struct seq_file *seq,
void *
v)
298 if (
hrt->hrt_version) {
300 "HRT table for controller is too new a version.\n");
304 seq_printf(seq,
"HRT has %d entries of %d bytes each.\n",
305 hrt->num_entries,
hrt->entry_len << 2);
307 for (i = 0; i <
hrt->num_entries; i++) {
310 hrt->hrt_entry[i].adapter_id);
312 hrt->hrt_entry[i].parent_tid);
314 if (
hrt->hrt_entry[i].bus_type != 0x80) {
315 bus =
hrt->hrt_entry[
i].bus_type;
322 hrt->hrt_entry[i].bus.local_bus.
325 hrt->hrt_entry[i].bus.local_bus.
326 LbBaseMemoryAddress);
331 hrt->hrt_entry[i].bus.isa_bus.
334 hrt->hrt_entry[i].bus.isa_bus.
335 IsaBaseMemoryAddress);
337 hrt->hrt_entry[i].bus.isa_bus.CSN);
342 hrt->hrt_entry[i].bus.eisa_bus.
345 hrt->hrt_entry[i].bus.eisa_bus.
346 EisaBaseMemoryAddress);
348 hrt->hrt_entry[i].bus.eisa_bus.
354 hrt->hrt_entry[i].bus.pci_bus.
357 hrt->hrt_entry[i].bus.pci_bus.
360 hrt->hrt_entry[i].bus.pci_bus.
363 hrt->hrt_entry[i].bus.pci_bus.
366 hrt->hrt_entry[i].bus.pci_bus.
380 static int i2o_seq_show_lct(
struct seq_file *seq,
void *v)
387 #define BUS_TABLE_SIZE 3
388 static char *bus_ports[] = {
396 seq_printf(seq,
"LCT contains %d %s\n", entries,
397 entries == 1 ?
"entry" :
"entries");
403 for (i = 0; i <
entries; i++) {
415 seq_printf(seq,
", Direct-Access Read/Write");
460 seq_printf(seq,
", Unknown Sub-Class (0x%02x)",
492 seq_printf(seq,
" Identity Tag : 0x%x%x%x%x%x%x%x%x\n",
501 seq_printf(seq,
" Change Indicator : %0#10x\n",
503 seq_printf(seq,
" Event Capab Mask : %0#10x\n",
510 static int i2o_seq_show_status(
struct seq_file *seq,
void *v)
519 seq_printf(seq,
"Organization ID : %0#6x\n",
sb->org_id);
553 seq_printf(seq,
"Host Unit ID : %0#6x\n",
sb->host_unit_id);
554 seq_printf(seq,
"Segment Number : %0#5x\n",
sb->segment_number);
572 switch (
sb->iop_state) {
607 switch (
sb->msg_type) {
618 seq_printf(seq,
"Memory mapped and remote\n");
624 seq_printf(seq,
"Inbound Frame Size : %d bytes\n",
625 sb->inbound_frame_size << 2);
627 sb->max_inbound_frames);
628 seq_printf(seq,
"Current Inbound Frames : %d\n",
629 sb->cur_inbound_frames);
631 sb->max_outbound_frames);
634 memcpy(prodstr,
sb->product_id, 24);
636 seq_printf(seq,
"Product ID : %s\n", prodstr);
637 seq_printf(seq,
"Expected LCT Size : %d bytes\n",
638 sb->expected_lct_size);
641 seq_printf(seq,
" Context Field Size Support : ");
642 switch (
sb->iop_capabilities & 0x0000003) {
644 seq_printf(seq,
"Supports only 32-bit context fields\n");
647 seq_printf(seq,
"Supports only 64-bit context fields\n");
650 seq_printf(seq,
"Supports 32-bit and 64-bit context fields, "
651 "but not concurrently\n");
654 seq_printf(seq,
"Supports 32-bit and 64-bit context fields "
660 seq_printf(seq,
" Current Context Field Size : ");
661 switch (
sb->iop_capabilities & 0x0000000C) {
666 seq_printf(seq,
"Supports only 32-bit context fields\n");
669 seq_printf(seq,
"Supports only 64-bit context fields\n");
672 seq_printf(seq,
"Supports both 32-bit or 64-bit context fields "
678 seq_printf(seq,
" Inbound Peer Support : %s\n",
680 iop_capabilities & 0x00000010) ?
"Supported" :
682 seq_printf(seq,
" Outbound Peer Support : %s\n",
684 iop_capabilities & 0x00000020) ?
"Supported" :
686 seq_printf(seq,
" Peer to Peer Support : %s\n",
688 iop_capabilities & 0x00000040) ?
"Supported" :
691 seq_printf(seq,
"Desired private memory size : %d kB\n",
692 sb->desired_mem_size >> 10);
693 seq_printf(seq,
"Allocated private memory size : %d kB\n",
694 sb->current_mem_size >> 10);
695 seq_printf(seq,
"Private memory base address : %0#10x\n",
696 sb->current_mem_base);
697 seq_printf(seq,
"Desired private I/O size : %d kB\n",
698 sb->desired_io_size >> 10);
699 seq_printf(seq,
"Allocated private I/O size : %d kB\n",
700 sb->current_io_size >> 10);
701 seq_printf(seq,
"Private I/O base address : %0#10x\n",
702 sb->current_io_base);
707 static int i2o_seq_show_hw(
struct seq_file *seq,
void *v)
710 static u32 work32[5];
711 static u8 *work8 = (
u8 *) work32;
712 static u16 *work16 = (
u16 *) work32;
717 "Intel 80960 series",
719 "Motorola 68000 series",
731 i2o_report_query_status(seq, token,
"0x0000 IOP Hardware");
735 seq_printf(seq,
"I2O Vendor ID : %0#6x\n", work16[0]);
736 seq_printf(seq,
"Product ID : %0#6x\n", work16[1]);
741 seq_printf(seq,
"%s\n", cpu_table[work8[16]]);
744 seq_printf(seq,
"RAM : %dkB\n", work32[1] >> 10);
745 seq_printf(seq,
"Non-Volatile Mem : %dkB\n", work32[2] >> 10);
748 seq_printf(seq,
"Capabilities : 0x%08x\n", hwcap);
750 (hwcap & 0x00000001) ?
"+" :
"-");
752 (hwcap & 0x00000002) ?
"+" :
"-");
753 seq_printf(seq,
" [%s] Supports downloading DDMs\n",
754 (hwcap & 0x00000004) ?
"+" :
"-");
755 seq_printf(seq,
" [%s] Supports installing DDMs\n",
756 (hwcap & 0x00000008) ?
"+" :
"-");
758 (hwcap & 0x00000010) ?
"+" :
"-");
764 static int i2o_seq_show_ddm_table(
struct seq_file *seq,
void *v)
770 typedef struct _i2o_exec_execute_ddm_table {
776 u8 module_name_version[28];
779 } i2o_exec_execute_ddm_table;
792 i2o_exec_execute_ddm_table ddm_table;
803 i2o_report_query_status(seq, token,
804 "0x0003 Executing DDM List");
809 "Tid Module_type Vendor Mod_id Module_name Vrs Data_size Code_size\n");
810 ddm_table =
result->ddm_table[0];
812 for (i = 0; i <
result->row_count; ddm_table =
result->ddm_table[++
i]) {
813 seq_printf(seq,
"0x%03x ", ddm_table.ddm_tid & 0xFFF);
815 switch (ddm_table.module_type) {
826 seq_printf(seq,
"%-#7x", ddm_table.i2o_vendor_id);
827 seq_printf(seq,
"%-#8x", ddm_table.module_id);
829 chtostr(tmp, ddm_table.module_name_version, 28));
841 static int i2o_seq_show_driver_store(
struct seq_file *seq,
void *v)
850 i2o_report_query_status(seq, token,
"0x0004 Driver Store");
855 "Module count : %d\n"
856 "Current space : %d kB\n"
857 "Free space : %d kB\n",
858 work32[0], work32[1], work32[2] >> 10, work32[3] >> 10);
864 static int i2o_seq_show_drivers_stored(
struct seq_file *seq,
void *v)
866 typedef struct _i2o_driver_store {
867 u16 stored_ddm_index;
872 u8 module_name_version[28];
877 } i2o_driver_store_table;
892 } i2o_driver_result_table;
894 i2o_driver_result_table *
result;
895 i2o_driver_store_table *
dst;
903 NULL, 0, result,
sizeof(*result));
906 i2o_report_query_status(seq, token,
907 "0x0005 DRIVER STORE TABLE");
913 "# Module_type Vendor Mod_id Module_name Vrs"
914 "Date Mod_size Par_size Flags\n");
915 for (i = 0, dst = &result->dst[0]; i < result->row_count;
916 dst = &result->dst[++i]) {
917 seq_printf(seq,
"%-3d", dst->stored_ddm_index);
918 switch (dst->module_type) {
932 chtostr(tmp, dst->module_name_version, 28));
933 seq_printf(seq,
"%-9s", chtostr(tmp, dst->date, 8));
945 static int i2o_seq_show_groups(
struct seq_file *seq,
void *v)
952 typedef struct _i2o_group_info {
968 i2o_group_info group[256];
976 result,
sizeof(*result));
979 i2o_report_query_status(seq, token,
"0xF000 Params Descriptor");
984 "# Group FieldCount RowCount Type Add Del Clear\n");
986 for (i = 0; i < result->row_count; i++) {
988 seq_printf(seq,
"0x%04X ", result->group[i].group_number);
989 seq_printf(seq,
"%10d ", result->group[i].field_count);
990 seq_printf(seq,
"%8d ", result->group[i].row_count);
992 properties = result->group[
i].properties;
993 if (properties & 0x1)
997 if (properties & 0x2)
1001 if (properties & 0x4)
1005 if (properties & 0x8)
1013 if (result->more_flag)
1021 static int i2o_seq_show_phys_device(
struct seq_file *seq,
void *v)
1039 &result,
sizeof(result));
1042 i2o_report_query_status(seq, token,
1043 "0xF001 Physical Device Table");
1047 if (result.row_count)
1050 for (i = 0; i < result.row_count; i++) {
1052 seq_printf(seq,
"%#7x\n", result.adapter_id[i]);
1055 if (result.more_flag)
1062 static int i2o_seq_show_claimed(
struct seq_file *seq,
void *v)
1076 u16 claimed_tid[64];
1080 &result,
sizeof(result));
1083 i2o_report_query_status(seq, token,
"0xF002 Claimed Table");
1087 if (result.row_count)
1090 for (i = 0; i < result.row_count; i++) {
1092 seq_printf(seq,
"%#7x\n", result.claimed_tid[i]);
1095 if (result.more_flag)
1102 static int i2o_seq_show_users(
struct seq_file *seq,
void *v)
1108 typedef struct _i2o_user_table {
1124 i2o_user_table
user[64];
1132 result,
sizeof(*result));
1135 i2o_report_query_status(seq, token,
"0xF003 User Table");
1139 seq_printf(seq,
"# Instance UserTid ClaimType\n");
1141 for (i = 0; i < result->row_count; i++) {
1143 seq_printf(seq,
"%#8x ", result->user[i].instance);
1144 seq_printf(seq,
"%#7x ", result->user[i].user_tid);
1145 seq_printf(seq,
"%#9x\n", result->user[i].claim_type);
1148 if (result->more_flag)
1156 static int i2o_seq_show_priv_msgs(
struct seq_file *seq,
void *v)
1162 typedef struct _i2o_private {
1164 u16 organization_id;
1165 u16 x_function_code;
1180 &result,
sizeof(result));
1183 i2o_report_query_status(seq, token,
1184 "0xF005 Private Message Extensions (optional)");
1188 seq_printf(seq,
"Instance# OrgId FunctionCode\n");
1190 for (i = 0; i < result.row_count; i++) {
1191 seq_printf(seq,
"%0#9x ", result.extension[i].ext_instance);
1192 seq_printf(seq,
"%0#6x ", result.extension[i].organization_id);
1193 seq_printf(seq,
"%0#6x", result.extension[i].x_function_code);
1198 if (result.more_flag)
1205 static int i2o_seq_show_authorized_users(
struct seq_file *seq,
void *v)
1219 u32 alternate_tid[64];
1223 &result,
sizeof(result));
1226 i2o_report_query_status(seq, token,
1227 "0xF006 Autohorized User Table");
1231 if (result.row_count)
1234 for (i = 0; i < result.row_count; i++) {
1236 seq_printf(seq,
"%#7x ", result.alternate_tid[i]);
1239 if (result.more_flag)
1246 static int i2o_seq_show_dev_identity(
struct seq_file *seq,
void *v)
1249 static u32 work32[128];
1251 static u16 *work16 = (
u16 *) work32;
1258 i2o_report_query_status(seq, token,
"0xF100 Device Identity");
1262 seq_printf(seq,
"Device Class : %s\n", i2o_get_class_name(work16[0]));
1263 seq_printf(seq,
"Owner TID : %0#5x\n", work16[2]);
1264 seq_printf(seq,
"Parent TID : %0#5x\n", work16[3]);
1266 chtostr(tmp, (
u8 *) (work32 + 2), 16));
1268 chtostr(tmp, (
u8 *) (work32 + 6), 16));
1270 chtostr(tmp, (
u8 *) (work32 + 10), 16));
1272 chtostr(tmp, (
u8 *) (work32 + 14), 8));
1275 print_serial_number(seq, (
u8 *) (work32 + 16),
1279 sizeof(work32) - (16 *
sizeof(
u32)) - 2);
1285 static int i2o_seq_show_dev_name(
struct seq_file *seq,
void *v)
1295 static int i2o_seq_show_ddm_identity(
struct seq_file *seq,
void *v)
1314 i2o_report_query_status(seq, token,
"0xF101 DDM Identity");
1318 seq_printf(seq,
"Registering DDM TID : 0x%03x\n", result.ddm_tid);
1320 chtostr(tmp, result.module_name, 24));
1322 chtostr(tmp, result.module_rev, 8));
1325 print_serial_number(seq, result.serial_number,
sizeof(result) - 36);
1334 static int i2o_seq_show_uinfo(
struct seq_file *seq,
void *v)
1341 u8 service_name[64];
1342 u8 physical_location[64];
1343 u8 instance_number[4];
1351 i2o_report_query_status(seq, token,
"0xF102 User Information");
1356 chtostr(tmp, result.device_name, 64));
1358 chtostr(tmp, result.service_name, 64));
1360 chtostr(tmp, result.physical_location, 64));
1362 chtostr(tmp, result.instance_number, 4));
1368 static int i2o_seq_show_sgl_limits(
struct seq_file *seq,
void *v)
1371 static u32 work32[12];
1372 static u16 *work16 = (
u16 *) work32;
1373 static u8 *work8 = (
u8 *) work32;
1379 i2o_report_query_status(seq, token,
1380 "0xF103 SGL Operating Limits");
1384 seq_printf(seq,
"SGL chain size : %d\n", work32[0]);
1385 seq_printf(seq,
"Max SGL chain size : %d\n", work32[1]);
1386 seq_printf(seq,
"SGL chain size target : %d\n", work32[2]);
1387 seq_printf(seq,
"SGL frag count : %d\n", work16[6]);
1388 seq_printf(seq,
"Max SGL frag count : %d\n", work16[7]);
1389 seq_printf(seq,
"SGL frag count target : %d\n", work16[8]);
1395 seq_printf(seq,
"SGL data alignment : %d\n", work16[8]);
1396 seq_printf(seq,
"SGL addr limit : %d\n", work8[20]);
1397 seq_printf(seq,
"SGL addr sizes supported : ");
1398 if (work8[21] & 0x01)
1400 if (work8[21] & 0x02)
1402 if (work8[21] & 0x04)
1404 if (work8[21] & 0x08)
1415 static int i2o_seq_show_sensors(
struct seq_file *seq,
void *v)
1421 u16 sensor_instance;
1423 u16 component_instance;
1426 u8 scaling_exponent;
1428 u32 minimum_reading;
1429 u32 low2lowcat_treshold;
1430 u32 lowcat2low_treshold;
1431 u32 lowwarn2low_treshold;
1432 u32 low2lowwarn_treshold;
1433 u32 norm2lowwarn_treshold;
1434 u32 lowwarn2norm_treshold;
1435 u32 nominal_reading;
1436 u32 hiwarn2norm_treshold;
1437 u32 norm2hiwarn_treshold;
1438 u32 high2hiwarn_treshold;
1439 u32 hiwarn2high_treshold;
1440 u32 hicat2high_treshold;
1441 u32 hi2hicat_treshold;
1442 u32 maximum_reading;
1450 i2o_report_query_status(seq, token,
1451 "0xF200 Sensors (optional)");
1455 seq_printf(seq,
"Sensor instance : %d\n", result.sensor_instance);
1457 seq_printf(seq,
"Component : %d = ", result.component);
1458 switch (result.component) {
1484 result.component_instance);
1486 result.sensor_class ?
"Analog" :
"Digital");
1488 seq_printf(seq,
"Sensor type : %d = ", result.sensor_type);
1489 switch (result.sensor_type) {
1517 result.scaling_exponent);
1518 seq_printf(seq,
"Actual reading : %d\n", result.actual_reading);
1519 seq_printf(seq,
"Minimum reading : %d\n", result.minimum_reading);
1520 seq_printf(seq,
"Low2LowCat treshold : %d\n",
1521 result.low2lowcat_treshold);
1522 seq_printf(seq,
"LowCat2Low treshold : %d\n",
1523 result.lowcat2low_treshold);
1524 seq_printf(seq,
"LowWarn2Low treshold : %d\n",
1525 result.lowwarn2low_treshold);
1526 seq_printf(seq,
"Low2LowWarn treshold : %d\n",
1527 result.low2lowwarn_treshold);
1528 seq_printf(seq,
"Norm2LowWarn treshold : %d\n",
1529 result.norm2lowwarn_treshold);
1530 seq_printf(seq,
"LowWarn2Norm treshold : %d\n",
1531 result.lowwarn2norm_treshold);
1532 seq_printf(seq,
"Nominal reading : %d\n", result.nominal_reading);
1533 seq_printf(seq,
"HiWarn2Norm treshold : %d\n",
1534 result.hiwarn2norm_treshold);
1535 seq_printf(seq,
"Norm2HiWarn treshold : %d\n",
1536 result.norm2hiwarn_treshold);
1537 seq_printf(seq,
"High2HiWarn treshold : %d\n",
1538 result.high2hiwarn_treshold);
1539 seq_printf(seq,
"HiWarn2High treshold : %d\n",
1540 result.hiwarn2high_treshold);
1541 seq_printf(seq,
"HiCat2High treshold : %d\n",
1542 result.hicat2high_treshold);
1543 seq_printf(seq,
"High2HiCat treshold : %d\n",
1544 result.hi2hicat_treshold);
1545 seq_printf(seq,
"Maximum reading : %d\n", result.maximum_reading);
1547 seq_printf(seq,
"Sensor state : %d = ", result.sensor_state);
1548 switch (result.sensor_state) {
1559 seq_printf(seq,
"Low Catastrophic (LoCat)\n");
1574 seq_printf(seq,
"High Catastrophic (HiCat)\n");
1578 seq_printf(seq,
"Event_enable : 0x%02X\n", result.event_enable);
1579 seq_printf(seq,
" [%s] Operational state change. \n",
1580 (result.event_enable & 0x01) ?
"+" :
"-");
1581 seq_printf(seq,
" [%s] Low catastrophic. \n",
1582 (result.event_enable & 0x02) ?
"+" :
"-");
1584 (result.event_enable & 0x04) ?
"+" :
"-");
1586 (result.event_enable & 0x08) ?
"+" :
"-");
1588 " [%s] Change back to normal from out of range state. \n",
1589 (result.event_enable & 0x10) ?
"+" :
"-");
1591 (result.event_enable & 0x20) ?
"+" :
"-");
1593 (result.event_enable & 0x40) ?
"+" :
"-");
1594 seq_printf(seq,
" [%s] High catastrophic. \n",
1595 (result.event_enable & 0x80) ?
"+" :
"-");
1605 static int i2o_seq_open_lct(
struct inode *inode,
struct file *file)
1610 static int i2o_seq_open_status(
struct inode *inode,
struct file *file)
1615 static int i2o_seq_open_hw(
struct inode *inode,
struct file *file)
1620 static int i2o_seq_open_ddm_table(
struct inode *inode,
struct file *file)
1625 static int i2o_seq_open_driver_store(
struct inode *inode,
struct file *file)
1627 return single_open(file, i2o_seq_show_driver_store, PDE(inode)->
data);
1630 static int i2o_seq_open_drivers_stored(
struct inode *inode,
struct file *file)
1632 return single_open(file, i2o_seq_show_drivers_stored, PDE(inode)->
data);
1635 static int i2o_seq_open_groups(
struct inode *inode,
struct file *file)
1640 static int i2o_seq_open_phys_device(
struct inode *inode,
struct file *file)
1645 static int i2o_seq_open_claimed(
struct inode *inode,
struct file *file)
1650 static int i2o_seq_open_users(
struct inode *inode,
struct file *file)
1655 static int i2o_seq_open_priv_msgs(
struct inode *inode,
struct file *file)
1660 static int i2o_seq_open_authorized_users(
struct inode *inode,
struct file *file)
1662 return single_open(file, i2o_seq_show_authorized_users,
1666 static int i2o_seq_open_dev_identity(
struct inode *inode,
struct file *file)
1668 return single_open(file, i2o_seq_show_dev_identity, PDE(inode)->
data);
1671 static int i2o_seq_open_ddm_identity(
struct inode *inode,
struct file *file)
1673 return single_open(file, i2o_seq_show_ddm_identity, PDE(inode)->
data);
1676 static int i2o_seq_open_uinfo(
struct inode *inode,
struct file *file)
1681 static int i2o_seq_open_sgl_limits(
struct inode *inode,
struct file *file)
1686 static int i2o_seq_open_sensors(
struct inode *inode,
struct file *file)
1691 static int i2o_seq_open_dev_name(
struct inode *inode,
struct file *file)
1697 .open = i2o_seq_open_lct,
1704 .open = i2o_seq_open_hrt,
1711 .open = i2o_seq_open_status,
1718 .open = i2o_seq_open_hw,
1725 .open = i2o_seq_open_ddm_table,
1732 .open = i2o_seq_open_driver_store,
1739 .open = i2o_seq_open_drivers_stored,
1746 .open = i2o_seq_open_groups,
1753 .open = i2o_seq_open_phys_device,
1760 .open = i2o_seq_open_claimed,
1767 .open = i2o_seq_open_users,
1774 .open = i2o_seq_open_priv_msgs,
1781 .open = i2o_seq_open_authorized_users,
1788 .open = i2o_seq_open_dev_name,
1795 .open = i2o_seq_open_dev_identity,
1802 .open = i2o_seq_open_ddm_identity,
1809 .open = i2o_seq_open_uinfo,
1816 .open = i2o_seq_open_sgl_limits,
1823 .open = i2o_seq_open_sensors,
1840 {
"drivers_stored",
S_IFREG |
S_IRUGO, &i2o_seq_fops_drivers_stored},
1853 {
"authorized_users",
S_IFREG |
S_IRUGO, &i2o_seq_fops_authorized_users},
1885 while (i2o_pe->
name) {
1887 i2o_pe->
fops, data);
1910 i2o_proc_subdir_remove(pe);
1933 osm_debug(
"adding device /proc/i2o/%s/%s\n", dev->
iop->name, buff);
1937 osm_warn(
"Could not allocate procdir!\n");
1943 i2o_proc_create_entries(devdir, generic_dev_entries, dev);
1949 i2o_pe = rbs_dev_entries;
1955 i2o_proc_create_entries(devdir, i2o_pe, dev);
1982 i2o_proc_create_entries(iopdir, i2o_proc_generic_iop_entries, c);
1985 i2o_proc_device_add(iopdir, dev);
2006 if (pe->
data == c) {
2007 i2o_proc_subdir_remove(pe);
2010 osm_debug(
"removing IOP /proc/i2o/%s\n", c->name);
2022 static int __init i2o_proc_fs_create(
void)
2027 if (!i2o_proc_dir_root)
2031 i2o_proc_iop_add(i2o_proc_dir_root, c);
2043 static
int __exit i2o_proc_fs_destroy(
void)
2048 i2o_proc_iop_remove(i2o_proc_dir_root, c);
2062 static
int __init i2o_proc_init(
void)
2072 rc = i2o_proc_fs_create();
2086 static void __exit i2o_proc_exit(
void)
2089 i2o_proc_fs_destroy();