All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Richter <richter@rus.uni-stuttgart.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-kernel@vger.kernel.org,
	Josep Lladonosa <jlladono@gmail.com>,
	dahinds@users.sourceforge.net, linux-pcmcia@lists.infradead.org
Subject: [PCMCIA] Solved: No USB 2.0 (ehci) in PCMCIA slot on E7110
Date: Sun, 11 Aug 2013 19:24:36 +0200	[thread overview]
Message-ID: <5207C8D4.1040609@rus.uni-stuttgart.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1308102140420.10834-100000@netrider.rowland.org>

Dear Alan, Josep, David, dear PCMCIA maintainers,

this is on followup of a hang I reported earlier when using a delock 
(NEC-based) PCMCIA card in a O2Micro slot of an oldish E7110 Fujitsu 
laptop. The phenomenon is that read accesses through the ehci interface 
of the USB host adapter are unreliable, and write accesses are outright 
impossible and create hangs and bad data being transmitted. The 
miscommunication on the USB port is so bad that it erased the super 
block of an external hard drive I have, thus causing loss of files on 
this drive. BUMMER!

While I searched for a long time in the usb subsystem, I found that this 
is actually innocent of the hang, and the trouble is rather in the 
pcmcia system.

The error was introduced in kernel 2.6.32, 2.6.31 worked fine. After a 
lot of bisection work, I finally found the source of the error.
The trouble is in drivers/pcmcia/o2micro.h, line 137 as of the linux 
3.10.5 kernel. It's likely in the close vicinity for the current 
development kernel:

		case PCI_DEVICE_ID_O2_6729:
		case PCI_DEVICE_ID_O2_6730:
		case PCI_DEVICE_ID_O2_6812:
		case PCI_DEVICE_ID_O2_6832:
		case PCI_DEVICE_ID_O2_6836:
		case PCI_DEVICE_ID_O2_6933: /* <--- this one! */
			use_speedup = false;
			break;

This line disables read prefetch and write bursting of the O2 pcmcia 
bridge chip found in this laptop, thus pcmcia communication is then 
entirely CPU-based, and simply too slow to generate signals to be 
conforming to the ehci protocol. ohci (USB 1.0) works. Note that this is 
only a 1.7Ghz Pentium-4-M dinosaur.

I understand the care necessary to disable this for some broken 
machines, but on the other hand on my machine write bursting does work, 
apparently, and *not* enabling it broke the communications so badly that 
it harmed data integrity on an external disk.

Thus, unconditionally disabling write bursts on the mentioned O2 bridge 
is not the right action. Probably the bridge should allow users of this 
bridge to query which speeds are available, and either disable the 
higher speed protocols like ehci, or include some kind of yet to be 
determined test that would allow to check whether the chip *is* actually 
broken. As said, it isn't here.

As a shorter time resolution, I would recommend to expose this as a 
configuration item in the kernel configuration dialog so I could build 
my kernel in the correct way, without running into the risk of ruining
data on external devices. (-;

For your information, this is the lspci output of the (un-)affected O2 card:
02:0a.0 CardBus bridge: O2 Micro, Inc. OZ6933/711E1 CardBus/SmartCardBus 
Controller (rev 02)
02:0a.1 CardBus bridge: O2 Micro, Inc. OZ6933/711E1 CardBus/SmartCardBus 
Controller (rev 02)

or numeric:

02:0a.0 0607: 1217:6933 (rev 02)
02:0a.1 0607: 1217:6933 (rev 02)

What is also probably helpful is the output of dmidecode to identify the 
product:

Handle 0x0001, DMI type 1, 25 bytes
System Information
         Manufacturer: FUJITSU SIEMENS
         Product Name: LIFEBOOK E Series
         Version:
         Serial Number: YBSN003702
         UUID: D1552D78-AB36-11D6-8B14-00E000AE4E45
         Wake-up Type: Power Switch

Handle 0x0002, DMI type 2, 8 bytes
Base Board Information
         Manufacturer: FUJITSU
         Product Name: FJNB15C
         Version:
         Serial Number:

Handle 0x0021, DMI type 9, 13 bytes
System Slot Information
         Designation: CardBus-1
         Type: 32-bit PC Card (PCMCIA)
         Current Usage: Unknown
         Length: Other
         ID: Adapter 0, Socket 0
         Characteristics:
                 5.0 V is provided
                 3.3 V is provided
                 PC Card-16 is supported
                 Cardbus is supported
                 Modem ring resume is supported
                 PME signal is supported

Handle 0x0022, DMI type 9, 13 bytes
System Slot Information
         Designation: CardBus-2
         Type: 32-bit PC Card (PCMCIA)
         Current Usage: Unknown
         Length: Other
         ID: Adapter 1, Socket 0
         Characteristics:
                 5.0 V is provided
                 3.3 V is provided
                 PC Card-16 is supported
                 Cardbus is supported
                 Modem ring resume is supported
                 PME signal is supported

(yes, there are two pcmcia slots here)

Maybe that helps as an identification, too, before turning 
write-bursting off.

Thanks, and please let me know if I can be of any further help to 
resolve the problem. It's currently successfully patched away for my 
kernel, but that's not a good solution.

Greetings,
	Thomas

  parent reply	other threads:[~2013-08-11 17:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-09  6:00 [HANG] Trouble with NEC-based USB adapter in PCMCIA slot on E7110 Thomas Richter
2013-08-09 17:46 ` Alan Stern
2013-08-09 19:29   ` Thomas Richter
2013-08-09 19:35     ` Alan Stern
2013-08-09 23:14       ` Thomas Richter
2013-08-10  1:07         ` Alan Stern
2013-08-10  8:36           ` Thomas Richter
2013-08-10 11:26           ` Thomas Richter
2013-08-10 12:04             ` Alan Stern
2013-08-10 19:04               ` Josep Lladonosa
2013-08-10 19:52                 ` Thomas Richter
2013-08-10 19:58                   ` Josep Lladonosa
2013-08-10 20:03                     ` Josep Lladonosa
2013-08-10 20:05                       ` Thomas Richter
2013-08-10 20:05                     ` Thomas Richter
2013-08-11  1:40                 ` Alan Stern
2013-08-10 19:48               ` Thomas Richter
2013-08-11  1:46                 ` Alan Stern
2013-08-11  8:51                   ` Thomas Richter
2013-08-11 13:27                   ` Thomas Richter
2013-08-11 17:24                   ` Thomas Richter [this message]
2013-08-12 21:25                     ` [PCMCIA] Solved: No USB 2.0 (ehci) " Andreas Mohr
2013-08-13  5:57                       ` Tomas Kovacik

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=5207C8D4.1040609@rus.uni-stuttgart.de \
    --to=richter@rus.uni-stuttgart.de \
    --cc=dahinds@users.sourceforge.net \
    --cc=jlladono@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=stern@rowland.harvard.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.