mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: "Kristian Høgsberg" <krh@redhat.com>, "Pieter Palmers" <pieterp@joow.be>
Cc: linux1394-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] firewire: adopt read cycle timer ABI from raw1394
Date: Sat, 29 Sep 2007 11:01:51 +0200 (CEST)	[thread overview]
Message-ID: <tkrat.4aa1f1b5ce7df936@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.9b780b2f580f1733@s5r6.in-berlin.de>

> This duplicates the read cycle timer feature of raw1394 (added in Linux
> 2.6.21) in firewire-core's userspace ABI.

Kristian and Pieter, does this simple duplication of the ioctl make
sense on its own?  AFAIU rawiso's iso packet buffers look different from
fw-cdevs's. It seems to me as if rawiso always put the cycle into a user
buffer for each iso packet received...

raw1394.h::struct raw1394_iso_packet_info {
	__u32 offset;
	__u16 len;
	__u16 cycle;   /* recv only */
	__u8  channel; /* recv only */
	__u8  tag;
	__u8  sy;
};

raw1394.c::raw1394_iso_recv_packets()

	/* copy the packet_infos out */
	for (i = 0; i < upackets.n_packets; i++) {
		if (__copy_to_user(&upackets.infos[i],
				   &fi->iso_handle->infos[packet],
				   sizeof(struct raw1394_iso_packet_info)))
			return -EFAULT;

		packet = (packet + 1) % fi->iso_handle->buf_packets;
	}

...while the Juju ABI returns the cycle only for those packets whose
fw_cdev_iso_packet.control had the FW_CDEV_ISO_INTERRUPT flag set.
The cycle is then written out in the fw_cdev_event_iso_interrupt event
which happens when this particular packet was received.  Right?

Pieter, do applications like yours need the cycle counter only for a few
predetermined packets or for each and every packet?
-- 
Stefan Richter
-=====-=-=== =--= ===-=
http://arcgraph.de/sr/


  reply	other threads:[~2007-09-29  9:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-29  8:41 Stefan Richter
2007-09-29  9:01 ` Stefan Richter [this message]
2007-10-01  9:31   ` Pieter Palmers
2007-10-01 16:03     ` Kristian Høgsberg
2007-10-02  6:45       ` Daniel Wagner
2007-10-05  8:31       ` Pieter Palmers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tkrat.4aa1f1b5ce7df936@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=krh@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=pieterp@joow.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome