Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e1a3e31 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (35 commits)
  usb: add PRODUCT, TYPE to usb-interface events
  USB: resubmission unusual_devs modification for Nikon D80
  usb quirks: Add Canon EOS 5D (PC Connection mode) to the autosuspend blacklist
  USB: make EHCI initialize properly on PPC SOCs
  UEAGLE: Remove sysfs files on error case
  USB: fsl_usb2_udc: fix bug in processing setup requests
  USB: g_file_storage: fix bug in DMA buffer handling
  USB: update last_busy field correctly
  USB: fix DoS in pwc USB video driver
  USB: allow retry on descriptor fetch errors
  USB: unkill cxacru atm driver
  USB: Adding support for HTC Smartphones to ipaq
  USB: another quirky device
  USB: quirky mass storage device
  USB: ohci, fix oddball gcc warning
  usb-storage: fix bugs in the disconnect pathway
  usb: typo in usb R8A66597 HCD config
  USB: accept 1-byte Device Status replies, fixing some b0rken devices
  USB: blacklist Samsung ML-2010 printer
  usb-serial: fix oti6858.c segfault in termios handling
  ...
parents de80af4c d65cc1b4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1772,6 +1772,7 @@ static int em28xx_usb_probe(struct usb_interface *interface,
	if (dev->alt_max_pkt_size == NULL) {
		em28xx_errdev("out of memory!\n");
		em28xx_devused&=~(1<<nr);
		kfree(dev);
		return -ENOMEM;
	}

+35 −17
Original line number Diff line number Diff line
@@ -1196,12 +1196,19 @@ static int pwc_video_open(struct inode *inode, struct file *file)
	return 0;
}


static void pwc_cleanup(struct pwc_device *pdev)
{
	pwc_remove_sysfs_files(pdev->vdev);
	video_unregister_device(pdev->vdev);
}

/* Note that all cleanup is done in the reverse order as in _open */
static int pwc_video_close(struct inode *inode, struct file *file)
{
	struct video_device *vdev = file->private_data;
	struct pwc_device *pdev;
	int i;
	int i, hint;

	PWC_DEBUG_OPEN(">> video_close called(vdev = 0x%p).\n", vdev);

@@ -1224,8 +1231,9 @@ static int pwc_video_close(struct inode *inode, struct file *file)
	pwc_isoc_cleanup(pdev);
	pwc_free_buffers(pdev);

	lock_kernel();
	/* Turn off LEDS and power down camera, but only when not unplugged */
	if (pdev->error_status != EPIPE) {
	if (!pdev->unplugged) {
		/* Turn LEDs off */
		if (pwc_set_leds(pdev, 0, 0) < 0)
			PWC_DEBUG_MODULE("Failed to set LED on/off time.\n");
@@ -1234,9 +1242,19 @@ static int pwc_video_close(struct inode *inode, struct file *file)
			if (i < 0)
				PWC_ERROR("Failed to power down camera (%d)\n", i);
		}
	}
		pdev->vopen--;
	PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", pdev->vopen);
		PWC_DEBUG_OPEN("<< video_close() vopen=%d\n", i);
	} else {
		pwc_cleanup(pdev);
		/* Free memory (don't set pdev to 0 just yet) */
		kfree(pdev);
		/* search device_hint[] table if we occupy a slot, by any chance */
		for (hint = 0; hint < MAX_DEV_HINTS; hint++)
			if (device_hint[hint].pdev == pdev)
				device_hint[hint].pdev = NULL;
	}
	unlock_kernel();

	return 0;
}

@@ -1791,13 +1809,12 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
	/* Alert waiting processes */
	wake_up_interruptible(&pdev->frameq);
	/* Wait until device is closed */
	while (pdev->vopen)
		schedule();
	/* Device is now closed, so we can safely unregister it */
	if(pdev->vopen) {
		pdev->unplugged = 1;
	} else {
		/* Device is closed, so we can safely unregister it */
		PWC_DEBUG_PROBE("Unregistering video device in disconnect().\n");
	pwc_remove_sysfs_files(pdev->vdev);
	video_unregister_device(pdev->vdev);

		pwc_cleanup(pdev);
		/* Free memory (don't set pdev to 0 just yet) */
		kfree(pdev);

@@ -1806,6 +1823,7 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
		for (hint = 0; hint < MAX_DEV_HINTS; hint++)
			if (device_hint[hint].pdev == pdev)
				device_hint[hint].pdev = NULL;
	}

	unlock_kernel();
}
+1 −0
Original line number Diff line number Diff line
@@ -193,6 +193,7 @@ struct pwc_device
   char vsnapshot;		/* snapshot mode */
   char vsync;			/* used by isoc handler */
   char vmirror;		/* for ToUCaM series */
	char unplugged;

   int cmd_len;
   unsigned char cmd_buf[13];
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ config USB_ARCH_HAS_HCD
	default y if USB_ARCH_HAS_EHCI
	default y if PCMCIA && !M32R			# sl811_cs
	default y if ARM				# SL-811
	default y if SUPERH				# r8a66597-hcd
	default PCI

# many non-PCI SOC chips embed OHCI
+1 −2
Original line number Diff line number Diff line
@@ -456,7 +456,6 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,
				 int* actual_length)
{
	struct timer_list timer;
	int status = urb->status;

	init_timer(&timer);
	timer.expires = jiffies + msecs_to_jiffies(CMD_TIMEOUT);
@@ -468,7 +467,7 @@ static int cxacru_start_wait_urb(struct urb *urb, struct completion *done,

	if (actual_length)
		*actual_length = urb->actual_length;
	return status;
	return urb->status; /* must read status after completion */
}

static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm,
Loading