lkml.org 
[lkml]   [2010]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 5/4 RFC] firewire: cdev: add PHY pinging
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/


\
 
 \ /
  Last update: 2010-07-18 13:03    [W:2.163 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site