Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 58753
b: refs/heads/master
c: 4c3ca4d
h: refs/heads/master
i:
  58751: 665003a
v: v3
  • Loading branch information
Jan-Bernd Themann authored and Jeff Garzik committed Jul 10, 2007
1 parent ce39e13 commit 75d2c57
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1abecc48938fbe1966ea6e78267fc673fa59295
refs/heads/master: 4c3ca4da8086c3c9fcc81dccc387c34bee6b755e
8 changes: 7 additions & 1 deletion trunk/drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@
#include <asm/io.h>

#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0065"
#define DRV_VERSION "EHEA_0067"

/* EHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
#define DLPAR_MEM_ADD 2
#define DLPAR_MEM_REM 4
#define EHEA_CAPABILITIES (DLPAR_PORT_ADD_REM)

#define EHEA_MSG_DEFAULT (NETIF_MSG_LINK | NETIF_MSG_TIMER \
| NETIF_MSG_RX_ERR | NETIF_MSG_TX_ERR)
Expand Down
23 changes: 22 additions & 1 deletion trunk/drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2923,6 +2923,15 @@ static int check_module_parm(void)
return ret;
}

static ssize_t ehea_show_capabilities(struct device_driver *drv,
char *buf)
{
return sprintf(buf, "%d", EHEA_CAPABILITIES);
}

static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH,
ehea_show_capabilities, NULL);

int __init ehea_module_init(void)
{
int ret;
Expand All @@ -2934,15 +2943,27 @@ int __init ehea_module_init(void)
if (ret)
goto out;
ret = ibmebus_register_driver(&ehea_driver);
if (ret)
if (ret) {
ehea_error("failed registering eHEA device driver on ebus");
goto out;
}

ret = driver_create_file(&ehea_driver.driver,
&driver_attr_capabilities);
if (ret) {
ehea_error("failed to register capabilities attribute, ret=%d",
ret);
ibmebus_unregister_driver(&ehea_driver);
goto out;
}

out:
return ret;
}

static void __exit ehea_module_exit(void)
{
driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities);
ibmebus_unregister_driver(&ehea_driver);
}

Expand Down

0 comments on commit 75d2c57

Please sign in to comment.