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

Commit 0d38edda 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:
  [PATCH] USB: fix omninet driver bug
  [PATCH] USB: add ark3116 usb to serial driver
  [PATCH] usbserial: Fixes leak in serial_open() error path.
  [PATCH] usbserial: Fixes use-after-free in serial_open().
  [PATCH] USB: Emagic USB firmware loading fixes
  [PATCH] USB: add an IBM USB keyboard to the HID_QUIRK_NOGET blacklist
  [PATCH] USB: Add Sieraa Wireless 580 evdo card to airprime.c
  [PATCH] USB: ftdi_sio: add device id for ACT Solutions HomePro ZWave interface
  [PATCH] USB: ftdi_sio: Add support for HCG HF Dual ISO RFID Reader
  [PATCH] USB: ub oops in block_uevent
  [PATCH] USB: usbcore: don't check the device's power source
  [PATCH] USB: fix OHCI PM regression
  [PATCH] USB: pegasus fixes (logstorm, suspend)
  [PATCH] USBATM: fix modinfo output
  [PATCH] USBATM: change the default speedtouch iso altsetting
  [PATCH] USB: fix bug in ohci-hcd.c ohci_restart()
parents 1a2acc9e df3fccb1
Loading
Loading
Loading
Loading
+10 −8
Original line number Original line Diff line number Diff line
@@ -536,6 +536,9 @@ static void ub_cleanup(struct ub_dev *sc)
		kfree(lun);
		kfree(lun);
	}
	}


	usb_set_intfdata(sc->intf, NULL);
	usb_put_intf(sc->intf);
	usb_put_dev(sc->dev);
	kfree(sc);
	kfree(sc);
}
}


@@ -2221,7 +2224,12 @@ static int ub_probe(struct usb_interface *intf,
	// sc->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
	// sc->ifnum = intf->cur_altsetting->desc.bInterfaceNumber;
	usb_set_intfdata(intf, sc);
	usb_set_intfdata(intf, sc);
	usb_get_dev(sc->dev);
	usb_get_dev(sc->dev);
	// usb_get_intf(sc->intf);	/* Do we need this? */
	/*
	 * Since we give the interface struct to the block level through
	 * disk->driverfs_dev, we have to pin it. Otherwise, block_uevent
	 * oopses on close after a disconnect (kernels 2.6.16 and up).
	 */
	usb_get_intf(sc->intf);


	snprintf(sc->name, 12, DRV_NAME "(%d.%d)",
	snprintf(sc->name, 12, DRV_NAME "(%d.%d)",
	    sc->dev->bus->busnum, sc->dev->devnum);
	    sc->dev->bus->busnum, sc->dev->devnum);
@@ -2286,7 +2294,7 @@ static int ub_probe(struct usb_interface *intf,


err_dev_desc:
err_dev_desc:
	usb_set_intfdata(intf, NULL);
	usb_set_intfdata(intf, NULL);
	// usb_put_intf(sc->intf);
	usb_put_intf(sc->intf);
	usb_put_dev(sc->dev);
	usb_put_dev(sc->dev);
	kfree(sc);
	kfree(sc);
err_core:
err_core:
@@ -2461,12 +2469,6 @@ static void ub_disconnect(struct usb_interface *intf)
	 * and no URBs left in transit.
	 * and no URBs left in transit.
	 */
	 */


	usb_set_intfdata(intf, NULL);
	// usb_put_intf(sc->intf);
	sc->intf = NULL;
	usb_put_dev(sc->dev);
	sc->dev = NULL;

	ub_put(sc);
	ub_put(sc);
}
}


+1 −1
Original line number Original line Diff line number Diff line
@@ -69,7 +69,7 @@ static const char speedtch_driver_name[] = "speedtch";
#define RESUBMIT_DELAY		1000	/* milliseconds */
#define RESUBMIT_DELAY		1000	/* milliseconds */


#define DEFAULT_BULK_ALTSETTING	1
#define DEFAULT_BULK_ALTSETTING	1
#define DEFAULT_ISOC_ALTSETTING	2
#define DEFAULT_ISOC_ALTSETTING	3
#define DEFAULT_DL_512_FIRST	0
#define DEFAULT_DL_512_FIRST	0
#define DEFAULT_ENABLE_ISOC	0
#define DEFAULT_ENABLE_ISOC	0
#define DEFAULT_SW_BUFFERING	0
#define DEFAULT_SW_BUFFERING	0
+4 −4
Original line number Original line Diff line number Diff line
@@ -99,11 +99,11 @@ static const char usbatm_driver_name[] = "usbatm";


#define UDSL_MAX_RCV_URBS		16
#define UDSL_MAX_RCV_URBS		16
#define UDSL_MAX_SND_URBS		16
#define UDSL_MAX_SND_URBS		16
#define UDSL_MAX_BUF_SIZE		64 * 1024	/* bytes */
#define UDSL_MAX_BUF_SIZE		65536
#define UDSL_DEFAULT_RCV_URBS		4
#define UDSL_DEFAULT_RCV_URBS		4
#define UDSL_DEFAULT_SND_URBS		4
#define UDSL_DEFAULT_SND_URBS		4
#define UDSL_DEFAULT_RCV_BUF_SIZE	64 * ATM_CELL_SIZE	/* bytes */
#define UDSL_DEFAULT_RCV_BUF_SIZE	3392	/* 64 * ATM_CELL_SIZE */
#define UDSL_DEFAULT_SND_BUF_SIZE	64 * ATM_CELL_SIZE	/* bytes */
#define UDSL_DEFAULT_SND_BUF_SIZE	3392	/* 64 * ATM_CELL_SIZE */


#define ATM_CELL_HEADER			(ATM_CELL_SIZE - ATM_CELL_PAYLOAD)
#define ATM_CELL_HEADER			(ATM_CELL_SIZE - ATM_CELL_PAYLOAD)


@@ -135,7 +135,7 @@ MODULE_PARM_DESC(rcv_buf_bytes,
module_param(snd_buf_bytes, uint, S_IRUGO);
module_param(snd_buf_bytes, uint, S_IRUGO);
MODULE_PARM_DESC(snd_buf_bytes,
MODULE_PARM_DESC(snd_buf_bytes,
		 "Size of the buffers used for transmission, in bytes (range: 1-"
		 "Size of the buffers used for transmission, in bytes (range: 1-"
		 __MODULE_STRING(UDSL_MAX_SND_BUF_SIZE) ", default: "
		 __MODULE_STRING(UDSL_MAX_BUF_SIZE) ", default: "
		 __MODULE_STRING(UDSL_DEFAULT_SND_BUF_SIZE) ")");
		 __MODULE_STRING(UDSL_DEFAULT_SND_BUF_SIZE) ")");




+6 −7
Original line number Original line Diff line number Diff line
@@ -1805,6 +1805,12 @@ int usb_add_hcd(struct usb_hcd *hcd,
			USB_SPEED_FULL;
			USB_SPEED_FULL;
	hcd->self.root_hub = rhdev;
	hcd->self.root_hub = rhdev;


	/* wakeup flag init defaults to "everything works" for root hubs,
	 * but drivers can override it in reset() if needed, along with
	 * recording the overall controller's system wakeup capability.
	 */
	device_init_wakeup(&rhdev->dev, 1);

	/* "reset" is misnamed; its role is now one-time init. the controller
	/* "reset" is misnamed; its role is now one-time init. the controller
	 * should already have been reset (and boot firmware kicked off etc).
	 * should already have been reset (and boot firmware kicked off etc).
	 */
	 */
@@ -1813,13 +1819,6 @@ int usb_add_hcd(struct usb_hcd *hcd,
		goto err_hcd_driver_setup;
		goto err_hcd_driver_setup;
	}
	}


	/* wakeup flag init is in transition; for now we can't rely on PCI to
	 * initialize these bits properly, so we let reset() override it.
	 * This init should _precede_ the reset() once PCI behaves.
	 */
	device_init_wakeup(&rhdev->dev,
			device_can_wakeup(hcd->self.controller));

	/* NOTE: root hub and controller capabilities may not be the same */
	/* NOTE: root hub and controller capabilities may not be the same */
	if (device_can_wakeup(hcd->self.controller)
	if (device_can_wakeup(hcd->self.controller)
			&& device_can_wakeup(&hcd->self.root_hub->dev))
			&& device_can_wakeup(&hcd->self.root_hub->dev))
+13 −10
Original line number Original line Diff line number Diff line
@@ -1168,19 +1168,9 @@ static inline const char *plural(int n)
static int choose_configuration(struct usb_device *udev)
static int choose_configuration(struct usb_device *udev)
{
{
	int i;
	int i;
	u16 devstatus;
	int bus_powered;
	int num_configs;
	int num_configs;
	struct usb_host_config *c, *best;
	struct usb_host_config *c, *best;


	/* If this fails, assume the device is bus-powered */
	devstatus = 0;
	usb_get_status(udev, USB_RECIP_DEVICE, 0, &devstatus);
	le16_to_cpus(&devstatus);
	bus_powered = ((devstatus & (1 << USB_DEVICE_SELF_POWERED)) == 0);
	dev_dbg(&udev->dev, "device is %s-powered\n",
			bus_powered ? "bus" : "self");

	best = NULL;
	best = NULL;
	c = udev->config;
	c = udev->config;
	num_configs = udev->descriptor.bNumConfigurations;
	num_configs = udev->descriptor.bNumConfigurations;
@@ -1197,6 +1187,19 @@ static int choose_configuration(struct usb_device *udev)
		 * similar errors in their descriptors.  If the next test
		 * similar errors in their descriptors.  If the next test
		 * were allowed to execute, such configurations would always
		 * were allowed to execute, such configurations would always
		 * be rejected and the devices would not work as expected.
		 * be rejected and the devices would not work as expected.
		 * In the meantime, we run the risk of selecting a config
		 * that requires external power at a time when that power
		 * isn't available.  It seems to be the lesser of two evils.
		 *
		 * Bugzilla #6448 reports a device that appears to crash
		 * when it receives a GET_DEVICE_STATUS request!  We don't
		 * have any other way to tell whether a device is self-powered,
		 * but since we don't use that information anywhere but here,
		 * the call has been removed.
		 *
		 * Maybe the GET_DEVICE_STATUS call and the test below can
		 * be reinstated when device firmwares become more reliable.
		 * Don't hold your breath.
		 */
		 */
#if 0
#if 0
		/* Rule out self-powered configs for a bus-powered device */
		/* Rule out self-powered configs for a bus-powered device */
Loading