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

Next file: linux/drivers/ieee1394/ieee1394_types.h
Previous file: linux/drivers/ieee1394/ieee1394_syms.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/drivers/ieee1394/ieee1394_transactions.c linux/drivers/ieee1394/ieee1394_transactions.c
@@ -131,7 +131,7 @@
 
         packet->header_size = 4;
         packet->data_size = length;
-        packet->type = iso;
+        packet->type = hpsb_iso;
         packet->tcode = TCODE_ISO_DATA;
 }
 
@@ -142,7 +142,7 @@
         packet->header_size = 8;
         packet->data_size = 0;
         packet->expect_response = 0;
-        packet->type = raw;             /* No CRC added */
+        packet->type = hpsb_raw;             /* No CRC added */
         packet->speed_code = SPEED_100; /* Force speed to be 100Mbps */
 }
 
@@ -488,7 +488,9 @@
         if (!packet)
                 return NULL;
 
-        if (length != 4)
+	/* Sometimes this may be called without data, just to allocate the
+	 * packet. */
+        if (length != 4 && buffer)
                 memcpy(packet->data, buffer, length);
 
 	return packet;

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