Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354715
b: refs/heads/master
c: 2f07607
h: refs/heads/master
i:
  354713: 84ba52e
  354711: 62ebe44
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jan 31, 2013
1 parent eb0736c commit 29ffdcf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0b4652f80c3276a57ede3b6b6d8159fa26c091f
refs/heads/master: 2f0760774711c957c395b31131b848043af98edf
15 changes: 15 additions & 0 deletions trunk/drivers/usb/gadget/net2280.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ static bool enable_suspend = 0;
/* "modprobe net2280 enable_suspend=1" etc */
module_param (enable_suspend, bool, S_IRUGO);

/* force full-speed operation */
static bool full_speed;
module_param(full_speed, bool, 0444);
MODULE_PARM_DESC(full_speed, "force full-speed mode -- for testing only!");

#define DIR_STRING(bAddress) (((bAddress) & USB_DIR_IN) ? "in" : "out")

Expand Down Expand Up @@ -1899,6 +1903,10 @@ static int net2280_start(struct usb_gadget *_gadget,
retval = device_create_file (&dev->pdev->dev, &dev_attr_queues);
if (retval) goto err_func;

/* Enable force-full-speed testing mode, if desired */
if (full_speed)
writel(1 << FORCE_FULL_SPEED_MODE, &dev->usb->xcvrdiag);

/* ... then enable host detection and ep0; and we're ready
* for set_configuration as well as eventual disconnect.
*/
Expand Down Expand Up @@ -1957,6 +1965,10 @@ static int net2280_stop(struct usb_gadget *_gadget,
dev->driver = NULL;

net2280_led_active (dev, 0);

/* Disable full-speed test mode */
writel(0, &dev->usb->xcvrdiag);

device_remove_file (&dev->pdev->dev, &dev_attr_function);
device_remove_file (&dev->pdev->dev, &dev_attr_queues);

Expand Down Expand Up @@ -2841,6 +2853,9 @@ static void net2280_shutdown (struct pci_dev *pdev)

/* disable the pullup so the host will think we're gone */
writel (0, &dev->usb->usbctl);

/* Disable full-speed test mode */
writel(0, &dev->usb->xcvrdiag);
}


Expand Down

0 comments on commit 29ffdcf

Please sign in to comment.