Discussion:
Problem with USB keyboard + ehci.mod
Richard Foltyn
2014-04-28 15:25:57 UTC
Permalink
Dear listers,

I have a USB hub/switch (ATEN US224) to share a USB keyboard / mouse
between two computers.

On one of these computers, the keyboard in the grub2 menu works only
if I pre-load ehci.mod (independent of whether "legacy USB support" is
enabled in BIOS or not).

However, as soon as I load ehci.mod, the partitions present on the
hard drive are no longer seen by grub2's ls and I can no longer boot
into Windows (Linux still works since it resides on LVM).
I.e., BEFORE loading ehci, ls on the grub2 command line shows something like
(hd0) (hd0,msdos1) (hd0,msdos2) + some LVM volumes

AFTER I load ehci I see
(usb0a) (usb0b) (usb0c) (usb0d) + some LVM volumes

I assume these correspond the x-in-1 card reader that's connected via USB.

Hence I can no longer boot into Windows, which resides on (hd0,msdos1).

If there is no other way to get the keyboard working without loading
ehci, how do I get the disk partitions 'back'?

Any help is greatly appreciated.
Best,
Richard

System info: Ubuntu 14.04 64bit with grub 2.02-beta9;
This is an older BIOS-based system (no UEFI).

lspci | grep -i usb
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:12.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0
USB OHCI1 Controller
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB OHCI0 Controller
00:13.1 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0
USB OHCI1 Controller
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB EHCI Controller
00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB OHCI2 Controller

Hard drive:
Model: ATA Samsung SSD 840 (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 157GB 157GB primary ntfs boot
2 157GB 250GB 92,8GB primary lvm
Andrey Borzenkov
2014-04-28 15:59:52 UTC
Permalink
В Mon, 28 Apr 2014 17:25:57 +0200
Post by Richard Foltyn
Dear listers,
I have a USB hub/switch (ATEN US224) to share a USB keyboard / mouse
between two computers.
On one of these computers, the keyboard in the grub2 menu works only
if I pre-load ehci.mod (independent of whether "legacy USB support" is
enabled in BIOS or not).
However, as soon as I load ehci.mod, the partitions present on the
hard drive are no longer seen by grub2's ls
Yes; loading ehci explicitly disables native (BIOS) disk driver.
Post by Richard Foltyn
and I can no longer boot
into Windows (Linux still works since it resides on LVM).
I.e., BEFORE loading ehci, ls on the grub2 command line shows something like
(hd0) (hd0,msdos1) (hd0,msdos2) + some LVM volumes
AFTER I load ehci I see
(usb0a) (usb0b) (usb0c) (usb0d) + some LVM volumes
"some LVM volumes" is actually minor cosmetic bug here, but I'm not
sure how difficult it is to track all references.

I'm afraid this does not have easy solution. As I understand, native
driver is disabled because driver tells BIOS to relinquish USB control
and we do not know what is controlled - it could as well be hard disk
or other mass storage and we lose access to it (or worse crash system
when accessing it).

What you could try - try loading ahci driver (better via "nativedisk"
command if your version supports it - it will also load ehci among
others). Thus you will hopefully get native access (not via BIOS) to
the same disk.
Richard Foltyn
2014-04-28 16:54:57 UTC
Permalink
Post by Andrey Borzenkov
What you could try - try loading ahci driver (better via "nativedisk"
command if your version supports it - it will also load ehci among
others). Thus you will hopefully get native access (not via BIOS) to
the same disk.
Thanks for the suggestion. Unfortunately, 'nativedisk' never returns
control and the HDD LED is continuously lit (I reset the PC after ~
5min). Loading 'ahci' by itself works, but then executing 'ls' has the
same effect.

Best,
Richard
Andrey Borzenkov
2014-04-28 17:17:52 UTC
Permalink
В Mon, 28 Apr 2014 18:54:57 +0200
Post by Richard Foltyn
Post by Andrey Borzenkov
What you could try - try loading ahci driver (better via "nativedisk"
command if your version supports it - it will also load ehci among
others). Thus you will hopefully get native access (not via BIOS) to
the same disk.
Thanks for the suggestion. Unfortunately, 'nativedisk' never returns
control and the HDD LED is continuously lit (I reset the PC after ~
5min). Loading 'ahci' by itself works, but then executing 'ls' has the
same effect.
Could you show full "lspci -nnv"?
Richard Foltyn
2014-04-28 18:17:18 UTC
Permalink
Post by Andrey Borzenkov
Could you show full "lspci -nnv"?
Here it comes:

# lspci -nnv
00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] RS880
Host Bridge [1022:9601]
Subsystem: Advanced Micro Devices, Inc. [AMD] RS880 Host
Bridge [1022:9601]
Flags: bus master, 66MHz, medium devsel, latency 32
Memory at <ignored> (64-bit, non-prefetchable) [size=512M]
Capabilities: [c4] HyperTransport: Slave or Primary Interface
Capabilities: [54] HyperTransport: UnitID Clumping
Capabilities: [40] HyperTransport: Retry Mode
Capabilities: [9c] HyperTransport: #1a
Capabilities: [f8] HyperTransport: #1c

00:02.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] RS780
PCI to PCI bridge (ext gfx port 0) [1022:9603] (prog-if 00 [Normal
decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
I/O behind bridge: 0000e000-0000efff
Memory behind bridge: f8000000-fbffffff
Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff
Capabilities: [50] Power Management version 3
Capabilities: [58] Express Root Port (Slot+), MSI 00
Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [b0] Subsystem: Advanced Micro Devices, Inc.
[AMD] Device [1022:9601]
Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1
Len=010 <?>
Capabilities: [110] Virtual Channel
Kernel driver in use: pcieport

00:0a.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD]
RS780/RS880 PCI to PCI bridge (PCIE port 5) [1022:9609] (prog-if 00
[Normal decode])
Flags: bus master, fast devsel, latency 0
Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
I/O behind bridge: 0000d000-0000dfff
Memory behind bridge: fdc00000-fdcfffff
Prefetchable memory behind bridge: 00000000fdf00000-00000000fdffffff
Capabilities: [50] Power Management version 3
Capabilities: [58] Express Root Port (Slot+), MSI 00
Capabilities: [a0] MSI: Enable+ Count=1/1 Maskable- 64bit-
Capabilities: [b0] Subsystem: Advanced Micro Devices, Inc.
[AMD] Device [1022:9601]
Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+
Capabilities: [100] Vendor Specific Information: ID=0001 Rev=1
Len=010 <?>
Capabilities: [110] Virtual Channel
Kernel driver in use: pcieport

00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] [1002:4391] (prog-if 01
[AHCI 1.0])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:b002]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 22
I/O ports at ff00 [size=8]
I/O ports at fe00 [size=4]
I/O ports at fd00 [size=8]
I/O ports at fc00 [size=4]
I/O ports at fb00 [size=16]
Memory at fe02f000 (32-bit, non-prefetchable) [size=1K]
Capabilities: [60] Power Management version 2
Capabilities: [70] SATA HBA v1.0
Kernel driver in use: ahci

00:12.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] (prog-if 10 [OHCI])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:5004]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
Memory at fe02e000 (32-bit, non-prefetchable) [size=4K]
Kernel driver in use: ohci-pci

00:12.1 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0 USB OHCI1 Controller [1002:4398] (prog-if 10 [OHCI])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:5004]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
Memory at fe02d000 (32-bit, non-prefetchable) [size=4K]
Kernel driver in use: ohci-pci

00:12.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396] (prog-if 20 [EHCI])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:5004]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 17
Memory at fe02c000 (32-bit, non-prefetchable) [size=256]
Capabilities: [c0] Power Management version 2
Capabilities: [e4] Debug port: BAR=1 offset=00e0
Kernel driver in use: ehci-pci

00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB OHCI0 Controller [1002:4397] (prog-if 10 [OHCI])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:5004]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
Memory at fe02b000 (32-bit, non-prefetchable) [size=4K]
Kernel driver in use: ohci-pci

00:13.1 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0 USB OHCI1 Controller [1002:4398] (prog-if 10 [OHCI])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:5004]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
Memory at fe02a000 (32-bit, non-prefetchable) [size=4K]
Kernel driver in use: ohci-pci

00:13.2 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB EHCI Controller [1002:4396] (prog-if 20 [EHCI])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:5004]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 19
Memory at fe029000 (32-bit, non-prefetchable) [size=256]
Capabilities: [c0] Power Management version 2
Capabilities: [e4] Debug port: BAR=1 offset=00e0
Kernel driver in use: ehci-pci

00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD/ATI] SBx00
SMBus Controller [1002:4385] (rev 3c)
Subsystem: Gigabyte Technology Co., Ltd GA-MA770-DS3rev2.0
Motherboard [1458:4385]
Flags: 66MHz, medium devsel
Capabilities: [b0] HyperTransport: MSI Mapping Enable- Fixed+

00:14.1 IDE interface [0101]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 IDE Controller [1002:439c] (prog-if 8a [Master SecP
PriP])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:5002]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 16
I/O ports at 01f0 [size=8]
I/O ports at 03f4
I/O ports at 0170 [size=8]
I/O ports at 0374
I/O ports at fa00 [size=16]
Capabilities: [70] MSI: Enable- Count=1/1 Maskable- 64bit-
Kernel driver in use: pata_atiixp

00:14.2 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI]
SBx00 Azalia (Intel HDA) [1002:4383]
Subsystem: Gigabyte Technology Co., Ltd Device [1458:a102]
Flags: bus master, slow devsel, latency 32, IRQ 16
Memory at fe024000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Kernel driver in use: snd_hda_intel

00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 LPC host controller [1002:439d]
Subsystem: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 LPC host controller [1002:439d]
Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD/ATI]
SBx00 PCI to PCI Bridge [1002:4384] (prog-if 01 [Subtractive decode])
Flags: bus master, VGA palette snoop, 66MHz, medium devsel, latency 64
Bus: primary=00, secondary=03, subordinate=03, sec-latency=64
I/O behind bridge: 0000c000-0000cfff
Memory behind bridge: fde00000-fdefffff
Prefetchable memory behind bridge: fdd00000-fddfffff

00:14.5 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 USB OHCI2 Controller [1002:4399] (prog-if 10 [OHCI])
Subsystem: Gigabyte Technology Co., Ltd Device [1458:5004]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 18
Memory at fe028000 (32-bit, non-prefetchable) [size=4K]
Kernel driver in use: ohci-pci

00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family
10h Processor HyperTransport Configuration [1022:1200]
Flags: fast devsel
Capabilities: [80] HyperTransport: Host or Secondary Interface

00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family
10h Processor Address Map [1022:1201]
Flags: fast devsel

00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family
10h Processor DRAM Controller [1022:1202]
Flags: fast devsel

00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family
10h Processor Miscellaneous Control [1022:1203]
Flags: fast devsel
Capabilities: [f0] Secure device <?>
Kernel driver in use: k10temp

00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family
10h Processor Link Control [1022:1204]
Flags: fast devsel

01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GF106
[GeForce GTS 450] [10de:0dc4] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:2360]
Flags: bus master, fast devsel, latency 0, IRQ 43
Memory at f8000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=128M]
Memory at dc000000 (64-bit, prefetchable) [size=32M]
I/O ports at ef00 [size=128]
[virtual] Expansion ROM at d8000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [b4] Vendor Specific Information: Len=14 <?>
Capabilities: [100] Virtual Channel
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1
Len=024 <?>
Kernel driver in use: nouveau

01:00.1 Audio device [0403]: NVIDIA Corporation GF106 High Definition
Audio Controller [10de:0be9] (rev a1)
Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:2360]
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at fbffc000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Kernel driver in use: snd_hda_intel

02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd.
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168]
(rev 02)
Subsystem: Gigabyte Technology Co., Ltd Motherboard [1458:e000]
Flags: bus master, fast devsel, latency 0, IRQ 42
I/O ports at de00 [size=256]
Memory at fdfff000 (64-bit, prefetchable) [size=4K]
Memory at fdfe0000 (64-bit, prefetchable) [size=64K]
[virtual] Expansion ROM at fdf00000 [disabled] [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=2 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 12-34-56-78-12-34-56-78
Kernel driver in use: r8169

03:0e.0 FireWire (IEEE 1394) [0c00]: Texas Instruments TSB43AB23
IEEE-1394a-2000 Controller (PHY/Link) [104c:8024] (prog-if 10 [OHCI])
Subsystem: Gigabyte Technology Co., Ltd Motherboard [1458:1000]
Flags: bus master, medium devsel, latency 32, IRQ 22
Memory at fdeff000 (32-bit, non-prefetchable) [size=2K]
Memory at fdef8000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [44] Power Management version 2
Kernel driver in use: firewire_ohci
Andrey Borzenkov
2014-04-28 18:42:23 UTC
Permalink
В Mon, 28 Apr 2014 20:17:18 +0200
Post by Richard Foltyn
Post by Andrey Borzenkov
Could you show full "lspci -nnv"?
# lspci -nnv
00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] [1002:4391] (prog-if 01
[AHCI 1.0])
00:14.1 IDE interface [0101]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 IDE Controller [1002:439c] (prog-if 8a [Master SecP
PriP])
And which one drives your disk? You may try pata in case it is
the latter.
Richard Foltyn
2014-04-28 19:42:46 UTC
Permalink
Post by Andrey Borzenkov
В Mon, 28 Apr 2014 20:17:18 +0200
Post by Richard Foltyn
Post by Andrey Borzenkov
Could you show full "lspci -nnv"?
# lspci -nnv
00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] [1002:4391] (prog-if 01
[AHCI 1.0])
00:14.1 IDE interface [0101]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 IDE Controller [1002:439c] (prog-if 8a [Master SecP
PriP])
And which one drives your disk? You may try pata in case it is
the latter.
Unfortunately it's an SSD that is connected to the SATA controller in
AHCI mode (and I guess switching it to something else is not a good
idea, as I'd have to reinstall Windows).
Richard Foltyn
2014-04-29 16:20:17 UTC
Permalink
BTW, just for the sake of completeness: By pure chance I figured out
that if some USB device (e.g. a USB headset) is plugged into the front
USB panel, then the USB keyboard actually works in the GRUB menu even
without loading the 'ehci' module. I have no clue what is going on
there, but I'll just use this 'solution' for the moment.

On Mon, Apr 28, 2014 at 9:42 PM, Richard Foltyn
Post by Richard Foltyn
Post by Andrey Borzenkov
В Mon, 28 Apr 2014 20:17:18 +0200
Post by Richard Foltyn
Post by Andrey Borzenkov
Could you show full "lspci -nnv"?
# lspci -nnv
00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] [1002:4391] (prog-if 01
[AHCI 1.0])
00:14.1 IDE interface [0101]: Advanced Micro Devices, Inc. [AMD/ATI]
SB7x0/SB8x0/SB9x0 IDE Controller [1002:439c] (prog-if 8a [Master SecP
PriP])
And which one drives your disk? You may try pata in case it is
the latter.
Unfortunately it's an SSD that is connected to the SATA controller in
AHCI mode (and I guess switching it to something else is not a good
idea, as I'd have to reinstall Windows).
Continue reading on narkive:
Loading...