]> git.baikalelectronics.ru Git - kernel.git/commit
firewire: ohci: fix probe failure with Agere/LSI controllers
authorStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 6 Mar 2014 19:39:04 +0000 (20:39 +0100)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Thu, 6 Mar 2014 20:36:23 +0000 (21:36 +0100)
commit34e727fec7d8d0bcc90723aee462803bf58a3279
tree3a395e43f06728603fa7316738a6aaea62042f28
parenta3aa0ed3183adcb4998f9208dc2d1a4d5b348220
firewire: ohci: fix probe failure with Agere/LSI controllers

Since commit 1287ba69728e
"firewire: ohci: Fix 'failed to read phy reg' on FW643 rev8",
there is a high chance that firewire-ohci fails to initialize LSI née
Agere controllers.
https://bugzilla.kernel.org/show_bug.cgi?id=65151

Peter Hurley points out the reason:  IEEE 1394a:2000 clause 5A.1 (or
IEEE 1394:2008 clause 17.2.1) say:  "The PHY shall insure that no more
than 10 ms elapse from the reassertion of LPS until the interface is
reset.  The link shall not assert LReq until the reset is complete."
In other words, the link needs to give the PHY at least 10 ms to get
the interface operational.

With just the msleep(1) in 1287ba69728e, the first read_phy_reg()
during ohci_enable() may happen before the phy-link interface reset was
finished, and fail.  Due to the high variability of msleep(n) with small
n, this failure was not fully reproducible, and not apparent at all with
low CONFIG_HZ setting.

On the other hand, Peter can no longer reproduce the issue with FW643
rev8.  The read phy reg failures that happened back then may have had an
unrelated cause.  So, just revert 1287ba69728e, except for the valid
comment on TSB82AA2 cards.

Reported-by: Mikhail Gavrilov
Reported-by: Jay Fenlason <fenlason@redhat.com>
Reported-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Peter Hurley <peter@hurleysoftware.com>
Cc: stable@vger.kernel.org # v3.10+
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/ohci.c