Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (22 commits)
  USB: gadget: f_mass_storage: stale common->fsg value bug fix
  USB: gadget: f_mass_storage: fixed fs descriptors not being updated
  USB: musb: Enable the maximum supported burst mode for DMA
  USB: musb: fix Blackfin ulpi stubs
  USB: MUSB: make non-OMAP platforms build with CONFIG_PM=y
  USB: musb_core: make disconnect and suspend interrupts work again
  USB: obey the sysfs power/wakeup setting
  USB: gadget eth: Fix calculate CRC32 in EEM
  USB: qcserial: fix a memory leak in qcprobe error path
  USB: gadget/printer, fix sleep inside atomic
  USB: isp1362-hcd, fix double lock
  USB: serial: ftdi: correct merge conflict with CONTEC id
  USB: fix oops in usb_sg_init()
  USB: s3c2410: deactivate endpoints before gadget unbinding
  USB: ehci-mxc: bail out on transceiver problems
  USB: otg/ulpi: bail out on read errors
  usb: musb: Fix a bug by making suspend interrupt available in device mode
  USB: r8a66597: Fix failure in change of status
  USB: xHCI: Fix bug in link TRB activation change.
  USB: gadget: g_fs: possible invalid pointer reference bug fixed
  ...
  • Loading branch information
Linus Torvalds committed Jun 30, 2010
2 parents 59e7648 + b894f60 commit 9f2952d
Show file tree
Hide file tree
Showing 19 changed files with 209 additions and 225 deletions.
13 changes: 3 additions & 10 deletions drivers/usb/core/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,8 +1272,7 @@ static int usb_resume_both(struct usb_device *udev, pm_message_t msg)

static void choose_wakeup(struct usb_device *udev, pm_message_t msg)
{
int w, i;
struct usb_interface *intf;
int w;

/* Remote wakeup is needed only when we actually go to sleep.
* For things like FREEZE and QUIESCE, if the device is already
Expand All @@ -1285,16 +1284,10 @@ static void choose_wakeup(struct usb_device *udev, pm_message_t msg)
return;
}

/* If remote wakeup is permitted, see whether any interface drivers
/* Enable remote wakeup if it is allowed, even if no interface drivers
* actually want it.
*/
w = 0;
if (device_may_wakeup(&udev->dev) && udev->actconfig) {
for (i = 0; i < udev->actconfig->desc.bNumInterfaces; i++) {
intf = udev->actconfig->interface[i];
w |= intf->needs_remote_wakeup;
}
}
w = device_may_wakeup(&udev->dev);

/* If the device is autosuspended with the wrong wakeup setting,
* autoresume now so the setting can be changed.
Expand Down
7 changes: 5 additions & 2 deletions drivers/usb/core/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,11 @@ int usb_sg_init(struct usb_sg_request *io, struct usb_device *dev,
/* A length of zero means transfer the whole sg list */
len = length;
if (len == 0) {
for_each_sg(sg, sg, nents, i)
len += sg->length;
struct scatterlist *sg2;
int j;

for_each_sg(sg, sg2, nents, j)
len += sg2->length;
}
} else {
/*
Expand Down
3 changes: 1 addition & 2 deletions drivers/usb/gadget/f_eem.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,7 @@ static int eem_unwrap(struct gether *port,
crc = get_unaligned_le32(skb->data + len
- ETH_FCS_LEN);
crc2 = ~crc32_le(~0,
skb->data,
skb->len - ETH_FCS_LEN);
skb->data, len - ETH_FCS_LEN);
} else {
crc = get_unaligned_be32(skb->data + len
- ETH_FCS_LEN);
Expand Down
Loading

0 comments on commit 9f2952d

Please sign in to comment.