Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6687
b: refs/heads/master
c: ec60bee
h: refs/heads/master
i:
  6685: 1c1c897
  6683: 29d487c
  6679: cbcdcd2
  6671: 775053f
  6655: 62d18c7
v: v3
  • Loading branch information
Michael Ellerman authored and Jeff Garzik committed Sep 1, 2005
1 parent 95ac226 commit 8f8f2f7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 14 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: cbf9074cc30ca0eee19c9bd7304faf9f1beb1e76
refs/heads/master: ec60beebed497691c97d674c1facac5ca3d7a4b3
35 changes: 22 additions & 13 deletions trunk/drivers/net/iseries_veth.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,14 @@ static void veth_stop_connection(u8 rlp)

/* Wait for the state machine to run. */
flush_scheduled_work();
}

static void veth_destroy_connection(u8 rlp)
{
struct veth_lpar_connection *cnx = veth_cnx[rlp];

if (! cnx)
return;

if (cnx->num_events > 0)
mf_deallocate_lp_events(cnx->remote_lp,
Expand All @@ -694,14 +702,6 @@ static void veth_stop_connection(u8 rlp)
HvLpEvent_Type_VirtualLan,
cnx->num_ack_events,
NULL, NULL);
}

static void veth_destroy_connection(u8 rlp)
{
struct veth_lpar_connection *cnx = veth_cnx[rlp];

if (! cnx)
return;

kfree(cnx->msgs);
kfree(cnx);
Expand Down Expand Up @@ -1441,15 +1441,24 @@ int __init veth_module_init(void)

for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {
rc = veth_init_connection(i);
if (rc != 0) {
veth_module_cleanup();
return rc;
}
if (rc != 0)
goto error;
}

HvLpEvent_registerHandler(HvLpEvent_Type_VirtualLan,
&veth_handle_event);

return vio_register_driver(&veth_driver);
rc = vio_register_driver(&veth_driver);
if (rc != 0)
goto error;

return 0;

error:
for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {
veth_destroy_connection(i);
}

return rc;
}
module_init(veth_module_init);

0 comments on commit 8f8f2f7

Please sign in to comment.