aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2010-08-28 08:21:26 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-08-29 03:17:31 -0400
commita4dc090b6cb445257d2a8e44f85395ced6d1ed3e (patch)
tree1cba172819b1395237adb69e34dfa469a63dbb68 /drivers/firewire
parent2222bcb76790f4f61f39ec1514946a7593b07e02 (diff)
firewire: ohci: work around VIA and NEC PHY packet reception bug
VIA VT6306, VIA VT6308, and NEC OrangeLink controllers do not write packet event codes for received PHY packets (or perhaps write evt_no_status, hard to tell). Work around it by overwriting the packet's ACK by ack_complete, so that upper layers that listen to PHY packet reception get to see these packets. (Also tested: TI TSB82AA2, TI TSB43AB22/A, TI XIO2213A, Agere FW643, JMicron JMB381 --- these do not exhibit this bug.) Clemens proposed a quirks flag for that, IOW whitelist known misbehaving controllers for this workaround. Though to me it seems harmless enough to enable for all controllers. The log_ar_at_event() debug log will continue to show the original status from the DMA unit. Reported-by: Clemens Ladisch <clemens@ladisch.de> (VT6308) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/ohci.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 7f03540cabe8..be29b0bb2471 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -694,7 +694,15 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer)
694 log_ar_at_event('R', p.speed, p.header, evt); 694 log_ar_at_event('R', p.speed, p.header, evt);
695 695
696 /* 696 /*
697 * The OHCI bus reset handler synthesizes a phy packet with 697 * Several controllers, notably from NEC and VIA, forget to
698 * write ack_complete status at PHY packet reception.
699 */
700 if (evt == OHCI1394_evt_no_status &&
701 (p.header[0] & 0xff) == (OHCI1394_phy_tcode << 4))
702 p.ack = ACK_COMPLETE;
703
704 /*
705 * The OHCI bus reset handler synthesizes a PHY packet with
698 * the new generation number when a bus reset happens (see 706 * the new generation number when a bus reset happens (see
699 * section 8.4.2.3). This helps us determine when a request 707 * section 8.4.2.3). This helps us determine when a request
700 * was received and make sure we send the response in the same 708 * was received and make sure we send the response in the same