Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33895
b: refs/heads/master
c: 8b98a37
h: refs/heads/master
i:
  33893: e003079
  33891: e6a11c6
  33887: d3bb194
v: v3
  • Loading branch information
Frank Pavlic authored and Jeff Garzik committed Sep 17, 2006
1 parent d21e275 commit c72e9de
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 21 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: f956b6902eabbff249000287c7b36cd65761d8b8
refs/heads/master: 8b98a37c4b00f3fbcf162281bd4595777e61241b
59 changes: 39 additions & 20 deletions trunk/drivers/s390/net/qeth_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -7344,6 +7344,8 @@ qeth_setrouting_v6(struct qeth_card *card)
QETH_DBF_TEXT(trace,3,"setrtg6");
#ifdef CONFIG_QETH_IPV6

if (!qeth_is_supported(card, IPA_IPV6))
return 0;
qeth_correct_routing_type(card, &card->options.route6.type,
QETH_PROT_IPV6);

Expand Down Expand Up @@ -8544,34 +8546,44 @@ qeth_ipv6_uninit(void)
static void
qeth_sysfs_unregister(void)
{
s390_root_dev_unregister(qeth_root_dev);
qeth_remove_driver_attributes();
ccw_driver_unregister(&qeth_ccw_driver);
ccwgroup_driver_unregister(&qeth_ccwgroup_driver);
s390_root_dev_unregister(qeth_root_dev);
}

/**
* register qeth at sysfs
*/
static int
qeth_sysfs_register(void)
{
int rc=0;
int rc;

rc = ccwgroup_driver_register(&qeth_ccwgroup_driver);
if (rc)
return rc;
goto out;

rc = ccw_driver_register(&qeth_ccw_driver);
if (rc)
return rc;
goto out_ccw_driver;

rc = qeth_create_driver_attributes();
if (rc)
return rc;
goto out_qeth_attr;

qeth_root_dev = s390_root_dev_register("qeth");
if (IS_ERR(qeth_root_dev)) {
rc = PTR_ERR(qeth_root_dev);
return rc;
}
return 0;
rc = IS_ERR(qeth_root_dev) ? PTR_ERR(qeth_root_dev) : 0;
if (!rc)
goto out;

qeth_remove_driver_attributes();
out_qeth_attr:
ccw_driver_unregister(&qeth_ccw_driver);
out_ccw_driver:
ccwgroup_driver_unregister(&qeth_ccwgroup_driver);
out:
return rc;
}

/***
Expand All @@ -8580,7 +8592,7 @@ qeth_sysfs_register(void)
static int __init
qeth_init(void)
{
int rc=0;
int rc;

PRINT_INFO("loading %s\n", version);

Expand All @@ -8589,20 +8601,26 @@ qeth_init(void)
spin_lock_init(&qeth_notify_lock);
rwlock_init(&qeth_card_list.rwlock);

if (qeth_register_dbf_views())
rc = qeth_register_dbf_views();
if (rc)
goto out_err;
if (qeth_sysfs_register())
goto out_sysfs;

rc = qeth_sysfs_register();
if (rc)
goto out_dbf;

#ifdef CONFIG_QETH_IPV6
if (qeth_ipv6_init()) {
PRINT_ERR("Out of memory during ipv6 init.\n");
rc = qeth_ipv6_init();
if (rc) {
PRINT_ERR("Out of memory during ipv6 init code = %d\n", rc);
goto out_sysfs;
}
#endif /* QETH_IPV6 */
if (qeth_register_notifiers())
rc = qeth_register_notifiers();
if (rc)
goto out_ipv6;
if (qeth_create_procfs_entries())
rc = qeth_create_procfs_entries();
if (rc)
goto out_notifiers;

return rc;
Expand All @@ -8612,12 +8630,13 @@ qeth_init(void)
out_ipv6:
#ifdef CONFIG_QETH_IPV6
qeth_ipv6_uninit();
#endif /* QETH_IPV6 */
out_sysfs:
#endif /* QETH_IPV6 */
qeth_sysfs_unregister();
out_dbf:
qeth_unregister_dbf_views();
out_err:
PRINT_ERR("Initialization failed");
PRINT_ERR("Initialization failed with code %d\n", rc);
return rc;
}

Expand Down

0 comments on commit c72e9de

Please sign in to comment.