]> err.no Git - linux-2.6/blobdiff - drivers/ieee1394/ieee1394_transactions.c
Merge branches 'armv7', 'at91', 'misc' and 'omap' into devel
[linux-2.6] / drivers / ieee1394 / ieee1394_transactions.c
index 8b7511d525334e457dbb3fbb63a7e443dbeaaf2b..40078ce930c86035ea2d5453ebc0f85851dd1fa1 100644 (file)
  */
 
 #include <linux/bitops.h>
+#include <linux/compiler.h>
 #include <linux/hardirq.h>
 #include <linux/spinlock.h>
+#include <linux/string.h>
 #include <linux/sched.h>  /* because linux/wait.h is broken if CONFIG_SMP=n */
 #include <linux/wait.h>
 
 #include <asm/bug.h>
 #include <asm/errno.h>
+#include <asm/system.h>
 
 #include "ieee1394.h"
 #include "ieee1394_types.h"
@@ -34,7 +37,7 @@
 #ifndef HPSB_DEBUG_TLABELS
 static
 #endif
-spinlock_t hpsb_tlabel_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(hpsb_tlabel_lock);
 
 static DECLARE_WAIT_QUEUE_HEAD(tlabel_wq);
 
@@ -375,6 +378,13 @@ struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 * buffer,
        }
        packet->host = host;
 
+       /* Because it is too difficult to determine all PHY speeds and link
+        * speeds here, we use S100... */
+       packet->speed_code = IEEE1394_SPEED_100;
+
+       /* ...and prevent hpsb_send_packet() from overriding it. */
+       packet->node_id = LOCAL_BUS | ALL_NODES;
+
        if (hpsb_get_tlabel(packet)) {
                hpsb_free_packet(packet);
                return NULL;