diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ehea/ehea.h | 8 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_main.c | 23 |
2 files changed, 29 insertions, 2 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index abaf3ac94936..f03f070451de 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -39,7 +39,13 @@ | |||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | #define DRV_NAME "ehea" | 41 | #define DRV_NAME "ehea" |
42 | #define DRV_VERSION "EHEA_0065" | 42 | #define DRV_VERSION "EHEA_0067" |
43 | |||
44 | /* EHEA capability flags */ | ||
45 | #define DLPAR_PORT_ADD_REM 1 | ||
46 | #define DLPAR_MEM_ADD 2 | ||
47 | #define DLPAR_MEM_REM 4 | ||
48 | #define EHEA_CAPABILITIES (DLPAR_PORT_ADD_REM) | ||
43 | 49 | ||
44 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ | 50 | #define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \ |
45 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) | 51 | | NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR) |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index bdb52419dbf5..383144db4d18 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
@@ -2923,6 +2923,15 @@ static int check_module_parm(void) | |||
2923 | return ret; | 2923 | return ret; |
2924 | } | 2924 | } |
2925 | 2925 | ||
2926 | static ssize_t ehea_show_capabilities(struct device_driver *drv, | ||
2927 | char *buf) | ||
2928 | { | ||
2929 | return sprintf(buf, "%d", EHEA_CAPABILITIES); | ||
2930 | } | ||
2931 | |||
2932 | static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH, | ||
2933 | ehea_show_capabilities, NULL); | ||
2934 | |||
2926 | int __init ehea_module_init(void) | 2935 | int __init ehea_module_init(void) |
2927 | { | 2936 | { |
2928 | int ret; | 2937 | int ret; |
@@ -2934,8 +2943,19 @@ int __init ehea_module_init(void) | |||
2934 | if (ret) | 2943 | if (ret) |
2935 | goto out; | 2944 | goto out; |
2936 | ret = ibmebus_register_driver(&ehea_driver); | 2945 | ret = ibmebus_register_driver(&ehea_driver); |
2937 | if (ret) | 2946 | if (ret) { |
2938 | ehea_error("failed registering eHEA device driver on ebus"); | 2947 | ehea_error("failed registering eHEA device driver on ebus"); |
2948 | goto out; | ||
2949 | } | ||
2950 | |||
2951 | ret = driver_create_file(&ehea_driver.driver, | ||
2952 | &driver_attr_capabilities); | ||
2953 | if (ret) { | ||
2954 | ehea_error("failed to register capabilities attribute, ret=%d", | ||
2955 | ret); | ||
2956 | ibmebus_unregister_driver(&ehea_driver); | ||
2957 | goto out; | ||
2958 | } | ||
2939 | 2959 | ||
2940 | out: | 2960 | out: |
2941 | return ret; | 2961 | return ret; |
@@ -2943,6 +2963,7 @@ out: | |||
2943 | 2963 | ||
2944 | static void __exit ehea_module_exit(void) | 2964 | static void __exit ehea_module_exit(void) |
2945 | { | 2965 | { |
2966 | driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities); | ||
2946 | ibmebus_unregister_driver(&ehea_driver); | 2967 | ibmebus_unregister_driver(&ehea_driver); |
2947 | } | 2968 | } |
2948 | 2969 | ||