diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-07-18 13:00:50 +0200 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-07-23 13:36:28 +0200 |
commit | cc550216ae9a2993ef3973464714dc1a39ab1f86 (patch) | |
tree | 62ffde836c83fe44b7a9edc01d00bcb9ad4f4ad6 /drivers/firewire/ohci.c | |
parent | bf54e1462b9192fdef7ea9e2bc44fdc16a4b87bc (diff) |
firewire: cdev: add PHY pinging
This extends the FW_CDEV_IOC_SEND_PHY_PACKET ioctl() for /dev/fw* to be
useful for ping time measurements. One application for it would be gap
count optimization in userspace that is based on ping times rather than
hop count. (The latter is implemented in firewire-core itself but is
not applicable to beta PHYs that act as repeater.)
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/ohci.c')
-rw-r--r-- | drivers/firewire/ohci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 08afccc6633..5f6bb2c5380 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -1068,6 +1068,9 @@ static int at_context_queue_packet(struct context *ctx, 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: |