X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=target%2Flinux%2Fadm5120%2Ffiles%2Fdrivers%2Fusb%2Fhost%2Fadm5120-hcd.c;h=54185966145f45e810525752718efb6b6400a90f;hb=b4f5ad450602411b30e6d9849ce0406a93ffb597;hp=30fe132d99fa5a293827f6d0647d804a31ac12a3;hpb=6c9a138d3cc4bc33bced2352c18c630a9c70fd84;p=openwrt.git diff --git a/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c b/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c index 30fe132d99..5418596614 100644 --- a/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c +++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c @@ -1,19 +1,16 @@ /* - * OHCI HCD (Host Controller Driver) for USB. + * ADM5120 HCD (Host Controller Driver) for USB * - * (C) Copyright 1999 Roman Weissgaerber - * (C) Copyright 2000-2004 David Brownell + * Copyright (C) 2007 Gabor Juhos * - * [ Initialisation is based on Linus' ] - * [ uhci code and gregs ahcd fragments ] - * [ (C) Copyright 1999 Linus Torvalds ] - * [ (C) Copyright 1999 Gregory P. Smith] + * This file was derived from: drivers/usb/host/ohci-hcd.c + * (C) Copyright 1999 Roman Weissgaerber + * (C) Copyright 2000-2004 David Brownell * - * - * OHCI is the main "non-Intel/VIA" standard for USB 1.1 host controller - * interfaces (though some non-x86 Intel chips use it). It supports - * smarter hardware than UHCI. A download link for the spec available - * through the http://www.usb.org website. + * [ Initialisation is based on Linus' ] + * [ uhci code and gregs ahcd fragments ] + * [ (C) Copyright 1999 Linus Torvalds ] + * [ (C) Copyright 1999 Gregory P. Smith] * * This file is licenced under the GPL. */ @@ -45,7 +42,7 @@ #include "../core/hcd.h" #include "../core/hub.h" -#define DRIVER_VERSION "v0.10" +#define DRIVER_VERSION "0.14.1" #define DRIVER_AUTHOR "Gabor Juhos " #define DRIVER_DESC "ADMtek USB 1.1 Host Controller Driver" @@ -142,10 +139,6 @@ static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep, /* number of packets from URB */ td_cnt = urb->number_of_packets; break; - default: - /* paranoia */ - admhc_err(ahcd, "bad EP type %d", ed->type); - return -EINVAL; } urb_priv = urb_priv_alloc(ahcd, td_cnt, mem_flags); @@ -207,6 +200,7 @@ static int admhc_urb_enqueue(struct usb_hcd *hcd, struct usb_host_endpoint *ep, #ifdef ADMHC_VERBOSE_DEBUG admhc_dump_ed(ahcd, "admhc_urb_enqueue", urb_priv->ed, 1); #endif + fail0: spin_unlock(&urb->lock); fail: @@ -228,11 +222,12 @@ static int admhc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb) struct admhcd *ahcd = hcd_to_admhcd(hcd); unsigned long flags; + spin_lock_irqsave(&ahcd->lock, flags); + #ifdef ADMHC_VERBOSE_DEBUG urb_print(ahcd, urb, "DEQUEUE", 1); #endif - spin_lock_irqsave(&ahcd->lock, flags); if (HC_IS_RUNNING(hcd->state)) { struct urb_priv *urb_priv; @@ -790,7 +785,7 @@ static void admhc_stop(struct usb_hcd *hcd) #error "missing bus glue for admhc-hcd" #endif -#define DRIVER_INFO DRIVER_DESC " " DRIVER_VERSION +#define DRIVER_INFO DRIVER_DESC " version " DRIVER_VERSION static int __init admhc_hcd_mod_init(void) { @@ -827,4 +822,5 @@ module_exit(admhc_hcd_mod_exit); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_INFO); +MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL");