grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] EHCI driver - USB 2.0 support


From: Aleš Nesrsta
Subject: Re: [PATCH] EHCI driver - USB 2.0 support
Date: Sat, 27 Aug 2011 18:42:18 +0200

Hi Vladimir,

there is little bit improved EHCI driver - ehci.c.
Changes in other files are still the same (more precisely, I hope - I
didn't check if there are some other unrelated changes from anybody else
in newest trunk revision...) - usb_ehci_110625_0.

Changes were done according to Your notes:
- ... run indent ... - done
- ... macro into inline function ... - done
- ... volatile attribute ... - done
- ... pointer arithmetic via char* ... - done
- ... access to PCI register in correct way in ownership change ... -
done
- ... "hard way" of ownership change ... - done
- ... use of grub_memalign_dma32 ... - done
- (corrected year in header of file...)

Result:
- driver should run on 64-bits machines with exception if EHCI I/O
registers are mapped above 4G
- driver should run on machines with different virtual/physical
addressing
- driver should run on "big endian" machines (but also original "zero
version" EHCI patch supports big endian)

Remaining issue:
- Any HID low speed device attached via USB 2.0 hub does not work. (It
is most probably because bulk split transfers are differently handled in
comparison with interrupt split transfers. Probably only one solution is
to add interrupt transfers into EHCI driver.)

I made short test, driver looks to be working.

But there can be still mistakes in CPU/LE and VIRT/PHYS conversions - I
cannot test them on x86 machine (or at least I don't know how to do
it...).
Could You (or, of course, anybody else...) test EHCI patch on:
- some "big endian" machine ?
- some machine with different virtual/physical addressing, i.e. like
Yeloong ?


What I didn't:
- ... packed isn't necessary here ... - GCC documentation says:
"packed
    This attribute, attached to struct or union type definition,
specifies that each member of the structure or union is placed to
minimize the memory required."

I.e., it is exactly what we need - members are stored in structure
without any additional space between them. Without this attribute
compiler can align structure members in any way (depend on its defaults
and global settings etc.) - so members can be aligned e.g. to 64 bits
inside structure and in this case we have structure which does not
correspond to EHCI HW data structure.
So, I left "packed" attribute in code.

Best regards
Ales

Attachment: usb_ehci_110625_0
Description: Text Data

Attachment: ehci.c
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]