aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/videobook.tmpl4
-rw-r--r--Documentation/SubmittingDrivers2
-rw-r--r--Documentation/SubmittingPatches3
-rw-r--r--Documentation/block/barrier.txt271
-rw-r--r--Documentation/cachetlb.txt2
-rw-r--r--Documentation/feature-removal-schedule.txt9
-rw-r--r--Documentation/filesystems/fuse.txt63
-rw-r--r--Documentation/filesystems/tmpfs.txt12
-rw-r--r--Documentation/hpet.txt2
-rw-r--r--Documentation/input/ff.txt2
-rw-r--r--Documentation/ioctl/hdio.txt2
-rw-r--r--Documentation/kernel-parameters.txt14
-rw-r--r--Documentation/laptop-mode.txt2
-rw-r--r--Documentation/networking/sk98lin.txt2
-rw-r--r--Documentation/scsi/aacraid.txt108
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl2
-rw-r--r--Documentation/spi/butterfly57
-rw-r--r--Documentation/spi/spi-summary457
-rw-r--r--Documentation/video4linux/CARDLIST.tuner1
-rw-r--r--Documentation/x86_64/boot-options.txt2
20 files changed, 1002 insertions, 15 deletions
diff --git a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl
index 3ec6c875588a..fdff984a5161 100644
--- a/Documentation/DocBook/videobook.tmpl
+++ b/Documentation/DocBook/videobook.tmpl
@@ -229,7 +229,7 @@ int __init myradio_init(struct video_init *v)
229 229
230static int users = 0; 230static int users = 0;
231 231
232static int radio_open(stuct video_device *dev, int flags) 232static int radio_open(struct video_device *dev, int flags)
233{ 233{
234 if(users) 234 if(users)
235 return -EBUSY; 235 return -EBUSY;
@@ -949,7 +949,7 @@ int __init mycamera_init(struct video_init *v)
949 949
950static int users = 0; 950static int users = 0;
951 951
952static int camera_open(stuct video_device *dev, int flags) 952static int camera_open(struct video_device *dev, int flags)
953{ 953{
954 if(users) 954 if(users)
955 return -EBUSY; 955 return -EBUSY;
diff --git a/Documentation/SubmittingDrivers b/Documentation/SubmittingDrivers
index dd311cff1cc3..6bd30fdd0786 100644
--- a/Documentation/SubmittingDrivers
+++ b/Documentation/SubmittingDrivers
@@ -143,7 +143,7 @@ KernelNewbies:
143 http://kernelnewbies.org/ 143 http://kernelnewbies.org/
144 144
145Linux USB project: 145Linux USB project:
146 http://linux-usb.sourceforge.net/ 146 http://www.linux-usb.org/
147 147
148How to NOT write kernel driver by arjanv@redhat.com 148How to NOT write kernel driver by arjanv@redhat.com
149 http://people.redhat.com/arjanv/olspaper.pdf 149 http://people.redhat.com/arjanv/olspaper.pdf
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches
index 6198e5ebcf65..c2c85bcb3d43 100644
--- a/Documentation/SubmittingPatches
+++ b/Documentation/SubmittingPatches
@@ -478,10 +478,11 @@ Andrew Morton, "The perfect patch" (tpp).
478Jeff Garzik, "Linux kernel patch submission format." 478Jeff Garzik, "Linux kernel patch submission format."
479 <http://linux.yyz.us/patch-format.html> 479 <http://linux.yyz.us/patch-format.html>
480 480
481Greg Kroah, "How to piss off a kernel subsystem maintainer". 481Greg Kroah-Hartman "How to piss off a kernel subsystem maintainer".
482 <http://www.kroah.com/log/2005/03/31/> 482 <http://www.kroah.com/log/2005/03/31/>
483 <http://www.kroah.com/log/2005/07/08/> 483 <http://www.kroah.com/log/2005/07/08/>
484 <http://www.kroah.com/log/2005/10/19/> 484 <http://www.kroah.com/log/2005/10/19/>
485 <http://www.kroah.com/log/2006/01/11/>
485 486
486NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people!. 487NO!!!! No more huge patch bombs to linux-kernel@vger.kernel.org people!.
487 <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2> 488 <http://marc.theaimsgroup.com/?l=linux-kernel&m=112112749912944&w=2>
diff --git a/Documentation/block/barrier.txt b/Documentation/block/barrier.txt
new file mode 100644
index 000000000000..03971518b222
--- /dev/null
+++ b/Documentation/block/barrier.txt
@@ -0,0 +1,271 @@
1I/O Barriers
2============
3Tejun Heo <htejun@gmail.com>, July 22 2005
4
5I/O barrier requests are used to guarantee ordering around the barrier
6requests. Unless you're crazy enough to use disk drives for
7implementing synchronization constructs (wow, sounds interesting...),
8the ordering is meaningful only for write requests for things like
9journal checkpoints. All requests queued before a barrier request
10must be finished (made it to the physical medium) before the barrier
11request is started, and all requests queued after the barrier request
12must be started only after the barrier request is finished (again,
13made it to the physical medium).
14
15In other words, I/O barrier requests have the following two properties.
16
171. Request ordering
18
19Requests cannot pass the barrier request. Preceding requests are
20processed before the barrier and following requests after.
21
22Depending on what features a drive supports, this can be done in one
23of the following three ways.
24
25i. For devices which have queue depth greater than 1 (TCQ devices) and
26support ordered tags, block layer can just issue the barrier as an
27ordered request and the lower level driver, controller and drive
28itself are responsible for making sure that the ordering contraint is
29met. Most modern SCSI controllers/drives should support this.
30
31NOTE: SCSI ordered tag isn't currently used due to limitation in the
32 SCSI midlayer, see the following random notes section.
33
34ii. For devices which have queue depth greater than 1 but don't
35support ordered tags, block layer ensures that the requests preceding
36a barrier request finishes before issuing the barrier request. Also,
37it defers requests following the barrier until the barrier request is
38finished. Older SCSI controllers/drives and SATA drives fall in this
39category.
40
41iii. Devices which have queue depth of 1. This is a degenerate case
42of ii. Just keeping issue order suffices. Ancient SCSI
43controllers/drives and IDE drives are in this category.
44
452. Forced flushing to physcial medium
46
47Again, if you're not gonna do synchronization with disk drives (dang,
48it sounds even more appealing now!), the reason you use I/O barriers
49is mainly to protect filesystem integrity when power failure or some
50other events abruptly stop the drive from operating and possibly make
51the drive lose data in its cache. So, I/O barriers need to guarantee
52that requests actually get written to non-volatile medium in order.
53
54There are four cases,
55
56i. No write-back cache. Keeping requests ordered is enough.
57
58ii. Write-back cache but no flush operation. There's no way to
59gurantee physical-medium commit order. This kind of devices can't to
60I/O barriers.
61
62iii. Write-back cache and flush operation but no FUA (forced unit
63access). We need two cache flushes - before and after the barrier
64request.
65
66iv. Write-back cache, flush operation and FUA. We still need one
67flush to make sure requests preceding a barrier are written to medium,
68but post-barrier flush can be avoided by using FUA write on the
69barrier itself.
70
71
72How to support barrier requests in drivers
73------------------------------------------
74
75All barrier handling is done inside block layer proper. All low level
76drivers have to are implementing its prepare_flush_fn and using one
77the following two functions to indicate what barrier type it supports
78and how to prepare flush requests. Note that the term 'ordered' is
79used to indicate the whole sequence of performing barrier requests
80including draining and flushing.
81
82typedef void (prepare_flush_fn)(request_queue_t *q, struct request *rq);
83
84int blk_queue_ordered(request_queue_t *q, unsigned ordered,
85 prepare_flush_fn *prepare_flush_fn,
86 unsigned gfp_mask);
87
88int blk_queue_ordered_locked(request_queue_t *q, unsigned ordered,
89 prepare_flush_fn *prepare_flush_fn,
90 unsigned gfp_mask);
91
92The only difference between the two functions is whether or not the
93caller is holding q->queue_lock on entry. The latter expects the
94caller is holding the lock.
95
96@q : the queue in question
97@ordered : the ordered mode the driver/device supports
98@prepare_flush_fn : this function should prepare @rq such that it
99 flushes cache to physical medium when executed
100@gfp_mask : gfp_mask used when allocating data structures
101 for ordered processing
102
103For example, SCSI disk driver's prepare_flush_fn looks like the
104following.
105
106static void sd_prepare_flush(request_queue_t *q, struct request *rq)
107{
108 memset(rq->cmd, 0, sizeof(rq->cmd));
109 rq->flags |= REQ_BLOCK_PC;
110 rq->timeout = SD_TIMEOUT;
111 rq->cmd[0] = SYNCHRONIZE_CACHE;
112}
113
114The following seven ordered modes are supported. The following table
115shows which mode should be used depending on what features a
116device/driver supports. In the leftmost column of table,
117QUEUE_ORDERED_ prefix is omitted from the mode names to save space.
118
119The table is followed by description of each mode. Note that in the
120descriptions of QUEUE_ORDERED_DRAIN*, '=>' is used whereas '->' is
121used for QUEUE_ORDERED_TAG* descriptions. '=>' indicates that the
122preceding step must be complete before proceeding to the next step.
123'->' indicates that the next step can start as soon as the previous
124step is issued.
125
126 write-back cache ordered tag flush FUA
127-----------------------------------------------------------------------
128NONE yes/no N/A no N/A
129DRAIN no no N/A N/A
130DRAIN_FLUSH yes no yes no
131DRAIN_FUA yes no yes yes
132TAG no yes N/A N/A
133TAG_FLUSH yes yes yes no
134TAG_FUA yes yes yes yes
135
136
137QUEUE_ORDERED_NONE
138 I/O barriers are not needed and/or supported.
139
140 Sequence: N/A
141
142QUEUE_ORDERED_DRAIN
143 Requests are ordered by draining the request queue and cache
144 flushing isn't needed.
145
146 Sequence: drain => barrier
147
148QUEUE_ORDERED_DRAIN_FLUSH
149 Requests are ordered by draining the request queue and both
150 pre-barrier and post-barrier cache flushings are needed.
151
152 Sequence: drain => preflush => barrier => postflush
153
154QUEUE_ORDERED_DRAIN_FUA
155 Requests are ordered by draining the request queue and
156 pre-barrier cache flushing is needed. By using FUA on barrier
157 request, post-barrier flushing can be skipped.
158
159 Sequence: drain => preflush => barrier
160
161QUEUE_ORDERED_TAG
162 Requests are ordered by ordered tag and cache flushing isn't
163 needed.
164
165 Sequence: barrier
166
167QUEUE_ORDERED_TAG_FLUSH
168 Requests are ordered by ordered tag and both pre-barrier and
169 post-barrier cache flushings are needed.
170
171 Sequence: preflush -> barrier -> postflush
172
173QUEUE_ORDERED_TAG_FUA
174 Requests are ordered by ordered tag and pre-barrier cache
175 flushing is needed. By using FUA on barrier request,
176 post-barrier flushing can be skipped.
177
178 Sequence: preflush -> barrier
179
180
181Random notes/caveats
182--------------------
183
184* SCSI layer currently can't use TAG ordering even if the drive,
185controller and driver support it. The problem is that SCSI midlayer
186request dispatch function is not atomic. It releases queue lock and
187switch to SCSI host lock during issue and it's possible and likely to
188happen in time that requests change their relative positions. Once
189this problem is solved, TAG ordering can be enabled.
190
191* Currently, no matter which ordered mode is used, there can be only
192one barrier request in progress. All I/O barriers are held off by
193block layer until the previous I/O barrier is complete. This doesn't
194make any difference for DRAIN ordered devices, but, for TAG ordered
195devices with very high command latency, passing multiple I/O barriers
196to low level *might* be helpful if they are very frequent. Well, this
197certainly is a non-issue. I'm writing this just to make clear that no
198two I/O barrier is ever passed to low-level driver.
199
200* Completion order. Requests in ordered sequence are issued in order
201but not required to finish in order. Barrier implementation can
202handle out-of-order completion of ordered sequence. IOW, the requests
203MUST be processed in order but the hardware/software completion paths
204are allowed to reorder completion notifications - eg. current SCSI
205midlayer doesn't preserve completion order during error handling.
206
207* Requeueing order. Low-level drivers are free to requeue any request
208after they removed it from the request queue with
209blkdev_dequeue_request(). As barrier sequence should be kept in order
210when requeued, generic elevator code takes care of putting requests in
211order around barrier. See blk_ordered_req_seq() and
212ELEVATOR_INSERT_REQUEUE handling in __elv_add_request() for details.
213
214Note that block drivers must not requeue preceding requests while
215completing latter requests in an ordered sequence. Currently, no
216error checking is done against this.
217
218* Error handling. Currently, block layer will report error to upper
219layer if any of requests in an ordered sequence fails. Unfortunately,
220this doesn't seem to be enough. Look at the following request flow.
221QUEUE_ORDERED_TAG_FLUSH is in use.
222
223 [0] [1] [2] [3] [pre] [barrier] [post] < [4] [5] [6] ... >
224 still in elevator
225
226Let's say request [2], [3] are write requests to update file system
227metadata (journal or whatever) and [barrier] is used to mark that
228those updates are valid. Consider the following sequence.
229
230 i. Requests [0] ~ [post] leaves the request queue and enters
231 low-level driver.
232 ii. After a while, unfortunately, something goes wrong and the
233 drive fails [2]. Note that any of [0], [1] and [3] could have
234 completed by this time, but [pre] couldn't have been finished
235 as the drive must process it in order and it failed before
236 processing that command.
237 iii. Error handling kicks in and determines that the error is
238 unrecoverable and fails [2], and resumes operation.
239 iv. [pre] [barrier] [post] gets processed.
240 v. *BOOM* power fails
241
242The problem here is that the barrier request is *supposed* to indicate
243that filesystem update requests [2] and [3] made it safely to the
244physical medium and, if the machine crashes after the barrier is
245written, filesystem recovery code can depend on that. Sadly, that
246isn't true in this case anymore. IOW, the success of a I/O barrier
247should also be dependent on success of some of the preceding requests,
248where only upper layer (filesystem) knows what 'some' is.
249
250This can be solved by implementing a way to tell the block layer which
251requests affect the success of the following barrier request and
252making lower lever drivers to resume operation on error only after
253block layer tells it to do so.
254
255As the probability of this happening is very low and the drive should
256be faulty, implementing the fix is probably an overkill. But, still,
257it's there.
258
259* In previous drafts of barrier implementation, there was fallback
260mechanism such that, if FUA or ordered TAG fails, less fancy ordered
261mode can be selected and the failed barrier request is retried
262automatically. The rationale for this feature was that as FUA is
263pretty new in ATA world and ordered tag was never used widely, there
264could be devices which report to support those features but choke when
265actually given such requests.
266
267 This was removed for two reasons 1. it's an overkill 2. it's
268impossible to implement properly when TAG ordering is used as low
269level drivers resume after an error automatically. If it's ever
270needed adding it back and modifying low level drivers accordingly
271shouldn't be difficult.
diff --git a/Documentation/cachetlb.txt b/Documentation/cachetlb.txt
index 7eb715e07eda..4ae418889b88 100644
--- a/Documentation/cachetlb.txt
+++ b/Documentation/cachetlb.txt
@@ -136,7 +136,7 @@ changes occur:
1368) void lazy_mmu_prot_update(pte_t pte) 1368) void lazy_mmu_prot_update(pte_t pte)
137 This interface is called whenever the protection on 137 This interface is called whenever the protection on
138 any user PTEs change. This interface provides a notification 138 any user PTEs change. This interface provides a notification
139 to architecture specific code to take appropiate action. 139 to architecture specific code to take appropriate action.
140 140
141 141
142Next, we have the cache flushing interfaces. In general, when Linux 142Next, we have the cache flushing interfaces. In general, when Linux
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 9474501dd6cc..b4a1ea762698 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -123,6 +123,15 @@ Who: Christoph Hellwig <hch@lst.de>
123 123
124--------------------------- 124---------------------------
125 125
126What: CONFIG_FORCED_INLINING
127When: June 2006
128Why: Config option is there to see if gcc is good enough. (in january
129 2006). If it is, the behavior should just be the default. If it's not,
130 the option should just go away entirely.
131Who: Arjan van de Ven
132
133---------------------------
134
126What: START_ARRAY ioctl for md 135What: START_ARRAY ioctl for md
127When: July 2006 136When: July 2006
128Files: drivers/md/md.c 137Files: drivers/md/md.c
diff --git a/Documentation/filesystems/fuse.txt b/Documentation/filesystems/fuse.txt
index 6b5741e651a2..33f74310d161 100644
--- a/Documentation/filesystems/fuse.txt
+++ b/Documentation/filesystems/fuse.txt
@@ -86,6 +86,62 @@ Mount options
86 The default is infinite. Note that the size of read requests is 86 The default is infinite. Note that the size of read requests is
87 limited anyway to 32 pages (which is 128kbyte on i386). 87 limited anyway to 32 pages (which is 128kbyte on i386).
88 88
89Sysfs
90~~~~~
91
92FUSE sets up the following hierarchy in sysfs:
93
94 /sys/fs/fuse/connections/N/
95
96where N is an increasing number allocated to each new connection.
97
98For each connection the following attributes are defined:
99
100 'waiting'
101
102 The number of requests which are waiting to be transfered to
103 userspace or being processed by the filesystem daemon. If there is
104 no filesystem activity and 'waiting' is non-zero, then the
105 filesystem is hung or deadlocked.
106
107 'abort'
108
109 Writing anything into this file will abort the filesystem
110 connection. This means that all waiting requests will be aborted an
111 error returned for all aborted and new requests.
112
113Only a privileged user may read or write these attributes.
114
115Aborting a filesystem connection
116~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
117
118It is possible to get into certain situations where the filesystem is
119not responding. Reasons for this may be:
120
121 a) Broken userspace filesystem implementation
122
123 b) Network connection down
124
125 c) Accidental deadlock
126
127 d) Malicious deadlock
128
129(For more on c) and d) see later sections)
130
131In either of these cases it may be useful to abort the connection to
132the filesystem. There are several ways to do this:
133
134 - Kill the filesystem daemon. Works in case of a) and b)
135
136 - Kill the filesystem daemon and all users of the filesystem. Works
137 in all cases except some malicious deadlocks
138
139 - Use forced umount (umount -f). Works in all cases but only if
140 filesystem is still attached (it hasn't been lazy unmounted)
141
142 - Abort filesystem through the sysfs interface. Most powerful
143 method, always works.
144
89How do non-privileged mounts work? 145How do non-privileged mounts work?
90~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 146~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91 147
@@ -313,3 +369,10 @@ faulted with get_user_pages(). The 'req->locked' flag indicates
313when the copy is taking place, and interruption is delayed until 369when the copy is taking place, and interruption is delayed until
314this flag is unset. 370this flag is unset.
315 371
372Scenario 3 - Tricky deadlock with asynchronous read
373---------------------------------------------------
374
375The same situation as above, except thread-1 will wait on page lock
376and hence it will be uninterruptible as well. The solution is to
377abort the connection with forced umount (if mount is attached) or
378through the abort attribute in sysfs.
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt
index 0d783c504ead..dbe4d87d2615 100644
--- a/Documentation/filesystems/tmpfs.txt
+++ b/Documentation/filesystems/tmpfs.txt
@@ -78,6 +78,18 @@ use up all the memory on the machine; but enhances the scalability of
78that instance in a system with many cpus making intensive use of it. 78that instance in a system with many cpus making intensive use of it.
79 79
80 80
81tmpfs has a mount option to set the NUMA memory allocation policy for
82all files in that instance:
83mpol=interleave prefers to allocate memory from each node in turn
84mpol=default prefers to allocate memory from the local node
85mpol=bind prefers to allocate from mpol_nodelist
86mpol=preferred prefers to allocate from first node in mpol_nodelist
87
88The following mount option is used in conjunction with mpol=interleave,
89mpol=bind or mpol=preferred:
90mpol_nodelist: nodelist suitable for parsing with nodelist_parse.
91
92
81To specify the initial root directory you can use the following mount 93To specify the initial root directory you can use the following mount
82options: 94options:
83 95
diff --git a/Documentation/hpet.txt b/Documentation/hpet.txt
index e52457581f47..b7a3dc38dd52 100644
--- a/Documentation/hpet.txt
+++ b/Documentation/hpet.txt
@@ -2,7 +2,7 @@
2 2
3The High Precision Event Timer (HPET) hardware is the future replacement 3The High Precision Event Timer (HPET) hardware is the future replacement
4for the 8254 and Real Time Clock (RTC) periodic timer functionality. 4for the 8254 and Real Time Clock (RTC) periodic timer functionality.
5Each HPET can have up two 32 timers. It is possible to configure the 5Each HPET can have up to 32 timers. It is possible to configure the
6first two timers as legacy replacements for 8254 and RTC periodic timers. 6first two timers as legacy replacements for 8254 and RTC periodic timers.
7A specification done by Intel and Microsoft can be found at 7A specification done by Intel and Microsoft can be found at
8<http://www.intel.com/hardwaredesign/hpetspec.htm>. 8<http://www.intel.com/hardwaredesign/hpetspec.htm>.
diff --git a/Documentation/input/ff.txt b/Documentation/input/ff.txt
index efa7dd6751f3..c7e10eaff203 100644
--- a/Documentation/input/ff.txt
+++ b/Documentation/input/ff.txt
@@ -120,7 +120,7 @@ to the unique id assigned by the driver. This data is required for performing
120some operations (removing an effect, controlling the playback). 120some operations (removing an effect, controlling the playback).
121This if field must be set to -1 by the user in order to tell the driver to 121This if field must be set to -1 by the user in order to tell the driver to
122allocate a new effect. 122allocate a new effect.
123See <linux/input.h> for a description of the ff_effect stuct. You should also 123See <linux/input.h> for a description of the ff_effect struct. You should also
124find help in a few sketches, contained in files shape.fig and interactive.fig. 124find help in a few sketches, contained in files shape.fig and interactive.fig.
125You need xfig to visualize these files. 125You need xfig to visualize these files.
126 126
diff --git a/Documentation/ioctl/hdio.txt b/Documentation/ioctl/hdio.txt
index 9a7aea0636a5..11c9be49f37c 100644
--- a/Documentation/ioctl/hdio.txt
+++ b/Documentation/ioctl/hdio.txt
@@ -946,7 +946,7 @@ HDIO_SCAN_HWIF register and (re)scan interface
946 946
947 This ioctl initializes the addresses and irq for a disk 947 This ioctl initializes the addresses and irq for a disk
948 controller, probes for drives, and creates /proc/ide 948 controller, probes for drives, and creates /proc/ide
949 interfaces as appropiate. 949 interfaces as appropriate.
950 950
951 951
952 952
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index fe11fccf7e41..1cbcf65b764b 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -471,7 +471,7 @@ running once the system is up.
471 arch/i386/kernel/cpu/cpufreq/elanfreq.c. 471 arch/i386/kernel/cpu/cpufreq/elanfreq.c.
472 472
473 elevator= [IOSCHED] 473 elevator= [IOSCHED]
474 Format: {"as" | "cfq" | "deadline" | "noop"} 474 Format: {"anticipatory" | "cfq" | "deadline" | "noop"}
475 See Documentation/block/as-iosched.txt and 475 See Documentation/block/as-iosched.txt and
476 Documentation/block/deadline-iosched.txt for details. 476 Documentation/block/deadline-iosched.txt for details.
477 477
@@ -712,9 +712,17 @@ running once the system is up.
712 load_ramdisk= [RAM] List of ramdisks to load from floppy 712 load_ramdisk= [RAM] List of ramdisks to load from floppy
713 See Documentation/ramdisk.txt. 713 See Documentation/ramdisk.txt.
714 714
715 lockd.udpport= [NFS] 715 lockd.nlm_grace_period=P [NFS] Assign grace period.
716 Format: <integer>
717
718 lockd.nlm_tcpport=N [NFS] Assign TCP port.
719 Format: <integer>
716 720
717 lockd.tcpport= [NFS] 721 lockd.nlm_timeout=T [NFS] Assign timeout value.
722 Format: <integer>
723
724 lockd.nlm_udpport=M [NFS] Assign UDP port.
725 Format: <integer>
718 726
719 logibm.irq= [HW,MOUSE] Logitech Bus Mouse Driver 727 logibm.irq= [HW,MOUSE] Logitech Bus Mouse Driver
720 Format: <irq> 728 Format: <irq>
diff --git a/Documentation/laptop-mode.txt b/Documentation/laptop-mode.txt
index f42e4c089356..b18e21675906 100644
--- a/Documentation/laptop-mode.txt
+++ b/Documentation/laptop-mode.txt
@@ -357,7 +357,7 @@ MAX_AGE=${MAX_AGE:-'600'}
357# Read-ahead, in kilobytes 357# Read-ahead, in kilobytes
358READAHEAD=${READAHEAD:-'4096'} 358READAHEAD=${READAHEAD:-'4096'}
359 359
360# Shall we remount journaled fs. with appropiate commit interval? (1=yes) 360# Shall we remount journaled fs. with appropriate commit interval? (1=yes)
361DO_REMOUNTS=${DO_REMOUNTS:-'1'} 361DO_REMOUNTS=${DO_REMOUNTS:-'1'}
362 362
363# And shall we add the "noatime" option to that as well? (1=yes) 363# And shall we add the "noatime" option to that as well? (1=yes)
diff --git a/Documentation/networking/sk98lin.txt b/Documentation/networking/sk98lin.txt
index f9d979ee9526..7837c53fd5fe 100644
--- a/Documentation/networking/sk98lin.txt
+++ b/Documentation/networking/sk98lin.txt
@@ -91,7 +91,7 @@ To use the driver as a module, proceed as follows:
91 with (M) 91 with (M)
925. Execute the command "make modules". 925. Execute the command "make modules".
936. Execute the command "make modules_install". 936. Execute the command "make modules_install".
94 The appropiate modules will be installed. 94 The appropriate modules will be installed.
957. Reboot your system. 957. Reboot your system.
96 96
97 97
diff --git a/Documentation/scsi/aacraid.txt b/Documentation/scsi/aacraid.txt
new file mode 100644
index 000000000000..820fd0793502
--- /dev/null
+++ b/Documentation/scsi/aacraid.txt
@@ -0,0 +1,108 @@
1AACRAID Driver for Linux (take two)
2
3Introduction
4-------------------------
5The aacraid driver adds support for Adaptec (http://www.adaptec.com)
6RAID controllers. This is a major rewrite from the original
7Adaptec supplied driver. It has signficantly cleaned up both the code
8and the running binary size (the module is less than half the size of
9the original).
10
11Supported Cards/Chipsets
12-------------------------
13 PCI ID (pci.ids) OEM Product
14 9005:0285:9005:028a Adaptec 2020ZCR (Skyhawk)
15 9005:0285:9005:028e Adaptec 2020SA (Skyhawk)
16 9005:0285:9005:028b Adaptec 2025ZCR (Terminator)
17 9005:0285:9005:028f Adaptec 2025SA (Terminator)
18 9005:0285:9005:0286 Adaptec 2120S (Crusader)
19 9005:0286:9005:028d Adaptec 2130S (Lancer)
20 9005:0285:9005:0285 Adaptec 2200S (Vulcan)
21 9005:0285:9005:0287 Adaptec 2200S (Vulcan-2m)
22 9005:0286:9005:028c Adaptec 2230S (Lancer)
23 9005:0286:9005:028c Adaptec 2230SLP (Lancer)
24 9005:0285:9005:0296 Adaptec 2240S (SabreExpress)
25 9005:0285:9005:0290 Adaptec 2410SA (Jaguar)
26 9005:0285:9005:0293 Adaptec 21610SA (Corsair-16)
27 9005:0285:103c:3227 Adaptec 2610SA (Bearcat)
28 9005:0285:9005:0292 Adaptec 2810SA (Corsair-8)
29 9005:0285:9005:0294 Adaptec Prowler
30 9005:0286:9005:029d Adaptec 2420SA (Intruder)
31 9005:0286:9005:029c Adaptec 2620SA (Intruder)
32 9005:0286:9005:029b Adaptec 2820SA (Intruder)
33 9005:0286:9005:02a7 Adaptec 2830SA (Skyray)
34 9005:0286:9005:02a8 Adaptec 2430SA (Skyray)
35 9005:0285:9005:0288 Adaptec 3230S (Harrier)
36 9005:0285:9005:0289 Adaptec 3240S (Tornado)
37 9005:0285:9005:0298 Adaptec 4000SAS (BlackBird)
38 9005:0285:9005:0297 Adaptec 4005SAS (AvonPark)
39 9005:0285:9005:0299 Adaptec 4800SAS (Marauder-X)
40 9005:0285:9005:029a Adaptec 4805SAS (Marauder-E)
41 9005:0286:9005:02a2 Adaptec 4810SAS (Hurricane)
42 1011:0046:9005:0364 Adaptec 5400S (Mustang)
43 1011:0046:9005:0365 Adaptec 5400S (Mustang)
44 9005:0283:9005:0283 Adaptec Catapult (3210S with arc firmware)
45 9005:0284:9005:0284 Adaptec Tomcat (3410S with arc firmware)
46 9005:0287:9005:0800 Adaptec Themisto (Jupiter)
47 9005:0200:9005:0200 Adaptec Themisto (Jupiter)
48 9005:0286:9005:0800 Adaptec Callisto (Jupiter)
49 1011:0046:9005:1364 Dell PERC 2/QC (Quad Channel, Mustang)
50 1028:0001:1028:0001 Dell PERC 2/Si (Iguana)
51 1028:0003:1028:0003 Dell PERC 3/Si (SlimFast)
52 1028:0002:1028:0002 Dell PERC 3/Di (Opal)
53 1028:0004:1028:0004 Dell PERC 3/DiF (Iguana)
54 1028:0002:1028:00d1 Dell PERC 3/DiV (Viper)
55 1028:0002:1028:00d9 Dell PERC 3/DiL (Lexus)
56 1028:000a:1028:0106 Dell PERC 3/DiJ (Jaguar)
57 1028:000a:1028:011b Dell PERC 3/DiD (Dagger)
58 1028:000a:1028:0121 Dell PERC 3/DiB (Boxster)
59 9005:0285:1028:0287 Dell PERC 320/DC (Vulcan)
60 9005:0285:1028:0291 Dell CERC 2 (DellCorsair)
61 1011:0046:103c:10c2 HP NetRAID-4M (Mustang)
62 9005:0285:17aa:0286 Legend S220 (Crusader)
63 9005:0285:17aa:0287 Legend S230 (Vulcan)
64 9005:0285:9005:0290 IBM ServeRAID 7t (Jaguar)
65 9005:0285:1014:02F2 IBM ServeRAID 8i (AvonPark)
66 9005:0285:1014:0312 IBM ServeRAID 8i (AvonParkLite)
67 9005:0286:1014:9580 IBM ServeRAID 8k/8k-l8 (Aurora)
68 9005:0286:1014:9540 IBM ServeRAID 8k/8k-l4 (AuroraLite)
69 9005:0286:9005:029f ICP ICP9014R0 (Lancer)
70 9005:0286:9005:029e ICP ICP9024R0 (Lancer)
71 9005:0286:9005:02a0 ICP ICP9047MA (Lancer)
72 9005:0286:9005:02a1 ICP ICP9087MA (Lancer)
73 9005:0286:9005:02a4 ICP ICP9085LI (Marauder-X)
74 9005:0286:9005:02a5 ICP ICP5085BR (Marauder-E)
75 9005:0286:9005:02a3 ICP ICP5085AU (Hurricane)
76 9005:0286:9005:02a6 ICP ICP9067MA (Intruder-6)
77 9005:0286:9005:02a9 ICP ICP5087AU (Skyray)
78 9005:0286:9005:02aa ICP ICP5047AU (Skyray)
79
80People
81-------------------------
82Alan Cox <alan@redhat.com>
83Christoph Hellwig <hch@infradead.org> (updates for new-style PCI probing and SCSI host registration,
84 small cleanups/fixes)
85Matt Domsch <matt_domsch@dell.com> (revision ioctl, adapter messages)
86Deanna Bonds (non-DASD support, PAE fibs and 64 bit, added new adaptec controllers
87 added new ioctls, changed scsi interface to use new error handler,
88 increased the number of fibs and outstanding commands to a container)
89
90 (fixed 64bit and 64G memory model, changed confusing naming convention
91 where fibs that go to the hardware are consistently called hw_fibs and
92 not just fibs like the name of the driver tracking structure)
93Mark Salyzyn <Mark_Salyzyn@adaptec.com> Fixed panic issues and added some new product ids for upcoming hbas. Performance tuning, card failover and bug mitigations.
94
95Original Driver
96-------------------------
97Adaptec Unix OEM Product Group
98
99Mailing List
100-------------------------
101linux-scsi@vger.kernel.org (Interested parties troll here)
102Also note this is very different to Brian's original driver
103so don't expect him to support it.
104Adaptec does support this driver. Contact Adaptec tech support or
105aacraid@adaptec.com
106
107Original by Brian Boerner February 2001
108Rewritten by Alan Cox, November 2001
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 4963d83d1511..e651ed8d1e6f 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -5577,7 +5577,7 @@ struct _snd_pcm_runtime {
5577 <informalexample> 5577 <informalexample>
5578 <programlisting> 5578 <programlisting>
5579<![CDATA[ 5579<![CDATA[
5580 static int mychip_suspend(strut pci_dev *pci, pm_message_t state) 5580 static int mychip_suspend(struct pci_dev *pci, pm_message_t state)
5581 { 5581 {
5582 /* (1) */ 5582 /* (1) */
5583 struct snd_card *card = pci_get_drvdata(pci); 5583 struct snd_card *card = pci_get_drvdata(pci);
diff --git a/Documentation/spi/butterfly b/Documentation/spi/butterfly
new file mode 100644
index 000000000000..a2e8c8d90e35
--- /dev/null
+++ b/Documentation/spi/butterfly
@@ -0,0 +1,57 @@
1spi_butterfly - parport-to-butterfly adapter driver
2===================================================
3
4This is a hardware and software project that includes building and using
5a parallel port adapter cable, together with an "AVR Butterfly" to run
6firmware for user interfacing and/or sensors. A Butterfly is a $US20
7battery powered card with an AVR microcontroller and lots of goodies:
8sensors, LCD, flash, toggle stick, and more. You can use AVR-GCC to
9develop firmware for this, and flash it using this adapter cable.
10
11You can make this adapter from an old printer cable and solder things
12directly to the Butterfly. Or (if you have the parts and skills) you
13can come up with something fancier, providing ciruit protection to the
14Butterfly and the printer port, or with a better power supply than two
15signal pins from the printer port.
16
17
18The first cable connections will hook Linux up to one SPI bus, with the
19AVR and a DataFlash chip; and to the AVR reset line. This is all you
20need to reflash the firmware, and the pins are the standard Atmel "ISP"
21connector pins (used also on non-Butterfly AVR boards).
22
23 Signal Butterfly Parport (DB-25)
24 ------ --------- ---------------
25 SCK = J403.PB1/SCK = pin 2/D0
26 RESET = J403.nRST = pin 3/D1
27 VCC = J403.VCC_EXT = pin 8/D6
28 MOSI = J403.PB2/MOSI = pin 9/D7
29 MISO = J403.PB3/MISO = pin 11/S7,nBUSY
30 GND = J403.GND = pin 23/GND
31
32Then to let Linux master that bus to talk to the DataFlash chip, you must
33(a) flash new firmware that disables SPI (set PRR.2, and disable pullups
34by clearing PORTB.[0-3]); (b) configure the mtd_dataflash driver; and
35(c) cable in the chipselect.
36
37 Signal Butterfly Parport (DB-25)
38 ------ --------- ---------------
39 VCC = J400.VCC_EXT = pin 7/D5
40 SELECT = J400.PB0/nSS = pin 17/C3,nSELECT
41 GND = J400.GND = pin 24/GND
42
43The "USI" controller, using J405, can be used for a second SPI bus. That
44would let you talk to the AVR over SPI, running firmware that makes it act
45as an SPI slave, while letting either Linux or the AVR use the DataFlash.
46There are plenty of spare parport pins to wire this one up, such as:
47
48 Signal Butterfly Parport (DB-25)
49 ------ --------- ---------------
50 SCK = J403.PE4/USCK = pin 5/D3
51 MOSI = J403.PE5/DI = pin 6/D4
52 MISO = J403.PE6/DO = pin 12/S5,nPAPEROUT
53 GND = J403.GND = pin 22/GND
54
55 IRQ = J402.PF4 = pin 10/S6,ACK
56 GND = J402.GND(P2) = pin 25/GND
57
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
new file mode 100644
index 000000000000..a5ffba33a351
--- /dev/null
+++ b/Documentation/spi/spi-summary
@@ -0,0 +1,457 @@
1Overview of Linux kernel SPI support
2====================================
3
402-Dec-2005
5
6What is SPI?
7------------
8The "Serial Peripheral Interface" (SPI) is a synchronous four wire serial
9link used to connect microcontrollers to sensors, memory, and peripherals.
10
11The three signal wires hold a clock (SCLK, often on the order of 10 MHz),
12and parallel data lines with "Master Out, Slave In" (MOSI) or "Master In,
13Slave Out" (MISO) signals. (Other names are also used.) There are four
14clocking modes through which data is exchanged; mode-0 and mode-3 are most
15commonly used. Each clock cycle shifts data out and data in; the clock
16doesn't cycle except when there is data to shift.
17
18SPI masters may use a "chip select" line to activate a given SPI slave
19device, so those three signal wires may be connected to several chips
20in parallel. All SPI slaves support chipselects. Some devices have
21other signals, often including an interrupt to the master.
22
23Unlike serial busses like USB or SMBUS, even low level protocols for
24SPI slave functions are usually not interoperable between vendors
25(except for cases like SPI memory chips).
26
27 - SPI may be used for request/response style device protocols, as with
28 touchscreen sensors and memory chips.
29
30 - It may also be used to stream data in either direction (half duplex),
31 or both of them at the same time (full duplex).
32
33 - Some devices may use eight bit words. Others may different word
34 lengths, such as streams of 12-bit or 20-bit digital samples.
35
36In the same way, SPI slaves will only rarely support any kind of automatic
37discovery/enumeration protocol. The tree of slave devices accessible from
38a given SPI master will normally be set up manually, with configuration
39tables.
40
41SPI is only one of the names used by such four-wire protocols, and
42most controllers have no problem handling "MicroWire" (think of it as
43half-duplex SPI, for request/response protocols), SSP ("Synchronous
44Serial Protocol"), PSP ("Programmable Serial Protocol"), and other
45related protocols.
46
47Microcontrollers often support both master and slave sides of the SPI
48protocol. This document (and Linux) currently only supports the master
49side of SPI interactions.
50
51
52Who uses it? On what kinds of systems?
53---------------------------------------
54Linux developers using SPI are probably writing device drivers for embedded
55systems boards. SPI is used to control external chips, and it is also a
56protocol supported by every MMC or SD memory card. (The older "DataFlash"
57cards, predating MMC cards but using the same connectors and card shape,
58support only SPI.) Some PC hardware uses SPI flash for BIOS code.
59
60SPI slave chips range from digital/analog converters used for analog
61sensors and codecs, to memory, to peripherals like USB controllers
62or Ethernet adapters; and more.
63
64Most systems using SPI will integrate a few devices on a mainboard.
65Some provide SPI links on expansion connectors; in cases where no
66dedicated SPI controller exists, GPIO pins can be used to create a
67low speed "bitbanging" adapter. Very few systems will "hotplug" an SPI
68controller; the reasons to use SPI focus on low cost and simple operation,
69and if dynamic reconfiguration is important, USB will often be a more
70appropriate low-pincount peripheral bus.
71
72Many microcontrollers that can run Linux integrate one or more I/O
73interfaces with SPI modes. Given SPI support, they could use MMC or SD
74cards without needing a special purpose MMC/SD/SDIO controller.
75
76
77How do these driver programming interfaces work?
78------------------------------------------------
79The <linux/spi/spi.h> header file includes kerneldoc, as does the
80main source code, and you should certainly read that. This is just
81an overview, so you get the big picture before the details.
82
83SPI requests always go into I/O queues. Requests for a given SPI device
84are always executed in FIFO order, and complete asynchronously through
85completion callbacks. There are also some simple synchronous wrappers
86for those calls, including ones for common transaction types like writing
87a command and then reading its response.
88
89There are two types of SPI driver, here called:
90
91 Controller drivers ... these are often built in to System-On-Chip
92 processors, and often support both Master and Slave roles.
93 These drivers touch hardware registers and may use DMA.
94 Or they can be PIO bitbangers, needing just GPIO pins.
95
96 Protocol drivers ... these pass messages through the controller
97 driver to communicate with a Slave or Master device on the
98 other side of an SPI link.
99
100So for example one protocol driver might talk to the MTD layer to export
101data to filesystems stored on SPI flash like DataFlash; and others might
102control audio interfaces, present touchscreen sensors as input interfaces,
103or monitor temperature and voltage levels during industrial processing.
104And those might all be sharing the same controller driver.
105
106A "struct spi_device" encapsulates the master-side interface between
107those two types of driver. At this writing, Linux has no slave side
108programming interface.
109
110There is a minimal core of SPI programming interfaces, focussing on
111using driver model to connect controller and protocol drivers using
112device tables provided by board specific initialization code. SPI
113shows up in sysfs in several locations:
114
115 /sys/devices/.../CTLR/spiB.C ... spi_device for on bus "B",
116 chipselect C, accessed through CTLR.
117
118 /sys/devices/.../CTLR/spiB.C/modalias ... identifies the driver
119 that should be used with this device (for hotplug/coldplug)
120
121 /sys/bus/spi/devices/spiB.C ... symlink to the physical
122 spiB-C device
123
124 /sys/bus/spi/drivers/D ... driver for one or more spi*.* devices
125
126 /sys/class/spi_master/spiB ... class device for the controller
127 managing bus "B". All the spiB.* devices share the same
128 physical SPI bus segment, with SCLK, MOSI, and MISO.
129
130
131How does board-specific init code declare SPI devices?
132------------------------------------------------------
133Linux needs several kinds of information to properly configure SPI devices.
134That information is normally provided by board-specific code, even for
135chips that do support some of automated discovery/enumeration.
136
137DECLARE CONTROLLERS
138
139The first kind of information is a list of what SPI controllers exist.
140For System-on-Chip (SOC) based boards, these will usually be platform
141devices, and the controller may need some platform_data in order to
142operate properly. The "struct platform_device" will include resources
143like the physical address of the controller's first register and its IRQ.
144
145Platforms will often abstract the "register SPI controller" operation,
146maybe coupling it with code to initialize pin configurations, so that
147the arch/.../mach-*/board-*.c files for several boards can all share the
148same basic controller setup code. This is because most SOCs have several
149SPI-capable controllers, and only the ones actually usable on a given
150board should normally be set up and registered.
151
152So for example arch/.../mach-*/board-*.c files might have code like:
153
154 #include <asm/arch/spi.h> /* for mysoc_spi_data */
155
156 /* if your mach-* infrastructure doesn't support kernels that can
157 * run on multiple boards, pdata wouldn't benefit from "__init".
158 */
159 static struct mysoc_spi_data __init pdata = { ... };
160
161 static __init board_init(void)
162 {
163 ...
164 /* this board only uses SPI controller #2 */
165 mysoc_register_spi(2, &pdata);
166 ...
167 }
168
169And SOC-specific utility code might look something like:
170
171 #include <asm/arch/spi.h>
172
173 static struct platform_device spi2 = { ... };
174
175 void mysoc_register_spi(unsigned n, struct mysoc_spi_data *pdata)
176 {
177 struct mysoc_spi_data *pdata2;
178
179 pdata2 = kmalloc(sizeof *pdata2, GFP_KERNEL);
180 *pdata2 = pdata;
181 ...
182 if (n == 2) {
183 spi2->dev.platform_data = pdata2;
184 register_platform_device(&spi2);
185
186 /* also: set up pin modes so the spi2 signals are
187 * visible on the relevant pins ... bootloaders on
188 * production boards may already have done this, but
189 * developer boards will often need Linux to do it.
190 */
191 }
192 ...
193 }
194
195Notice how the platform_data for boards may be different, even if the
196same SOC controller is used. For example, on one board SPI might use
197an external clock, where another derives the SPI clock from current
198settings of some master clock.
199
200
201DECLARE SLAVE DEVICES
202
203The second kind of information is a list of what SPI slave devices exist
204on the target board, often with some board-specific data needed for the
205driver to work correctly.
206
207Normally your arch/.../mach-*/board-*.c files would provide a small table
208listing the SPI devices on each board. (This would typically be only a
209small handful.) That might look like:
210
211 static struct ads7846_platform_data ads_info = {
212 .vref_delay_usecs = 100,
213 .x_plate_ohms = 580,
214 .y_plate_ohms = 410,
215 };
216
217 static struct spi_board_info spi_board_info[] __initdata = {
218 {
219 .modalias = "ads7846",
220 .platform_data = &ads_info,
221 .mode = SPI_MODE_0,
222 .irq = GPIO_IRQ(31),
223 .max_speed_hz = 120000 /* max sample rate at 3V */ * 16,
224 .bus_num = 1,
225 .chip_select = 0,
226 },
227 };
228
229Again, notice how board-specific information is provided; each chip may need
230several types. This example shows generic constraints like the fastest SPI
231clock to allow (a function of board voltage in this case) or how an IRQ pin
232is wired, plus chip-specific constraints like an important delay that's
233changed by the capacitance at one pin.
234
235(There's also "controller_data", information that may be useful to the
236controller driver. An example would be peripheral-specific DMA tuning
237data or chipselect callbacks. This is stored in spi_device later.)
238
239The board_info should provide enough information to let the system work
240without the chip's driver being loaded. The most troublesome aspect of
241that is likely the SPI_CS_HIGH bit in the spi_device.mode field, since
242sharing a bus with a device that interprets chipselect "backwards" is
243not possible.
244
245Then your board initialization code would register that table with the SPI
246infrastructure, so that it's available later when the SPI master controller
247driver is registered:
248
249 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
250
251Like with other static board-specific setup, you won't unregister those.
252
253The widely used "card" style computers bundle memory, cpu, and little else
254onto a card that's maybe just thirty square centimeters. On such systems,
255your arch/.../mach-.../board-*.c file would primarily provide information
256about the devices on the mainboard into which such a card is plugged. That
257certainly includes SPI devices hooked up through the card connectors!
258
259
260NON-STATIC CONFIGURATIONS
261
262Developer boards often play by different rules than product boards, and one
263example is the potential need to hotplug SPI devices and/or controllers.
264
265For those cases you might need to use use spi_busnum_to_master() to look
266up the spi bus master, and will likely need spi_new_device() to provide the
267board info based on the board that was hotplugged. Of course, you'd later
268call at least spi_unregister_device() when that board is removed.
269
270When Linux includes support for MMC/SD/SDIO/DataFlash cards through SPI, those
271configurations will also be dynamic. Fortunately, those devices all support
272basic device identification probes, so that support should hotplug normally.
273
274
275How do I write an "SPI Protocol Driver"?
276----------------------------------------
277All SPI drivers are currently kernel drivers. A userspace driver API
278would just be another kernel driver, probably offering some lowlevel
279access through aio_read(), aio_write(), and ioctl() calls and using the
280standard userspace sysfs mechanisms to bind to a given SPI device.
281
282SPI protocol drivers somewhat resemble platform device drivers:
283
284 static struct spi_driver CHIP_driver = {
285 .driver = {
286 .name = "CHIP",
287 .bus = &spi_bus_type,
288 .owner = THIS_MODULE,
289 },
290
291 .probe = CHIP_probe,
292 .remove = __devexit_p(CHIP_remove),
293 .suspend = CHIP_suspend,
294 .resume = CHIP_resume,
295 };
296
297The driver core will autmatically attempt to bind this driver to any SPI
298device whose board_info gave a modalias of "CHIP". Your probe() code
299might look like this unless you're creating a class_device:
300
301 static int __devinit CHIP_probe(struct spi_device *spi)
302 {
303 struct CHIP *chip;
304 struct CHIP_platform_data *pdata;
305
306 /* assuming the driver requires board-specific data: */
307 pdata = &spi->dev.platform_data;
308 if (!pdata)
309 return -ENODEV;
310
311 /* get memory for driver's per-chip state */
312 chip = kzalloc(sizeof *chip, GFP_KERNEL);
313 if (!chip)
314 return -ENOMEM;
315 dev_set_drvdata(&spi->dev, chip);
316
317 ... etc
318 return 0;
319 }
320
321As soon as it enters probe(), the driver may issue I/O requests to
322the SPI device using "struct spi_message". When remove() returns,
323the driver guarantees that it won't submit any more such messages.
324
325 - An spi_message is a sequence of of protocol operations, executed
326 as one atomic sequence. SPI driver controls include:
327
328 + when bidirectional reads and writes start ... by how its
329 sequence of spi_transfer requests is arranged;
330
331 + optionally defining short delays after transfers ... using
332 the spi_transfer.delay_usecs setting;
333
334 + whether the chipselect becomes inactive after a transfer and
335 any delay ... by using the spi_transfer.cs_change flag;
336
337 + hinting whether the next message is likely to go to this same
338 device ... using the spi_transfer.cs_change flag on the last
339 transfer in that atomic group, and potentially saving costs
340 for chip deselect and select operations.
341
342 - Follow standard kernel rules, and provide DMA-safe buffers in
343 your messages. That way controller drivers using DMA aren't forced
344 to make extra copies unless the hardware requires it (e.g. working
345 around hardware errata that force the use of bounce buffering).
346
347 If standard dma_map_single() handling of these buffers is inappropriate,
348 you can use spi_message.is_dma_mapped to tell the controller driver
349 that you've already provided the relevant DMA addresses.
350
351 - The basic I/O primitive is spi_async(). Async requests may be
352 issued in any context (irq handler, task, etc) and completion
353 is reported using a callback provided with the message.
354 After any detected error, the chip is deselected and processing
355 of that spi_message is aborted.
356
357 - There are also synchronous wrappers like spi_sync(), and wrappers
358 like spi_read(), spi_write(), and spi_write_then_read(). These
359 may be issued only in contexts that may sleep, and they're all
360 clean (and small, and "optional") layers over spi_async().
361
362 - The spi_write_then_read() call, and convenience wrappers around
363 it, should only be used with small amounts of data where the
364 cost of an extra copy may be ignored. It's designed to support
365 common RPC-style requests, such as writing an eight bit command
366 and reading a sixteen bit response -- spi_w8r16() being one its
367 wrappers, doing exactly that.
368
369Some drivers may need to modify spi_device characteristics like the
370transfer mode, wordsize, or clock rate. This is done with spi_setup(),
371which would normally be called from probe() before the first I/O is
372done to the device.
373
374While "spi_device" would be the bottom boundary of the driver, the
375upper boundaries might include sysfs (especially for sensor readings),
376the input layer, ALSA, networking, MTD, the character device framework,
377or other Linux subsystems.
378
379Note that there are two types of memory your driver must manage as part
380of interacting with SPI devices.
381
382 - I/O buffers use the usual Linux rules, and must be DMA-safe.
383 You'd normally allocate them from the heap or free page pool.
384 Don't use the stack, or anything that's declared "static".
385
386 - The spi_message and spi_transfer metadata used to glue those
387 I/O buffers into a group of protocol transactions. These can
388 be allocated anywhere it's convenient, including as part of
389 other allocate-once driver data structures. Zero-init these.
390
391If you like, spi_message_alloc() and spi_message_free() convenience
392routines are available to allocate and zero-initialize an spi_message
393with several transfers.
394
395
396How do I write an "SPI Master Controller Driver"?
397-------------------------------------------------
398An SPI controller will probably be registered on the platform_bus; write
399a driver to bind to the device, whichever bus is involved.
400
401The main task of this type of driver is to provide an "spi_master".
402Use spi_alloc_master() to allocate the master, and class_get_devdata()
403to get the driver-private data allocated for that device.
404
405 struct spi_master *master;
406 struct CONTROLLER *c;
407
408 master = spi_alloc_master(dev, sizeof *c);
409 if (!master)
410 return -ENODEV;
411
412 c = class_get_devdata(&master->cdev);
413
414The driver will initialize the fields of that spi_master, including the
415bus number (maybe the same as the platform device ID) and three methods
416used to interact with the SPI core and SPI protocol drivers. It will
417also initialize its own internal state.
418
419 master->setup(struct spi_device *spi)
420 This sets up the device clock rate, SPI mode, and word sizes.
421 Drivers may change the defaults provided by board_info, and then
422 call spi_setup(spi) to invoke this routine. It may sleep.
423
424 master->transfer(struct spi_device *spi, struct spi_message *message)
425 This must not sleep. Its responsibility is arrange that the
426 transfer happens and its complete() callback is issued; the two
427 will normally happen later, after other transfers complete.
428
429 master->cleanup(struct spi_device *spi)
430 Your controller driver may use spi_device.controller_state to hold
431 state it dynamically associates with that device. If you do that,
432 be sure to provide the cleanup() method to free that state.
433
434The bulk of the driver will be managing the I/O queue fed by transfer().
435
436That queue could be purely conceptual. For example, a driver used only
437for low-frequency sensor acess might be fine using synchronous PIO.
438
439But the queue will probably be very real, using message->queue, PIO,
440often DMA (especially if the root filesystem is in SPI flash), and
441execution contexts like IRQ handlers, tasklets, or workqueues (such
442as keventd). Your driver can be as fancy, or as simple, as you need.
443
444
445THANKS TO
446---------
447Contributors to Linux-SPI discussions include (in alphabetical order,
448by last name):
449
450David Brownell
451Russell King
452Dmitry Pervushin
453Stephen Street
454Mark Underwood
455Andrew Victor
456Vitaly Wool
457
diff --git a/Documentation/video4linux/CARDLIST.tuner b/Documentation/video4linux/CARDLIST.tuner
index 0bf3d5bf9ef8..f6d0cf7b7922 100644
--- a/Documentation/video4linux/CARDLIST.tuner
+++ b/Documentation/video4linux/CARDLIST.tuner
@@ -68,3 +68,4 @@ tuner=66 - LG NTSC (TALN mini series)
68tuner=67 - Philips TD1316 Hybrid Tuner 68tuner=67 - Philips TD1316 Hybrid Tuner
69tuner=68 - Philips TUV1236D ATSC/NTSC dual in 69tuner=68 - Philips TUV1236D ATSC/NTSC dual in
70tuner=69 - Tena TNF 5335 MF 70tuner=69 - Tena TNF 5335 MF
71tuner=70 - Samsung TCPN 2121P30A
diff --git a/Documentation/x86_64/boot-options.txt b/Documentation/x86_64/boot-options.txt
index 72ab9b99b22c..9c5fc15d03d1 100644
--- a/Documentation/x86_64/boot-options.txt
+++ b/Documentation/x86_64/boot-options.txt
@@ -198,6 +198,6 @@ Debugging
198 198
199Misc 199Misc
200 200
201 noreplacement Don't replace instructions with more appropiate ones 201 noreplacement Don't replace instructions with more appropriate ones
202 for the CPU. This may be useful on asymmetric MP systems 202 for the CPU. This may be useful on asymmetric MP systems
203 where some CPU have less capabilities than the others. 203 where some CPU have less capabilities than the others.