patch-2.4.7 linux/drivers/ieee1394/highlevel.c

Next file: linux/drivers/ieee1394/highlevel.h
Previous file: linux/drivers/ieee1394/guid.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.6/linux/drivers/ieee1394/highlevel.c linux/drivers/ieee1394/highlevel.c
@@ -175,6 +175,19 @@
 DEFINE_MULTIPLEXER(host_reset)
 #undef DEFINE_MULTIPLEXER
 
+/* Add one host to our list */
+void highlevel_add_one_host (struct hpsb_host *host)
+{
+	if (host->template->initialize_host)
+		if (!host->template->initialize_host(host))
+			goto fail;
+	host->initialized = 1;
+	highlevel_add_host (host);
+	hpsb_reset_bus (host, LONG_RESET);
+fail:
+	host->template->number_of_hosts++;
+}
+
 void highlevel_iso_receive(struct hpsb_host *host, quadlet_t *data,
                            unsigned int length)
 {
@@ -200,7 +213,7 @@
 {
         struct list_head *entry;
         struct hpsb_highlevel *hl;
-        int cts = data[0];
+        int cts = data[0] >> 4;
 
         read_lock(&hl_drivers_lock);
         entry = hl_drivers.next;
@@ -262,8 +275,8 @@
         return rcode;
 }
 
-int highlevel_write(struct hpsb_host *host, int nodeid, quadlet_t *data,
-                    u64 addr, unsigned int length)
+int highlevel_write(struct hpsb_host *host, int nodeid, int destid,
+		    quadlet_t *data, u64 addr, unsigned int length)
 {
         struct hpsb_address_serve *as;
         struct list_head *entry;
@@ -281,8 +294,8 @@
                                          length);
 
                         if (as->op->write != NULL) {
-                                rcode = as->op->write(host, nodeid, data, addr,
-                                                      partlength);
+                                rcode = as->op->write(host, nodeid, destid, data,
+						      addr, partlength);
                         } else {
                                 rcode = RCODE_TYPE_ERROR;
                         }
@@ -376,23 +389,6 @@
         return rcode;
 }
 
-
-
-#ifndef MODULE
-
-void register_builtin_highlevels(void)
-{
-#ifdef CONFIG_IEEE1394_RAWIO
-        {
-                int init_raw1394(void);
-                init_raw1394();
-        }
-#endif
-}
-
-#endif /* !MODULE */
-
-
 void init_hpsb_highlevel(void)
 {
         INIT_LIST_HEAD(&dummy_zero_addr.as_list);
@@ -407,8 +403,4 @@
 
         list_add_tail(&dummy_zero_addr.as_list, &addr_space);
         list_add_tail(&dummy_max_addr.as_list, &addr_space);
-
-#ifndef MODULE
-        register_builtin_highlevels();
-#endif
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)