aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:38:49 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 07:39:00 -0500
commit6bcac508fbebdca52f5a55d69a4316997ecb5391 (patch)
treefa04ce94ef6267676e8edcd2f93ef776bd6e60eb /drivers/s390/net
parent7a0b4cbc7d7d99763511b488b08bbc2607ddd1e3 (diff)
[S390] service level interface.
Add a new proc interface /proc/service_levels that allows any code to report a relevant service level, e.g. the microcode level of devices, the service level of the hypervisor, etc. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/net')
-rw-r--r--drivers/s390/net/qeth_core.h2
-rw-r--r--drivers/s390/net/qeth_core_main.c11
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index af6d60458513..1414d3df69dc 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -31,6 +31,7 @@
31#include <asm/qdio.h> 31#include <asm/qdio.h>
32#include <asm/ccwdev.h> 32#include <asm/ccwdev.h>
33#include <asm/ccwgroup.h> 33#include <asm/ccwgroup.h>
34#include <asm/sysinfo.h>
34 35
35#include "qeth_core_mpc.h" 36#include "qeth_core_mpc.h"
36 37
@@ -733,6 +734,7 @@ struct qeth_card {
733 struct qeth_osn_info osn_info; 734 struct qeth_osn_info osn_info;
734 struct qeth_discipline discipline; 735 struct qeth_discipline discipline;
735 atomic_t force_alloc_skb; 736 atomic_t force_alloc_skb;
737 struct service_level qeth_service_level;
736}; 738};
737 739
738struct qeth_card_list_struct { 740struct qeth_card_list_struct {
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index ebdc549da537..3dc752c29c73 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1138,6 +1138,14 @@ static int qeth_setup_card(struct qeth_card *card)
1138 return 0; 1138 return 0;
1139} 1139}
1140 1140
1141static void qeth_core_sl_print(struct seq_file *m, struct service_level *slr)
1142{
1143 struct qeth_card *card = container_of(slr, struct qeth_card,
1144 qeth_service_level);
1145 seq_printf(m, "qeth: %s firmware level %s\n", CARD_BUS_ID(card),
1146 card->info.mcl_level);
1147}
1148
1141static struct qeth_card *qeth_alloc_card(void) 1149static struct qeth_card *qeth_alloc_card(void)
1142{ 1150{
1143 struct qeth_card *card; 1151 struct qeth_card *card;
@@ -1157,6 +1165,8 @@ static struct qeth_card *qeth_alloc_card(void)
1157 return NULL; 1165 return NULL;
1158 } 1166 }
1159 card->options.layer2 = -1; 1167 card->options.layer2 = -1;
1168 card->qeth_service_level.seq_print = qeth_core_sl_print;
1169 register_service_level(&card->qeth_service_level);
1160 return card; 1170 return card;
1161} 1171}
1162 1172
@@ -3730,6 +3740,7 @@ static void qeth_core_free_card(struct qeth_card *card)
3730 free_netdev(card->dev); 3740 free_netdev(card->dev);
3731 kfree(card->ip_tbd_list); 3741 kfree(card->ip_tbd_list);
3732 qeth_free_qdio_buffers(card); 3742 qeth_free_qdio_buffers(card);
3743 unregister_service_level(&card->qeth_service_level);
3733 kfree(card); 3744 kfree(card);
3734} 3745}
3735 3746