summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Stefan Richter 2009-01-11 22:44:11 +0100
committerGravatar Stefan Richter 2009-05-30 10:17:43 +0200
commitda5156af5a5b779b6713ab7dff569a10927ed188 (patch)
treeb7c0e9e66c4c75721801c9a11347ebba5c2ddf57
parenttestlibraw: fix printing of local config ROM (diff)
Use new broadcast request ioctl
This implements broadcast transactions on juju. (Broadcast transactions are write transactions to PHY ID 63, not to be confused with isochronous or asynchronous streams.) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r--src/fw.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/fw.c b/src/fw.c
index 0b6ed67..9b33422 100644
--- a/src/fw.c
+++ b/src/fw.c
@@ -935,7 +935,17 @@ send_request(fw_handle_t handle, int tcode,
{
struct fw_cdev_send_request *request;
struct request_closure *closure;
- int i;
+ int ioctl_nr = FW_CDEV_IOC_SEND_REQUEST;
+ int fd, i;
+
+#ifdef FW_CDEV_IOC_SEND_BROADCAST_REQUEST /* added in kernel 2.6.30 */
+ if (node == 0xffff) {
+ ioctl_nr = FW_CDEV_IOC_SEND_BROADCAST_REQUEST;
+ fd = handle->ioctl_fd;
+ }
+#endif
+ if (ioctl_nr != FW_CDEV_IOC_SEND_REQUEST)
+ goto node_id_ok;
if (node > handle->reset.root_node_id) {
handle->err = -RCODE_NO_ACK;
@@ -955,6 +965,9 @@ send_request(fw_handle_t handle, int tcode,
errno = fw_errcode_to_errno(handle->err);
return -1;
}
+ fd = handle->devices[i].fd;
+
+node_id_ok:
closure = malloc(sizeof *closure);
if (closure == NULL) {
@@ -975,7 +988,7 @@ send_request(fw_handle_t handle, int tcode,
request->closure = ptr_to_u64(closure);
request->data = ptr_to_u64(in);
- return ioctl(handle->devices[i].fd, FW_CDEV_IOC_SEND_REQUEST, request);
+ return ioctl(fd, ioctl_nr, request);
}
int
2f25b2109b02d5560d1c4605dd20183&follow=1'>Added raw1394_get_irm_id().Gravatar aeb 7-7/+39 2000-08-06Added support for isochronous sending.Gravatar aeb 3-0/+35 2000-07-05Added raw1394_reset_bus() call.Gravatar aeb 4-0/+23 2000-06-22- Set library version info in configure.in, use in src/Makefile.am.Gravatar aeb 4-2/+16 2000-06-15Update libtool version number.Gravatar aeb 2-2/+2 2000-06-14Added copyright headers.Gravatar aeb 6-0/+54 2000-06-11Added explicit AC_PROG_INSTALL call.Gravatar aeb 1-0/+1 2000-06-09Fix size of error field.Gravatar aeb 1-2/+2 2000-06-02Modified support for 32/64 bit environments, control struct fields have fixed...Gravatar aeb 7-43/+28 2000-05-28Added support for environments with 64 bit kernel and 32 bit userland.Gravatar aeb 8-7/+45 2000-04-27Fixed missing setting of ext code in raw1394_start_lock()Gravatar aeb 1-0/+1 2000-04-15Fixed lock transaction to actually return response value.Gravatar aeb 3-5/+11 2000-04-12Add userdata functions as news.Gravatar aeb 1-0/+4 2000-04-05Add userdata functions.Gravatar aeb 3-0/+18 2000-03-18Bump version number to 0.6.Gravatar aeb 3-5/+6 2000-03-18Mention byte order change.Gravatar aeb 1-0/+2 2000-03-18Mention SourceForge home.Gravatar aeb 1-1/+5