X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/6c9a138d3cc4bc33bced2352c18c630a9c70fd84..59dc59994cc0f7837e5cb8a6982d7cef06e5ce87:/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c 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 30fe132d9..2d2604aa7 100644 --- a/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c +++ b/target/linux/adm5120/files/drivers/usb/host/adm5120-hcd.c @@ -1,21 +1,21 @@ /* - * 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,2008 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 * + * [ Initialisation is based on Linus' ] + * [ uhci code and gregs ahcd fragments ] + * [ (C) Copyright 1999 Linus Torvalds ] + * [ (C) Copyright 1999 Gregory P. Smith] * - * 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. + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. * - * This file is licenced under the GPL. */ #include @@ -45,7 +45,7 @@ #include "../core/hcd.h" #include "../core/hub.h" -#define DRIVER_VERSION "v0.10" +#define DRIVER_VERSION "0.16.3" #define DRIVER_AUTHOR "Gabor Juhos " #define DRIVER_DESC "ADMtek USB 1.1 Host Controller Driver" @@ -142,10 +142,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 +203,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 +225,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 +788,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 +825,5 @@ module_exit(admhc_hcd_mod_exit); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_INFO); -MODULE_LICENSE("GPL"); +MODULE_VERSION(DRIVER_VERSION); +MODULE_LICENSE("GPL v2");