public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: David Brownell <david-b@pacbell.net>
Cc: "Lev A. Melnikovsky" <melnikovsky@mail.ru>,
	Alessandro Suardi <alessandro.suardi@gmail.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: ehci-hcd affects hda speed
Date: Tue, 18 Mar 2008 00:23:49 +0100	[thread overview]
Message-ID: <47DEFD85.1050706@keyaccess.nl> (raw)
In-Reply-To: <200803171400.40045.david-b@pacbell.net>

[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]

On 17-03-08 22:00, David Brownell wrote:

>> On 15-03-08 23:46, Lev A. Melnikovsky wrote:
>>
>>> changing the bit 5 (EHCI sleep time select:  0=1us 1=10us)
>>> of register 0x4B seems to resolve my own problem.
> 
> Note that 10 usec is the value used in the EHCI spec.
> 
> And yes, waiting only 1 usec between schedule scans is
> absolutely certain to hammer on the PCI bus quite rudely,
> preventing other devices from getting Real Work done.
> 
> Could someone put together an EHCI patch to make sure
> that bit is set on vt6212 parts?  For the VT8235 that
> register seems to be marked (in an old document someone
> forwarded to me) as "reserved, do not program"; so this
> should be specific to vt6212 EHCI.  (PCI vendor 0x1106,
> device 0x3104, revision 0x60 ... the revision being what
> says "vt6212" vs "vt8235" or "vt8237" etc.

Just something like this? Completely untested as I've not the hardware 
anymore. Googling for an old lspci, I had a revision 0x63, and Lev has a 
revision 0x65. The VT6212(L) should be 0x60+ it seems.

The "CC:" should be a "Tested-by:" if that's actually the case.

But yes, as he also asked, should this be the fix at all?

Rene.

[-- Attachment #2: vt6212_ehci_sleep_time.diff --]
[-- Type: text/plain, Size: 1008 bytes --]

commit fb221b24a314069af26db8c9beb6c843efcafa38
Author: Rene Herman <rene.herman@gmail.com>
Date:   Tue Mar 18 00:02:16 2008 +0100

    USB: VIA VT6212 10us EHCI sleep time select
    
    The VIA VT6212 uses a 1us EHCI sleep time by default which
    hammers the PCI bus bad. Use the 10us spec value instead
    as suggested by Lev A. Melnikovsky.
    
    CC: Lev A. Melnikovsky <melnikovsky@mail.ru>
    Signed-off-by: Rene Herman <rene.herman@gmail.com>

diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c
index 3ba0166..35a6ccb 100644
--- a/drivers/usb/host/ehci-pci.c
+++ b/drivers/usb/host/ehci-pci.c
@@ -152,6 +152,15 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
 			break;
 		}
 		break;
+	case PCI_VENDOR_ID_VIA:
+		if (pdev->device == 0x3104 && pdev->revision >= 0x60) {
+			u8 tmp;
+
+			/* VT6212: EHCI sleep time 10us (default 1) */
+			pci_read_config_byte(pdev, 0x4b, &tmp);
+			pci_write_config_byte(pdev, 0x4b, tmp | 0x20);
+		}
+		break;
 	}
 
 	ehci_reset(ehci);

  parent reply	other threads:[~2008-03-17 23:23 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04 22:27 ehci-hcd affects hda speed Lev A. Melnikovsky
2008-03-05 16:19 ` Rene Herman
2008-03-05 20:03   ` Alessandro Suardi
2008-03-05 21:03     ` David Brownell
2008-03-06 16:25       ` Alessandro Suardi
2008-03-06 20:10       ` Lev A. Melnikovsky
2008-03-10 10:11         ` Lev A. Melnikovsky
2008-03-15 22:46           ` Lev A. Melnikovsky
2008-03-17 16:15             ` Alessandro Suardi
2008-03-17 21:06             ` David Brownell
     [not found]             ` <47DC596A.4010800@keyaccess.nl>
     [not found]               ` <200803171400.40045.david-b@pacbell.net>
2008-03-17 23:23                 ` Rene Herman [this message]
2008-03-17 23:26                   ` Rene Herman
2008-03-18  0:00                   ` David Brownell
2008-03-18  0:24                     ` Lev A. Melnikovsky
2008-03-18  1:27                       ` Rene Herman
2008-03-18  1:45                         ` David Brownell
2008-03-18  1:23                     ` Rene Herman
2008-03-18  1:55                       ` David Brownell
2008-03-18  3:13                         ` Rene Herman
2008-03-19 23:47                         ` Lev A. Melnikovsky
2008-03-20  0:31                           ` Rene Herman
2008-03-20  5:08                             ` Alessandro Suardi
2008-03-20 11:35                               ` Rene Herman
2008-03-20 21:01                                 ` Alessandro Suardi
2008-04-15 19:56                             ` Lev A. Melnikovsky
2008-04-15 20:02                               ` Oliver Neukum
2008-04-15 20:41                                 ` Lev A. Melnikovsky
2008-04-16  5:38                                   ` Oliver Neukum
2008-04-16 22:23                                     ` Lev A. Melnikovsky
2008-04-17  8:20                                       ` Oliver Neukum
2008-04-15 20:24                               ` Rene Herman
2008-04-15 20:32                               ` Rene Herman
2008-04-15 23:17                               ` David Brownell
2008-04-16 22:44                                 ` Lev A. Melnikovsky
2008-03-18 22:02                       ` Alessandro Suardi
2008-03-18 22:09                         ` Rene Herman

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=47DEFD85.1050706@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=alessandro.suardi@gmail.com \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=melnikovsky@mail.ru \
    /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