aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 18:37:24 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 18:37:24 -0500
commit7c7758f99d39d529a64d4f60d22129bbf2f16d74 (patch)
tree8847b5e56812fe4c4c812cfffc78e391a91f4ebe /Documentation
parent67acd8b4b7a3f1b183ae358e1dfdb8a80e170736 (diff)
parent8a70da82edc50aa7a4b54864babf2d72538ba1bb (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: (123 commits) wimax/i2400m: add CREDITS and MAINTAINERS entries wimax: export linux/wimax.h and linux/wimax/i2400m.h with headers_install i2400m: Makefile and Kconfig i2400m/SDIO: TX and RX path backends i2400m/SDIO: firmware upload backend i2400m/SDIO: probe/disconnect, dev init/shutdown and reset backends i2400m/SDIO: header for the SDIO subdriver i2400m/USB: TX and RX path backends i2400m/USB: firmware upload backend i2400m/USB: probe/disconnect, dev init/shutdown and reset backends i2400m/USB: header for the USB bus driver i2400m: debugfs controls i2400m: various functions for device management i2400m: RX and TX data/control paths i2400m: firmware loading and bootrom initialization i2400m: linkage to the networking stack i2400m: Generic probe/disconnect, reset and message passing i2400m: host/device procotol and core driver definitions i2400m: documentation and instructions for usage wimax: Makefile, Kconfig and docbook linkage for the stack ...
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/networking.tmpl8
-rw-r--r--Documentation/kernel-parameters.txt36
-rw-r--r--Documentation/usb/power-management.txt22
-rw-r--r--Documentation/wimax/README.i2400m260
-rw-r--r--Documentation/wimax/README.wimax81
5 files changed, 402 insertions, 5 deletions
diff --git a/Documentation/DocBook/networking.tmpl b/Documentation/DocBook/networking.tmpl
index 627707a3cb9d..59ad69a9d777 100644
--- a/Documentation/DocBook/networking.tmpl
+++ b/Documentation/DocBook/networking.tmpl
@@ -74,6 +74,14 @@
74!Enet/sunrpc/rpcb_clnt.c 74!Enet/sunrpc/rpcb_clnt.c
75!Enet/sunrpc/clnt.c 75!Enet/sunrpc/clnt.c
76 </sect1> 76 </sect1>
77 <sect1><title>WiMAX</title>
78!Enet/wimax/op-msg.c
79!Enet/wimax/op-reset.c
80!Enet/wimax/op-rfkill.c
81!Enet/wimax/stack.c
82!Iinclude/net/wimax.h
83!Iinclude/linux/wimax.h
84 </sect1>
77 </chapter> 85 </chapter>
78 86
79 <chapter id="netdev"> 87 <chapter id="netdev">
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 0b3f6711d2f1..a58fc8b73398 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -91,6 +91,7 @@ parameter is applicable:
91 SUSPEND System suspend states are enabled. 91 SUSPEND System suspend states are enabled.
92 FTRACE Function tracing enabled. 92 FTRACE Function tracing enabled.
93 TS Appropriate touchscreen support is enabled. 93 TS Appropriate touchscreen support is enabled.
94 UMS USB Mass Storage support is enabled.
94 USB USB support is enabled. 95 USB USB support is enabled.
95 USBHID USB Human Interface Device support is enabled. 96 USBHID USB Human Interface Device support is enabled.
96 V4L Video For Linux support is enabled. 97 V4L Video For Linux support is enabled.
@@ -2383,6 +2384,41 @@ and is between 256 and 4096 characters. It is defined in the file
2383 usbhid.mousepoll= 2384 usbhid.mousepoll=
2384 [USBHID] The interval which mice are to be polled at. 2385 [USBHID] The interval which mice are to be polled at.
2385 2386
2387 usb-storage.delay_use=
2388 [UMS] The delay in seconds before a new device is
2389 scanned for Logical Units (default 5).
2390
2391 usb-storage.quirks=
2392 [UMS] A list of quirks entries to supplement or
2393 override the built-in unusual_devs list. List
2394 entries are separated by commas. Each entry has
2395 the form VID:PID:Flags where VID and PID are Vendor
2396 and Product ID values (4-digit hex numbers) and
2397 Flags is a set of characters, each corresponding
2398 to a common usb-storage quirk flag as follows:
2399 a = SANE_SENSE (collect more than 18 bytes
2400 of sense data);
2401 c = FIX_CAPACITY (decrease the reported
2402 device capacity by one sector);
2403 h = CAPACITY_HEURISTICS (decrease the
2404 reported device capacity by one
2405 sector if the number is odd);
2406 i = IGNORE_DEVICE (don't bind to this
2407 device);
2408 l = NOT_LOCKABLE (don't try to lock and
2409 unlock ejectable media);
2410 m = MAX_SECTORS_64 (don't transfer more
2411 than 64 sectors = 32 KB at a time);
2412 o = CAPACITY_OK (accept the capacity
2413 reported by the device);
2414 r = IGNORE_RESIDUE (the device reports
2415 bogus residue values);
2416 s = SINGLE_LUN (the device has only one
2417 Logical Unit);
2418 w = NO_WP_DETECT (don't test whether the
2419 medium is write-protected).
2420 Example: quirks=0419:aaf5:rl,0421:0433:rc
2421
2386 add_efi_memmap [EFI; x86-32,X86-64] Include EFI memory map in 2422 add_efi_memmap [EFI; x86-32,X86-64] Include EFI memory map in
2387 kernel's map of available physical RAM. 2423 kernel's map of available physical RAM.
2388 2424
diff --git a/Documentation/usb/power-management.txt b/Documentation/usb/power-management.txt
index e48ea1d51010..ad642615ad4c 100644
--- a/Documentation/usb/power-management.txt
+++ b/Documentation/usb/power-management.txt
@@ -313,11 +313,13 @@ three of the methods listed above. In addition, a driver indicates
313that it supports autosuspend by setting the .supports_autosuspend flag 313that it supports autosuspend by setting the .supports_autosuspend flag
314in its usb_driver structure. It is then responsible for informing the 314in its usb_driver structure. It is then responsible for informing the
315USB core whenever one of its interfaces becomes busy or idle. The 315USB core whenever one of its interfaces becomes busy or idle. The
316driver does so by calling these three functions: 316driver does so by calling these five 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); 320 int usb_autopm_set_interface(struct usb_interface *intf);
321 int usb_autopm_get_interface_async(struct usb_interface *intf);
322 void usb_autopm_put_interface_async(struct usb_interface *intf);
321 323
322The functions work by maintaining a counter in the usb_interface 324The functions work by maintaining a counter in the usb_interface
323structure. When intf->pm_usage_count is > 0 then the interface is 325structure. When intf->pm_usage_count is > 0 then the interface is
@@ -330,10 +332,12 @@ associated with the device itself rather than any of its interfaces.
330This field is used only by the USB core.) 332This field is used only by the USB core.)
331 333
332The driver owns intf->pm_usage_count; it can modify the value however 334The driver owns intf->pm_usage_count; it can modify the value however
333and whenever it likes. A nice aspect of the usb_autopm_* routines is 335and whenever it likes. A nice aspect of the non-async usb_autopm_*
334that the changes they make are protected by the usb_device structure's 336routines is that the changes they make are protected by the usb_device
335PM mutex (udev->pm_mutex); however drivers may change pm_usage_count 337structure's PM mutex (udev->pm_mutex); however drivers may change
336without holding the mutex. 338pm_usage_count without holding the mutex. Drivers using the async
339routines are responsible for their own synchronization and mutual
340exclusion.
337 341
338 usb_autopm_get_interface() increments pm_usage_count and 342 usb_autopm_get_interface() increments pm_usage_count and
339 attempts an autoresume if the new value is > 0 and the 343 attempts an autoresume if the new value is > 0 and the
@@ -348,6 +352,14 @@ without holding the mutex.
348 is suspended, and it attempts an autosuspend if the value is 352 is suspended, and it attempts an autosuspend if the value is
349 <= 0 and the device isn't suspended. 353 <= 0 and the device isn't suspended.
350 354
355 usb_autopm_get_interface_async() and
356 usb_autopm_put_interface_async() do almost the same things as
357 their non-async counterparts. The differences are: they do
358 not acquire the PM mutex, and they use a workqueue to do their
359 jobs. As a result they can be called in an atomic context,
360 such as an URB's completion handler, but when they return the
361 device will not generally not yet be in the desired state.
362
351There also are a couple of utility routines drivers can use: 363There also are a couple of utility routines drivers can use:
352 364
353 usb_autopm_enable() sets pm_usage_cnt to 0 and then calls 365 usb_autopm_enable() sets pm_usage_cnt to 0 and then calls
diff --git a/Documentation/wimax/README.i2400m b/Documentation/wimax/README.i2400m
new file mode 100644
index 000000000000..7dffd8919cb0
--- /dev/null
+++ b/Documentation/wimax/README.i2400m
@@ -0,0 +1,260 @@
1
2 Driver for the Intel Wireless Wimax Connection 2400m
3
4 (C) 2008 Intel Corporation < linux-wimax@intel.com >
5
6 This provides a driver for the Intel Wireless WiMAX Connection 2400m
7 and a basic Linux kernel WiMAX stack.
8
91. Requirements
10
11 * Linux installation with Linux kernel 2.6.22 or newer (if building
12 from a separate tree)
13 * Intel i2400m Echo Peak or Baxter Peak; this includes the Intel
14 Wireless WiMAX/WiFi Link 5x50 series.
15 * build tools:
16 + Linux kernel development package for the target kernel; to
17 build against your currently running kernel, you need to have
18 the kernel development package corresponding to the running
19 image installed (usually if your kernel is named
20 linux-VERSION, the development package is called
21 linux-dev-VERSION or linux-headers-VERSION).
22 + GNU C Compiler, make
23
242. Compilation and installation
25
262.1. Compilation of the drivers included in the kernel
27
28 Configure the kernel; to enable the WiMAX drivers select Drivers >
29 Networking Drivers > WiMAX device support. Enable all of them as
30 modules (easier).
31
32 If USB or SDIO are not enabled in the kernel configuration, the options
33 to build the i2400m USB or SDIO drivers will not show. Enable said
34 subsystems and go back to the WiMAX menu to enable the drivers.
35
36 Compile and install your kernel as usual.
37
382.2. Compilation of the drivers distributed as an standalone module
39
40 To compile
41
42$ cd source/directory
43$ make
44
45 Once built you can load and unload using the provided load.sh script;
46 load.sh will load the modules, load.sh u will unload them.
47
48 To install in the default kernel directories (and enable auto loading
49 when the device is plugged):
50
51$ make install
52$ depmod -a
53
54 If your kernel development files are located in a non standard
55 directory or if you want to build for a kernel that is not the
56 currently running one, set KDIR to the right location:
57
58$ make KDIR=/path/to/kernel/dev/tree
59
60 For more information, please contact linux-wimax@intel.com.
61
623. Installing the firmware
63
64 The firmware can be obtained from http://linuxwimax.org or might have
65 been supplied with your hardware.
66
67 It has to be installed in the target system:
68 *
69$ cp FIRMWAREFILE.sbcf /lib/firmware/i2400m-fw-BUSTYPE-1.3.sbcf
70
71 * NOTE: if your firmware came in an .rpm or .deb file, just install
72 it as normal, with the rpm (rpm -i FIRMWARE.rpm) or dpkg
73 (dpkg -i FIRMWARE.deb) commands. No further action is needed.
74 * BUSTYPE will be usb or sdio, depending on the hardware you have.
75 Each hardware type comes with its own firmware and will not work
76 with other types.
77
784. Design
79
80 This package contains two major parts: a WiMAX kernel stack and a
81 driver for the Intel i2400m.
82
83 The WiMAX stack is designed to provide for common WiMAX control
84 services to current and future WiMAX devices from any vendor; please
85 see README.wimax for details.
86
87 The i2400m kernel driver is broken up in two main parts: the bus
88 generic driver and the bus-specific drivers. The bus generic driver
89 forms the drivercore and contain no knowledge of the actual method we
90 use to connect to the device. The bus specific drivers are just the
91 glue to connect the bus-generic driver and the device. Currently only
92 USB and SDIO are supported. See drivers/net/wimax/i2400m/i2400m.h for
93 more information.
94
95 The bus generic driver is logically broken up in two parts: OS-glue and
96 hardware-glue. The OS-glue interfaces with Linux. The hardware-glue
97 interfaces with the device on using an interface provided by the
98 bus-specific driver. The reason for this breakup is to be able to
99 easily reuse the hardware-glue to write drivers for other OSes; note
100 the hardware glue part is written as a native Linux driver; no
101 abstraction layers are used, so to port to another OS, the Linux kernel
102 API calls should be replaced with the target OS's.
103
1045. Usage
105
106 To load the driver, follow the instructions in the install section;
107 once the driver is loaded, plug in the device (unless it is permanently
108 plugged in). The driver will enumerate the device, upload the firmware
109 and output messages in the kernel log (dmesg, /var/log/messages or
110 /var/log/kern.log) such as:
111
112...
113i2400m_usb 5-4:1.0: firmware interface version 8.0.0
114i2400m_usb 5-4:1.0: WiMAX interface wmx0 (00:1d:e1:01:94:2c) ready
115
116 At this point the device is ready to work.
117
118 Current versions require the Intel WiMAX Network Service in userspace
119 to make things work. See the network service's README for instructions
120 on how to scan, connect and disconnect.
121
1225.1. Module parameters
123
124 Module parameters can be set at kernel or module load time or by
125 echoing values:
126
127$ echo VALUE > /sys/module/MODULENAME/parameters/PARAMETERNAME
128
129 To make changes permanent, for example, for the i2400m module, you can
130 also create a file named /etc/modprobe.d/i2400m containing:
131
132options i2400m idle_mode_disabled=1
133
134 To find which parameters are supported by a module, run:
135
136$ modinfo path/to/module.ko
137
138 During kernel bootup (if the driver is linked in the kernel), specify
139 the following to the kernel command line:
140
141i2400m.PARAMETER=VALUE
142
1435.1.1. i2400m: idle_mode_disabled
144
145 The i2400m module supports a parameter to disable idle mode. This
146 parameter, once set, will take effect only when the device is
147 reinitialized by the driver (eg: following a reset or a reconnect).
148
1495.2. Debug operations: debugfs entries
150
151 The driver will register debugfs entries that allow the user to tweak
152 debug settings. There are three main container directories where
153 entries are placed, which correspond to the three blocks a i2400m WiMAX
154 driver has:
155 * /sys/kernel/debug/wimax:DEVNAME/ for the generic WiMAX stack
156 controls
157 * /sys/kernel/debug/wimax:DEVNAME/i2400m for the i2400m generic
158 driver controls
159 * /sys/kernel/debug/wimax:DEVNAME/i2400m-usb (or -sdio) for the
160 bus-specific i2400m-usb or i2400m-sdio controls).
161
162 Of course, if debugfs is mounted in a directory other than
163 /sys/kernel/debug, those paths will change.
164
1655.2.1. Increasing debug output
166
167 The files named *dl_* indicate knobs for controlling the debug output
168 of different submodules:
169 *
170# find /sys/kernel/debug/wimax\:wmx0 -name \*dl_\*
171/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_tx
172/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_rx
173/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_notif
174/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_fw
175/sys/kernel/debug/wimax:wmx0/i2400m-usb/dl_usb
176/sys/kernel/debug/wimax:wmx0/i2400m/dl_tx
177/sys/kernel/debug/wimax:wmx0/i2400m/dl_rx
178/sys/kernel/debug/wimax:wmx0/i2400m/dl_rfkill
179/sys/kernel/debug/wimax:wmx0/i2400m/dl_netdev
180/sys/kernel/debug/wimax:wmx0/i2400m/dl_fw
181/sys/kernel/debug/wimax:wmx0/i2400m/dl_debugfs
182/sys/kernel/debug/wimax:wmx0/i2400m/dl_driver
183/sys/kernel/debug/wimax:wmx0/i2400m/dl_control
184/sys/kernel/debug/wimax:wmx0/wimax_dl_stack
185/sys/kernel/debug/wimax:wmx0/wimax_dl_op_rfkill
186/sys/kernel/debug/wimax:wmx0/wimax_dl_op_reset
187/sys/kernel/debug/wimax:wmx0/wimax_dl_op_msg
188/sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
189/sys/kernel/debug/wimax:wmx0/wimax_dl_debugfs
190
191 By reading the file you can obtain the current value of said debug
192 level; by writing to it, you can set it.
193
194 To increase the debug level of, for example, the i2400m's generic TX
195 engine, just write:
196
197$ echo 3 > /sys/kernel/debug/wimax:wmx0/i2400m/dl_tx
198
199 Increasing numbers yield increasing debug information; for details of
200 what is printed and the available levels, check the source. The code
201 uses 0 for disabled and increasing values until 8.
202
2035.2.2. RX and TX statistics
204
205 The i2400m/rx_stats and i2400m/tx_stats provide statistics about the
206 data reception/delivery from the device:
207
208$ cat /sys/kernel/debug/wimax:wmx0/i2400m/rx_stats
20945 1 3 34 3104 48 480
210
211 The numbers reported are
212 * packets/RX-buffer: total, min, max
213 * RX-buffers: total RX buffers received, accumulated RX buffer size
214 in bytes, min size received, max size received
215
216 Thus, to find the average buffer size received, divide accumulated
217 RX-buffer / total RX-buffers.
218
219 To clear the statistics back to 0, write anything to the rx_stats file:
220
221$ echo 1 > /sys/kernel/debug/wimax:wmx0/i2400m_rx_stats
222
223 Likewise for TX.
224
225 Note the packets this debug file refers to are not network packet, but
226 packets in the sense of the device-specific protocol for communication
227 to the host. See drivers/net/wimax/i2400m/tx.c.
228
2295.2.3. Tracing messages received from user space
230
231 To echo messages received from user space into the trace pipe that the
232 i2400m driver creates, set the debug file i2400m/trace_msg_from_user to
233 1:
234 *
235$ echo 1 > /sys/kernel/debug/wimax:wmx0/i2400m/trace_msg_from_user
236
2375.2.4. Performing a device reset
238
239 By writing a 0, a 1 or a 2 to the file
240 /sys/kernel/debug/wimax:wmx0/reset, the driver performs a warm (without
241 disconnecting from the bus), cold (disconnecting from the bus) or bus
242 (bus specific) reset on the device.
243
2445.2.5. Asking the device to enter power saving mode
245
246 By writing any value to the /sys/kernel/debug/wimax:wmx0 file, the
247 device will attempt to enter power saving mode.
248
2496. Troubleshooting
250
2516.1. Driver complains about 'i2400m-fw-usb-1.2.sbcf: request failed'
252
253 If upon connecting the device, the following is output in the kernel
254 log:
255
256i2400m_usb 5-4:1.0: fw i2400m-fw-usb-1.3.sbcf: request failed: -2
257
258 This means that the driver cannot locate the firmware file named
259 /lib/firmware/i2400m-fw-usb-1.2.sbcf. Check that the file is present in
260 the right location.
diff --git a/Documentation/wimax/README.wimax b/Documentation/wimax/README.wimax
new file mode 100644
index 000000000000..b78c4378084e
--- /dev/null
+++ b/Documentation/wimax/README.wimax
@@ -0,0 +1,81 @@
1
2 Linux kernel WiMAX stack
3
4 (C) 2008 Intel Corporation < linux-wimax@intel.com >
5
6 This provides a basic Linux kernel WiMAX stack to provide a common
7 control API for WiMAX devices, usable from kernel and user space.
8
91. Design
10
11 The WiMAX stack is designed to provide for common WiMAX control
12 services to current and future WiMAX devices from any vendor.
13
14 Because currently there is only one and we don't know what would be the
15 common services, the APIs it currently provides are very minimal.
16 However, it is done in such a way that it is easily extensible to
17 accommodate future requirements.
18
19 The stack works by embedding a struct wimax_dev in your device's
20 control structures. This provides a set of callbacks that the WiMAX
21 stack will call in order to implement control operations requested by
22 the user. As well, the stack provides API functions that the driver
23 calls to notify about changes of state in the device.
24
25 The stack exports the API calls needed to control the device to user
26 space using generic netlink as a marshalling mechanism. You can access
27 them using your own code or use the wrappers provided for your
28 convenience in libwimax (in the wimax-tools package).
29
30 For detailed information on the stack, please see
31 include/linux/wimax.h.
32
332. Usage
34
35 For usage in a driver (registration, API, etc) please refer to the
36 instructions in the header file include/linux/wimax.h.
37
38 When a device is registered with the WiMAX stack, a set of debugfs
39 files will appear in /sys/kernel/debug/wimax:wmxX can tweak for
40 control.
41
422.1. Obtaining debug information: debugfs entries
43
44 The WiMAX stack is compiled, by default, with debug messages that can
45 be used to diagnose issues. By default, said messages are disabled.
46
47 The drivers will register debugfs entries that allow the user to tweak
48 debug settings.
49
50 Each driver, when registering with the stack, will cause a debugfs
51 directory named wimax:DEVICENAME to be created; optionally, it might
52 create more subentries below it.
53
542.1.1. Increasing debug output
55
56 The files named *dl_* indicate knobs for controlling the debug output
57 of different submodules of the WiMAX stack:
58 *
59# find /sys/kernel/debug/wimax\:wmx0 -name \*dl_\*
60/sys/kernel/debug/wimax:wmx0/wimax_dl_stack
61/sys/kernel/debug/wimax:wmx0/wimax_dl_op_rfkill
62/sys/kernel/debug/wimax:wmx0/wimax_dl_op_reset
63/sys/kernel/debug/wimax:wmx0/wimax_dl_op_msg
64/sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
65/sys/kernel/debug/wimax:wmx0/wimax_dl_debugfs
66/sys/kernel/debug/wimax:wmx0/.... # other driver specific files
67
68 NOTE: Of course, if debugfs is mounted in a directory other than
69 /sys/kernel/debug, those paths will change.
70
71 By reading the file you can obtain the current value of said debug
72 level; by writing to it, you can set it.
73
74 To increase the debug level of, for example, the id-table submodule,
75 just write:
76
77$ echo 3 > /sys/kernel/debug/wimax:wmx0/wimax_dl_id_table
78
79 Increasing numbers yield increasing debug information; for details of
80 what is printed and the available levels, check the source. The code
81 uses 0 for disabled and increasing values until 8.