diff options
Diffstat (limited to 'arch/powerpc/platforms/iseries/viopath.c')
-rw-r--r-- | arch/powerpc/platforms/iseries/viopath.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c index 622a30149b48..9baa4ee82592 100644 --- a/arch/powerpc/platforms/iseries/viopath.c +++ b/arch/powerpc/platforms/iseries/viopath.c | |||
@@ -41,8 +41,8 @@ | |||
41 | 41 | ||
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
43 | #include <asm/uaccess.h> | 43 | #include <asm/uaccess.h> |
44 | #include <asm/prom.h> | ||
44 | #include <asm/iseries/hv_types.h> | 45 | #include <asm/iseries/hv_types.h> |
45 | #include <asm/iseries/it_exp_vpd_panel.h> | ||
46 | #include <asm/iseries/hv_lp_event.h> | 46 | #include <asm/iseries/hv_lp_event.h> |
47 | #include <asm/iseries/hv_lp_config.h> | 47 | #include <asm/iseries/hv_lp_config.h> |
48 | #include <asm/iseries/mf.h> | 48 | #include <asm/iseries/mf.h> |
@@ -116,6 +116,8 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
116 | dma_addr_t handle; | 116 | dma_addr_t handle; |
117 | HvLpEvent_Rc hvrc; | 117 | HvLpEvent_Rc hvrc; |
118 | DECLARE_MUTEX_LOCKED(Semaphore); | 118 | DECLARE_MUTEX_LOCKED(Semaphore); |
119 | struct device_node *node; | ||
120 | const char *sysid; | ||
119 | 121 | ||
120 | buf = kmalloc(HW_PAGE_SIZE, GFP_KERNEL); | 122 | buf = kmalloc(HW_PAGE_SIZE, GFP_KERNEL); |
121 | if (!buf) | 123 | if (!buf) |
@@ -143,20 +145,26 @@ static int proc_viopath_show(struct seq_file *m, void *v) | |||
143 | 145 | ||
144 | buf[HW_PAGE_SIZE-1] = '\0'; | 146 | buf[HW_PAGE_SIZE-1] = '\0'; |
145 | seq_printf(m, "%s", buf); | 147 | seq_printf(m, "%s", buf); |
146 | seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap); | ||
147 | seq_printf(m, "SRLNBR=%c%c%c%c%c%c%c\n", | ||
148 | e2a(xItExtVpdPanel.mfgID[2]), | ||
149 | e2a(xItExtVpdPanel.mfgID[3]), | ||
150 | e2a(xItExtVpdPanel.systemSerial[1]), | ||
151 | e2a(xItExtVpdPanel.systemSerial[2]), | ||
152 | e2a(xItExtVpdPanel.systemSerial[3]), | ||
153 | e2a(xItExtVpdPanel.systemSerial[4]), | ||
154 | e2a(xItExtVpdPanel.systemSerial[5])); | ||
155 | 148 | ||
156 | dma_unmap_single(iSeries_vio_dev, handle, HW_PAGE_SIZE, | 149 | dma_unmap_single(iSeries_vio_dev, handle, HW_PAGE_SIZE, |
157 | DMA_FROM_DEVICE); | 150 | DMA_FROM_DEVICE); |
158 | kfree(buf); | 151 | kfree(buf); |
159 | 152 | ||
153 | seq_printf(m, "AVAILABLE_VETH=%x\n", vlanMap); | ||
154 | |||
155 | node = of_find_node_by_path("/"); | ||
156 | sysid = NULL; | ||
157 | if (node != NULL) | ||
158 | sysid = get_property(node, "system-id", NULL); | ||
159 | |||
160 | if (sysid == NULL) | ||
161 | seq_printf(m, "SRLNBR=<UNKNOWN>\n"); | ||
162 | else | ||
163 | /* Skip "IBM," on front of serial number, see dt.c */ | ||
164 | seq_printf(m, "SRLNBR=%s\n", sysid + 4); | ||
165 | |||
166 | of_node_put(node); | ||
167 | |||
160 | return 0; | 168 | return 0; |
161 | } | 169 | } |
162 | 170 | ||