From: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
To: Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
lugovskoy@dev.rtsoft.ru,
Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
Subject: [PATCH] usb: pci-quirks: do not access OHCI_FMINTERVAL register on ULI hw
Date: Tue, 27 May 2014 08:56:42 +0400 [thread overview]
Message-ID: <1401166602-26379-1-git-send-email-nyushchenko@dev.rtsoft.ru> (raw)
This access causes hang on Freescale P2020DS board (that has OHCI
provided by ULI 1533 chip).
Since preserving OHCI_FMINTERVAL was originally done only for NVIDIA
hardware and only later (in c6187597) was turned unconditional, and
c6187597 commit message again mentions only NVIDIA, I think it should be
safe to disable preserving OHCI_FMINTERVAL if device vendor is ULI.
Signed-off-by: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
---
drivers/usb/host/pci-quirks.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 00661d3..5acbd5b 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -571,7 +571,7 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev)
{
void __iomem *base;
u32 control;
- u32 fminterval;
+ u32 uninitialized_var(fminterval);
int cnt;
if (!mmio_resource_enabled(pdev, 0))
@@ -619,7 +619,8 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev)
}
/* software reset of the controller, preserving HcFmInterval */
- fminterval = readl(base + OHCI_FMINTERVAL);
+ if (pdev->vendor != PCI_VENDOR_ID_AL)
+ fminterval = readl(base + OHCI_FMINTERVAL);
writel(OHCI_HCR, base + OHCI_CMDSTATUS);
/* reset requires max 10 us delay */
@@ -628,7 +629,8 @@ static void quirk_usb_handoff_ohci(struct pci_dev *pdev)
break;
udelay(1);
}
- writel(fminterval, base + OHCI_FMINTERVAL);
+ if (pdev->vendor != PCI_VENDOR_ID_AL)
+ writel(fminterval, base + OHCI_FMINTERVAL);
/* Now the controller is safely in SUSPEND and nothing can wake it up */
iounmap(base);
--
1.7.10.4
next reply other threads:[~2014-05-27 4:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 4:56 Nikita Yushchenko [this message]
2014-05-27 15:08 ` [PATCH] usb: pci-quirks: do not access OHCI_FMINTERVAL register on ULI hw Alan Stern
2014-05-28 7:20 ` Nikita Yushchenko
2014-05-28 14:24 ` Alan Stern
2014-05-29 5:34 ` Nikita Yushchenko
2014-05-29 14:32 ` Nikita Yushchenko
2014-05-29 14:42 ` One Thousand Gnomes
2014-05-29 15:33 ` Nikita Yushchenko
2014-05-29 15:35 ` Nikita Yushchenko
2014-05-29 15:44 ` Alan Stern
2014-05-29 15:45 ` Nikita Yushchenko
2014-05-29 17:16 ` Alan Stern
2014-05-27 16:39 ` Sergei Shtylyov
2014-05-28 7:21 ` Nikita Yushchenko
2014-05-28 11:57 ` Sergei Shtylyov
2014-05-27 23:27 ` Greg Kroah-Hartman
2014-05-28 7:12 ` Nikita Yushchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401166602-26379-1-git-send-email-nyushchenko@dev.rtsoft.ru \
--to=nyushchenko@dev.rtsoft.ru \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lugovskoy@dev.rtsoft.ru \
--cc=mathias.nyman@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).