mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/4 RFC] firewire: cdev: add PHY pinging
Date: Sun, 18 Jul 2010 13:00:50 +0200 (CEST)	[thread overview]
Message-ID: <tkrat.6c75a797bbb6b2f7@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.506ae60f1ea3a97a@s5r6.in-berlin.de>

On 17 Jul, Stefan Richter wrote:
> --- a/drivers/firewire/ohci.c
> +++ b/drivers/firewire/ohci.c
> @@ -1105,6 +1105,10 @@ static int at_context_queue_packet(struc
>  	} else {
>  		last = &d[0];
>  		z = 2;
> +
> +		if (packet->header_length == 8 &&
> +		    is_ping_packet(packet->header))
> +			last->control |= cpu_to_le16(DESCRIPTOR_PING);
>  	}
>  
>  	last->control |= cpu_to_le16(DESCRIPTOR_OUTPUT_LAST |

Here is a better implementation of the card driver's part.  It moves the
ping packet test out of an else branch that is taken for all no-payload
packets into a switch block that is only reached in case of PHY packets.

--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -1068,6 +1068,9 @@ static int at_context_queue_packet(struc
 		header[1] = cpu_to_le32(packet->header[0]);
 		header[2] = cpu_to_le32(packet->header[1]);
 		d[0].req_count = cpu_to_le16(12);
+
+		if (is_ping_packet(packet->header))
+			d[0].control |= cpu_to_le16(DESCRIPTOR_PING);
 		break;
 
 	case 4:

-- 
Stefan Richter
-=====-==-=- -=== =--=-
http://arcgraph.de/sr/


      parent reply	other threads:[~2010-07-18 11:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-16 20:23 [PATCH 0/4] firewire: 2 simple updates + 2 ABI additions: PHY packet tx/rx Stefan Richter
2010-07-16 20:24 ` [PATCH 1/4] firewire: cdev: some clarifications to the API documentation Stefan Richter
2010-07-17 19:36   ` [PATCH 1/4 update] " Stefan Richter
2010-07-16 20:24 ` [PATCH 2/4] firewire: core: use C99 initializer in array of ioctl handlers Stefan Richter
2010-07-16 20:25 ` [PATCH 3/4 RFC] firewire: cdev: add PHY packet transmission Stefan Richter
2010-07-16 20:25 ` [PATCH 4/4 RFC] firewire: cdev: add PHY packet reception Stefan Richter
2010-07-16 20:28 ` [PATCH libraw1394] Implement raw1394_(start_)phy_packet_write() on new firewire backend Stefan Richter
2010-07-17 17:19 ` [PATCH 5/4 RFC] firewire: cdev: add PHY pinging Stefan Richter
2010-07-17 17:20   ` PHY pinging test tool Stefan Richter
2010-07-18 11:00   ` Stefan Richter [this message]

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.6c75a797bbb6b2f7@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®