Merge branch 'android-tegra-2.6.36' into android-tegra-moto-2.6.36

This commit is contained in:
Colin Cross 2011-02-12 14:23:33 -08:00
commit 7aa771f81d
16 changed files with 209 additions and 50 deletions

View File

@ -445,6 +445,7 @@ static int tegra_idle_enter_lp2(struct cpuidle_device *dev,
return tegra_idle_enter_lp3(dev, state);
local_irq_disable();
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
local_fiq_disable();
enter = ktime_get();
@ -463,11 +464,9 @@ static int tegra_idle_enter_lp2(struct cpuidle_device *dev,
us = ktime_to_us(exit);
local_fiq_enable();
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
local_irq_enable();
/* cpu clockevents may have been reset by powerdown */
hrtimer_peek_ahead_timers();
smp_rmb();
state->exit_latency = tegra_lp2_exit_latency;
state->target_residency = tegra_lp2_exit_latency +

View File

@ -881,7 +881,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
data.dev = dev;
data.tsk = get_current();
init_timer_on_stack(&timer);
timer.expires = jiffies + HZ * 3;
timer.expires = jiffies + HZ * 12;
timer.function = dpm_drv_timeout;
timer.data = (unsigned long)&data;
add_timer(&timer);

View File

@ -253,13 +253,8 @@ static int mmc_read_ext_csd(struct mmc_card *card)
ext_csd[EXT_CSD_SEC_CNT + 3] << 24;
/* Cards with density > 2GiB are sector addressed */
if (card->ext_csd.sectors > (2u * 1024 * 1024 * 1024) / 512) {
unsigned boot_sectors;
/* size is in 256K chunks, i.e. 512 sectors each */
boot_sectors = ext_csd[EXT_CSD_BOOT_SIZE_MULTI] * 512;
card->ext_csd.sectors -= boot_sectors;
if (card->ext_csd.sectors > (2u * 1024 * 1024 * 1024) / 512)
mmc_card_set_blockaddr(card);
}
}
switch (ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_MASK) {

View File

@ -301,7 +301,7 @@ int bcmsdh_remove(struct device *dev)
MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
osl_detach(osh);
#if !defined(BCMLXSDMMC)
#if !defined(BCMLXSDMMC) || defined(OOB_INTR_ONLY)
dev_set_drvdata(dev, NULL);
#endif /* !defined(BCMLXSDMMC) */
@ -647,10 +647,12 @@ void bcmsdh_unregister_oob_intr(void)
{
SDLX_MSG(("%s: Enter\n", __FUNCTION__));
set_irq_wake(sdhcinfo->oob_irq, 0);
disable_irq(sdhcinfo->oob_irq); /* just in case.. */
free_irq(sdhcinfo->oob_irq, NULL);
sdhcinfo->oob_irq_registered = FALSE;
if (sdhcinfo->oob_irq_registered) {
set_irq_wake(sdhcinfo->oob_irq, 0);
disable_irq(sdhcinfo->oob_irq); /* just in case.. */
free_irq(sdhcinfo->oob_irq, NULL);
sdhcinfo->oob_irq_registered = FALSE;
}
}
#endif /* defined(OOB_INTR_ONLY) */
/* Module parameters specific to each host-controller driver */

View File

@ -82,7 +82,6 @@ PBCMSDH_SDMMC_INSTANCE gInstance;
extern int bcmsdh_probe(struct device *dev);
extern int bcmsdh_remove(struct device *dev);
struct device sdmmc_dev;
static int bcmsdh_sdmmc_probe(struct sdio_func *func,
const struct sdio_device_id *id)
@ -102,7 +101,7 @@ static int bcmsdh_sdmmc_probe(struct sdio_func *func,
if(func->device == 0x4) { /* 4318 */
gInstance->func[2] = NULL;
sd_trace(("NIC found, calling bcmsdh_probe...\n"));
ret = bcmsdh_probe(&sdmmc_dev);
ret = bcmsdh_probe(&func->dev);
}
}
@ -110,7 +109,7 @@ static int bcmsdh_sdmmc_probe(struct sdio_func *func,
if (func->num == 2) {
sd_trace(("F2 found, calling bcmsdh_probe...\n"));
ret = bcmsdh_probe(&sdmmc_dev);
ret = bcmsdh_probe(&func->dev);
}
return ret;
@ -126,7 +125,7 @@ static void bcmsdh_sdmmc_remove(struct sdio_func *func)
if (func->num == 2) {
sd_trace(("F2 found, calling bcmsdh_remove...\n"));
bcmsdh_remove(&sdmmc_dev);
bcmsdh_remove(&func->dev);
}
}
@ -250,10 +249,8 @@ int sdio_function_init(void)
if (!gInstance)
return -ENOMEM;
bzero(&sdmmc_dev, sizeof(sdmmc_dev));
error = sdio_register_driver(&bcmsdh_sdmmc_driver);
return error;
}
@ -265,7 +262,6 @@ void sdio_function_cleanup(void)
{
sd_trace(("%s Enter\n", __FUNCTION__));
sdio_unregister_driver(&bcmsdh_sdmmc_driver);
if (gInstance)

View File

@ -2185,12 +2185,15 @@ dhd_bus_start(dhd_pub_t *dhdp)
DHD_TRACE(("%s: \n", __FUNCTION__));
dhd_os_sdlock(dhdp);
/* try to download image and nvram to the dongle */
if (dhd->pub.busstate == DHD_BUS_DOWN) {
if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh,
fw_path, nv_path))) {
DHD_ERROR(("%s: dhdsdio_probe_download failed. firmware = %s nvram = %s\n",
__FUNCTION__, fw_path, nv_path));
dhd_os_sdunlock(dhdp);
return -1;
}
}
@ -2200,8 +2203,9 @@ dhd_bus_start(dhd_pub_t *dhdp)
dhd_os_wd_timer(&dhd->pub, dhd_watchdog_ms);
/* Bring up the bus */
if ((ret = dhd_bus_init(&dhd->pub, TRUE)) != 0) {
if ((ret = dhd_bus_init(&dhd->pub, FALSE)) != 0) {
DHD_ERROR(("%s, dhd_bus_init failed %d\n", __FUNCTION__, ret));
dhd_os_sdunlock(dhdp);
return ret;
}
#if defined(OOB_INTR_ONLY)
@ -2210,6 +2214,7 @@ dhd_bus_start(dhd_pub_t *dhdp)
dhd->wd_timer_valid = FALSE;
del_timer_sync(&dhd->timer);
DHD_ERROR(("%s Host failed to resgister for OOB\n", __FUNCTION__));
dhd_os_sdunlock(dhdp);
return -ENODEV;
}
@ -2222,9 +2227,12 @@ dhd_bus_start(dhd_pub_t *dhdp)
dhd->wd_timer_valid = FALSE;
del_timer_sync(&dhd->timer);
DHD_ERROR(("%s failed bus is not ready\n", __FUNCTION__));
dhd_os_sdunlock(dhdp);
return -ENODEV;
}
dhd_os_sdunlock(dhdp);
#ifdef EMBEDDED_PLATFORM
bcm_mkiovar("event_msgs", dhdp->eventmask, WL_EVENTING_MASK_LEN, iovbuf, sizeof(iovbuf));
dhdcdc_query_ioctl(dhdp, 0, WLC_GET_VAR, iovbuf, sizeof(iovbuf));

View File

@ -3686,6 +3686,7 @@ wl_iw_handle_scanresults_ies(char **event_p, char *end,
wpa_snprintf_hex(buf + 10, 2+1, &(ie->len), 1);
wpa_snprintf_hex(buf + 12, 2*ie->len+1, ie->data, ie->len);
event = IWE_STREAM_ADD_POINT(info, event, end, &iwe, buf);
kfree(buf);
#endif
break;
}

View File

@ -1264,6 +1264,14 @@ static void hcd_free_coherent(struct usb_bus *bus, dma_addr_t *dma_handle,
}
static void unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb)
{
if (hcd->driver->unmap_urb_for_dma)
hcd->driver->unmap_urb_for_dma(hcd, urb);
else
usb_hcd_unmap_urb_for_dma(hcd, urb);
}
void usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb)
{
enum dma_data_direction dir;
@ -1307,9 +1315,19 @@ static void unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb)
URB_DMA_MAP_SG | URB_DMA_MAP_PAGE |
URB_DMA_MAP_SINGLE | URB_MAP_LOCAL);
}
EXPORT_SYMBOL_GPL(usb_hcd_unmap_urb_for_dma);
static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
gfp_t mem_flags)
{
if (hcd->driver->map_urb_for_dma)
return hcd->driver->map_urb_for_dma(hcd, urb, mem_flags);
else
return usb_hcd_map_urb_for_dma(hcd, urb, mem_flags);
}
int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
gfp_t mem_flags)
{
enum dma_data_direction dir;
int ret = 0;
@ -1400,10 +1418,11 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
}
if (ret && (urb->transfer_flags & (URB_SETUP_MAP_SINGLE |
URB_SETUP_MAP_LOCAL)))
unmap_urb_for_dma(hcd, urb);
usb_hcd_unmap_urb_for_dma(hcd, urb);
}
return ret;
}
EXPORT_SYMBOL_GPL(usb_hcd_map_urb_for_dma);
/*-------------------------------------------------------------------------*/

View File

@ -65,6 +65,7 @@ struct android_dev {
int num_functions;
char **functions;
int vendor_id;
int product_id;
int version;
};
@ -255,6 +256,22 @@ static int product_matches_functions(struct android_usb_product *p)
return 1;
}
static int get_vendor_id(struct android_dev *dev)
{
struct android_usb_product *p = dev->products;
int count = dev->num_products;
int i;
if (p) {
for (i = 0; i < count; i++, p++) {
if (p->vendor_id && product_matches_functions(p))
return p->vendor_id;
}
}
/* use default vendor ID */
return dev->vendor_id;
}
static int get_product_id(struct android_dev *dev)
{
struct android_usb_product *p = dev->products;
@ -275,7 +292,7 @@ static int android_bind(struct usb_composite_dev *cdev)
{
struct android_dev *dev = _android_dev;
struct usb_gadget *gadget = cdev->gadget;
int gcnum, id, product_id, ret;
int gcnum, id, ret;
printk(KERN_INFO "android_bind\n");
@ -325,8 +342,8 @@ static int android_bind(struct usb_composite_dev *cdev)
usb_gadget_set_selfpowered(gadget);
dev->cdev = cdev;
product_id = get_product_id(dev);
device_desc.idProduct = __constant_cpu_to_le16(product_id);
device_desc.idVendor = __constant_cpu_to_le16(get_vendor_id(dev));
device_desc.idProduct = __constant_cpu_to_le16(get_product_id(dev));
cdev->desc.idProduct = device_desc.idProduct;
return 0;
@ -396,7 +413,6 @@ void android_enable_function(struct usb_function *f, int enable)
{
struct android_dev *dev = _android_dev;
int disable = !enable;
int product_id;
if (!!f->disabled != disable) {
usb_function_set_enabled(f, !disable);
@ -418,8 +434,8 @@ void android_enable_function(struct usb_function *f, int enable)
update_dev_desc(dev);
product_id = get_product_id(dev);
device_desc.idProduct = __constant_cpu_to_le16(product_id);
device_desc.idVendor = __constant_cpu_to_le16(get_vendor_id(dev));
device_desc.idProduct = __constant_cpu_to_le16(get_product_id(dev));
if (dev->cdev)
dev->cdev->desc.idProduct = device_desc.idProduct;
usb_composite_force_reset(dev->cdev);
@ -438,9 +454,11 @@ static int android_probe(struct platform_device *pdev)
dev->num_products = pdata->num_products;
dev->functions = pdata->functions;
dev->num_functions = pdata->num_functions;
if (pdata->vendor_id)
if (pdata->vendor_id) {
dev->vendor_id = pdata->vendor_id;
device_desc.idVendor =
__constant_cpu_to_le16(pdata->vendor_id);
}
if (pdata->product_id) {
dev->product_id = pdata->product_id;
device_desc.idProduct =

View File

@ -92,7 +92,6 @@ struct mtp_dev {
wait_queue_head_t read_wq;
wait_queue_head_t write_wq;
wait_queue_head_t intr_wq;
struct usb_request *rx_req[RX_REQ_MAX];
struct usb_request *intr_req;
int rx_done;
@ -373,12 +372,11 @@ static void mtp_complete_intr(struct usb_ep *ep, struct usb_request *req)
{
struct mtp_dev *dev = _mtp_dev;
DBG(dev->cdev, "mtp_complete_intr status: %d actual: %d\n", req->status, req->actual);
DBG(dev->cdev, "mtp_complete_intr status: %d actual: %d\n",
req->status, req->actual);
dev->intr_busy = 0;
if (req->status != 0)
dev->state = STATE_ERROR;
wake_up(&dev->intr_wq);
}
static int __init create_bulk_endpoints(struct mtp_dev *dev,
@ -662,6 +660,10 @@ static void send_file_work(struct work_struct *data) {
ret = wait_event_interruptible(dev->write_wq,
(req = req_get(dev, &dev->tx_idle))
|| dev->state != STATE_BUSY);
if (dev->state == STATE_CANCELED) {
r = -ECANCELED;
break;
}
if (!req) {
r = ret;
break;
@ -794,13 +796,15 @@ static int mtp_send_event(struct mtp_dev *dev, struct mtp_event *event)
if (length < 0 || length > INTR_BUFFER_SIZE)
return -EINVAL;
/* wait for a request to complete */
ret = wait_event_interruptible(dev->intr_wq, !dev->intr_busy || dev->state == STATE_OFFLINE);
if (ret < 0)
return ret;
if (dev->state == STATE_OFFLINE)
return -ENODEV;
/* unfortunately an interrupt request might hang indefinitely if the host
* is not listening on the interrupt endpoint, so instead of waiting,
* we just fail if the endpoint is busy.
*/
if (dev->intr_busy)
return -EBUSY;
req = dev->intr_req;
if (copy_from_user(req->buf, (void __user *)event->data, length))
return -EFAULT;
@ -1012,7 +1016,6 @@ mtp_function_unbind(struct usb_configuration *c, struct usb_function *f)
mtp_request_free(dev->intr_req, dev->ep_intr);
dev->state = STATE_OFFLINE;
spin_unlock_irq(&dev->lock);
wake_up(&dev->intr_wq);
misc_deregister(&mtp_device);
kfree(_mtp_dev);
@ -1098,14 +1101,13 @@ static int mtp_function_setup(struct usb_function *f,
/* device status is "busy" until we report
* the cancelation to userspace
*/
if (dev->state == STATE_BUSY
|| dev->state == STATE_CANCELED)
if (dev->state == STATE_CANCELED)
status->wCode =
__cpu_to_le16(MTP_RESPONSE_DEVICE_BUSY);
else
status->wCode =
__cpu_to_le16(MTP_RESPONSE_OK);
spin_unlock_irqrestore(&dev->lock, flags);
spin_unlock_irqrestore(&dev->lock, flags);
value = sizeof(*status);
}
}
@ -1177,7 +1179,6 @@ static void mtp_function_disable(struct usb_function *f)
/* readers may be blocked waiting for us to go online */
wake_up(&dev->read_wq);
wake_up(&dev->intr_wq);
VDBG(cdev, "%s disabled\n", dev->function.name);
}
@ -1185,7 +1186,7 @@ static void mtp_function_disable(struct usb_function *f)
static int mtp_bind_config(struct usb_configuration *c)
{
struct mtp_dev *dev;
int ret;
int ret = 0;
printk(KERN_INFO "mtp_bind_config\n");
@ -1205,7 +1206,6 @@ static int mtp_bind_config(struct usb_configuration *c)
spin_lock_init(&dev->lock);
init_waitqueue_head(&dev->read_wq);
init_waitqueue_head(&dev->write_wq);
init_waitqueue_head(&dev->intr_wq);
atomic_set(&dev->open_excl, 0);
atomic_set(&dev->ioctl_excl, 0);
INIT_LIST_HEAD(&dev->tx_idle);

View File

@ -32,6 +32,8 @@
#define TEGRA_USB_USBMODE_HOST (3 << 0)
#define TEGRA_USB_PORTSC1_PTC(x) (((x) & 0xf) << 16)
#define TEGRA_USB_DMA_ALIGN 32
struct tegra_ehci_context {
bool valid;
u32 command;
@ -468,6 +470,92 @@ static int tegra_ehci_bus_resume(struct usb_hcd *hcd)
}
#endif
struct temp_buffer {
void *kmalloc_ptr;
void *old_xfer_buffer;
u8 data[0];
};
static void free_temp_buffer(struct urb *urb)
{
enum dma_data_direction dir;
struct temp_buffer *temp;
if (!(urb->transfer_flags & URB_ALIGNED_TEMP_BUFFER))
return;
dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
temp = container_of(urb->transfer_buffer, struct temp_buffer,
data);
if (dir == DMA_FROM_DEVICE)
memcpy(temp->old_xfer_buffer, temp->data,
urb->transfer_buffer_length);
urb->transfer_buffer = temp->old_xfer_buffer;
kfree(temp->kmalloc_ptr);
urb->transfer_flags &= ~URB_ALIGNED_TEMP_BUFFER;
}
static int alloc_temp_buffer(struct urb *urb, gfp_t mem_flags)
{
enum dma_data_direction dir;
struct temp_buffer *temp, *kmalloc_ptr;
size_t kmalloc_size;
if (urb->num_sgs || urb->sg ||
urb->transfer_buffer_length == 0 ||
!((uintptr_t)urb->transfer_buffer & (TEGRA_USB_DMA_ALIGN - 1)))
return 0;
dir = usb_urb_dir_in(urb) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
/* Allocate a buffer with enough padding for alignment */
kmalloc_size = urb->transfer_buffer_length +
sizeof(struct temp_buffer) + TEGRA_USB_DMA_ALIGN - 1;
kmalloc_ptr = kmalloc(kmalloc_size, mem_flags);
if (!kmalloc_ptr)
return -ENOMEM;
/* Position our struct temp_buffer such that data is aligned */
temp = PTR_ALIGN(kmalloc_ptr + 1, TEGRA_USB_DMA_ALIGN) - 1;
temp->kmalloc_ptr = kmalloc_ptr;
temp->old_xfer_buffer = urb->transfer_buffer;
if (dir == DMA_TO_DEVICE)
memcpy(temp->data, urb->transfer_buffer,
urb->transfer_buffer_length);
urb->transfer_buffer = temp->data;
urb->transfer_flags |= URB_ALIGNED_TEMP_BUFFER;
return 0;
}
static int tegra_ehci_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
gfp_t mem_flags)
{
int ret;
ret = alloc_temp_buffer(urb, mem_flags);
if (ret)
return ret;
ret = usb_hcd_map_urb_for_dma(hcd, urb, mem_flags);
if (ret)
free_temp_buffer(urb);
return ret;
}
static void tegra_ehci_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb)
{
usb_hcd_unmap_urb_for_dma(hcd, urb);
free_temp_buffer(urb);
}
static const struct hc_driver tegra_ehci_hc_driver = {
.description = hcd_name,
.product_desc = "Tegra EHCI Host Controller",
@ -483,6 +571,8 @@ static const struct hc_driver tegra_ehci_hc_driver = {
.shutdown = tegra_ehci_shutdown,
.urb_enqueue = ehci_urb_enqueue,
.urb_dequeue = ehci_urb_dequeue,
.map_urb_for_dma = tegra_ehci_map_urb_for_dma,
.unmap_urb_for_dma = tegra_ehci_unmap_urb_for_dma,
.endpoint_disable = ehci_endpoint_disable,
.endpoint_reset = ehci_endpoint_reset,
.get_frame_number = ehci_get_frame,

View File

@ -105,6 +105,7 @@
* the partition tables happens after init too.
*/
static int force_gpt;
static u64 force_gpt_sector;
static int __init
force_gpt_fn(char *str)
{
@ -113,6 +114,13 @@ force_gpt_fn(char *str)
}
__setup("gpt", force_gpt_fn);
static int __init force_gpt_sector_fn(char *str)
{
force_gpt_sector = simple_strtoull(str, NULL, 0);
return 1;
}
__setup("gpt_sector=", force_gpt_sector_fn);
/**
* efi_crc32() - EFI version of crc32 function
@ -541,6 +549,9 @@ static int find_valid_gpt(struct parsed_partitions *state, gpt_header **gpt,
if (!good_agpt && force_gpt)
good_agpt = is_gpt_valid(state, lastlba, &agpt, &aptes);
if (!good_agpt && force_gpt && force_gpt_sector)
good_agpt = is_gpt_valid(state, force_gpt_sector, &agpt, &aptes);
/* The obviously unsuccessful case */
if (!good_pgpt && !good_agpt)
goto fail;

View File

@ -262,12 +262,10 @@ struct _mmc_csd {
#define EXT_CSD_S_A_TIMEOUT 217 /* RO */
#define EXT_CSD_ERASE_TIMEOUT_MULT 223 /* RO */
#define EXT_CSD_HC_ERASE_GRP_SIZE 224 /* RO */
#define EXT_CSD_BOOT_SIZE_MULTI 226
#define EXT_CSD_SEC_TRIM_MULT 229 /* RO */
#define EXT_CSD_SEC_ERASE_MULT 230 /* RO */
#define EXT_CSD_SEC_FEATURE_SUPPORT 231 /* RO */
#define EXT_CSD_TRIM_MULT 232 /* RO */
#define EXT_CSD_BOOT_SIZE_MULTI 226 /* RO */
/*
* EXT_CSD field definitions

View File

@ -975,6 +975,7 @@ extern int usb_disabled(void);
#define URB_SETUP_MAP_SINGLE 0x00100000 /* Setup packet DMA mapped */
#define URB_SETUP_MAP_LOCAL 0x00200000 /* HCD-local setup packet */
#define URB_DMA_SG_COMBINED 0x00400000 /* S-G entries were combined */
#define URB_ALIGNED_TEMP_BUFFER 0x00800000 /* Temp buffer was alloc'd */
struct usb_iso_packet_descriptor {
unsigned int offset;

View File

@ -27,7 +27,12 @@ struct android_usb_function {
};
struct android_usb_product {
/* Default product ID. */
/* Vendor ID for this set of functions.
* Default vendor_id in platform data will be used if this is zero.
*/
__u16 vendor_id;
/* Product ID for this set of functions. */
__u16 product_id;
/* List of function names associated with this product.

View File

@ -233,6 +233,19 @@ struct hc_driver {
int (*urb_dequeue)(struct usb_hcd *hcd,
struct urb *urb, int status);
/*
* (optional) these hooks allow an HCD to override the default DMA
* mapping and unmapping routines. In general, they shouldn't be
* necessary unless the host controller has special DMA requirements,
* such as alignment contraints. If these are not specified, the
* general usb_hcd_(un)?map_urb_for_dma functions will be used instead
* (and it may be a good idea to call these functions in your HCD
* implementation)
*/
int (*map_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb,
gfp_t mem_flags);
void (*unmap_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb);
/* hw synch, freeing endpoint resources that urb_dequeue can't */
void (*endpoint_disable)(struct usb_hcd *hcd,
struct usb_host_endpoint *ep);
@ -329,6 +342,9 @@ extern int usb_hcd_submit_urb(struct urb *urb, gfp_t mem_flags);
extern int usb_hcd_unlink_urb(struct urb *urb, int status);
extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb,
int status);
extern int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
gfp_t mem_flags);
extern void usb_hcd_unmap_urb_for_dma(struct usb_hcd *, struct urb *);
extern void usb_hcd_flush_endpoint(struct usb_device *udev,
struct usb_host_endpoint *ep);
extern void usb_hcd_disable_endpoint(struct usb_device *udev,