patch-2.4.9 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
- Lines: 62
- Date:
Sun Aug 12 12:39:02 2001
- Orig file:
v2.4.8/linux/drivers/ieee1394/ieee1394_transactions.c
- Orig date:
Wed Jul 25 17:10:20 2001
diff -u --recursive --new-file v2.4.8/linux/drivers/ieee1394/ieee1394_transactions.c linux/drivers/ieee1394/ieee1394_transactions.c
@@ -447,7 +447,12 @@
return -ENOMEM;
}
- hpsb_send_packet(packet);
+ packet->generation = get_hpsb_generation(host);
+ if (!hpsb_send_packet(packet)) {
+ retval = -EINVAL;
+ goto hpsb_read_fail;
+ }
+
down(&packet->state_change);
down(&packet->state_change);
retval = hpsb_packet_success(packet);
@@ -460,6 +465,7 @@
}
}
+hpsb_read_fail:
free_tlabel(host, node, packet->tlabel);
free_hpsb_packet(packet);
@@ -514,11 +520,17 @@
if (!packet)
return -ENOMEM;
- hpsb_send_packet(packet);
+ packet->generation = get_hpsb_generation(host);
+ if (!hpsb_send_packet(packet)) {
+ retval = -EINVAL;
+ goto hpsb_write_fail;
+ }
+
down(&packet->state_change);
down(&packet->state_change);
retval = hpsb_packet_success(packet);
+hpsb_write_fail:
free_tlabel(host, node, packet->tlabel);
free_hpsb_packet(packet);
@@ -574,7 +586,11 @@
}
fill_async_lock(packet, addr, extcode, length);
- hpsb_send_packet(packet);
+ packet->generation = get_hpsb_generation(host);
+ if (!hpsb_send_packet(packet)) {
+ retval = -EINVAL;
+ goto hpsb_lock_fail;
+ }
down(&packet->state_change);
down(&packet->state_change);
retval = hpsb_packet_success(packet);
@@ -583,6 +599,7 @@
*data = packet->data[0];
}
+hpsb_lock_fail:
free_tlabel(host, node, packet->tlabel);
free_hpsb_packet(packet);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)