patch-2.4.11-dontuse linux/drivers/ieee1394/raw1394.c

Next file: linux/drivers/ieee1394/sbp2.c
Previous file: linux/drivers/ieee1394/pcilynx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/drivers/ieee1394/raw1394.c linux/drivers/ieee1394/raw1394.c
@@ -290,8 +290,11 @@
         }
         spin_unlock_irqrestore(&host_info_lock, flags);
 
-        list_for_each(lh, &reqs) {
+        lh = reqs.next;
+        while (lh != &reqs) {
                 req = list_entry(lh, struct pending_request, list);
+                lh = lh->next;
+
                 queue_complete_req(req);
         }
 }
@@ -356,8 +359,11 @@
         }
         spin_unlock_irqrestore(&host_info_lock, flags);
 
-        list_for_each(lh, &reqs) {
+        lh = reqs.next;
+        while (lh != &reqs) {
                 req = list_entry(lh, struct pending_request, list);
+                lh = lh->next;
+
                 queue_complete_req(req);
         }
 }
@@ -746,6 +752,8 @@
         list_add_tail(&req->list, &fi->req_pending);
         spin_unlock_irq(&fi->reqlists_lock);
 
+	packet->generation = req->req.generation;
+
         if (!hpsb_send_packet(packet)) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
                 req->req.length = 0;
@@ -766,7 +774,7 @@
 
         fill_iso_packet(packet, req->req.length, channel & 0x3f,
                         (req->req.misc >> 16) & 0x3, req->req.misc & 0xf);
-        packet->type = iso;
+        packet->type = hpsb_iso;
         packet->speed_code = req->req.address & 0x3;
         packet->host = fi->host;
 
@@ -787,6 +795,9 @@
         list_add_tail(&req->list, &fi->req_pending);
         spin_unlock_irq(&fi->reqlists_lock);
 
+	/* Update the generation of the packet just before sending. */
+	packet->generation = get_hpsb_generation(fi->host);
+
         if (!hpsb_send_packet(packet)) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
                 queue_complete_req(req);
@@ -1031,3 +1042,4 @@
 
 module_init(init_raw1394);
 module_exit(cleanup_raw1394);
+MODULE_LICENSE("GPL");

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