Commit 5055a79b authored by Jeroen Vreeken's avatar Jeroen Vreeken Committed by Stephen Hemminger

[PATCH] 6pack reinit bug

This patch is the same as to mkiss a while ago, the current code triggers a
bug when reattaching a network device.
parent 14309012
......@@ -178,17 +178,17 @@ static inline struct sixpack *sp_alloc(void)
(sixpack_ctrls[i] = (sixpack_ctrl_t *)kmalloc(sizeof(sixpack_ctrl_t),
GFP_KERNEL)) != NULL) {
spp = sixpack_ctrls[i];
memset(spp, 0, sizeof(sixpack_ctrl_t));
/* Initialize channel control data */
set_bit(SIXPF_INUSE, &spp->ctrl.flags);
spp->ctrl.tty = NULL;
sprintf(spp->dev.name, "sp%d", i);
spp->dev.base_addr = i;
spp->dev.priv = (void *) &spp->ctrl;
spp->dev.next = NULL;
spp->dev.init = sixpack_init;
}
memset(spp, 0, sizeof(sixpack_ctrl_t));
/* Initialize channel control data */
set_bit(SIXPF_INUSE, &spp->ctrl.flags);
spp->ctrl.tty = NULL;
sprintf(spp->dev.name, "sp%d", i);
spp->dev.base_addr = i;
spp->dev.priv = (void *) &spp->ctrl;
spp->dev.next = NULL;
spp->dev.init = sixpack_init;
if (spp != NULL) {
/* register device so that it can be ifconfig'ed */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment