--- zzzz-none-000/linux-2.6.32.61/drivers/usb/core/hcd.h 2013-06-10 09:43:48.000000000 +0000 +++ virian-300e-630/linux-2.6.32.61/drivers/usb/core/hcd.h 2014-10-29 15:55:54.000000000 +0000 @@ -23,6 +23,10 @@ #include +#ifdef CONFIG_AVM_NET_TRACE +#include "avmusbtrace.h" +#endif + #define MAX_TOPO_LEVEL 6 /* This file contains declarations of usbcore internals that are mostly @@ -111,6 +115,21 @@ u64 rsrc_len; /* memory/io resource length */ unsigned power_budget; /* in mA, 0 = no limit */ +/* -- 20140828 AVM/WK XHCI reset patch from newer kernel --*/ + /* bandwidth_mutex should be taken before adding or removing + * any new bus bandwidth constraints: + * 1. Before adding a configuration for a new device. + * 2. Before removing the configuration to put the device into + * the addressed state. + * 3. Before selecting a different configuration. + * 4. Before selecting an alternate interface setting. + * + * bandwidth_mutex should be dropped after a successful control message + * to the device, or resetting the bandwidth after a failed attempt. + */ + struct mutex bandwidth_mutex; + + #define HCD_BUFFER_POOLS 4 struct dma_pool *pool [HCD_BUFFER_POOLS]; @@ -134,6 +153,10 @@ * (ohci 32, uhci 1024, ehci 256/512/1024). */ +#ifdef AVM_USB_TRACE + struct avm_net_trace_device *avm_ntd; +#endif + /* The HC driver's private data is stored at the end of * this structure. */ @@ -272,6 +295,7 @@ */ int (*update_hub_device)(struct usb_hcd *, struct usb_device *hdev, struct usb_tt *tt, gfp_t mem_flags); + int (*reset_device)(struct usb_hcd *, struct usb_device *); }; extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); @@ -290,9 +314,10 @@ extern void usb_hcd_reset_endpoint(struct usb_device *udev, struct usb_host_endpoint *ep); extern void usb_hcd_synchronize_unlinks(struct usb_device *udev); -extern int usb_hcd_check_bandwidth(struct usb_device *udev, +extern int usb_hcd_alloc_bandwidth(struct usb_device *udev, struct usb_host_config *new_config, - struct usb_interface *new_intf); + struct usb_host_interface *old_alt, + struct usb_host_interface *new_alt); extern int usb_hcd_get_frame_number(struct usb_device *udev); extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver, @@ -552,6 +577,24 @@ #define USB_OHCI_LOADED 1 #define USB_EHCI_LOADED 2 extern unsigned long usb_hcds_loaded; +#ifdef CONFIG_FUSIV_USB_LED + #define FUSIV_USB_MAX_LEDS 2 + #define FUSIV_USB_LED_HALF_PERIOD 50 //500 ms + typedef struct + { + unsigned int gpio_no; + unsigned int port_status; // could be one of following + #define FUSIV_USB_LED_ATTCHD_BIT ( 1 << 0 ) + #define FUSIV_USB_LED_XTR_BIT ( 1 << 1 ) + unsigned int count ; // timer counter for blinking slow or fast + unsigned int led_status; // either ON or Off + unsigned int blink_status; // whether blinking or not + }fusiv_led_t; +extern fusiv_led_t fusiv_leds[FUSIV_USB_MAX_LEDS]; +void fusiv_usb_led_set( unsigned int portnum,unsigned int bit); +void fusiv_usb_led_clear( unsigned int portnum,unsigned int bit); +void fusiv_usb_led_init( void ); +#endif #endif /* __KERNEL__ */