patch-2.4.0-test9 linux/drivers/ieee1394/hosts.c
Next file: linux/drivers/ieee1394/hosts.h
Previous file: linux/drivers/ide/via82cxxx.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Sun Oct 1 19:53:07 2000
- Orig file:
v2.4.0-test8/linux/drivers/ieee1394/hosts.c
- Orig date:
Wed Jul 5 13:03:56 2000
diff -u --recursive --new-file v2.4.0-test8/linux/drivers/ieee1394/hosts.c linux/drivers/ieee1394/hosts.c
@@ -61,8 +61,9 @@
struct hpsb_host_template *tmpl;
struct hpsb_host *h;
int retval = 0;
+ unsigned long flags;
- spin_lock(&templates_lock);
+ spin_lock_irqsave(&templates_lock, flags);
for (tmpl = templates; (tmpl != NULL) && !retval; tmpl = tmpl->next) {
for (h = tmpl->hosts; h != NULL; h = h->next) {
@@ -74,7 +75,7 @@
}
}
- spin_unlock(&templates_lock);
+ spin_unlock_irqrestore(&templates_lock, flags);
return retval;
}
@@ -99,11 +100,11 @@
}
memset(h, 0, sizeof(struct hpsb_host) + hd_size);
- h->tlabel_count = 64;
INIT_LIST_HEAD(&h->pending_packets);
spin_lock_init(&h->pending_pkt_lock);
+
+ sema_init(&h->tlabel_count, 64);
spin_lock_init(&h->tlabel_lock);
- init_waitqueue_head(&h->tlabel_wait);
h->timeout_tq.routine = (void (*)(void*))abort_timedouts;
h->timeout_tq.data = h;
@@ -154,10 +155,7 @@
host->initialized = 1;
highlevel_add_host(host);
- reset_host_bus(host);
-
- //kernel_thread(hpsb_host_thread, host,
- // CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
+ hpsb_reset_bus(host);
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)