Another USB2 hub problem -- sort of solved

This forum is for all AmigaOne 500, Sam440 and Sam460 specific issues.
User avatar
kilaueabart
Posts: 1070
Joined: Mon Mar 05, 2012 2:36 am

Re: Another USB2 hub problem -- sort of solved

Post by kilaueabart »

I've been paying some attention to Metalheart's problem, especially at AmigaWorld.com; I'll go through the thread here carefully as well.

I am almost certain that I changed uboot variable scan_usb_storage to 0 with kb plugged into hub, but it doesn't work now.

I wasn't sure what sequence I should plug things in, so I did it two ways.
Procedure 1: nothing, keyboard into front port, trackball into other front port, powered hub (except I forgot to power it) into back port.
Procedure 2: nothing, powered hub (on) into front port, keyboard into hub, trackball into hub.
The logs are identical through about line 32, then the order of things changes. The "times" given in the log also change. Both logs were dated 02/01/2012 11:38, but actually created at about 14:30, give or take a few minutes.
Hidden Text - Click to Show :
I: [00:00:04] USB stack | | ==========
I: [00:00:04] USB stack | | USB System Software Task started
I: [00:00:04] USB stack | | Starting HCDs...
E: [00:00:04] USB stack | New Fkt | fkt: 0x5FE0A1F0 = Level -1
E: [00:00:04] USB stack | New Fkt | fkt: 0x5FE0A290 = Level 0
I: [00:00:04] EHCI Controller Task Unit 0 | EHCI | Another driver seems to use the PPC460ex USB hardware. Sending shut down notification.
W: [00:00:04] OHCI Controller Task Unit 0 | OHCI | Received request to shutdown unit 0.
W: [00:00:04] OHCI Controller Task Unit 0 | OHCI | Releasing lock for unit 0.
I: [00:00:04] EHCI Controller Task Unit 0 | EHCI | Successfully locked PPC460ex USB hardware.
E: [00:00:04] USB stack | New Fkt | fkt: 0x5FE0A330 = Level -1
E: [00:00:04] USB stack | New Fkt | fkt: 0x5FE0A3D0 = Level 0
I: [00:00:04] USB stack | | ...HCDs started.
I: [00:00:04] USB Fkt Init | Init Fkt | Fkt 0x5FE0A290 is {Vendor: 0x0000, Product: 0x0000, Class: 09.00}
I: [00:00:04] USB Fkt Init | Init Fkt | Fkt 0x5FE0A3D0 is {Vendor: 0x0000, Product: 0x0000, Class: 09.00}
I: [00:00:04] USB Fkt Init | Init Fkt | Fkt 0x5FE0A290 initialized
I: [00:00:04] USB Fkt Init | Init Fkt | Fkt 0x5FE0A3D0 initialized
I: [00:00:04] hub.usbfd | HUB | Hub "Rear Roothub (ohci.usbhcd/0)" has TT thinktime of 8 full speed bittimes and protocol 0
I: [00:00:04] hub.usbfd | HUB | Hub "Rear Roothub (ehci.usbhcd/0)" has TT thinktime of 8 full speed bittimes and protocol 0
I: [00:00:04] hub.usbfd | HUB | All ports are empty
I: [00:00:04] hub.usbfd | HUB | Device found on port 1 of hub "Rear Roothub (ehci.usbhcd/0)".
I: [00:00:05] hub.usbfd | Hub port | Device at port 1 of hub "Rear Roothub (ehci.usbhcd/0)" is high-speed.
E: [00:00:05] USB stack | New Fkt | fkt: 0x5FE0A5B0 = Level 1
I: [00:00:05] hub.usbfd | HUB | Device on hub port 1 successfully added.
I: [00:00:05] EHCI Controller Task Unit 0 | EHCI | Port 0 is not in reset state.
I: [00:00:05] hub.usbfd | HUB | Driver Running
I: [00:00:05] USB Fkt Init | Init Fkt | Fkt 0x5FE0A5B0 is {Vendor: 0x0424, Product: 0x2517, Class: 09.00}
I: [00:00:05] USB Fkt Init | Init Fkt | Fkt 0x5FE0A5B0 initialized
I: [00:00:05] hub.usbfd | HUB | Now configured to use multiple TTs
I: [00:00:05] hub.usbfd | HUB | Hub "" has TT thinktime of 8 full speed bittimes and protocol 2
I: [00:00:05] hub.usbfd | HUB | Device found on port 5 of hub "".
I: [00:00:05] hub.usbfd | Hub port | Device at port 5 of hub "" is low-speed.
Up to this point, line 31 of log, both logs identical.
Next lines through 14:29:20 (line 75 of log) result from 1st order of attachment.
E: [00:00:06] USB stack | New Fkt | fkt: 0x5FE0A6F0 = Level 2
I: [00:00:06] hub.usbfd | HUB | Device on hub port 5 successfully added.
I: [00:00:06] hub.usbfd | HUB | Device found on port 7 of hub "".
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0A6F0 is {Vendor: 0x0B39, Product: 0x0001, Class: 00.00}
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0A6F0 initialized
I: [00:00:06] hub.usbfd | Hub port | Device at port 7 of hub "" is high-speed.
E: [00:00:06] USB stack | New Fkt | fkt: 0x5FE0A790 = Level 2
I: [00:00:06] hub.usbfd | HUB | Device on hub port 7 successfully added.
I: [00:00:06] hub.usbfd | HUB | Driver Running
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0A790 is {Vendor: 0x0424, Product: 0x2240, Class: 00.00}
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0A790 initialized
I: [00:00:06] MassStorage Device Task | Massstorage | Lun 0 has device type 0x00 (Direct access) and is removable
I: [00:00:06] hub.usbfd | HUB | Device found on port 6 of hub "".
I: [00:00:07] hub.usbfd | Hub port | Device at port 6 of hub "" is low-speed.
E: [00:00:07] USB stack | New Fkt | fkt: 0x5FE0A970 = Level 2
I: [00:00:07] hub.usbfd | HUB | Device on hub port 6 successfully added.
I: [00:00:07] USB Fkt Init | Init Fkt | Fkt 0x5FE0A970 is {Vendor: 0x046D, Product: 0xC404, Class: 00.00}
I: [00:00:07] USB Fkt Init | Init Fkt | Fkt 0x5FE0A970 initialized
I: [00:00:07] MassStorage Device Task | Sys_EndInitialAttachmentPhase | Initial USB Attachment Phase terminated
I: [11:38:13] USB stack Process | | USB System Software Process started.
I: [11:38:13] USB stack Process | | Reading FD descriptors...
I: [11:38:13] USB stack Process | | ...FD infos read
I: [11:38:13] USB stack Process | Rebind FD | Weak FD "bootkeyboard.usbfd" for Ifc 0x5FD59080 is being preempted.
I: [11:38:13] USB stack Process | Rebind FD | Weak FD "bootmouse.usbfd" for Ifc 0x5FD59100 is being preempted.
I: [11:38:13] USB stack Process | Rebind FD | Weak FD "bootmouse.usbfd" for Ifc 0x5FD596C0 is being preempted.
I: [11:38:13] USB stack Process | | Starting HCDs...
I: [11:38:13] USB stack Process | | ...HCDs started.
I: [11:38:13] USB stack Process | Sys_EndInitialAttachmentPhase | Initial USB Attachment Phase terminated
I: [11:38:13] USB stack Process | | USB stack fullbooted
I: [14:29:19] hub.usbfd | HUB | Device found on port 1 of hub "".
I: [14:29:19] hub.usbfd | Hub port | Device at port 1 of hub "" is high-speed.
E: [14:29:19] USB stack | New Fkt | fkt: 0x51171970 = Level 2
I: [14:29:19] hub.usbfd | HUB | Device on hub port 1 successfully added.
I: [14:29:19] USB Fkt Init | Init Fkt | Fkt 0x51171970 is {Vendor: 0x1A40, Product: 0x0201, Class: 09.00}
I: [14:29:19] USB Fkt Init | Init Fkt | Fkt 0x51171970 initialized
I: [14:29:19] hub.usbfd | HUB | Now configured to use multiple TTs
I: [14:29:19] hub.usbfd | HUB | Hub "USB 2.0 Hub [MTT]" has TT thinktime of 8 full speed bittimes and protocol 2
I: [14:29:20] hub.usbfd | HUB | Device found on port 4 of hub "USB 2.0 Hub [MTT]".
I: [14:29:20] hub.usbfd | Hub port | Device at port 4 of hub "USB 2.0 Hub [MTT]" is high-speed.
E: [14:29:20] USB stack | New Fkt | fkt: 0x51171ab0 = Level 3
I: [14:29:20] hub.usbfd | HUB | Device on hub port 4 successfully added.
I: [14:29:20] hub.usbfd | HUB | Driver Running
I: [14:29:20] USB Fkt Init | Init Fkt | Fkt 0x51171AB0 is {Vendor: 0x05E3, Product: 0x0716, Class: 00.00}
I: [14:29:20] USB Fkt Init | Init Fkt | Fkt 0x51171AB0 initialized
Below are lines 32 through 79 resulting from the 2nd order of attachment
I: [00:00:06] hub.usbfd | HUB | Device on hub port 6 successfully added.
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0A6F0 is {Vendor: 0x1A40, Product: 0x0201, Class: 09.00}
I: [00:00:06] hub.usbfd | HUB | Device found on port 7 of hub "".
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0A6F0 initialized
I: [00:00:06] hub.usbfd | HUB | Now configured to use multiple TTs
I: [00:00:06] hub.usbfd | HUB | Hub "USB 2.0 Hub [MTT]" has TT thinktime of 8 full speed bittimes and protocol 2
I: [00:00:06] hub.usbfd | Hub port | Device at port 7 of hub "" is high-speed.
E: [00:00:06] USB stack | New Fkt | fkt: 0x5FE0A830 = Level 2
I: [00:00:06] hub.usbfd | HUB | Device on hub port 7 successfully added.
I: [00:00:06] hub.usbfd | HUB | Driver Running
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0A830 is {Vendor: 0x0424, Product: 0x2240, Class: 00.00}
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0A830 initialized
I: [00:00:06] MassStorage Device Task | Massstorage | Lun 0 has device type 0x00 (Direct access) and is removable
I: [00:00:06] hub.usbfd | HUB | Device found on port 1 of hub "USB 2.0 Hub [MTT]".
I: [00:00:06] hub.usbfd | Hub port | Device at port 1 of hub "USB 2.0 Hub [MTT]" is low-speed.
E: [00:00:06] USB stack | New Fkt | fkt: 0x5FE0AA10 = Level 3
I: [00:00:06] hub.usbfd | HUB | Device on hub port 1 successfully added.
I: [00:00:06] hub.usbfd | HUB | Device found on port 4 of hub "USB 2.0 Hub [MTT]".
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0AA10 is {Vendor: 0x046D, Product: 0xC404, Class: 00.00}
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0AA10 initialized
I: [00:00:06] hub.usbfd | Hub port | Device at port 4 of hub "USB 2.0 Hub [MTT]" is high-speed.
E: [00:00:06] USB stack | New Fkt | fkt: 0x5FE0AAB0 = Level 3
I: [00:00:06] hub.usbfd | HUB | Device on hub port 4 successfully added.
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0AAB0 is {Vendor: 0x05E3, Product: 0x0716, Class: 00.00}
I: [00:00:06] hub.usbfd | HUB | Device found on port 5 of hub "USB 2.0 Hub [MTT]".
I: [00:00:06] USB Fkt Init | Init Fkt | Fkt 0x5FE0AAB0 initialized
I: [00:00:07] hub.usbfd | Hub port | Device at port 5 of hub "USB 2.0 Hub [MTT]" is low-speed.
E: [00:00:07] USB stack | New Fkt | fkt: 0x5FE0AB50 = Level 3
I: [00:00:07] hub.usbfd | HUB | Device on hub port 5 successfully added.
I: [00:00:07] hub.usbfd | HUB | Driver Running
I: [00:00:07] USB Fkt Init | Init Fkt | Fkt 0x5FE0AB50 is {Vendor: 0x0B39, Product: 0x0001, Class: 00.00}
I: [00:00:07] USB Fkt Init | Init Fkt | Fkt 0x5FE0AB50 initialized
I: [00:00:07] MassStorage Device Task | Massstorage | Lun 0 has device type 0x00 (Direct access) and is removable
I: [00:00:07] MassStorage Device Task | Massstorage | Lun 1 has device type 0x00 (Direct access) and is removable
I: [00:00:07] MassStorage Device Task | Massstorage | Lun 2 has device type 0x00 (Direct access) and is removable
I: [00:00:07] MassStorage Device Task | Massstorage | Lun 3 has device type 0x00 (Direct access) and is removable
I: [00:00:08] MassStorage Device Task | Sys_EndInitialAttachmentPhase | Initial USB Attachment Phase terminated
I: [11:38:13] USB stack Process | | USB System Software Process started.
I: [11:38:13] USB stack Process | | Reading FD descriptors...
I: [11:38:13] USB stack Process | | ...FD infos read
I: [11:38:13] USB stack Process | Rebind FD | Weak FD "bootmouse.usbfd" for Ifc 0x5FD59680 is being preempted.
I: [11:38:13] USB stack Process | Rebind FD | Weak FD "bootkeyboard.usbfd" for Ifc 0x5FD59AC0 is being preempted.
I: [11:38:13] USB stack Process | Rebind FD | Weak FD "bootmouse.usbfd" for Ifc 0x5FD59B40 is being preempted.
I: [11:38:13] USB stack Process | | Starting HCDs...
I: [11:38:13] USB stack Process | | ...HCDs started.
I: [11:38:13] USB stack Process | Sys_EndInitialAttachmentPhase | Initial USB Attachment Phase terminated
I: [11:38:13] USB stack Process | | USB stack fullbooted
Aloha,
Bart
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Another USB2 hub problem -- sort of solved

Post by mechanic »

After taking a look at the hardware setup in the user manual I can see
why the usb log is the way it is.

Near the log start, where is says;
'Another driver seems to use the PPC460ex USB hardware', I wonder if that
is because of the Bootmouse and Bootkeyboard being active at that time.

I also wonder if ALL the USB ports are active at switch on. If so then it
would seem the best port for mouse & keyboard would be J28 (port 7) as it
is OHCI only. Probably not active, not on my 440ep anyway.

Unless someone from Acube can give guidance on this the only way I see to
get the best setup is to experiment, and I don't have a 460.

The 460 board does look very versatile. Though it may not be a dedicated
board for a desktop system it certainly has the ability.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
kilaueabart
Posts: 1070
Joined: Mon Mar 05, 2012 2:36 am

Re: Another USB2 hub problem -- sort of solved

Post by kilaueabart »

I noticed that Metalheart didn't get that 'Another driver seems to use the PPC460ex USB hardware' message in his first log, when he had EHCI commented out.

I'll probably experiment with J28 sooner or later, but the only thing that is obviously not quite right is the search for Device 2 until Timeout while booting, and then the Not found messages I get. Otherwise, as long as I plug the keyboard and mouse into the back USB ports and leave the hub unplugged until such time as I might need it, after OS4 comes up, booting time is satisfactory.

Thanks again for your help.
Aloha,
Bart
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Another USB2 hub problem -- sort of solved

Post by mechanic »

I noticed that Metalheart didn't get that 'Another driver seems to use the PPC460ex USB hardware' message in his first log, when he had EHCI commented out.
That is because the Bootmouse and Bootkeyboard use OHCI and EHCI should go first.
_______________________________________________________________

In your first post you said the 460 displays

Config: PCIe 4x + SATA-2

But, you seem to have a card in the PCIe 1x slot for sii3114. HD + DVD.
The user manual states that you can use one OR the other. So perhaps that
should be - Config: PCIe 4x + PCIe 1x. ??

If you are using the SATA connector then it seems the
sii3114ide_xfer=G0G0
sii3114ide_conf=1020
Should only be set for 1 device.
________________________________________________________________

Looking at the block diagram and motherboard in the manual suggests that
the 460 has a built in USB2 hub.

As I understand (?) EHCI scans first and whatever is not Hi-Speed is then
released by EHCI and delegated to OHCI. That would indicate that first the
USB sets up the internal hub for EHCI, then your external hub EHCI, then
when it finds the Mouse, keyboard, and other low speed devices it must
relinquish control to OHCI.

If you are only using low speed devices or transfering small amounts of
data you may not need the EHCI driver active in KickLayout.

Right now the hub I'm using is an older USB1.1 so it does not matter what
I plug into it, it will only use the OHCI driver anyway. The other, seperate,
port on my 440ep can use EHCI for things like mem sticks and external HDs etc..
But, then again I seldom transfer more than a few meg of data over USB so
speed is not a big deal.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
kilaueabart
Posts: 1070
Joined: Mon Mar 05, 2012 2:36 am

Re: Another USB2 hub problem -- sort of solved

Post by kilaueabart »

In your first post you said the 460 displays

Config: PCIe 4x + SATA-2

But, you seem to have a card in the PCIe 1x slot for sii3114. HD + DVD.
The user manual states that you can use one OR the other. So perhaps that
should be - Config: PCIe 4x + PCIe 1x. ??
It only took me three months to get around to fixing that. (A U-Boot menu matter that I had failed to look into.)

But now that it is fixed, there are minor differences in the usb.log, but the main problem remains:

scanning bus for storage devices ...
[fairly long delay}
1 Storage Device(s) found
SATA Device 0: OK SATA Device 1: OK SATA Device 2: ............
[another delay until it reports on my harddrive and my DVD thing]
Model: Hitachi HD [etc.]
Type: Hard Disk
[etc.]
Model: ATAPI Firm: AL15 [etc.]
Type: Removable CD ROM
[etc.]
[then another pause, followed by:]
not available
[again, long pause and]
not available
Hard Disk not found

I must have something set wrong in U-Boot that makes it keep hunting for "SATA Device 2" later reporting "not available" twice, and "Hard Disk not found" (what does it think that "Hitachi HD" is?), but what could that something be?
Aloha,
Bart
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Another USB2 hub problem -- sort of solved

Post by mechanic »

On my 440ep there is a setting

s4sii_maxbus 1

That keeps Uboot from scanning the second bus for things that are not there.
Not sure what it would be for a 460, but there should be something similar.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
kilaueabart
Posts: 1070
Joined: Mon Mar 05, 2012 2:36 am

Re: Another USB2 hub problem -- sort of solved

Post by kilaueabart »

I've always had

sii3114ide_maxbus=1

That has an "ide" that apparently you don't use on a 440. Anyway, I'll try it your way and see if that does anything.

One thing that puzzles me in particular, and may be a clue, but I'm not smart enough to get anything out of it: I don't understand why I get "SATA Device 0: OK SATA Device 1: OK SATA Device 2: ............" in the first place. According to Media Toolbox, my hard drive is id 0, LUN 0, which my DVD is id 2, LUN 0. Why isn't my DVD SATA Device 2 instead of Device 1?
Aloha,
Bart
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Another USB2 hub problem -- sort of solved

Post by mechanic »

Perhaps Uboot looks at the hardware differently (?) where bus 1 = ports 0 and 2 and
bus 2 = ports 1 and 3.

May be you could post your NVsettings here so someone with a 460 could help better than my guessing.

I think something like nvgetvar > RAM:nv.txt should produce a file that could be copy/pasted.

Wish I could help more. :(
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
User avatar
kilaueabart
Posts: 1070
Joined: Mon Mar 05, 2012 2:36 am

Re: Another USB2 hub problem -- sort of solved

Post by kilaueabart »

Perhaps Uboot looks at the hardware differently (?) where bus 1 = ports 0 and 2 and
bus 2 = ports 1 and 3.
I wondered about that, thinking that *maybe* if I replugged the DVD onto one of the other sii3114 connectors it might solve the problem. I should probably try it before I waste people's time here, but it's kind of hard to get at, and I suspect that it might end up getting me "SATA Device 0: OK SATA Device 1: ..." (followed by "SATA Device 2: OK SATA Device 3: ..."?)

I just had another look at SYS:Documentation/IDE/sii3114_ide.doc, where the following, which I've never quite understood, probably confirms the above:
Hidden Text - Click to Show :
- For now, the driver uses two tasks (and not four, while
it is possible to have all 4 channels transfer in
parallel throgh the use of memory mapped registers, but
this is not reliable yet). The tasks handle the units like this:
o port 0 task handles units 0 and 1 (i.e. ports 0 and 2)
o port 1 task handles units 2 and 3 (i.e. ports 1 and 3)
This means, if you have 2 SATA drives and want to operate them
in parallel, connect them like this :
o drive 1 on port 0 and drive 2 on port 2 (if your board
counts ports from 1), or
o drive 1 on port 1 and drive 2 on port 3
Anyway, the next time I have this turned off I'll pop it open and see what shifting the DVD does. Meanwhile, here are my Uboot variables:
Hidden Text - Click to Show :
baudrate=115200
loads_echo=1
hostname=Sam460ex
stdout=vga
stdin=usbkbd
ide_doreset=on
ide_reset_timeout=15
ide_cd_timeout=20
pcie_mode=RP:RP
pciconfighost=1
ipaddr=192.168.2.50
serverip=192.168.2.222
bootcmd=menu; run menuboot_cmd
menucmd=menu
boot_method=boota
usb_enable_4x0=1
usb_retry=1
usb_ohci_power_down_before_reset=1
ethact=ppc_4xx_eth0
ethaddr=00:50:C2:80:D4:B9
boota_timeout=2
sii3114ide_maxbus=1
boot1=s4sii
scan_usb_storage=0
menuboot_cmd=boota
ver=U-Boot 2010.06.05 (Apr 14 2011 - 10:54:55)
video_activate=pci
hush=0
serdes=pci-e
menuboot_delay=4
os4_commandline=debuglevel=0
bootargs=root=/dev/sda3 console=tty0
s4sii_maxbus=1
I haven't actually tried that last one yet.
Aloha,
Bart
User avatar
kilaueabart
Posts: 1070
Joined: Mon Mar 05, 2012 2:36 am

Re: Another USB2 hub problem -- sort of solved

Post by kilaueabart »

Well for cryin' out loud!

I was out all morning and in a rush to check e-mail when I got home, and forgot that I was going to try replugging drives on my SATA controller. And it booted right up! No time wasted looking for anything, no "Not available"'s, just reports of found items and then AOS!

This has to be because I added "s4sii_maxbus=1" to the Uboot commands. Obviously the SAM's Uboot didn't come with "sii3114ide_maxbus=1" preset -- no one knew what controller I was using so I have to have made that error myself, but I got that out of the documentation. Where should I have found a clue that that only works on A1s and not on SAMs?
Aloha,
Bart
Post Reply