diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/DocBook/Makefile | 2 | ||||
-rw-r--r-- | Documentation/DocBook/kernel-api.tmpl | 1 | ||||
-rw-r--r-- | Documentation/DocBook/libata.tmpl | 156 | ||||
-rw-r--r-- | Documentation/DocBook/scsidrivers.tmpl | 193 | ||||
-rw-r--r-- | Documentation/SubmittingPatches | 8 | ||||
-rw-r--r-- | Documentation/cpu-freq/cpufreq-stats.txt | 128 | ||||
-rw-r--r-- | Documentation/driver-model/device.txt | 8 | ||||
-rw-r--r-- | Documentation/driver-model/driver.txt | 51 | ||||
-rw-r--r-- | Documentation/filesystems/sysfs.txt | 2 | ||||
-rw-r--r-- | Documentation/networking/generic-hdlc.txt | 51 | ||||
-rw-r--r-- | Documentation/networking/multicast.txt | 1 | ||||
-rw-r--r-- | Documentation/networking/net-modules.txt | 3 | ||||
-rw-r--r-- | Documentation/networking/vortex.txt | 2 | ||||
-rw-r--r-- | Documentation/scsi/ChangeLog.megaraid | 66 | ||||
-rw-r--r-- | Documentation/scsi/scsi-changer.txt | 180 | ||||
-rw-r--r-- | Documentation/scsi/scsi_mid_low_api.txt | 12 |
16 files changed, 571 insertions, 293 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index e69b3d2e7884..87da3478fada 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ | 9 | DOCBOOKS := wanbook.xml z8530book.xml mcabook.xml videobook.xml \ |
10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ | 10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ |
11 | procfs-guide.xml writing_usb_driver.xml scsidrivers.xml \ | 11 | procfs-guide.xml writing_usb_driver.xml \ |
12 | sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \ | 12 | sis900.xml kernel-api.xml journal-api.xml lsm.xml usb.xml \ |
13 | gadget.xml libata.xml mtdnand.xml librs.xml | 13 | gadget.xml libata.xml mtdnand.xml librs.xml |
14 | 14 | ||
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 757cef8f8491..bb6a0106be11 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
@@ -338,7 +338,6 @@ X!Earch/i386/kernel/mca.c | |||
338 | X!Iinclude/linux/device.h | 338 | X!Iinclude/linux/device.h |
339 | --> | 339 | --> |
340 | !Edrivers/base/driver.c | 340 | !Edrivers/base/driver.c |
341 | !Edrivers/base/class_simple.c | ||
342 | !Edrivers/base/core.c | 341 | !Edrivers/base/core.c |
343 | !Edrivers/base/firmware_class.c | 342 | !Edrivers/base/firmware_class.c |
344 | !Edrivers/base/transport_class.c | 343 | !Edrivers/base/transport_class.c |
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index cf2fce7707da..6df1dfd18b65 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl | |||
@@ -14,7 +14,7 @@ | |||
14 | </authorgroup> | 14 | </authorgroup> |
15 | 15 | ||
16 | <copyright> | 16 | <copyright> |
17 | <year>2003</year> | 17 | <year>2003-2005</year> |
18 | <holder>Jeff Garzik</holder> | 18 | <holder>Jeff Garzik</holder> |
19 | </copyright> | 19 | </copyright> |
20 | 20 | ||
@@ -44,30 +44,38 @@ | |||
44 | 44 | ||
45 | <toc></toc> | 45 | <toc></toc> |
46 | 46 | ||
47 | <chapter id="libataThanks"> | 47 | <chapter id="libataIntroduction"> |
48 | <title>Thanks</title> | 48 | <title>Introduction</title> |
49 | <para> | 49 | <para> |
50 | The bulk of the ATA knowledge comes thanks to long conversations with | 50 | libATA is a library used inside the Linux kernel to support ATA host |
51 | Andre Hedrick (www.linux-ide.org). | 51 | controllers and devices. libATA provides an ATA driver API, class |
52 | transports for ATA and ATAPI devices, and SCSI<->ATA translation | ||
53 | for ATA devices according to the T10 SAT specification. | ||
52 | </para> | 54 | </para> |
53 | <para> | 55 | <para> |
54 | Thanks to Alan Cox for pointing out similarities | 56 | This Guide documents the libATA driver API, library functions, library |
55 | between SATA and SCSI, and in general for motivation to hack on | 57 | internals, and a couple sample ATA low-level drivers. |
56 | libata. | ||
57 | </para> | ||
58 | <para> | ||
59 | libata's device detection | ||
60 | method, ata_pio_devchk, and in general all the early probing was | ||
61 | based on extensive study of Hale Landis's probe/reset code in his | ||
62 | ATADRVR driver (www.ata-atapi.com). | ||
63 | </para> | 58 | </para> |
64 | </chapter> | 59 | </chapter> |
65 | 60 | ||
66 | <chapter id="libataDriverApi"> | 61 | <chapter id="libataDriverApi"> |
67 | <title>libata Driver API</title> | 62 | <title>libata Driver API</title> |
63 | <para> | ||
64 | struct ata_port_operations is defined for every low-level libata | ||
65 | hardware driver, and it controls how the low-level driver | ||
66 | interfaces with the ATA and SCSI layers. | ||
67 | </para> | ||
68 | <para> | ||
69 | FIS-based drivers will hook into the system with ->qc_prep() and | ||
70 | ->qc_issue() high-level hooks. Hardware which behaves in a manner | ||
71 | similar to PCI IDE hardware may utilize several generic helpers, | ||
72 | defining at a bare minimum the bus I/O addresses of the ATA shadow | ||
73 | register blocks. | ||
74 | </para> | ||
68 | <sect1> | 75 | <sect1> |
69 | <title>struct ata_port_operations</title> | 76 | <title>struct ata_port_operations</title> |
70 | 77 | ||
78 | <sect2><title>Disable ATA port</title> | ||
71 | <programlisting> | 79 | <programlisting> |
72 | void (*port_disable) (struct ata_port *); | 80 | void (*port_disable) (struct ata_port *); |
73 | </programlisting> | 81 | </programlisting> |
@@ -78,6 +86,9 @@ void (*port_disable) (struct ata_port *); | |||
78 | unplug). | 86 | unplug). |
79 | </para> | 87 | </para> |
80 | 88 | ||
89 | </sect2> | ||
90 | |||
91 | <sect2><title>Post-IDENTIFY device configuration</title> | ||
81 | <programlisting> | 92 | <programlisting> |
82 | void (*dev_config) (struct ata_port *, struct ata_device *); | 93 | void (*dev_config) (struct ata_port *, struct ata_device *); |
83 | </programlisting> | 94 | </programlisting> |
@@ -88,6 +99,9 @@ void (*dev_config) (struct ata_port *, struct ata_device *); | |||
88 | issue of SET FEATURES - XFER MODE, and prior to operation. | 99 | issue of SET FEATURES - XFER MODE, and prior to operation. |
89 | </para> | 100 | </para> |
90 | 101 | ||
102 | </sect2> | ||
103 | |||
104 | <sect2><title>Set PIO/DMA mode</title> | ||
91 | <programlisting> | 105 | <programlisting> |
92 | void (*set_piomode) (struct ata_port *, struct ata_device *); | 106 | void (*set_piomode) (struct ata_port *, struct ata_device *); |
93 | void (*set_dmamode) (struct ata_port *, struct ata_device *); | 107 | void (*set_dmamode) (struct ata_port *, struct ata_device *); |
@@ -108,6 +122,9 @@ void (*post_set_mode) (struct ata_port *ap); | |||
108 | ->set_dma_mode() is only called if DMA is possible. | 122 | ->set_dma_mode() is only called if DMA is possible. |
109 | </para> | 123 | </para> |
110 | 124 | ||
125 | </sect2> | ||
126 | |||
127 | <sect2><title>Taskfile read/write</title> | ||
111 | <programlisting> | 128 | <programlisting> |
112 | void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf); | 129 | void (*tf_load) (struct ata_port *ap, struct ata_taskfile *tf); |
113 | void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); | 130 | void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); |
@@ -120,6 +137,9 @@ void (*tf_read) (struct ata_port *ap, struct ata_taskfile *tf); | |||
120 | taskfile register values. | 137 | taskfile register values. |
121 | </para> | 138 | </para> |
122 | 139 | ||
140 | </sect2> | ||
141 | |||
142 | <sect2><title>ATA command execute</title> | ||
123 | <programlisting> | 143 | <programlisting> |
124 | void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); | 144 | void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); |
125 | </programlisting> | 145 | </programlisting> |
@@ -129,17 +149,37 @@ void (*exec_command)(struct ata_port *ap, struct ata_taskfile *tf); | |||
129 | ->tf_load(), to be initiated in hardware. | 149 | ->tf_load(), to be initiated in hardware. |
130 | </para> | 150 | </para> |
131 | 151 | ||
152 | </sect2> | ||
153 | |||
154 | <sect2><title>Per-cmd ATAPI DMA capabilities filter</title> | ||
155 | <programlisting> | ||
156 | int (*check_atapi_dma) (struct ata_queued_cmd *qc); | ||
157 | </programlisting> | ||
158 | |||
159 | <para> | ||
160 | Allow low-level driver to filter ATA PACKET commands, returning a status | ||
161 | indicating whether or not it is OK to use DMA for the supplied PACKET | ||
162 | command. | ||
163 | </para> | ||
164 | |||
165 | </sect2> | ||
166 | |||
167 | <sect2><title>Read specific ATA shadow registers</title> | ||
132 | <programlisting> | 168 | <programlisting> |
133 | u8 (*check_status)(struct ata_port *ap); | 169 | u8 (*check_status)(struct ata_port *ap); |
134 | void (*dev_select)(struct ata_port *ap, unsigned int device); | 170 | u8 (*check_altstatus)(struct ata_port *ap); |
171 | u8 (*check_err)(struct ata_port *ap); | ||
135 | </programlisting> | 172 | </programlisting> |
136 | 173 | ||
137 | <para> | 174 | <para> |
138 | Reads the Status ATA shadow register from hardware. On some | 175 | Reads the Status/AltStatus/Error ATA shadow register from |
139 | hardware, this has the side effect of clearing the interrupt | 176 | hardware. On some hardware, reading the Status register has |
140 | condition. | 177 | the side effect of clearing the interrupt condition. |
141 | </para> | 178 | </para> |
142 | 179 | ||
180 | </sect2> | ||
181 | |||
182 | <sect2><title>Select ATA device on bus</title> | ||
143 | <programlisting> | 183 | <programlisting> |
144 | void (*dev_select)(struct ata_port *ap, unsigned int device); | 184 | void (*dev_select)(struct ata_port *ap, unsigned int device); |
145 | </programlisting> | 185 | </programlisting> |
@@ -147,9 +187,13 @@ void (*dev_select)(struct ata_port *ap, unsigned int device); | |||
147 | <para> | 187 | <para> |
148 | Issues the low-level hardware command(s) that causes one of N | 188 | Issues the low-level hardware command(s) that causes one of N |
149 | hardware devices to be considered 'selected' (active and | 189 | hardware devices to be considered 'selected' (active and |
150 | available for use) on the ATA bus. | 190 | available for use) on the ATA bus. This generally has no |
191 | meaning on FIS-based devices. | ||
151 | </para> | 192 | </para> |
152 | 193 | ||
194 | </sect2> | ||
195 | |||
196 | <sect2><title>Reset ATA bus</title> | ||
153 | <programlisting> | 197 | <programlisting> |
154 | void (*phy_reset) (struct ata_port *ap); | 198 | void (*phy_reset) (struct ata_port *ap); |
155 | </programlisting> | 199 | </programlisting> |
@@ -162,17 +206,31 @@ void (*phy_reset) (struct ata_port *ap); | |||
162 | functions ata_bus_reset() or sata_phy_reset() for this hook. | 206 | functions ata_bus_reset() or sata_phy_reset() for this hook. |
163 | </para> | 207 | </para> |
164 | 208 | ||
209 | </sect2> | ||
210 | |||
211 | <sect2><title>Control PCI IDE BMDMA engine</title> | ||
165 | <programlisting> | 212 | <programlisting> |
166 | void (*bmdma_setup) (struct ata_queued_cmd *qc); | 213 | void (*bmdma_setup) (struct ata_queued_cmd *qc); |
167 | void (*bmdma_start) (struct ata_queued_cmd *qc); | 214 | void (*bmdma_start) (struct ata_queued_cmd *qc); |
215 | void (*bmdma_stop) (struct ata_port *ap); | ||
216 | u8 (*bmdma_status) (struct ata_port *ap); | ||
168 | </programlisting> | 217 | </programlisting> |
169 | 218 | ||
170 | <para> | 219 | <para> |
171 | When setting up an IDE BMDMA transaction, these hooks arm | 220 | When setting up an IDE BMDMA transaction, these hooks arm |
172 | (->bmdma_setup) and fire (->bmdma_start) the hardware's DMA | 221 | (->bmdma_setup), fire (->bmdma_start), and halt (->bmdma_stop) |
173 | engine. | 222 | the hardware's DMA engine. ->bmdma_status is used to read the standard |
223 | PCI IDE DMA Status register. | ||
174 | </para> | 224 | </para> |
175 | 225 | ||
226 | <para> | ||
227 | These hooks are typically either no-ops, or simply not implemented, in | ||
228 | FIS-based drivers. | ||
229 | </para> | ||
230 | |||
231 | </sect2> | ||
232 | |||
233 | <sect2><title>High-level taskfile hooks</title> | ||
176 | <programlisting> | 234 | <programlisting> |
177 | void (*qc_prep) (struct ata_queued_cmd *qc); | 235 | void (*qc_prep) (struct ata_queued_cmd *qc); |
178 | int (*qc_issue) (struct ata_queued_cmd *qc); | 236 | int (*qc_issue) (struct ata_queued_cmd *qc); |
@@ -190,20 +248,26 @@ int (*qc_issue) (struct ata_queued_cmd *qc); | |||
190 | ->qc_issue is used to make a command active, once the hardware | 248 | ->qc_issue is used to make a command active, once the hardware |
191 | and S/G tables have been prepared. IDE BMDMA drivers use the | 249 | and S/G tables have been prepared. IDE BMDMA drivers use the |
192 | helper function ata_qc_issue_prot() for taskfile protocol-based | 250 | helper function ata_qc_issue_prot() for taskfile protocol-based |
193 | dispatch. More advanced drivers roll their own ->qc_issue | 251 | dispatch. More advanced drivers implement their own ->qc_issue. |
194 | implementation, using this as the "issue new ATA command to | ||
195 | hardware" hook. | ||
196 | </para> | 252 | </para> |
197 | 253 | ||
254 | </sect2> | ||
255 | |||
256 | <sect2><title>Timeout (error) handling</title> | ||
198 | <programlisting> | 257 | <programlisting> |
199 | void (*eng_timeout) (struct ata_port *ap); | 258 | void (*eng_timeout) (struct ata_port *ap); |
200 | </programlisting> | 259 | </programlisting> |
201 | 260 | ||
202 | <para> | 261 | <para> |
203 | This is a high level error handling function, called from the | 262 | This is a high level error handling function, called from the |
204 | error handling thread, when a command times out. | 263 | error handling thread, when a command times out. Most newer |
264 | hardware will implement its own error handling code here. IDE BMDMA | ||
265 | drivers may use the helper function ata_eng_timeout(). | ||
205 | </para> | 266 | </para> |
206 | 267 | ||
268 | </sect2> | ||
269 | |||
270 | <sect2><title>Hardware interrupt handling</title> | ||
207 | <programlisting> | 271 | <programlisting> |
208 | irqreturn_t (*irq_handler)(int, void *, struct pt_regs *); | 272 | irqreturn_t (*irq_handler)(int, void *, struct pt_regs *); |
209 | void (*irq_clear) (struct ata_port *); | 273 | void (*irq_clear) (struct ata_port *); |
@@ -216,6 +280,9 @@ void (*irq_clear) (struct ata_port *); | |||
216 | is quiet. | 280 | is quiet. |
217 | </para> | 281 | </para> |
218 | 282 | ||
283 | </sect2> | ||
284 | |||
285 | <sect2><title>SATA phy read/write</title> | ||
219 | <programlisting> | 286 | <programlisting> |
220 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); | 287 | u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); |
221 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, | 288 | void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, |
@@ -227,6 +294,9 @@ void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, | |||
227 | if ->phy_reset hook called the sata_phy_reset() helper function. | 294 | if ->phy_reset hook called the sata_phy_reset() helper function. |
228 | </para> | 295 | </para> |
229 | 296 | ||
297 | </sect2> | ||
298 | |||
299 | <sect2><title>Init and shutdown</title> | ||
230 | <programlisting> | 300 | <programlisting> |
231 | int (*port_start) (struct ata_port *ap); | 301 | int (*port_start) (struct ata_port *ap); |
232 | void (*port_stop) (struct ata_port *ap); | 302 | void (*port_stop) (struct ata_port *ap); |
@@ -240,15 +310,17 @@ void (*host_stop) (struct ata_host_set *host_set); | |||
240 | tasks. | 310 | tasks. |
241 | </para> | 311 | </para> |
242 | <para> | 312 | <para> |
243 | ->host_stop() is called when the rmmod or hot unplug process | ||
244 | begins. The hook must stop all hardware interrupts, DMA | ||
245 | engines, etc. | ||
246 | </para> | ||
247 | <para> | ||
248 | ->port_stop() is called after ->host_stop(). It's sole function | 313 | ->port_stop() is called after ->host_stop(). It's sole function |
249 | is to release DMA/memory resources, now that they are no longer | 314 | is to release DMA/memory resources, now that they are no longer |
250 | actively being used. | 315 | actively being used. |
251 | </para> | 316 | </para> |
317 | <para> | ||
318 | ->host_stop() is called after all ->port_stop() calls | ||
319 | have completed. The hook must finalize hardware shutdown, release DMA | ||
320 | and other resources, etc. | ||
321 | </para> | ||
322 | |||
323 | </sect2> | ||
252 | 324 | ||
253 | </sect1> | 325 | </sect1> |
254 | </chapter> | 326 | </chapter> |
@@ -279,4 +351,24 @@ void (*host_stop) (struct ata_host_set *host_set); | |||
279 | !Idrivers/scsi/sata_sil.c | 351 | !Idrivers/scsi/sata_sil.c |
280 | </chapter> | 352 | </chapter> |
281 | 353 | ||
354 | <chapter id="libataThanks"> | ||
355 | <title>Thanks</title> | ||
356 | <para> | ||
357 | The bulk of the ATA knowledge comes thanks to long conversations with | ||
358 | Andre Hedrick (www.linux-ide.org), and long hours pondering the ATA | ||
359 | and SCSI specifications. | ||
360 | </para> | ||
361 | <para> | ||
362 | Thanks to Alan Cox for pointing out similarities | ||
363 | between SATA and SCSI, and in general for motivation to hack on | ||
364 | libata. | ||
365 | </para> | ||
366 | <para> | ||
367 | libata's device detection | ||
368 | method, ata_pio_devchk, and in general all the early probing was | ||
369 | based on extensive study of Hale Landis's probe/reset code in his | ||
370 | ATADRVR driver (www.ata-atapi.com). | ||
371 | </para> | ||
372 | </chapter> | ||
373 | |||
282 | </book> | 374 | </book> |
diff --git a/Documentation/DocBook/scsidrivers.tmpl b/Documentation/DocBook/scsidrivers.tmpl deleted file mode 100644 index d058e65daf19..000000000000 --- a/Documentation/DocBook/scsidrivers.tmpl +++ /dev/null | |||
@@ -1,193 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||
4 | |||
5 | <book id="scsidrivers"> | ||
6 | <bookinfo> | ||
7 | <title>SCSI Subsystem Interfaces</title> | ||
8 | |||
9 | <authorgroup> | ||
10 | <author> | ||
11 | <firstname>Douglas</firstname> | ||
12 | <surname>Gilbert</surname> | ||
13 | <affiliation> | ||
14 | <address> | ||
15 | <email>dgilbert@interlog.com</email> | ||
16 | </address> | ||
17 | </affiliation> | ||
18 | </author> | ||
19 | </authorgroup> | ||
20 | <pubdate>2003-08-11</pubdate> | ||
21 | |||
22 | <copyright> | ||
23 | <year>2002</year> | ||
24 | <year>2003</year> | ||
25 | <holder>Douglas Gilbert</holder> | ||
26 | </copyright> | ||
27 | |||
28 | <legalnotice> | ||
29 | <para> | ||
30 | This documentation is free software; you can redistribute | ||
31 | it and/or modify it under the terms of the GNU General Public | ||
32 | License as published by the Free Software Foundation; either | ||
33 | version 2 of the License, or (at your option) any later | ||
34 | version. | ||
35 | </para> | ||
36 | |||
37 | <para> | ||
38 | This program is distributed in the hope that it will be | ||
39 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
40 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
41 | See the GNU General Public License for more details. | ||
42 | </para> | ||
43 | |||
44 | <para> | ||
45 | You should have received a copy of the GNU General Public | ||
46 | License along with this program; if not, write to the Free | ||
47 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
48 | MA 02111-1307 USA | ||
49 | </para> | ||
50 | |||
51 | <para> | ||
52 | For more details see the file COPYING in the source | ||
53 | distribution of Linux. | ||
54 | </para> | ||
55 | </legalnotice> | ||
56 | |||
57 | </bookinfo> | ||
58 | |||
59 | <toc></toc> | ||
60 | |||
61 | <chapter id="intro"> | ||
62 | <title>Introduction</title> | ||
63 | <para> | ||
64 | This document outlines the interface between the Linux scsi mid level | ||
65 | and lower level drivers. Lower level drivers are variously called HBA | ||
66 | (host bus adapter) drivers, host drivers (HD) or pseudo adapter drivers. | ||
67 | The latter alludes to the fact that a lower level driver may be a | ||
68 | bridge to another IO subsystem (and the "ide-scsi" driver is an example | ||
69 | of this). There can be many lower level drivers active in a running | ||
70 | system, but only one per hardware type. For example, the aic7xxx driver | ||
71 | controls adaptec controllers based on the 7xxx chip series. Most lower | ||
72 | level drivers can control one or more scsi hosts (a.k.a. scsi initiators). | ||
73 | </para> | ||
74 | <para> | ||
75 | This document can been found in an ASCII text file in the linux kernel | ||
76 | source: <filename>Documentation/scsi/scsi_mid_low_api.txt</filename> . | ||
77 | It currently hold a little more information than this document. The | ||
78 | <filename>drivers/scsi/hosts.h</filename> and <filename> | ||
79 | drivers/scsi/scsi.h</filename> headers contain descriptions of members | ||
80 | of important structures for the scsi subsystem. | ||
81 | </para> | ||
82 | </chapter> | ||
83 | |||
84 | <chapter id="driver-struct"> | ||
85 | <title>Driver structure</title> | ||
86 | <para> | ||
87 | Traditionally a lower level driver for the scsi subsystem has been | ||
88 | at least two files in the drivers/scsi directory. For example, a | ||
89 | driver called "xyz" has a header file "xyz.h" and a source file | ||
90 | "xyz.c". [Actually there is no good reason why this couldn't all | ||
91 | be in one file.] Some drivers that have been ported to several operating | ||
92 | systems (e.g. aic7xxx which has separate files for generic and | ||
93 | OS-specific code) have more than two files. Such drivers tend to have | ||
94 | their own directory under the drivers/scsi directory. | ||
95 | </para> | ||
96 | <para> | ||
97 | scsi_module.c is normally included at the end of a lower | ||
98 | level driver. For it to work a declaration like this is needed before | ||
99 | it is included: | ||
100 | <programlisting> | ||
101 | static Scsi_Host_Template driver_template = DRIVER_TEMPLATE; | ||
102 | /* DRIVER_TEMPLATE should contain pointers to supported interface | ||
103 | functions. Scsi_Host_Template is defined hosts.h */ | ||
104 | #include "scsi_module.c" | ||
105 | </programlisting> | ||
106 | </para> | ||
107 | <para> | ||
108 | The scsi_module.c assumes the name "driver_template" is appropriately | ||
109 | defined. It contains 2 functions: | ||
110 | <orderedlist> | ||
111 | <listitem><para> | ||
112 | init_this_scsi_driver() called during builtin and module driver | ||
113 | initialization: invokes mid level's scsi_register_host() | ||
114 | </para></listitem> | ||
115 | <listitem><para> | ||
116 | exit_this_scsi_driver() called during closedown: invokes | ||
117 | mid level's scsi_unregister_host() | ||
118 | </para></listitem> | ||
119 | </orderedlist> | ||
120 | </para> | ||
121 | <para> | ||
122 | When a new, lower level driver is being added to Linux, the following | ||
123 | files (all found in the drivers/scsi directory) will need some attention: | ||
124 | Makefile, Config.help and Config.in . It is probably best to look at what | ||
125 | an existing lower level driver does in this regard. | ||
126 | </para> | ||
127 | </chapter> | ||
128 | |||
129 | <chapter id="intfunctions"> | ||
130 | <title>Interface Functions</title> | ||
131 | !EDocumentation/scsi/scsi_mid_low_api.txt | ||
132 | </chapter> | ||
133 | |||
134 | <chapter id="locks"> | ||
135 | <title>Locks</title> | ||
136 | <para> | ||
137 | Each Scsi_Host instance has a spin_lock called Scsi_Host::default_lock | ||
138 | which is initialized in scsi_register() [found in hosts.c]. Within the | ||
139 | same function the Scsi_Host::host_lock pointer is initialized to point | ||
140 | at default_lock with the scsi_assign_lock() function. Thereafter | ||
141 | lock and unlock operations performed by the mid level use the | ||
142 | Scsi_Host::host_lock pointer. | ||
143 | </para> | ||
144 | <para> | ||
145 | Lower level drivers can override the use of Scsi_Host::default_lock by | ||
146 | using scsi_assign_lock(). The earliest opportunity to do this would | ||
147 | be in the detect() function after it has invoked scsi_register(). It | ||
148 | could be replaced by a coarser grain lock (e.g. per driver) or a | ||
149 | lock of equal granularity (i.e. per host). Using finer grain locks | ||
150 | (e.g. per scsi device) may be possible by juggling locks in | ||
151 | queuecommand(). | ||
152 | </para> | ||
153 | </chapter> | ||
154 | |||
155 | <chapter id="changes"> | ||
156 | <title>Changes since lk 2.4 series</title> | ||
157 | <para> | ||
158 | io_request_lock has been replaced by several finer grained locks. The lock | ||
159 | relevant to lower level drivers is Scsi_Host::host_lock and there is one | ||
160 | per scsi host. | ||
161 | </para> | ||
162 | <para> | ||
163 | The older error handling mechanism has been removed. This means the | ||
164 | lower level interface functions abort() and reset() have been removed. | ||
165 | </para> | ||
166 | <para> | ||
167 | In the 2.4 series the scsi subsystem configuration descriptions were | ||
168 | aggregated with the configuration descriptions from all other Linux | ||
169 | subsystems in the Documentation/Configure.help file. In the 2.5 series, | ||
170 | the scsi subsystem now has its own (much smaller) drivers/scsi/Config.help | ||
171 | file. | ||
172 | </para> | ||
173 | </chapter> | ||
174 | |||
175 | <chapter id="credits"> | ||
176 | <title>Credits</title> | ||
177 | <para> | ||
178 | The following people have contributed to this document: | ||
179 | <orderedlist> | ||
180 | <listitem><para> | ||
181 | Mike Anderson <email>andmike@us.ibm.com</email> | ||
182 | </para></listitem> | ||
183 | <listitem><para> | ||
184 | James Bottomley <email>James.Bottomley@steeleye.com</email> | ||
185 | </para></listitem> | ||
186 | <listitem><para> | ||
187 | Patrick Mansfield <email>patmans@us.ibm.com</email> | ||
188 | </para></listitem> | ||
189 | </orderedlist> | ||
190 | </para> | ||
191 | </chapter> | ||
192 | |||
193 | </book> | ||
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 9838d32b2fe7..4d35562b1cf9 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
@@ -271,7 +271,7 @@ patch, which certifies that you wrote it or otherwise have the right to | |||
271 | pass it on as a open-source patch. The rules are pretty simple: if you | 271 | pass it on as a open-source patch. The rules are pretty simple: if you |
272 | can certify the below: | 272 | can certify the below: |
273 | 273 | ||
274 | Developer's Certificate of Origin 1.0 | 274 | Developer's Certificate of Origin 1.1 |
275 | 275 | ||
276 | By making a contribution to this project, I certify that: | 276 | By making a contribution to this project, I certify that: |
277 | 277 | ||
@@ -291,6 +291,12 @@ can certify the below: | |||
291 | person who certified (a), (b) or (c) and I have not modified | 291 | person who certified (a), (b) or (c) and I have not modified |
292 | it. | 292 | it. |
293 | 293 | ||
294 | (d) I understand and agree that this project and the contribution | ||
295 | are public and that a record of the contribution (including all | ||
296 | personal information I submit with it, including my sign-off) is | ||
297 | maintained indefinitely and may be redistributed consistent with | ||
298 | this project or the open source license(s) involved. | ||
299 | |||
294 | then you just add a line saying | 300 | then you just add a line saying |
295 | 301 | ||
296 | Signed-off-by: Random J Developer <random@developer.org> | 302 | Signed-off-by: Random J Developer <random@developer.org> |
diff --git a/Documentation/cpu-freq/cpufreq-stats.txt b/Documentation/cpu-freq/cpufreq-stats.txt new file mode 100644 index 000000000000..e2d1e760b4ba --- /dev/null +++ b/Documentation/cpu-freq/cpufreq-stats.txt | |||
@@ -0,0 +1,128 @@ | |||
1 | |||
2 | CPU frequency and voltage scaling statictics in the Linux(TM) kernel | ||
3 | |||
4 | |||
5 | L i n u x c p u f r e q - s t a t s d r i v e r | ||
6 | |||
7 | - information for users - | ||
8 | |||
9 | |||
10 | Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | ||
11 | |||
12 | Contents | ||
13 | 1. Introduction | ||
14 | 2. Statistics Provided (with example) | ||
15 | 3. Configuring cpufreq-stats | ||
16 | |||
17 | |||
18 | 1. Introduction | ||
19 | |||
20 | cpufreq-stats is a driver that provices CPU frequency statistics for each CPU. | ||
21 | This statistics is provided in /sysfs as a bunch of read_only interfaces. This | ||
22 | interface (when configured) will appear in a seperate directory under cpufreq | ||
23 | in /sysfs (<sysfs root>/devices/system/cpu/cpuX/cpufreq/stats/) for each CPU. | ||
24 | Various statistics will form read_only files under this directory. | ||
25 | |||
26 | This driver is designed to be independent of any particular cpufreq_driver | ||
27 | that may be running on your CPU. So, it will work with any cpufreq_driver. | ||
28 | |||
29 | |||
30 | 2. Statistics Provided (with example) | ||
31 | |||
32 | cpufreq stats provides following statistics (explained in detail below). | ||
33 | - time_in_state | ||
34 | - total_trans | ||
35 | - trans_table | ||
36 | |||
37 | All the statistics will be from the time the stats driver has been inserted | ||
38 | to the time when a read of a particular statistic is done. Obviously, stats | ||
39 | driver will not have any information about the the frequcny transitions before | ||
40 | the stats driver insertion. | ||
41 | |||
42 | -------------------------------------------------------------------------------- | ||
43 | <mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # ls -l | ||
44 | total 0 | ||
45 | drwxr-xr-x 2 root root 0 May 14 16:06 . | ||
46 | drwxr-xr-x 3 root root 0 May 14 15:58 .. | ||
47 | -r--r--r-- 1 root root 4096 May 14 16:06 time_in_state | ||
48 | -r--r--r-- 1 root root 4096 May 14 16:06 total_trans | ||
49 | -r--r--r-- 1 root root 4096 May 14 16:06 trans_table | ||
50 | -------------------------------------------------------------------------------- | ||
51 | |||
52 | - time_in_state | ||
53 | This gives the amount of time spent in each of the frequencies supported by | ||
54 | this CPU. The cat output will have "<frequency> <time>" pair in each line, which | ||
55 | will mean this CPU spent <time> usertime units of time at <frequency>. Output | ||
56 | will have one line for each of the supported freuencies. usertime units here | ||
57 | is 10mS (similar to other time exported in /proc). | ||
58 | |||
59 | -------------------------------------------------------------------------------- | ||
60 | <mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # cat time_in_state | ||
61 | 3600000 2089 | ||
62 | 3400000 136 | ||
63 | 3200000 34 | ||
64 | 3000000 67 | ||
65 | 2800000 172488 | ||
66 | -------------------------------------------------------------------------------- | ||
67 | |||
68 | |||
69 | - total_trans | ||
70 | This gives the total number of frequency transitions on this CPU. The cat | ||
71 | output will have a single count which is the total number of frequency | ||
72 | transitions. | ||
73 | |||
74 | -------------------------------------------------------------------------------- | ||
75 | <mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # cat total_trans | ||
76 | 20 | ||
77 | -------------------------------------------------------------------------------- | ||
78 | |||
79 | - trans_table | ||
80 | This will give a fine grained information about all the CPU frequency | ||
81 | transitions. The cat output here is a two dimensional matrix, where an entry | ||
82 | <i,j> (row i, column j) represents the count of number of transitions from | ||
83 | Freq_i to Freq_j. Freq_i is in descending order with increasing rows and | ||
84 | Freq_j is in descending order with increasing columns. The output here also | ||
85 | contains the actual freq values for each row and column for better readability. | ||
86 | |||
87 | -------------------------------------------------------------------------------- | ||
88 | <mysystem>:/sys/devices/system/cpu/cpu0/cpufreq/stats # cat trans_table | ||
89 | From : To | ||
90 | : 3600000 3400000 3200000 3000000 2800000 | ||
91 | 3600000: 0 5 0 0 0 | ||
92 | 3400000: 4 0 2 0 0 | ||
93 | 3200000: 0 1 0 2 0 | ||
94 | 3000000: 0 0 1 0 3 | ||
95 | 2800000: 0 0 0 2 0 | ||
96 | -------------------------------------------------------------------------------- | ||
97 | |||
98 | |||
99 | 3. Configuring cpufreq-stats | ||
100 | |||
101 | To configure cpufreq-stats in your kernel | ||
102 | Config Main Menu | ||
103 | Power management options (ACPI, APM) ---> | ||
104 | CPU Frequency scaling ---> | ||
105 | [*] CPU Frequency scaling | ||
106 | <*> CPU frequency translation statistics | ||
107 | [*] CPU frequency translation statistics details | ||
108 | |||
109 | |||
110 | "CPU Frequency scaling" (CONFIG_CPU_FREQ) should be enabled to configure | ||
111 | cpufreq-stats. | ||
112 | |||
113 | "CPU frequency translation statistics" (CONFIG_CPU_FREQ_STAT) provides the | ||
114 | basic statistics which includes time_in_state and total_trans. | ||
115 | |||
116 | "CPU frequency translation statistics details" (CONFIG_CPU_FREQ_STAT_DETAILS) | ||
117 | provides fine grained cpufreq stats by trans_table. The reason for having a | ||
118 | seperate config option for trans_table is: | ||
119 | - trans_table goes against the traditional /sysfs rule of one value per | ||
120 | interface. It provides a whole bunch of value in a 2 dimensional matrix | ||
121 | form. | ||
122 | |||
123 | Once these two options are enabled and your CPU supports cpufrequency, you | ||
124 | will be able to see the CPU frequency statistics in /sysfs. | ||
125 | |||
126 | |||
127 | |||
128 | |||
diff --git a/Documentation/driver-model/device.txt b/Documentation/driver-model/device.txt index 58cc5dc8fd3e..a05ec50f8004 100644 --- a/Documentation/driver-model/device.txt +++ b/Documentation/driver-model/device.txt | |||
@@ -76,6 +76,14 @@ driver_data: Driver-specific data. | |||
76 | 76 | ||
77 | platform_data: Platform data specific to the device. | 77 | platform_data: Platform data specific to the device. |
78 | 78 | ||
79 | Example: for devices on custom boards, as typical of embedded | ||
80 | and SOC based hardware, Linux often uses platform_data to point | ||
81 | to board-specific structures describing devices and how they | ||
82 | are wired. That can include what ports are available, chip | ||
83 | variants, which GPIO pins act in what additional roles, and so | ||
84 | on. This shrinks the "Board Support Packages" (BSPs) and | ||
85 | minimizes board-specific #ifdefs in drivers. | ||
86 | |||
79 | current_state: Current power state of the device. | 87 | current_state: Current power state of the device. |
80 | 88 | ||
81 | saved_state: Pointer to saved state of the device. This is usable by | 89 | saved_state: Pointer to saved state of the device. This is usable by |
diff --git a/Documentation/driver-model/driver.txt b/Documentation/driver-model/driver.txt index 6031a68dd3f5..fabaca1ab1b0 100644 --- a/Documentation/driver-model/driver.txt +++ b/Documentation/driver-model/driver.txt | |||
@@ -5,21 +5,17 @@ struct device_driver { | |||
5 | char * name; | 5 | char * name; |
6 | struct bus_type * bus; | 6 | struct bus_type * bus; |
7 | 7 | ||
8 | rwlock_t lock; | 8 | struct completion unloaded; |
9 | atomic_t refcount; | 9 | struct kobject kobj; |
10 | |||
11 | list_t bus_list; | ||
12 | list_t devices; | 10 | list_t devices; |
13 | 11 | ||
14 | struct driver_dir_entry dir; | 12 | struct module *owner; |
15 | 13 | ||
16 | int (*probe) (struct device * dev); | 14 | int (*probe) (struct device * dev); |
17 | int (*remove) (struct device * dev); | 15 | int (*remove) (struct device * dev); |
18 | 16 | ||
19 | int (*suspend) (struct device * dev, pm_message_t state, u32 level); | 17 | int (*suspend) (struct device * dev, pm_message_t state, u32 level); |
20 | int (*resume) (struct device * dev, u32 level); | 18 | int (*resume) (struct device * dev, u32 level); |
21 | |||
22 | void (*release) (struct device_driver * drv); | ||
23 | }; | 19 | }; |
24 | 20 | ||
25 | 21 | ||
@@ -51,7 +47,6 @@ being converted completely to the new model. | |||
51 | static struct device_driver eepro100_driver = { | 47 | static struct device_driver eepro100_driver = { |
52 | .name = "eepro100", | 48 | .name = "eepro100", |
53 | .bus = &pci_bus_type, | 49 | .bus = &pci_bus_type, |
54 | .devclass = ðernet_devclass, /* when it's implemented */ | ||
55 | 50 | ||
56 | .probe = eepro100_probe, | 51 | .probe = eepro100_probe, |
57 | .remove = eepro100_remove, | 52 | .remove = eepro100_remove, |
@@ -85,7 +80,6 @@ static struct pci_driver eepro100_driver = { | |||
85 | .driver = { | 80 | .driver = { |
86 | .name = "eepro100", | 81 | .name = "eepro100", |
87 | .bus = &pci_bus_type, | 82 | .bus = &pci_bus_type, |
88 | .devclass = ðernet_devclass, /* when it's implemented */ | ||
89 | .probe = eepro100_probe, | 83 | .probe = eepro100_probe, |
90 | .remove = eepro100_remove, | 84 | .remove = eepro100_remove, |
91 | .suspend = eepro100_suspend, | 85 | .suspend = eepro100_suspend, |
@@ -166,27 +160,32 @@ Callbacks | |||
166 | 160 | ||
167 | int (*probe) (struct device * dev); | 161 | int (*probe) (struct device * dev); |
168 | 162 | ||
169 | probe is called to verify the existence of a certain type of | 163 | The probe() entry is called in task context, with the bus's rwsem locked |
170 | hardware. This is called during the driver binding process, after the | 164 | and the driver partially bound to the device. Drivers commonly use |
171 | bus has verified that the device ID of a device matches one of the | 165 | container_of() to convert "dev" to a bus-specific type, both in probe() |
172 | device IDs supported by the driver. | 166 | and other routines. That type often provides device resource data, such |
173 | 167 | as pci_dev.resource[] or platform_device.resources, which is used in | |
174 | This callback only verifies that there actually is supported hardware | 168 | addition to dev->platform_data to initialize the driver. |
175 | present. It may allocate a driver-specific structure, but it should | 169 | |
176 | not do any initialization of the hardware itself. The device-specific | 170 | This callback holds the driver-specific logic to bind the driver to a |
177 | structure may be stored in the device's driver_data field. | 171 | given device. That includes verifying that the device is present, that |
178 | 172 | it's a version the driver can handle, that driver data structures can | |
179 | int (*init) (struct device * dev); | 173 | be allocated and initialized, and that any hardware can be initialized. |
180 | 174 | Drivers often store a pointer to their state with dev_set_drvdata(). | |
181 | init is called during the binding stage. It is called after probe has | 175 | When the driver has successfully bound itself to that device, then probe() |
182 | successfully returned and the device has been registered with its | 176 | returns zero and the driver model code will finish its part of binding |
183 | class. It is responsible for initializing the hardware. | 177 | the driver to that device. |
178 | |||
179 | A driver's probe() may return a negative errno value to indicate that | ||
180 | the driver did not bind to this device, in which case it should have | ||
181 | released all reasources it allocated. | ||
184 | 182 | ||
185 | int (*remove) (struct device * dev); | 183 | int (*remove) (struct device * dev); |
186 | 184 | ||
187 | remove is called to dissociate a driver with a device. This may be | 185 | remove is called to unbind a driver from a device. This may be |
188 | called if a device is physically removed from the system, if the | 186 | called if a device is physically removed from the system, if the |
189 | driver module is being unloaded, or during a reboot sequence. | 187 | driver module is being unloaded, during a reboot sequence, or |
188 | in other cases. | ||
190 | 189 | ||
191 | It is up to the driver to determine if the device is present or | 190 | It is up to the driver to determine if the device is present or |
192 | not. It should free any resources allocated specifically for the | 191 | not. It should free any resources allocated specifically for the |
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 60f6c2c4d477..dc276598a65a 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
@@ -214,7 +214,7 @@ Other notes: | |||
214 | 214 | ||
215 | A very simple (and naive) implementation of a device attribute is: | 215 | A very simple (and naive) implementation of a device attribute is: |
216 | 216 | ||
217 | static ssize_t show_name(struct device * dev, char * buf) | 217 | static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf) |
218 | { | 218 | { |
219 | return sprintf(buf,"%s\n",dev->name); | 219 | return sprintf(buf,"%s\n",dev->name); |
220 | } | 220 | } |
diff --git a/Documentation/networking/generic-hdlc.txt b/Documentation/networking/generic-hdlc.txt index 7d1dc6b884f3..31bc8b759b75 100644 --- a/Documentation/networking/generic-hdlc.txt +++ b/Documentation/networking/generic-hdlc.txt | |||
@@ -1,21 +1,21 @@ | |||
1 | Generic HDLC layer | 1 | Generic HDLC layer |
2 | Krzysztof Halasa <khc@pm.waw.pl> | 2 | Krzysztof Halasa <khc@pm.waw.pl> |
3 | January, 2003 | ||
4 | 3 | ||
5 | 4 | ||
6 | Generic HDLC layer currently supports: | 5 | Generic HDLC layer currently supports: |
7 | - Frame Relay (ANSI, CCITT and no LMI), with ARP support (no InARP). | 6 | 1. Frame Relay (ANSI, CCITT, Cisco and no LMI). |
8 | Normal (routed) and Ethernet-bridged (Ethernet device emulation) | 7 | - Normal (routed) and Ethernet-bridged (Ethernet device emulation) |
9 | interfaces can share a single PVC. | 8 | interfaces can share a single PVC. |
10 | - raw HDLC - either IP (IPv4) interface or Ethernet device emulation. | 9 | - ARP support (no InARP support in the kernel - there is an |
11 | - Cisco HDLC, | 10 | experimental InARP user-space daemon available on: |
12 | - PPP (uses syncppp.c), | 11 | http://www.kernel.org/pub/linux/utils/net/hdlc/). |
13 | - X.25 (uses X.25 routines). | 12 | 2. raw HDLC - either IP (IPv4) interface or Ethernet device emulation. |
14 | 13 | 3. Cisco HDLC. | |
15 | There are hardware drivers for the following cards: | 14 | 4. PPP (uses syncppp.c). |
16 | - C101 by Moxa Technologies Co., Ltd. | 15 | 5. X.25 (uses X.25 routines). |
17 | - RISCom/N2 by SDL Communications Inc. | 16 | |
18 | - and others, some not in the official kernel. | 17 | Generic HDLC is a protocol driver only - it needs a low-level driver |
18 | for your particular hardware. | ||
19 | 19 | ||
20 | Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible | 20 | Ethernet device emulation (using HDLC or Frame-Relay PVC) is compatible |
21 | with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging). | 21 | with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging). |
@@ -24,7 +24,7 @@ with IEEE 802.1Q (VLANs) and 802.1D (Ethernet bridging). | |||
24 | Make sure the hdlc.o and the hardware driver are loaded. It should | 24 | Make sure the hdlc.o and the hardware driver are loaded. It should |
25 | create a number of "hdlc" (hdlc0 etc) network devices, one for each | 25 | create a number of "hdlc" (hdlc0 etc) network devices, one for each |
26 | WAN port. You'll need the "sethdlc" utility, get it from: | 26 | WAN port. You'll need the "sethdlc" utility, get it from: |
27 | http://hq.pm.waw.pl/hdlc/ | 27 | http://www.kernel.org/pub/linux/utils/net/hdlc/ |
28 | 28 | ||
29 | Compile sethdlc.c utility: | 29 | Compile sethdlc.c utility: |
30 | gcc -O2 -Wall -o sethdlc sethdlc.c | 30 | gcc -O2 -Wall -o sethdlc sethdlc.c |
@@ -52,12 +52,12 @@ Setting interface: | |||
52 | * v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port | 52 | * v35 | rs232 | x21 | t1 | e1 - sets physical interface for a given port |
53 | if the card has software-selectable interfaces | 53 | if the card has software-selectable interfaces |
54 | loopback - activate hardware loopback (for testing only) | 54 | loopback - activate hardware loopback (for testing only) |
55 | * clock ext - external clock (uses DTE RX and TX clock) | 55 | * clock ext - both RX clock and TX clock external |
56 | * clock int - internal clock (provides clock signal on DCE clock output) | 56 | * clock int - both RX clock and TX clock internal |
57 | * clock txint - TX internal, RX external (provides TX clock on DCE output) | 57 | * clock txint - RX clock external, TX clock internal |
58 | * clock txfromrx - TX clock derived from RX clock (TX clock on DCE output) | 58 | * clock txfromrx - RX clock external, TX clock derived from RX clock |
59 | * rate - sets clock rate in bps (not required for external clock or | 59 | * rate - sets clock rate in bps (for "int" or "txint" clock only) |
60 | for txfromrx) | 60 | |
61 | 61 | ||
62 | Setting protocol: | 62 | Setting protocol: |
63 | 63 | ||
@@ -79,7 +79,7 @@ Setting protocol: | |||
79 | * x25 - sets X.25 mode | 79 | * x25 - sets X.25 mode |
80 | 80 | ||
81 | * fr - Frame Relay mode | 81 | * fr - Frame Relay mode |
82 | lmi ansi / ccitt / none - LMI (link management) type | 82 | lmi ansi / ccitt / cisco / none - LMI (link management) type |
83 | dce - Frame Relay DCE (network) side LMI instead of default DTE (user). | 83 | dce - Frame Relay DCE (network) side LMI instead of default DTE (user). |
84 | It has nothing to do with clocks! | 84 | It has nothing to do with clocks! |
85 | t391 - link integrity verification polling timer (in seconds) - user | 85 | t391 - link integrity verification polling timer (in seconds) - user |
@@ -119,13 +119,14 @@ or | |||
119 | 119 | ||
120 | 120 | ||
121 | 121 | ||
122 | If you have a problem with N2 or C101 card, you can issue the "private" | 122 | If you have a problem with N2, C101 or PLX200SYN card, you can issue the |
123 | command to see port's packet descriptor rings (in kernel logs): | 123 | "private" command to see port's packet descriptor rings (in kernel logs): |
124 | 124 | ||
125 | sethdlc hdlc0 private | 125 | sethdlc hdlc0 private |
126 | 126 | ||
127 | The hardware driver has to be build with CONFIG_HDLC_DEBUG_RINGS. | 127 | The hardware driver has to be build with #define DEBUG_RINGS. |
128 | Attaching this info to bug reports would be helpful. Anyway, let me know | 128 | Attaching this info to bug reports would be helpful. Anyway, let me know |
129 | if you have problems using this. | 129 | if you have problems using this. |
130 | 130 | ||
131 | For patches and other info look at http://hq.pm.waw.pl/hdlc/ | 131 | For patches and other info look at: |
132 | <http://www.kernel.org/pub/linux/utils/net/hdlc/>. | ||
diff --git a/Documentation/networking/multicast.txt b/Documentation/networking/multicast.txt index 5049a64313d1..b06c8c69266f 100644 --- a/Documentation/networking/multicast.txt +++ b/Documentation/networking/multicast.txt | |||
@@ -47,7 +47,6 @@ ni52 <------------------ Buggy ------------------> | |||
47 | ni65 YES YES YES Software(#) | 47 | ni65 YES YES YES Software(#) |
48 | seeq NO NO NO N/A | 48 | seeq NO NO NO N/A |
49 | sgiseek <------------------ Buggy ------------------> | 49 | sgiseek <------------------ Buggy ------------------> |
50 | sk_g16 NO NO YES N/A | ||
51 | smc-ultra YES YES YES Hardware | 50 | smc-ultra YES YES YES Hardware |
52 | sunlance YES YES YES Hardware | 51 | sunlance YES YES YES Hardware |
53 | tulip YES YES YES Hardware | 52 | tulip YES YES YES Hardware |
diff --git a/Documentation/networking/net-modules.txt b/Documentation/networking/net-modules.txt index 3830a83513d2..0b27863f155c 100644 --- a/Documentation/networking/net-modules.txt +++ b/Documentation/networking/net-modules.txt | |||
@@ -284,9 +284,6 @@ ppp.c: | |||
284 | seeq8005.c: *Not modularized* | 284 | seeq8005.c: *Not modularized* |
285 | (Probes ports: 0x300, 0x320, 0x340, 0x360) | 285 | (Probes ports: 0x300, 0x320, 0x340, 0x360) |
286 | 286 | ||
287 | sk_g16.c: *Not modularized* | ||
288 | (Probes ports: 0x100, 0x180, 0x208, 0x220m 0x288, 0x320, 0x328, 0x390) | ||
289 | |||
290 | skeleton.c: *Skeleton* | 287 | skeleton.c: *Skeleton* |
291 | 288 | ||
292 | slhc.c: | 289 | slhc.c: |
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt index fa12a9e4abdd..80e1cb19609f 100644 --- a/Documentation/networking/vortex.txt +++ b/Documentation/networking/vortex.txt | |||
@@ -12,7 +12,7 @@ Don is no longer the prime maintainer of this version of the driver. | |||
12 | Please report problems to one or more of: | 12 | Please report problems to one or more of: |
13 | 13 | ||
14 | Andrew Morton <andrewm@uow.edu.au> | 14 | Andrew Morton <andrewm@uow.edu.au> |
15 | Netdev mailing list <netdev@oss.sgi.com> | 15 | Netdev mailing list <netdev@vger.kernel.org> |
16 | Linux kernel mailing list <linux-kernel@vger.kernel.org> | 16 | Linux kernel mailing list <linux-kernel@vger.kernel.org> |
17 | 17 | ||
18 | Please note the 'Reporting and Diagnosing Problems' section at the end | 18 | Please note the 'Reporting and Diagnosing Problems' section at the end |
diff --git a/Documentation/scsi/ChangeLog.megaraid b/Documentation/scsi/ChangeLog.megaraid index a9356c63b800..5331d91432c7 100644 --- a/Documentation/scsi/ChangeLog.megaraid +++ b/Documentation/scsi/ChangeLog.megaraid | |||
@@ -1,3 +1,69 @@ | |||
1 | Release Date : Mon Mar 07 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> | ||
2 | Current Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module) | ||
3 | Older Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module) | ||
4 | |||
5 | 1. Added IOCTL backward compatibility. | ||
6 | Convert megaraid_mm driver to new compat_ioctl entry points. | ||
7 | I don't have easy access to hardware, so only compile tested. | ||
8 | - Signed-off-by:Andi Kleen <ak@muc.de> | ||
9 | |||
10 | 2. megaraid_mbox fix: wrong order of arguments in memset() | ||
11 | That, BTW, shows why cross-builds are useful-the only indication of | ||
12 | problem had been a new warning showing up in sparse output on alpha | ||
13 | build (number of exceeding 256 got truncated). | ||
14 | - Signed-off-by: Al Viro | ||
15 | <viro@parcelfarce.linux.theplanet.co.uk> | ||
16 | |||
17 | 3. Convert pci_module_init to pci_register_driver | ||
18 | Convert from pci_module_init to pci_register_driver | ||
19 | (from:http://kerneljanitors.org/TODO) | ||
20 | - Signed-off-by: Domen Puncer <domen@coderock.org> | ||
21 | |||
22 | 4. Use the pre defined DMA mask constants from dma-mapping.h | ||
23 | Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling | ||
24 | pci_set_dma_mask() or pci_set_consistend_dma_mask(). See | ||
25 | http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for more | ||
26 | details. | ||
27 | Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> | ||
28 | Signed-off-by: Domen Puncer <domen@coderock.org> | ||
29 | |||
30 | 5. Remove SSID checking for Dobson, Lindsay, and Verde based products. | ||
31 | Checking the SSVID/SSID for controllers which have Dobson, Lindsay, | ||
32 | and Verde is unnecessary because device ID has been assigned by LSI | ||
33 | and it is unique value. So, all controllers with these IOPs have to be | ||
34 | supported by the driver regardless SSVID/SSID. | ||
35 | |||
36 | 6. Date Thu, 27 Jan 2005 04:31:09 +0100 | ||
37 | From Herbert Poetzl <> | ||
38 | Subject RFC: assert_spin_locked() for 2.6 | ||
39 | |||
40 | Greetings! | ||
41 | |||
42 | overcautious programming will kill your kernel ;) | ||
43 | ever thought about checking a spin_lock or even | ||
44 | asserting that it must be held (maybe just for | ||
45 | spinlock debugging?) ... | ||
46 | |||
47 | there are several checks present in the kernel | ||
48 | where somebody does a variation on the following: | ||
49 | |||
50 | BUG_ON(!spin_is_locked(&some_lock)); | ||
51 | |||
52 | so what's wrong about that? nothing, unless you | ||
53 | compile the code with CONFIG_DEBUG_SPINLOCK but | ||
54 | without CONFIG_SMP ... in which case the BUG() | ||
55 | will kill your kernel ... | ||
56 | |||
57 | maybe it's not advised to make such assertions, | ||
58 | but here is a solution which works for me ... | ||
59 | (compile tested for sh, x86_64 and x86, boot/run | ||
60 | tested for x86 only) | ||
61 | |||
62 | best, | ||
63 | Herbert | ||
64 | |||
65 | - Herbert Poetzl <herbert@13thfloor.at>, Thu, 27 Jan 2005 | ||
66 | |||
1 | Release Date : Thu Feb 03 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> | 67 | Release Date : Thu Feb 03 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> |
2 | Current Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module) | 68 | Current Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module) |
3 | Older Version : 2.20.4.4 (scsi module), 2.20.2.4 (cmm module) | 69 | Older Version : 2.20.4.4 (scsi module), 2.20.2.4 (cmm module) |
diff --git a/Documentation/scsi/scsi-changer.txt b/Documentation/scsi/scsi-changer.txt new file mode 100644 index 000000000000..c132687b017a --- /dev/null +++ b/Documentation/scsi/scsi-changer.txt | |||
@@ -0,0 +1,180 @@ | |||
1 | |||
2 | README for the SCSI media changer driver | ||
3 | ======================================== | ||
4 | |||
5 | This is a driver for SCSI Medium Changer devices, which are listed | ||
6 | with "Type: Medium Changer" in /proc/scsi/scsi. | ||
7 | |||
8 | This is for *real* Jukeboxes. It is *not* supported to work with | ||
9 | common small CD-ROM changers, neither one-lun-per-slot SCSI changers | ||
10 | nor IDE drives. | ||
11 | |||
12 | Userland tools available from here: | ||
13 | http://linux.bytesex.org/misc/changer.html | ||
14 | |||
15 | |||
16 | General Information | ||
17 | ------------------- | ||
18 | |||
19 | First some words about how changers work: A changer has 2 (possibly | ||
20 | more) SCSI ID's. One for the changer device which controls the robot, | ||
21 | and one for the device which actually reads and writes the data. The | ||
22 | later may be anything, a MOD, a CD-ROM, a tape or whatever. For the | ||
23 | changer device this is a "don't care", he *only* shuffles around the | ||
24 | media, nothing else. | ||
25 | |||
26 | |||
27 | The SCSI changer model is complex, compared to - for example - IDE-CD | ||
28 | changers. But it allows to handle nearly all possible cases. It knows | ||
29 | 4 different types of changer elements: | ||
30 | |||
31 | media transport - this one shuffles around the media, i.e. the | ||
32 | transport arm. Also known as "picker". | ||
33 | storage - a slot which can hold a media. | ||
34 | import/export - the same as above, but is accessable from outside, | ||
35 | i.e. there the operator (you !) can use this to | ||
36 | fill in and remove media from the changer. | ||
37 | Sometimes named "mailslot". | ||
38 | data transfer - this is the device which reads/writes, i.e. the | ||
39 | CD-ROM / Tape / whatever drive. | ||
40 | |||
41 | None of these is limited to one: A huge Jukebox could have slots for | ||
42 | 123 CD-ROM's, 5 CD-ROM readers (and therefore 6 SCSI ID's: the changer | ||
43 | and each CD-ROM) and 2 transport arms. No problem to handle. | ||
44 | |||
45 | |||
46 | How it is implemented | ||
47 | --------------------- | ||
48 | |||
49 | I implemented the driver as character device driver with a NetBSD-like | ||
50 | ioctl interface. Just grabbed NetBSD's header file and one of the | ||
51 | other linux SCSI device drivers as starting point. The interface | ||
52 | should be source code compatible with NetBSD. So if there is any | ||
53 | software (anybody knows ???) which supports a BSDish changer driver, | ||
54 | it should work with this driver too. | ||
55 | |||
56 | Over time a few more ioctls where added, volume tag support for example | ||
57 | wasn't covered by the NetBSD ioctl API. | ||
58 | |||
59 | |||
60 | Current State | ||
61 | ------------- | ||
62 | |||
63 | Support for more than one transport arm is not implemented yet (and | ||
64 | nobody asked for it so far...). | ||
65 | |||
66 | I test and use the driver myself with a 35 slot cdrom jukebox from | ||
67 | Grundig. I got some reports telling it works ok with tape autoloaders | ||
68 | (Exabyte, HP and DEC). Some People use this driver with amanda. It | ||
69 | works fine with small (11 slots) and a huge (4 MOs, 88 slots) | ||
70 | magneto-optical Jukebox. Probably with lots of other changers too, most | ||
71 | (but not all :-) people mail me only if it does *not* work... | ||
72 | |||
73 | I don't have any device lists, neither black-list nor white-list. Thus | ||
74 | it is quite useless to ask me whenever a specific device is supported or | ||
75 | not. In theory every changer device which supports the SCSI-2 media | ||
76 | changer command set should work out-of-the-box with this driver. If it | ||
77 | doesn't, it is a bug. Either within the driver or within the firmware | ||
78 | of the changer device. | ||
79 | |||
80 | |||
81 | Using it | ||
82 | -------- | ||
83 | |||
84 | This is a character device with major number is 86, so use | ||
85 | "mknod /dev/sch0 c 86 0" to create the special file for the driver. | ||
86 | |||
87 | If the module finds the changer, it prints some messages about the | ||
88 | device [ try "dmesg" if you don't see anything ] and should show up in | ||
89 | /proc/devices. If not.... some changers use ID ? / LUN 0 for the | ||
90 | device and ID ? / LUN 1 for the robot mechanism. But Linux does *not* | ||
91 | look for LUN's other than 0 as default, becauce there are to many | ||
92 | broken devices. So you can try: | ||
93 | |||
94 | 1) echo "scsi add-single-device 0 0 ID 1" > /proc/scsi/scsi | ||
95 | (replace ID with the SCSI-ID of the device) | ||
96 | 2) boot the kernel with "max_scsi_luns=1" on the command line | ||
97 | (append="max_scsi_luns=1" in lilo.conf should do the trick) | ||
98 | |||
99 | |||
100 | Trouble? | ||
101 | -------- | ||
102 | |||
103 | If you insmod the driver with "insmod debug=1", it will be verbose and | ||
104 | prints a lot of stuff to the syslog. Compiling the kernel with | ||
105 | CONFIG_SCSI_CONSTANTS=y improves the quality of the error messages alot | ||
106 | because the kernel will translate the error codes into human-readable | ||
107 | strings then. | ||
108 | |||
109 | You can display these messages with the dmesg command (or check the | ||
110 | logfiles). If you email me some question becauce of a problem with the | ||
111 | driver, please include these messages. | ||
112 | |||
113 | |||
114 | Insmod options | ||
115 | -------------- | ||
116 | |||
117 | debug=0/1 | ||
118 | Enable debug messages (see above, default: 0). | ||
119 | |||
120 | verbose=0/1 | ||
121 | Be verbose (default: 1). | ||
122 | |||
123 | init=0/1 | ||
124 | Send INITIALIZE ELEMENT STATUS command to the changer | ||
125 | at insmod time (default: 1). | ||
126 | |||
127 | timeout_init=<seconds> | ||
128 | timeout for the INITIALIZE ELEMENT STATUS command | ||
129 | (default: 3600). | ||
130 | |||
131 | timeout_move=<seconds> | ||
132 | timeout for all other commands (default: 120). | ||
133 | |||
134 | dt_id=<id1>,<id2>,... | ||
135 | dt_lun=<lun1>,<lun2>,... | ||
136 | These two allow to specify the SCSI ID and LUN for the data | ||
137 | transfer elements. You likely don't need this as the jukebox | ||
138 | should provide this information. But some devices don't ... | ||
139 | |||
140 | vendor_firsts= | ||
141 | vendor_counts= | ||
142 | vendor_labels= | ||
143 | These insmod options can be used to tell the driver that there | ||
144 | are some vendor-specific element types. Grundig for example | ||
145 | does this. Some jukeboxes have a printer to label fresh burned | ||
146 | CDs, which is addressed as element 0xc000 (type 5). To tell the | ||
147 | driver about this vendor-specific element, use this: | ||
148 | $ insmod ch \ | ||
149 | vendor_firsts=0xc000 \ | ||
150 | vendor_counts=1 \ | ||
151 | vendor_labels=printer | ||
152 | All three insmod options accept up to four comma-separated | ||
153 | values, this way you can configure the element types 5-8. | ||
154 | You likely need the SCSI specs for the device in question to | ||
155 | find the correct values as they are not covered by the SCSI-2 | ||
156 | standard. | ||
157 | |||
158 | |||
159 | Credits | ||
160 | ------- | ||
161 | |||
162 | I wrote this driver using the famous mailing-patches-around-the-world | ||
163 | method. With (more or less) help from: | ||
164 | |||
165 | Daniel Moehwald <moehwald@hdg.de> | ||
166 | Dane Jasper <dane@sonic.net> | ||
167 | R. Scott Bailey <sbailey@dsddi.eds.com> | ||
168 | Jonathan Corbet <corbet@lwn.net> | ||
169 | |||
170 | Special thanks go to | ||
171 | Martin Kuehne <martin.kuehne@bnbt.de> | ||
172 | for a old, second-hand (but full functional) cdrom jukebox which I use | ||
173 | to develop/test driver and tools now. | ||
174 | |||
175 | Have fun, | ||
176 | |||
177 | Gerd | ||
178 | |||
179 | -- | ||
180 | Gerd Knorr <kraxel@bytesex.org> | ||
diff --git a/Documentation/scsi/scsi_mid_low_api.txt b/Documentation/scsi/scsi_mid_low_api.txt index e41703d7d24d..da176c95d0fb 100644 --- a/Documentation/scsi/scsi_mid_low_api.txt +++ b/Documentation/scsi/scsi_mid_low_api.txt | |||
@@ -936,8 +936,7 @@ Details: | |||
936 | * | 936 | * |
937 | * Returns SUCCESS if command aborted else FAILED | 937 | * Returns SUCCESS if command aborted else FAILED |
938 | * | 938 | * |
939 | * Locks: struct Scsi_Host::host_lock held (with irqsave) on entry | 939 | * Locks: None held |
940 | * and assumed to be held on return. | ||
941 | * | 940 | * |
942 | * Calling context: kernel thread | 941 | * Calling context: kernel thread |
943 | * | 942 | * |
@@ -955,8 +954,7 @@ Details: | |||
955 | * | 954 | * |
956 | * Returns SUCCESS if command aborted else FAILED | 955 | * Returns SUCCESS if command aborted else FAILED |
957 | * | 956 | * |
958 | * Locks: struct Scsi_Host::host_lock held (with irqsave) on entry | 957 | * Locks: None held |
959 | * and assumed to be held on return. | ||
960 | * | 958 | * |
961 | * Calling context: kernel thread | 959 | * Calling context: kernel thread |
962 | * | 960 | * |
@@ -974,8 +972,7 @@ Details: | |||
974 | * | 972 | * |
975 | * Returns SUCCESS if command aborted else FAILED | 973 | * Returns SUCCESS if command aborted else FAILED |
976 | * | 974 | * |
977 | * Locks: struct Scsi_Host::host_lock held (with irqsave) on entry | 975 | * Locks: None held |
978 | * and assumed to be held on return. | ||
979 | * | 976 | * |
980 | * Calling context: kernel thread | 977 | * Calling context: kernel thread |
981 | * | 978 | * |
@@ -993,8 +990,7 @@ Details: | |||
993 | * | 990 | * |
994 | * Returns SUCCESS if command aborted else FAILED | 991 | * Returns SUCCESS if command aborted else FAILED |
995 | * | 992 | * |
996 | * Locks: struct Scsi_Host::host_lock held (with irqsave) on entry | 993 | * Locks: None held |
997 | * and assumed to be held on return. | ||
998 | * | 994 | * |
999 | * Calling context: kernel thread | 995 | * Calling context: kernel thread |
1000 | * | 996 | * |