aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-03-05 20:32:02 -0500
committerDavid S. Miller <davem@davemloft.net>2014-03-05 20:32:02 -0500
commit67ddc87f162e2d0e29db2b6b21c5a3fbcb8be206 (patch)
treec83ac73e3d569156d4b7f3dab3e7e27e0054cd0d /Documentation
parent6092c79fd00ce48ee8698955ea6419cc5cd65641 (diff)
parentc3bebc71c4bcdafa24b506adf0c1de3c1f77e2e0 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/wireless/ath/ath9k/recv.c drivers/net/wireless/mwifiex/pcie.c net/ipv6/sit.c The SIT driver conflict consists of a bug fix being done by hand in 'net' (missing u64_stats_init()) whilst in 'net-next' a helper was created (netdev_alloc_pcpu_stats()) which takes care of this. The two wireless conflicts were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-tty3
-rw-r--r--Documentation/PCI/MSI-HOWTO.txt119
-rw-r--r--Documentation/devicetree/bindings/arm/omap/omap.txt2
-rw-r--r--Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt4
-rw-r--r--Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt16
-rw-r--r--Documentation/devicetree/bindings/net/opencores-ethoc.txt22
-rw-r--r--Documentation/networking/can.txt6
7 files changed, 145 insertions, 27 deletions
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty
index a2ccec35ffce..ad22fb0ee765 100644
--- a/Documentation/ABI/testing/sysfs-tty
+++ b/Documentation/ABI/testing/sysfs-tty
@@ -3,8 +3,7 @@ Date: Nov 2010
3Contact: Kay Sievers <kay.sievers@vrfy.org> 3Contact: Kay Sievers <kay.sievers@vrfy.org>
4Description: 4Description:
5 Shows the list of currently configured 5 Shows the list of currently configured
6 tty devices used for the console, 6 console devices, like 'tty1 ttyS0'.
7 like 'tty1 ttyS0'.
8 The last entry in the file is the active 7 The last entry in the file is the active
9 device connected to /dev/console. 8 device connected to /dev/console.
10 The file supports poll() to detect virtual 9 The file supports poll() to detect virtual
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index a8d01005f480..10a93696e55a 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -82,7 +82,19 @@ Most of the hard work is done for the driver in the PCI layer. It simply
82has to request that the PCI layer set up the MSI capability for this 82has to request that the PCI layer set up the MSI capability for this
83device. 83device.
84 84
854.2.1 pci_enable_msi_range 854.2.1 pci_enable_msi
86
87int pci_enable_msi(struct pci_dev *dev)
88
89A successful call allocates ONE interrupt to the device, regardless
90of how many MSIs the device supports. The device is switched from
91pin-based interrupt mode to MSI mode. The dev->irq number is changed
92to a new number which represents the message signaled interrupt;
93consequently, this function should be called before the driver calls
94request_irq(), because an MSI is delivered via a vector that is
95different from the vector of a pin-based interrupt.
96
974.2.2 pci_enable_msi_range
86 98
87int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec) 99int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec)
88 100
@@ -147,6 +159,11 @@ static int foo_driver_enable_msi(struct pci_dev *pdev, int nvec)
147 return pci_enable_msi_range(pdev, nvec, nvec); 159 return pci_enable_msi_range(pdev, nvec, nvec);
148} 160}
149 161
162Note, unlike pci_enable_msi_exact() function, which could be also used to
163enable a particular number of MSI-X interrupts, pci_enable_msi_range()
164returns either a negative errno or 'nvec' (not negative errno or 0 - as
165pci_enable_msi_exact() does).
166
1504.2.1.3 Single MSI mode 1674.2.1.3 Single MSI mode
151 168
152The most notorious example of the request type described above is 169The most notorious example of the request type described above is
@@ -158,7 +175,27 @@ static int foo_driver_enable_single_msi(struct pci_dev *pdev)
158 return pci_enable_msi_range(pdev, 1, 1); 175 return pci_enable_msi_range(pdev, 1, 1);
159} 176}
160 177
1614.2.2 pci_disable_msi 178Note, unlike pci_enable_msi() function, which could be also used to
179enable the single MSI mode, pci_enable_msi_range() returns either a
180negative errno or 1 (not negative errno or 0 - as pci_enable_msi()
181does).
182
1834.2.3 pci_enable_msi_exact
184
185int pci_enable_msi_exact(struct pci_dev *dev, int nvec)
186
187This variation on pci_enable_msi_range() call allows a device driver to
188request exactly 'nvec' MSIs.
189
190If this function returns a negative number, it indicates an error and
191the driver should not attempt to request any more MSI interrupts for
192this device.
193
194By contrast with pci_enable_msi_range() function, pci_enable_msi_exact()
195returns zero in case of success, which indicates MSI interrupts have been
196successfully allocated.
197
1984.2.4 pci_disable_msi
162 199
163void pci_disable_msi(struct pci_dev *dev) 200void pci_disable_msi(struct pci_dev *dev)
164 201
@@ -172,7 +209,7 @@ on any interrupt for which it previously called request_irq().
172Failure to do so results in a BUG_ON(), leaving the device with 209Failure to do so results in a BUG_ON(), leaving the device with
173MSI enabled and thus leaking its vector. 210MSI enabled and thus leaking its vector.
174 211
1754.2.3 pci_msi_vec_count 2124.2.4 pci_msi_vec_count
176 213
177int pci_msi_vec_count(struct pci_dev *dev) 214int pci_msi_vec_count(struct pci_dev *dev)
178 215
@@ -257,8 +294,8 @@ possible, likely up to the limit returned by pci_msix_vec_count() function:
257 294
258static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) 295static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
259{ 296{
260 return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, 297 return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
261 1, nvec); 298 1, nvec);
262} 299}
263 300
264Note the value of 'minvec' parameter is 1. As 'minvec' is inclusive, 301Note the value of 'minvec' parameter is 1. As 'minvec' is inclusive,
@@ -269,8 +306,8 @@ In this case the function could look like this:
269 306
270static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) 307static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
271{ 308{
272 return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, 309 return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
273 FOO_DRIVER_MINIMUM_NVEC, nvec); 310 FOO_DRIVER_MINIMUM_NVEC, nvec);
274} 311}
275 312
2764.3.1.2 Exact number of MSI-X interrupts 3134.3.1.2 Exact number of MSI-X interrupts
@@ -282,10 +319,15 @@ parameters:
282 319
283static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec) 320static int foo_driver_enable_msix(struct foo_adapter *adapter, int nvec)
284{ 321{
285 return pci_enable_msi_range(adapter->pdev, adapter->msix_entries, 322 return pci_enable_msix_range(adapter->pdev, adapter->msix_entries,
286 nvec, nvec); 323 nvec, nvec);
287} 324}
288 325
326Note, unlike pci_enable_msix_exact() function, which could be also used to
327enable a particular number of MSI-X interrupts, pci_enable_msix_range()
328returns either a negative errno or 'nvec' (not negative errno or 0 - as
329pci_enable_msix_exact() does).
330
2894.3.1.3 Specific requirements to the number of MSI-X interrupts 3314.3.1.3 Specific requirements to the number of MSI-X interrupts
290 332
291As noted above, there could be devices that can not operate with just any 333As noted above, there could be devices that can not operate with just any
@@ -332,7 +374,64 @@ Note how pci_enable_msix_range() return value is analized for a fallback -
332any error code other than -ENOSPC indicates a fatal error and should not 374any error code other than -ENOSPC indicates a fatal error and should not
333be retried. 375be retried.
334 376
3354.3.2 pci_disable_msix 3774.3.2 pci_enable_msix_exact
378
379int pci_enable_msix_exact(struct pci_dev *dev,
380 struct msix_entry *entries, int nvec)
381
382This variation on pci_enable_msix_range() call allows a device driver to
383request exactly 'nvec' MSI-Xs.
384
385If this function returns a negative number, it indicates an error and
386the driver should not attempt to allocate any more MSI-X interrupts for
387this device.
388
389By contrast with pci_enable_msix_range() function, pci_enable_msix_exact()
390returns zero in case of success, which indicates MSI-X interrupts have been
391successfully allocated.
392
393Another version of a routine that enables MSI-X mode for a device with
394specific requirements described in chapter 4.3.1.3 might look like this:
395
396/*
397 * Assume 'minvec' and 'maxvec' are non-zero
398 */
399static int foo_driver_enable_msix(struct foo_adapter *adapter,
400 int minvec, int maxvec)
401{
402 int rc;
403
404 minvec = roundup_pow_of_two(minvec);
405 maxvec = rounddown_pow_of_two(maxvec);
406
407 if (minvec > maxvec)
408 return -ERANGE;
409
410retry:
411 rc = pci_enable_msix_exact(adapter->pdev,
412 adapter->msix_entries, maxvec);
413
414 /*
415 * -ENOSPC is the only error code allowed to be analyzed
416 */
417 if (rc == -ENOSPC) {
418 if (maxvec == 1)
419 return -ENOSPC;
420
421 maxvec /= 2;
422
423 if (minvec > maxvec)
424 return -ENOSPC;
425
426 goto retry;
427 } else if (rc < 0) {
428 return rc;
429 }
430
431 return maxvec;
432}
433
4344.3.3 pci_disable_msix
336 435
337void pci_disable_msix(struct pci_dev *dev) 436void pci_disable_msix(struct pci_dev *dev)
338 437
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt
index 34dc40cffdfd..af9b4a0d902b 100644
--- a/Documentation/devicetree/bindings/arm/omap/omap.txt
+++ b/Documentation/devicetree/bindings/arm/omap/omap.txt
@@ -91,7 +91,7 @@ Boards:
91 compatible = "ti,omap3-beagle", "ti,omap3" 91 compatible = "ti,omap3-beagle", "ti,omap3"
92 92
93- OMAP3 Tobi with Overo : Commercial expansion board with daughter board 93- OMAP3 Tobi with Overo : Commercial expansion board with daughter board
94 compatible = "ti,omap3-tobi", "ti,omap3-overo", "ti,omap3" 94 compatible = "gumstix,omap3-overo-tobi", "gumstix,omap3-overo", "ti,omap3"
95 95
96- OMAP4 SDP : Software Development Board 96- OMAP4 SDP : Software Development Board
97 compatible = "ti,omap4-sdp", "ti,omap4430" 97 compatible = "ti,omap4-sdp", "ti,omap4430"
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
index a6a352c2771e..5992dceec7af 100644
--- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
@@ -21,9 +21,9 @@ Required Properties:
21 must appear in the same order as the output clocks. 21 must appear in the same order as the output clocks.
22 - #clock-cells: Must be 1 22 - #clock-cells: Must be 1
23 - clock-output-names: The name of the clocks as free-form strings 23 - clock-output-names: The name of the clocks as free-form strings
24 - renesas,indices: Indices of the gate clocks into the group (0 to 31) 24 - renesas,clock-indices: Indices of the gate clocks into the group (0 to 31)
25 25
26The clocks, clock-output-names and renesas,indices properties contain one 26The clocks, clock-output-names and renesas,clock-indices properties contain one
27entry per gate clock. The MSTP groups are sparsely populated. Unimplemented 27entry per gate clock. The MSTP groups are sparsely populated. Unimplemented
28gate clocks must not be declared. 28gate clocks must not be declared.
29 29
diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
index 68b83ecc3850..ee9be9961524 100644
--- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
+++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt
@@ -1,12 +1,16 @@
1* Freescale Smart Direct Memory Access (SDMA) Controller for i.MX 1* Freescale Smart Direct Memory Access (SDMA) Controller for i.MX
2 2
3Required properties: 3Required properties:
4- compatible : Should be "fsl,imx31-sdma", "fsl,imx31-to1-sdma", 4- compatible : Should be one of
5 "fsl,imx31-to2-sdma", "fsl,imx35-sdma", "fsl,imx35-to1-sdma", 5 "fsl,imx25-sdma"
6 "fsl,imx35-to2-sdma", "fsl,imx51-sdma", "fsl,imx53-sdma" or 6 "fsl,imx31-sdma", "fsl,imx31-to1-sdma", "fsl,imx31-to2-sdma"
7 "fsl,imx6q-sdma". The -to variants should be preferred since they 7 "fsl,imx35-sdma", "fsl,imx35-to1-sdma", "fsl,imx35-to2-sdma"
8 allow to determnine the correct ROM script addresses needed for 8 "fsl,imx51-sdma"
9 the driver to work without additional firmware. 9 "fsl,imx53-sdma"
10 "fsl,imx6q-sdma"
11 The -to variants should be preferred since they allow to determnine the
12 correct ROM script addresses needed for the driver to work without additional
13 firmware.
10- reg : Should contain SDMA registers location and length 14- reg : Should contain SDMA registers location and length
11- interrupts : Should contain SDMA interrupt 15- interrupts : Should contain SDMA interrupt
12- #dma-cells : Must be <3>. 16- #dma-cells : Must be <3>.
diff --git a/Documentation/devicetree/bindings/net/opencores-ethoc.txt b/Documentation/devicetree/bindings/net/opencores-ethoc.txt
new file mode 100644
index 000000000000..2dc127c30d9b
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/opencores-ethoc.txt
@@ -0,0 +1,22 @@
1* OpenCores MAC 10/100 Mbps
2
3Required properties:
4- compatible: Should be "opencores,ethoc".
5- reg: two memory regions (address and length),
6 first region is for the device registers and descriptor rings,
7 second is for the device packet memory.
8- interrupts: interrupt for the device.
9
10Optional properties:
11- clocks: phandle to refer to the clk used as per
12 Documentation/devicetree/bindings/clock/clock-bindings.txt
13
14Examples:
15
16 enet0: ethoc@fd030000 {
17 compatible = "opencores,ethoc";
18 reg = <0xfd030000 0x4000 0xfd800000 0x4000>;
19 interrupts = <1>;
20 local-mac-address = [00 50 c2 13 6f 00];
21 clocks = <&osc>;
22 };
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt
index f3089d423515..0cbe6ec22d6f 100644
--- a/Documentation/networking/can.txt
+++ b/Documentation/networking/can.txt
@@ -554,12 +554,6 @@ solution for a couple of reasons:
554 not specified in the struct can_frame and therefore it is only valid in 554 not specified in the struct can_frame and therefore it is only valid in
555 CANFD_MTU sized CAN FD frames. 555 CANFD_MTU sized CAN FD frames.
556 556
557 As long as the payload length is <=8 the received CAN frames from CAN FD
558 capable CAN devices can be received and read by legacy sockets too. When
559 user-generated CAN FD frames have a payload length <=8 these can be send
560 by legacy CAN network interfaces too. Sending CAN FD frames with payload
561 length > 8 to a legacy CAN network interface returns an -EMSGSIZE error.
562
563 Implementation hint for new CAN applications: 557 Implementation hint for new CAN applications:
564 558
565 To build a CAN FD aware application use struct canfd_frame as basic CAN 559 To build a CAN FD aware application use struct canfd_frame as basic CAN