Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374703
b: refs/heads/master
c: bd97268
h: refs/heads/master
i:
  374701: 44e09c7
  374699: c58bd79
  374695: 9a69ebc
  374687: 6d29184
v: v3
  • Loading branch information
Peter Hurley authored and Stefan Richter committed Apr 30, 2013
1 parent d65775f commit ebcb46d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be8dcab942e1c0ec2aa13eb2af2a79ab51b46293
refs/heads/master: bd972688eb2404239a8f1255db26b0bb6b604686
20 changes: 18 additions & 2 deletions trunk/drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ static char ohci_driver_name[] = KBUILD_MODNAME;
#define QUIRK_NO_MSI 16
#define QUIRK_TI_SLLZ059 32
#define QUIRK_IR_WAKE 64
#define QUIRK_PHY_LCTRL_TIMEOUT 128

/* In case of multiple matches in ohci_quirks[], only the first one is used. */
static const struct {
Expand All @@ -296,7 +297,10 @@ static const struct {
QUIRK_BE_HEADERS},

{PCI_VENDOR_ID_ATT, PCI_DEVICE_ID_AGERE_FW643, 6,
QUIRK_NO_MSI},
QUIRK_PHY_LCTRL_TIMEOUT | QUIRK_NO_MSI},

{PCI_VENDOR_ID_ATT, PCI_ANY_ID, PCI_ANY_ID,
QUIRK_PHY_LCTRL_TIMEOUT},

{PCI_VENDOR_ID_CREATIVE, PCI_DEVICE_ID_CREATIVE_SB1394, PCI_ANY_ID,
QUIRK_RESET_PACKET},
Expand Down Expand Up @@ -343,6 +347,7 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default = 0"
", disable MSI = " __stringify(QUIRK_NO_MSI)
", TI SLLZ059 erratum = " __stringify(QUIRK_TI_SLLZ059)
", IR wake unreliable = " __stringify(QUIRK_IR_WAKE)
", phy LCtrl timeout = " __stringify(QUIRK_PHY_LCTRL_TIMEOUT)
")");

#define OHCI_PARAM_DEBUG_AT_AR 1
Expand Down Expand Up @@ -2293,14 +2298,25 @@ static int ohci_enable(struct fw_card *card,
* will lock up the machine. Wait 50msec to make sure we have
* full link enabled. However, with some cards (well, at least
* a JMicron PCIe card), we have to try again sometimes.
*
* TI TSB82AA2 + TSB81BA3(A) cards signal LPS enabled early but
* cannot actually use the phy at that time. These need tens of
* millisecods pause between LPS write and first phy access too.
*
* But do not wait for 50msec on Agere/LSI cards. Their phy
* arbitration state machine may time out during such a long wait.
*/

reg_write(ohci, OHCI1394_HCControlSet,
OHCI1394_HCControl_LPS |
OHCI1394_HCControl_postedWriteEnable);
flush_writes(ohci);

for (lps = 0, i = 0; !lps && i < 3; i++) {
if (!(ohci->quirks & QUIRK_PHY_LCTRL_TIMEOUT))
msleep(50);

for (lps = 0, i = 0; !lps && i < 150; i++) {
msleep(1);
lps = reg_read(ohci, OHCI1394_HCControlSet) &
OHCI1394_HCControl_LPS;
}
Expand Down

0 comments on commit ebcb46d

Please sign in to comment.