linux/drivers/usb/host
Tony Olech 4b87361d49 USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card
ELAN's U132 is a USB to CardBus OHCI controller adapter,
    designed specifically for CardBus 3G data cards to
    function in machines without a CardBus slot.
The "ftdi-elan" module is a USB client driver, that detects
    a supported CardBus OHCI controller plugged into the
    U132 adapter and thereafter provides the conduit for
    for access by the "u132-hcd" module.
The "u132-hcd" module is a (cut-down OHCI) host controller
    that supports a single OHCI function of the CardBus 
    card inserted into the U132 adapter.

The problem with the initial implementation is that when
the CardBus card inserted into the U132 adapter has multiple
functions (and a CardBus card can support up to 4 functions),
it was the first function that was arbitrarily choosen.

The first batch of 3G cards tested, like the Merlin Qualcomm
V620, have two functions each supporting a seperate USB OHCI
host controller, of which it was that first function that is
wired up to the 3G modem.

Then along comes the Vodafone Mobile Connect 3G/GPRS data card,
aka "Option GT 3G Quad" as printed on it's rear or "Option N.V.
GlobeTrotter Fusion Quad Lite" as read with "lspci -v". And it
has the meaningful functionality in the second CardBus function.

That presents a problem because it was the "ftdi-elan" module
alone that knows how to communicate to the embedded CardBus slot
and the "u132-hcd" module alone that knows how to access the
pcmcia configuration and CardBus accessible memory space. And
of course, the information about attached (internally hardwired)
devices is contained within USB configuration embedded somewhere
within the CardBus card.

If only the "u132-hcd" module probe() interface could return a
result code that propagated back to the instigating function
platform_device_register() then the "ftdi-elan" module could
try an alternative CardBus function.     However in spite of
the recent changes to the drivers/base/ routines that moved 
device_attach() from bus_add_device() to bus_attach_device()
both of those routines lose the "failed to attach" 0 result
code and thus the calling routine, namely device_add() is
incapable of propaging the "failed to attach" condition back
to platform_device_add() and consequently back to the caller
of platform_device_register()

Experiments show that patching bus_attach_device() to return
ENODEV fails with the kernel locking up very early during
boot. But, however, if the patch is restricted to calls from
platform_device_add() then it does seem to work.

Unfortunately, until the kernel's drivers/base is properly
modified to propagate -ENODEV back to the caller of
platform_device_register(), it is necessary to "fix" the
"ftdi-elan" module by importing knowledge from the 
"u132-hcd" module. This is the reason for the duplicated
functionality introduced in this patch.

Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:27 -08:00
..
Kconfig Fix misc Kconfig typos 2006-11-30 05:22:59 +01:00
Makefile USB: u132-hcd: host controller driver for ELAN U132 adapter 2006-09-27 11:58:59 -07:00
ehci-au1xxx.c USB: Properly unregister reboot notifier in case of failure in ehci hcd 2006-09-27 11:58:54 -07:00
ehci-dbg.c [PATCH] slab: remove SLAB_ATOMIC 2006-12-07 08:39:24 -08:00
ehci-fsl.c USB: Properly unregister reboot notifier in case of failure in ehci hcd 2006-09-27 11:58:54 -07:00
ehci-fsl.h
ehci-hcd.c EHCI: Fix root-hub and port suspend/resume problems 2006-12-01 14:25:52 -08:00
ehci-hub.c EHCI: Fix root-hub and port suspend/resume problems 2006-12-01 14:25:52 -08:00
ehci-mem.c USB: EHCI whitespace fixes (cosmetic) 2006-09-27 11:58:56 -07:00
ehci-pci.c EHCI: Fix root-hub and port suspend/resume problems 2006-12-01 14:25:52 -08:00
ehci-q.c USB: revert EHCI VIA workaround patch 2006-10-17 13:57:18 -07:00
ehci-sched.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
ehci.h EHCI: Fix root-hub and port suspend/resume problems 2006-12-01 14:25:52 -08:00
hc_crisv10.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
hc_crisv10.h
isp116x-hcd.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
isp116x.h USB: Dealias -110 code (more complete) 2006-09-27 11:59:00 -07:00
ohci-at91.c USB: ohci at91 warning fix 2006-12-20 10:14:27 -08:00
ohci-au1xxx.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-dbg.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-ep93xx.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-hcd.c USB: OHCI support for PNX8550 2006-12-20 10:14:27 -08:00
ohci-hub.c USB: ohci handles hardware faults during root port resets 2006-12-20 10:14:27 -08:00
ohci-lh7a404.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-mem.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-omap.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-pci.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-pnx4008.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-pnx8550.c USB: OHCI support for PNX8550 2006-12-20 10:14:27 -08:00
ohci-ppc-soc.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-pxa27x.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-q.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-s3c2410.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci-sa1111.c USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
ohci.h USB: ohci whitespace/comment fixups 2006-12-20 10:14:26 -08:00
pci-quirks.c [PATCH] USB: Kill compiler warning in quirk_usb_handoff_ohci 2006-07-12 16:03:22 -07:00
pci-quirks.h [PATCH] USB: pci-quirks.c: proper prototypes 2006-04-14 11:12:20 -07:00
sl811-hcd.c IRQ: Maintain regs pointer globally rather than passing to IRQ handlers 2006-10-05 15:10:12 +01:00
sl811.h
sl811_cs.c [PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation 2006-12-04 20:12:02 -05:00
u132-hcd.c USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card 2006-12-20 10:14:27 -08:00
uhci-debug.c USB: Make file operations structs in drivers/usb const. 2006-09-27 11:58:52 -07:00
uhci-hcd.c UHCI: module parameter to ignore overcurrent changes 2006-12-20 10:14:26 -08:00
uhci-hcd.h [PATCH] UHCI: Improve FSBR-off timing 2006-06-21 15:04:16 -07:00
uhci-hub.c UHCI: module parameter to ignore overcurrent changes 2006-12-20 10:14:26 -08:00
uhci-q.c [PATCH] slab: remove SLAB_ATOMIC 2006-12-07 08:39:24 -08:00