Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
1 user(s) are online (1 user(s) are browsing Forum)

Members: 0
Guests: 1

more...

Browsing this Thread:   1 Anonymous Users



« 1 2 (3)


Re: State of AROS Drivers

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1006
Offline
Quote:

ncafferkey wrote:
Quote:

ntromans wrote:
On the Gigabyte board nothing works - not USB 1, 2 or 3. Neil has the same board and confirms AROS simply cannot use the onboard USB at all. On the Acer, to be fair, a memory stick can be opened - but when accessing its contents the machine quickly crashes so that's not too useable either.


Yes, the two similar Gigabyte boards that Nigel and I have are essentially XHCI-only. They do have EHCI controllers onboard (at least mine does) but the BIOS doesn't make them available in any configuration. I've filed a bug report with Gigabyte about this and they say they may fix it in a future BIOS version, but I'm not holding my breath!

I faintly recall that on some motherboards the order in which XHCI and USB2 hosts are brought online is important, can't remember the details. We would need a working XHCI driver in order for those motherboards to be able to use USB2 host controller.

This is also true for the older host controllers, e.g. EHCI versus UHCHI/OHCI. EHCI has to have it's companion controller on corresponding PCI slot otherwise it doesn't know which port is it's companion port and can't release it's port (well it can but it needs to know beforehand if that port has a companion port...). On poseidon there's just one PCIUSB driver and all those hosts are on a single driver and some quirks are used for the port forwarding but they doesn't need to be on the same driver. The chipset is able to detect when a port is released and the companion host controller will automaticly take over the port.

In the early days when XHCI came out there was a lot of confusion why USB2 doesn't work out of the box on some machines. There's a lot of talk of it online.

https://superuser.com/questions/480045 ... ing-xhci-pre-boot-mode-do

https://www.tonymacx86.com/threads/usb ... plained.57694/#post372656

Take a look in here from page 227 onwards:
https://www.intel.com/content/dam/www/ ... er-interface-usb-xhci.pdf

The current AROS XHCI driver code can find the USB3 and USB2 ports from the host controller and create a port list for them as well corresponding roothubs.

On some motherboards the XHCI might only have USB3 ports on it's controller and a real EHCI chip and the usb data lines are directed via a digital MUX.

Posted on: 9/25 23:06

Edited by DizzyOfCRN on 2017/9/25 23:29:55
Edited by DizzyOfCRN on 2017/9/25 23:31:22
Edited by DizzyOfCRN on 2017/9/25 23:58:27
Edited by DizzyOfCRN on 2017/9/26 0:04:10
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2004/10/30 17:13
From Ireland
Group:
Member
Posts: 2648
Offline
@DizzyOfCRN

In the case of my Gigabyte board, the EHCI controller can't be seen in the list of PCI devices under either AROS or Ubuntu. I presume it can't be used in that case.

Posted on: 9/26 13:18
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1006
Offline
Quote:

ncafferkey wrote:
@DizzyOfCRN

In the case of my Gigabyte board, the EHCI controller can't be seen in the list of PCI devices under either AROS or Ubuntu. I presume it can't be used in that case.

Is it just AROS or does it show up with other OS'es?

It might be that there's only an XHCI controller on your MB.

Oh... I should have read better. :)

The function BOOL PCIXHCI_FindPorts(struct PCIXHCIUnit *unit) from pcixhci_controller.c should be able to detect the usb3.0 and usb2.0 ports from the XHCI controller. I've only tested it with my setup, but it seems to work...

I don't think that there's a lot of work involved in getting the XHCI driver to somewhat operational state.

Jason back then suggested to use his sata driver's slab memory allocator. Memory allocations are bad in XHCI. That is one issue.

We don't need PCI-X interrupts, I coded the init routine such that it uses PCI INT (event handler 0 only) With PCI-X other event rings can also be used.

Then there's the removal of huge switch statement and adding all the usb3 commands (not all of them are needed at start) and coding the hubss.class to use them.

Also the hardware ring buffers need to be implemented correctly.

One benefit would be that we should get ISOC transfers as the XHCI takes care of lining them up and there's no need to make an scheduler for the different packets.

Posted on: 9/26 20:43

Edited by DizzyOfCRN on 2017/9/26 21:07:36
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1006
Offline
I've taken a closer look at the XHCI driver and it seems there's some more work to do than I remembered...

The driver needs to present two units per controller if the XHCI has both usb3 and usb2 ports. That's because we need to give Poseidon the correct roothub (hub or hubss) and one driver unit can only present one roothub per unit.

There's already code present int the VUSBHCI to sort of implement this but there's no code for the usb3 part.

Higher level usb3 code can be coded with the VUSBHCI driver even before we have a native XHCI driver via the said hosted driver.

Posted on: 9/26 21:35
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1006
Offline
Just tested the VUSBHCI driver and it still builds ok.

These are the steps needed to get hosted usb "working"

1. build the hosted version of AROS (It now needs to be build with --enable_usb30_code)
2. cd into the build directory
3. issue make kernel-usb (if it doesn't build everything then just make the rest)
4. issue make kernel-usb-vusbhci
5. issue make kernel-fs-fat (if intending to use fat usb sticks)
6. issue make kernel-partition (otherwise AROS will crash as it tries to use the partition.library, bug? it should know it hasn't opened it)
7. issue make kernel-usb-classes-hubss

My Linux distribution doesn't allow user to access usb devices, so I made a rule in /etc/udev/rules.d

# Allow user to access all usb devices
SUBSYSTEMS=="usb", \
MODE:="0666"

And saved it as "49-all-usb-devices.rules"

Start hosted AROS and go to prefs and open Trident.
Go to "Controllers" and press "New" and select "vusbhci.device" as unit number 0. press "Online" and press "Save"
Go again to "Controllers" and press "New" and select "vusbhci.device", as unit number 1. press "Online" and press "Save"

Unit 0 is now USB2 roothub and unit 1 is USB3 roothub. (hardcoded, I think that the order isn't significant)

Trident needs to be opened everytime you boot into the hosted version of AROS. There's no usbrombootstrap for the hosted version so Trident is used to setup the USB stack.

VUSBHCI.device depends on libusb so it will need the includes for it on Linux side (libusb-dev or something...)

VUSBHCI may output a lot of debug messages at the moment (I haven't looked it up at this point) Those go of course to the console if started from it.

VUSBHCI just means (V)irtual (USB) (H)ost (C)ontroller (I)nterface

There's only one virtual port per virtual host controller (usb2/usb3 (usb3 not implemented yeat)) AROS will see the usb device when Trident is started and the device plugged in after. AROS can't take a device already plugged in as the driver uses libusb's plug in event. Linux has already enumerated and reset the device so a bit of hackery is needed on AROS side. VUSHCI driver will not reset the device nor issue it a new address. Otherwise it would confuse Linux. AROS will then own the device and use it as it will.

If one wishes to start coding for the USB3 (vusbhci.device now doesn't build without it) then AROS build needs to be configured with the "--enable-usb30-code" switch. This will alter the Poseidon USB stack quite a bit to be USB3 aware. There's a lot of work to do to make sure it's solid.

Posted on: 9/28 4:23

Edited by DizzyOfCRN on 2017/9/28 4:44:09
Edited by DizzyOfCRN on 2017/9/28 4:45:19
Edited by DizzyOfCRN on 2017/9/28 4:59:04
Edited by DizzyOfCRN on 2017/9/28 5:14:36
Edited by DizzyOfCRN on 2017/10/1 3:45:02
Edited by DizzyOfCRN on 2017/10/1 3:45:45
Edited by DizzyOfCRN on 2017/10/1 3:47:48
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2009/11/8 11:03
Group:
Member
Posts: 145
Offline
Quote:

ntromans wrote:
Quote:

DizzyOfCRN wrote:
Quote:

ntromans wrote:
Hi Steve,

The problem is the USB on these machine does not work at all; its not for USB 3 devices, it's just for USB full stop.

Cheers,
Nigel.

Stop using motherboards with VIA-chipset. Or it might be that the motherboard (BIOS) doesn't list the USB PCI device in correct order as stated on USB specifications. Those are really ancient motherboards.


These are not VIA - one is Gigabyte, the other an Acer laptop, both less than a year old and bought new. Basically AROS has no driver for modern xhci controllers.

Cheers,
Nigel.


Most boards you can change USB3 into USB2 via EHCI/OHCI/XHCI BIOS settings so USB3 is NICE but not necessary for AROS

Certainly that works on my X99 board

I really think our biggest limitation is the lack of modern VGA drivers :(

Posted on: 9/30 7:56
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2007/3/13 15:52
From West Midlands, UK
Group:
Member
Posts: 920
Offline
Quote:

Methanoid wrote:

Most boards you can change USB3 into USB2 via EHCI/OHCI/XHCI BIOS settings so USB3 is NICE but not necessary for AROS

Certainly that works on my X99 board

I really think our biggest limitation is the lack of modern VGA drivers :(


It's been a few months since I last played with the Gigabyte board due to real-life events, but as I remember trying to set the controller to 'legacy' USB stopped AROS from booting at all (boot stalled during kernel setup).

Cheers,
Nigel.

Posted on: 9/30 9:54
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2009/11/8 11:03
Group:
Member
Posts: 145
Offline
No, its a toggle between EHCI/XHCI if memory serves that you want

Posted on: 9/30 11:35
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2007/3/13 15:52
From West Midlands, UK
Group:
Member
Posts: 920
Offline
Quote:

Methanoid wrote:
No, its a toggle between EHCI/XHCI if memory serves that you want


Yes, exactly - and when set the machine would not boot and I had to reset the bios via the jumper. Believe me, I tried every option and there was no way to make native USB work; in the end I bought a PCI USB 2 card so I actually had a functional USB. My original point was that USB (and in addition to that point SATA) are so fundamental to getting a machine working. If you look through these posts you see more and more modern machines failing on the SATA and as mentioned my experience with a couple of recent machines is that USB does not work at all or if at all in a flakey manner.

Imagine someone new tries AROS on their < 4 year old hardware and their live disk fails due to SATA and their USB boot also fails due to USB. That's it - they most likely will not persevere or seek out old hardware to try to get things working (even if said old hardware is merely up in the loft), the disk will go in the bin and they'll move on. Now, don't get me wrong - I've never presumed to tell the devs what they should be doing; it's their time and energy they are expending and their right to do what interests them, but as Steve opened a debate as to what drivers might benefit from some love I put my penny's worth in. However, I must admit to being worried that once the 'iMica generation' of hardware has bit the digital dust it may be damn hard to find systems, particularly laptops and netbooks, that will allow even the basic functionality of AROS.

Cheers,
Nigel.

Posted on: 10/1 2:27
Transfer the post to other applications Transfer


Re: State of AROS Drivers

Joined:
2008/2/5 6:58
From Sunny Finland
Group:
Member
Posts: 1006
Offline
I think that there is a bug at compiler/includes/devices/usb_hub.h with the definition of UHCS_THINK_TIME and UHCF_THINK_TIME(_xx)

These seem to start from bit 13, but from http://sdphca.ucsd.edu/lab_equip_manuals/usb_20.pdf page 417 wHubCharacteristics has them in bits 5 to 6. Is it from endian conversion?

hub.class.c uses it on line 870 with psdSetAttrs(PGA_DEVICE, nch->nch_Device, DA_HubThinkTime, (nch->nch_HubAttr & UHCM_THINK_TIME)>>UHCS_THINK_TIME, TAG_END);

and nch->nch_HubAttr = AROS_WORD2LE(uhd->wHubCharacteristics);

Could ncafferkey or someone else take a look at it? At the moment I can't install AROS natively.

Posted on: 10/2 0:30
Transfer the post to other applications Transfer



« 1 2 (3)



You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4364
2 magorium
magorium
4095
3 phoenixkonsole
phoenixkonsole
3892
4 nikolaos
nikolaos
3694
5 deadwood
deadwood
2923
6 ncafferkey
ncafferkey
2648
7 mazze
mazze
2214
8 clusteruk
clusteruk
2111
9 Kalamatee
Kalamatee
2024
10 damocles
damocles
1789
© 2004-2017 AROS Exec