* Re: USB: u132-hcd: host controller driver for ELAN U132 adapter
[not found] <200609051620.k85GK4d24135@elandigitalsystems.com>
@ 2006-09-08 5:45 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2006-09-08 5:45 UTC (permalink / raw)
To: Tony Olech
Cc: Andrew Morton, USB Development List, Kernel Development List,
Bart Prescott
On Tue, Sep 05, 2006 at 04:12:24PM +0100, Tony Olech wrote:
> + #include <linux/config.h>
> + #include <linux/kernel.h>
> + #include <linux/version.h>
> + #include <linux/module.h>
> + #include <linux/moduleparam.h>
> + #include <linux/delay.h>
> + #include <linux/ioport.h>
> + #include <linux/sched.h>
> + #include <linux/slab.h>
> + #include <linux/smp_lock.h>
> + #include <linux/errno.h>
> + #include <linux/init.h>
> + #include <linux/timer.h>
> + #include <linux/list.h>
> + #include <linux/interrupt.h>
> + #include <linux/usb.h>
> + #include <linux/workqueue.h>
> + #include <linux/platform_device.h>
> + #include <linux/pci_ids.h>
> + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
> + #error you need at least 2.6.16 to get mutexes
> + #endif
That check doesn't mean anything in a driver that is in the kernel tree.
You can remove it.
> + #include <asm/io.h>
> + #include <asm/irq.h>
> + #include <asm/system.h>
> + #include <asm/byteorder.h>
> + #include "../core/hcd.h"
> + #include "ohci.h"
> + #define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
> + #define OHCI_INTR_INIT (OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_RD | \
> + OHCI_INTR_WDH)
> + MODULE_AUTHOR("Tony Olech - Elan Digital Systems Limited");
> + MODULE_DESCRIPTION("U132 USB Host Controller Driver");
> + MODULE_LICENSE("GPL");
> + #define INT_MODULE_PARM(n, v) static int n = v;module_param(n, int, 0444)
> + INT_MODULE_PARM(testing, 0);
> + /* Some boards misreport power switching/overcurrent*/
> + static int distrust_firmware = 1;
> + module_param(distrust_firmware, bool, 0);
> + MODULE_PARM_DESC(distrust_firmware, "true to distrust firmware power/overcurren"
> + "t setup");
> + #define U132_INFO(format, arg...) printk(KERN_INFO "u132.%d " format "\n", \
> + u132->sequence_num, ## arg)
> + #define ELAN_INFO(format, arg...) printk(KERN_INFO "u132 " format "\n", ## arg)
> + #define U132_WARN(format, arg...) printk(KERN_WARNING "u132.%d " format "\n", \
> + u132->sequence_num, ## arg)
> + #define ELAN_WARN(format, arg...) printk(KERN_WARNING "u132 " format "\n", ## \
> + arg)
> + #define U132_ERR(format, arg...) printk(KERN_ERR "u132.%d " format "\n", \
> + u132->sequence_num, ## arg)
> + #define ELAN_ERR(format, arg...) printk(KERN_ERR "u132 " format "\n", ## arg)
> + DECLARE_WAIT_QUEUE_HEAD(u132_hcd_wait);
> + /*
> + * u132_module_lock exists to protect access to global variables
> + *
> + */
> + struct mutex u132_module_lock;
Is it supposed to be global like this? Or can it be static?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: USB: u132-hcd: host controller driver for ELAN U132 adapter
[not found] <1158143255.4328.14.camel@n04-207.elan.private>
@ 2006-09-20 21:57 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2006-09-20 21:57 UTC (permalink / raw)
To: Tony Olech
Cc: Andrew Morton, Kernel Development List, USB Development List,
Bart Prescott
On Wed, Sep 13, 2006 at 11:27:35AM +0100, Tony Olech wrote:
> This "u132-hcd" module is one half of the "driver" for
> ELAN's U132 which is a USB to CardBus OHCI controller
> adapter. This module needs the "ftdi-elan" module in
> order to communicate to CardBus OHCI controller inserted
> into the U132 adapter.
>
> When the "ftdi-elan" module detects a supported CardBus
> OHCI controller in the U132 adapter it loads this "u132-hcd"
> module.
>
> Upon a successful device probe() the single workqueue
> is started up which does all the processing of commands
> from the USB core that implement the host controller.
>
> The workqueue maintains the urb queues and issues commands
> via the functions exported by the "ftdi-elan" module. Each
> such command will result in a callback.
>
> Note that the "ftdi-elan" module is a USB client driver.
>
> Note that this "u132-hcd" module is a (cut-down OHCI)
> host controller.
>
> Thus we have a topology with the parent of a host controller
> being a USB client! This really stresses the USB subsystem
> semaphore/mutex handling in the module removal.
>
> Signed-off-by: Tony Olech <tony.olech@elandigitalsystems.com>
I've applied this, and fixed up the build issue (needed to add it also
to the drivers/usb/Makefile file) and the sparse errors, but I'm still
getting these warnings:
drivers/usb/host/ohci.h:605: warning: 'periodic_reinit' defined but not used
drivers/usb/host/ohci.h:629: warning: 'roothub_a' defined but not used
drivers/usb/host/ohci.h:635: warning: 'roothub_portstatus' defined but not used
Care to send me a follow-on patch that fixes this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-20 21:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1158143255.4328.14.camel@n04-207.elan.private>
2006-09-20 21:57 ` USB: u132-hcd: host controller driver for ELAN U132 adapter Greg KH
[not found] <200609051620.k85GK4d24135@elandigitalsystems.com>
2006-09-08 5:45 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox