diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 18:22:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 18:22:55 -0500 |
commit | 748e566b7e24541e05e3e70be311887a1262f2a1 (patch) | |
tree | 41cc3a9aa04918cc17efa575baf6dbf87f40ddba /Documentation | |
parent | 5f1141eb352ea79d849920039503e40dd623fffa (diff) | |
parent | acf509ae28301d78b022c534c26b1e4765c18f2b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (122 commits)
USB: mos7840: add device IDs for B&B electronics devices
USB: ftdi_sio: add USB device ID's for B&B Electronics line
USB: musb: musb_host: fix sparse warning
USB: musb: musb_gadget: fix sparse warning
USB: musb: omap2430: fix sparse warning
USB: core: message: fix sparse warning
USB: core: hub: fix sparse warning
USB: core: fix sparse warning for static function
USB: Added USB_ETH_RNDIS to use instead of CONFIG_USB_ETH_RNDIS
USB: Check bandwidth when switching alt settings.
USB: Refactor code to find alternate interface settings.
USB: xhci: Fix command completion after a drop endpoint.
USB: xhci: Make reverting an alt setting "unfailable".
USB: usbtmc: Use usb_clear_halt() instead of custom code.
USB: xhci: Add correct email and files to MAINTAINERS entry.
USB: ehci-omap.c: introduce missing kfree
USB: xhci-mem.c: introduce missing kfree
USB: add remove_id sysfs attr for usb drivers
USB: g_multi kconfig: fix depends and help text
USB: option: add pid for ZTE
...
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/ABI/testing/sysfs-bus-usb | 13 | ||||
-rw-r--r-- | Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc | 13 | ||||
-rw-r--r-- | Documentation/kernel-parameters.txt | 2 | ||||
-rw-r--r-- | Documentation/powerpc/dts-bindings/xilinx.txt | 11 | ||||
-rw-r--r-- | Documentation/usb/power-management.txt | 69 |
5 files changed, 72 insertions, 36 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-usb b/Documentation/ABI/testing/sysfs-bus-usb index 7772928ee48f..deb6b489e4e5 100644 --- a/Documentation/ABI/testing/sysfs-bus-usb +++ b/Documentation/ABI/testing/sysfs-bus-usb | |||
@@ -144,3 +144,16 @@ Description: | |||
144 | 144 | ||
145 | Write a 1 to force the device to disconnect | 145 | Write a 1 to force the device to disconnect |
146 | (equivalent to unplugging a wired USB device). | 146 | (equivalent to unplugging a wired USB device). |
147 | |||
148 | What: /sys/bus/usb/drivers/.../remove_id | ||
149 | Date: November 2009 | ||
150 | Contact: CHENG Renquan <rqcheng@smu.edu.sg> | ||
151 | Description: | ||
152 | Writing a device ID to this file will remove an ID | ||
153 | that was dynamically added via the new_id sysfs entry. | ||
154 | The format for the device ID is: | ||
155 | idVendor idProduct. After successfully | ||
156 | removing an ID, the driver will no longer support the | ||
157 | device. This is useful to ensure auto probing won't | ||
158 | match the driver to the device. For example: | ||
159 | # echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id | ||
diff --git a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc index 4e8106f7cfd9..25b1e751b777 100644 --- a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc +++ b/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc | |||
@@ -23,3 +23,16 @@ Description: | |||
23 | Since this relates to security (specifically, the | 23 | Since this relates to security (specifically, the |
24 | lifetime of PTKs and GTKs) it should not be changed | 24 | lifetime of PTKs and GTKs) it should not be changed |
25 | from the default. | 25 | from the default. |
26 | |||
27 | What: /sys/class/uwb_rc/uwbN/wusbhc/wusb_phy_rate | ||
28 | Date: August 2009 | ||
29 | KernelVersion: 2.6.32 | ||
30 | Contact: David Vrabel <david.vrabel@csr.com> | ||
31 | Description: | ||
32 | The maximum PHY rate to use for all connected devices. | ||
33 | This is only of limited use for testing and | ||
34 | development as the hardware's automatic rate | ||
35 | adaptation is better then this simple control. | ||
36 | |||
37 | Refer to [ECMA-368] section 10.3.1.1 for the value to | ||
38 | use. | ||
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 777dc8a32df8..3f886e298f62 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -2663,6 +2663,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
2663 | to a common usb-storage quirk flag as follows: | 2663 | to a common usb-storage quirk flag as follows: |
2664 | a = SANE_SENSE (collect more than 18 bytes | 2664 | a = SANE_SENSE (collect more than 18 bytes |
2665 | of sense data); | 2665 | of sense data); |
2666 | b = BAD_SENSE (don't collect more than 18 | ||
2667 | bytes of sense data); | ||
2666 | c = FIX_CAPACITY (decrease the reported | 2668 | c = FIX_CAPACITY (decrease the reported |
2667 | device capacity by one sector); | 2669 | device capacity by one sector); |
2668 | h = CAPACITY_HEURISTICS (decrease the | 2670 | h = CAPACITY_HEURISTICS (decrease the |
diff --git a/Documentation/powerpc/dts-bindings/xilinx.txt b/Documentation/powerpc/dts-bindings/xilinx.txt index 80339fe4300b..ea68046bb9cb 100644 --- a/Documentation/powerpc/dts-bindings/xilinx.txt +++ b/Documentation/powerpc/dts-bindings/xilinx.txt | |||
@@ -292,4 +292,15 @@ | |||
292 | - reg-offset : A value of 3 is required | 292 | - reg-offset : A value of 3 is required |
293 | - reg-shift : A value of 2 is required | 293 | - reg-shift : A value of 2 is required |
294 | 294 | ||
295 | vii) Xilinx USB Host controller | ||
296 | |||
297 | The Xilinx USB host controller is EHCI compatible but with a different | ||
298 | base address for the EHCI registers, and it is always a big-endian | ||
299 | USB Host controller. The hardware can be configured as high speed only, | ||
300 | or high speed/full speed hybrid. | ||
301 | |||
302 | Required properties: | ||
303 | - xlnx,support-usb-fs: A value 0 means the core is built as high speed | ||
304 | only. A value 1 means the core also supports | ||
305 | full speed devices. | ||
295 | 306 | ||
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt index ad642615ad4c..c7c1dc2f8017 100644 --- a/Documentation/usb/power-management.txt +++ b/Documentation/usb/power-management.txt | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | Alan Stern <stern@rowland.harvard.edu> | 3 | Alan Stern <stern@rowland.harvard.edu> |
4 | 4 | ||
5 | October 5, 2007 | 5 | November 10, 2009 |
6 | 6 | ||
7 | 7 | ||
8 | 8 | ||
@@ -123,9 +123,9 @@ relevant attribute files are: wakeup, level, and autosuspend. | |||
123 | 123 | ||
124 | power/level | 124 | power/level |
125 | 125 | ||
126 | This file contains one of three words: "on", "auto", | 126 | This file contains one of two words: "on" or "auto". |
127 | or "suspend". You can write those words to the file | 127 | You can write those words to the file to change the |
128 | to change the device's setting. | 128 | device's setting. |
129 | 129 | ||
130 | "on" means that the device should be resumed and | 130 | "on" means that the device should be resumed and |
131 | autosuspend is not allowed. (Of course, system | 131 | autosuspend is not allowed. (Of course, system |
@@ -134,10 +134,10 @@ relevant attribute files are: wakeup, level, and autosuspend. | |||
134 | "auto" is the normal state in which the kernel is | 134 | "auto" is the normal state in which the kernel is |
135 | allowed to autosuspend and autoresume the device. | 135 | allowed to autosuspend and autoresume the device. |
136 | 136 | ||
137 | "suspend" means that the device should remain | 137 | (In kernels up to 2.6.32, you could also specify |
138 | suspended, and autoresume is not allowed. (But remote | 138 | "suspend", meaning that the device should remain |
139 | wakeup may still be allowed, since it is controlled | 139 | suspended and autoresume was not allowed. This |
140 | separately by the power/wakeup attribute.) | 140 | setting is no longer supported.) |
141 | 141 | ||
142 | power/autosuspend | 142 | power/autosuspend |
143 | 143 | ||
@@ -313,13 +313,14 @@ three of the methods listed above. In addition, a driver indicates | |||
313 | that it supports autosuspend by setting the .supports_autosuspend flag | 313 | that it supports autosuspend by setting the .supports_autosuspend flag |
314 | in its usb_driver structure. It is then responsible for informing the | 314 | in its usb_driver structure. It is then responsible for informing the |
315 | USB core whenever one of its interfaces becomes busy or idle. The | 315 | USB core whenever one of its interfaces becomes busy or idle. The |
316 | driver does so by calling these five functions: | 316 | driver does so by calling these six functions: |
317 | 317 | ||
318 | int usb_autopm_get_interface(struct usb_interface *intf); | 318 | int usb_autopm_get_interface(struct usb_interface *intf); |
319 | void usb_autopm_put_interface(struct usb_interface *intf); | 319 | void usb_autopm_put_interface(struct usb_interface *intf); |
320 | int usb_autopm_set_interface(struct usb_interface *intf); | ||
321 | int usb_autopm_get_interface_async(struct usb_interface *intf); | 320 | int usb_autopm_get_interface_async(struct usb_interface *intf); |
322 | void usb_autopm_put_interface_async(struct usb_interface *intf); | 321 | void usb_autopm_put_interface_async(struct usb_interface *intf); |
322 | void usb_autopm_get_interface_no_resume(struct usb_interface *intf); | ||
323 | void usb_autopm_put_interface_no_suspend(struct usb_interface *intf); | ||
323 | 324 | ||
324 | The functions work by maintaining a counter in the usb_interface | 325 | The functions work by maintaining a counter in the usb_interface |
325 | structure. When intf->pm_usage_count is > 0 then the interface is | 326 | structure. When intf->pm_usage_count is > 0 then the interface is |
@@ -331,11 +332,13 @@ considered to be idle, and the kernel may autosuspend the device. | |||
331 | associated with the device itself rather than any of its interfaces. | 332 | associated with the device itself rather than any of its interfaces. |
332 | This field is used only by the USB core.) | 333 | This field is used only by the USB core.) |
333 | 334 | ||
334 | The driver owns intf->pm_usage_count; it can modify the value however | 335 | Drivers must not modify intf->pm_usage_count directly; its value |
335 | and whenever it likes. A nice aspect of the non-async usb_autopm_* | 336 | should be changed only be using the functions listed above. Drivers |
336 | routines is that the changes they make are protected by the usb_device | 337 | are responsible for insuring that the overall change to pm_usage_count |
337 | structure's PM mutex (udev->pm_mutex); however drivers may change | 338 | during their lifetime balances out to 0 (it may be necessary for the |
338 | pm_usage_count without holding the mutex. Drivers using the async | 339 | disconnect method to call usb_autopm_put_interface() one or more times |
340 | to fulfill this requirement). The first two routines use the PM mutex | ||
341 | in struct usb_device for mutual exclusion; drivers using the async | ||
339 | routines are responsible for their own synchronization and mutual | 342 | routines are responsible for their own synchronization and mutual |
340 | exclusion. | 343 | exclusion. |
341 | 344 | ||
@@ -347,11 +350,6 @@ exclusion. | |||
347 | attempts an autosuspend if the new value is <= 0 and the | 350 | attempts an autosuspend if the new value is <= 0 and the |
348 | device isn't suspended. | 351 | device isn't suspended. |
349 | 352 | ||
350 | usb_autopm_set_interface() leaves pm_usage_count alone. | ||
351 | It attempts an autoresume if the value is > 0 and the device | ||
352 | is suspended, and it attempts an autosuspend if the value is | ||
353 | <= 0 and the device isn't suspended. | ||
354 | |||
355 | usb_autopm_get_interface_async() and | 353 | usb_autopm_get_interface_async() and |
356 | usb_autopm_put_interface_async() do almost the same things as | 354 | usb_autopm_put_interface_async() do almost the same things as |
357 | their non-async counterparts. The differences are: they do | 355 | their non-async counterparts. The differences are: they do |
@@ -360,13 +358,11 @@ exclusion. | |||
360 | such as an URB's completion handler, but when they return the | 358 | such as an URB's completion handler, but when they return the |
361 | device will not generally not yet be in the desired state. | 359 | device will not generally not yet be in the desired state. |
362 | 360 | ||
363 | There also are a couple of utility routines drivers can use: | 361 | usb_autopm_get_interface_no_resume() and |
364 | 362 | usb_autopm_put_interface_no_suspend() merely increment or | |
365 | usb_autopm_enable() sets pm_usage_cnt to 0 and then calls | 363 | decrement the pm_usage_count value; they do not attempt to |
366 | usb_autopm_set_interface(), which will attempt an autosuspend. | 364 | carry out an autoresume or an autosuspend. Hence they can be |
367 | 365 | called in an atomic context. | |
368 | usb_autopm_disable() sets pm_usage_cnt to 1 and then calls | ||
369 | usb_autopm_set_interface(), which will attempt an autoresume. | ||
370 | 366 | ||
371 | The conventional usage pattern is that a driver calls | 367 | The conventional usage pattern is that a driver calls |
372 | usb_autopm_get_interface() in its open routine and | 368 | usb_autopm_get_interface() in its open routine and |
@@ -400,11 +396,11 @@ though, setting this flag won't cause the kernel to autoresume it. | |||
400 | Normally a driver would set this flag in its probe method, at which | 396 | Normally a driver would set this flag in its probe method, at which |
401 | time the device is guaranteed not to be autosuspended.) | 397 | time the device is guaranteed not to be autosuspended.) |
402 | 398 | ||
403 | The usb_autopm_* routines have to run in a sleepable process context; | 399 | The synchronous usb_autopm_* routines have to run in a sleepable |
404 | they must not be called from an interrupt handler or while holding a | 400 | process context; they must not be called from an interrupt handler or |
405 | spinlock. In fact, the entire autosuspend mechanism is not well geared | 401 | while holding a spinlock. In fact, the entire autosuspend mechanism |
406 | toward interrupt-driven operation. However there is one thing a | 402 | is not well geared toward interrupt-driven operation. However there |
407 | driver can do in an interrupt handler: | 403 | is one thing a driver can do in an interrupt handler: |
408 | 404 | ||
409 | usb_mark_last_busy(struct usb_device *udev); | 405 | usb_mark_last_busy(struct usb_device *udev); |
410 | 406 | ||
@@ -423,15 +419,16 @@ an URB had completed too recently. | |||
423 | 419 | ||
424 | External suspend calls should never be allowed to fail in this way, | 420 | External suspend calls should never be allowed to fail in this way, |
425 | only autosuspend calls. The driver can tell them apart by checking | 421 | only autosuspend calls. The driver can tell them apart by checking |
426 | udev->auto_pm; this flag will be set to 1 for internal PM events | 422 | the PM_EVENT_AUTO bit in the message.event argument to the suspend |
427 | (autosuspend or autoresume) and 0 for external PM events. | 423 | method; this bit will be set for internal PM events (autosuspend) and |
424 | clear for external PM events. | ||
428 | 425 | ||
429 | Many of the ingredients in the autosuspend framework are oriented | 426 | Many of the ingredients in the autosuspend framework are oriented |
430 | towards interfaces: The usb_interface structure contains the | 427 | towards interfaces: The usb_interface structure contains the |
431 | pm_usage_cnt field, and the usb_autopm_* routines take an interface | 428 | pm_usage_cnt field, and the usb_autopm_* routines take an interface |
432 | pointer as their argument. But somewhat confusingly, a few of the | 429 | pointer as their argument. But somewhat confusingly, a few of the |
433 | pieces (usb_mark_last_busy() and udev->auto_pm) use the usb_device | 430 | pieces (i.e., usb_mark_last_busy()) use the usb_device structure |
434 | structure instead. Drivers need to keep this straight; they can call | 431 | instead. Drivers need to keep this straight; they can call |
435 | interface_to_usbdev() to find the device structure for a given | 432 | interface_to_usbdev() to find the device structure for a given |
436 | interface. | 433 | interface. |
437 | 434 | ||