提交 cb8e59cc 编写于 作者: L Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next

Pull networking updates from David Miller:

 1) Allow setting bluetooth L2CAP modes via socket option, from Luiz
    Augusto von Dentz.

 2) Add GSO partial support to igc, from Sasha Neftin.

 3) Several cleanups and improvements to r8169 from Heiner Kallweit.

 4) Add IF_OPER_TESTING link state and use it when ethtool triggers a
    device self-test. From Andrew Lunn.

 5) Start moving away from custom driver versions, use the globally
    defined kernel version instead, from Leon Romanovsky.

 6) Support GRO vis gro_cells in DSA layer, from Alexander Lobakin.

 7) Allow hard IRQ deferral during NAPI, from Eric Dumazet.

 8) Add sriov and vf support to hinic, from Luo bin.

 9) Support Media Redundancy Protocol (MRP) in the bridging code, from
    Horatiu Vultur.

10) Support netmap in the nft_nat code, from Pablo Neira Ayuso.

11) Allow UDPv6 encapsulation of ESP in the ipsec code, from Sabrina
    Dubroca. Also add ipv6 support for espintcp.

12) Lots of ReST conversions of the networking documentation, from Mauro
    Carvalho Chehab.

13) Support configuration of ethtool rxnfc flows in bcmgenet driver,
    from Doug Berger.

14) Allow to dump cgroup id and filter by it in inet_diag code, from
    Dmitry Yakunin.

15) Add infrastructure to export netlink attribute policies to
    userspace, from Johannes Berg.

16) Several optimizations to sch_fq scheduler, from Eric Dumazet.

17) Fallback to the default qdisc if qdisc init fails because otherwise
    a packet scheduler init failure will make a device inoperative. From
    Jesper Dangaard Brouer.

18) Several RISCV bpf jit optimizations, from Luke Nelson.

19) Correct the return type of the ->ndo_start_xmit() method in several
    drivers, it's netdev_tx_t but many drivers were using
    'int'. From Yunjian Wang.

20) Add an ethtool interface for PHY master/slave config, from Oleksij
    Rempel.

21) Add BPF iterators, from Yonghang Song.

22) Add cable test infrastructure, including ethool interfaces, from
    Andrew Lunn. Marvell PHY driver is the first to support this
    facility.

23) Remove zero-length arrays all over, from Gustavo A. R. Silva.

24) Calculate and maintain an explicit frame size in XDP, from Jesper
    Dangaard Brouer.

25) Add CAP_BPF, from Alexei Starovoitov.

26) Support terse dumps in the packet scheduler, from Vlad Buslov.

27) Support XDP_TX bulking in dpaa2 driver, from Ioana Ciornei.

28) Add devm_register_netdev(), from Bartosz Golaszewski.

29) Minimize qdisc resets, from Cong Wang.

30) Get rid of kernel_getsockopt and kernel_setsockopt in order to
    eliminate set_fs/get_fs calls. From Christoph Hellwig.

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2517 commits)
  selftests: net: ip_defrag: ignore EPERM
  net_failover: fixed rollback in net_failover_open()
  Revert "tipc: Fix potential tipc_aead refcnt leak in tipc_crypto_rcv"
  Revert "tipc: Fix potential tipc_node refcnt leak in tipc_rcv"
  vmxnet3: allow rx flow hash ops only when rss is enabled
  hinic: add set_channels ethtool_ops support
  selftests/bpf: Add a default $(CXX) value
  tools/bpf: Don't use $(COMPILE.c)
  bpf, selftests: Use bpf_probe_read_kernel
  s390/bpf: Use bcr 0,%0 as tail call nop filler
  s390/bpf: Maintain 8-byte stack alignment
  selftests/bpf: Fix verifier test
  selftests/bpf: Fix sample_cnt shared between two threads
  bpf, selftests: Adapt cls_redirect to call csum_level helper
  bpf: Add csum_level helper for fixing up csum levels
  bpf: Fix up bpf_skb_adjust_room helper's skb csum setting
  sfc: add missing annotation for efx_ef10_try_update_nic_stats_vf()
  crypto/chtls: IPv6 support for inline TLS
  Crypto/chcr: Fixes a coccinile check error
  Crypto/chcr: Fixes compilations warnings
  ...

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
...@@ -124,6 +124,19 @@ Description: ...@@ -124,6 +124,19 @@ Description:
authentication is performed (e.g: 802.1x). 'link_mode' attribute authentication is performed (e.g: 802.1x). 'link_mode' attribute
will also reflect the dormant state. will also reflect the dormant state.
What: /sys/class/net/<iface>/testing
Date: April 2002
KernelVersion: 5.8
Contact: netdev@vger.kernel.org
Description:
Indicates whether the interface is under test. Possible
values are:
0: interface is not being tested
1: interface is being tested
When an interface is under test, it cannot be expected
to pass packets as normal.
What: /sys/clas/net/<iface>/duplex What: /sys/clas/net/<iface>/duplex
Date: October 2009 Date: October 2009
KernelVersion: 2.6.33 KernelVersion: 2.6.33
......
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
shot down by NMI shot down by NMI
autoconf= [IPV6] autoconf= [IPV6]
See Documentation/networking/ipv6.txt. See Documentation/networking/ipv6.rst.
show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller
Limit apic dumping. The parameter defines the maximal Limit apic dumping. The parameter defines the maximal
...@@ -638,7 +638,7 @@ ...@@ -638,7 +638,7 @@
See Documentation/admin-guide/serial-console.rst for more See Documentation/admin-guide/serial-console.rst for more
information. See information. See
Documentation/networking/netconsole.txt for an Documentation/networking/netconsole.rst for an
alternative. alternative.
uart[8250],io,<addr>[,options] uart[8250],io,<addr>[,options]
...@@ -831,7 +831,7 @@ ...@@ -831,7 +831,7 @@
decnet.addr= [HW,NET] decnet.addr= [HW,NET]
Format: <area>[,<node>] Format: <area>[,<node>]
See also Documentation/networking/decnet.txt. See also Documentation/networking/decnet.rst.
default_hugepagesz= default_hugepagesz=
[same as hugepagesz=] The size of the default [same as hugepagesz=] The size of the default
...@@ -872,7 +872,7 @@ ...@@ -872,7 +872,7 @@
miss to occur. miss to occur.
disable= [IPV6] disable= [IPV6]
See Documentation/networking/ipv6.txt. See Documentation/networking/ipv6.rst.
hardened_usercopy= hardened_usercopy=
[KNL] Under CONFIG_HARDENED_USERCOPY, whether [KNL] Under CONFIG_HARDENED_USERCOPY, whether
...@@ -912,7 +912,7 @@ ...@@ -912,7 +912,7 @@
to workaround buggy firmware. to workaround buggy firmware.
disable_ipv6= [IPV6] disable_ipv6= [IPV6]
See Documentation/networking/ipv6.txt. See Documentation/networking/ipv6.rst.
disable_mtrr_cleanup [X86] disable_mtrr_cleanup [X86]
The kernel tries to adjust MTRR layout from continuous The kernel tries to adjust MTRR layout from continuous
...@@ -4956,7 +4956,7 @@ ...@@ -4956,7 +4956,7 @@
Set the number of tcp_metrics_hash slots. Set the number of tcp_metrics_hash slots.
Default value is 8192 or 16384 depending on total Default value is 8192 or 16384 depending on total
ram pages. This is used to specify the TCP metrics ram pages. This is used to specify the TCP metrics
cache size. See Documentation/networking/ip-sysctl.txt cache size. See Documentation/networking/ip-sysctl.rst
"tcp_no_metrics_save" section for more details. "tcp_no_metrics_save" section for more details.
tdfx= [HW,DRM] tdfx= [HW,DRM]
......
...@@ -54,7 +54,7 @@ You will need to create a new device to use ``/dev/console``. The official ...@@ -54,7 +54,7 @@ You will need to create a new device to use ``/dev/console``. The official
``/dev/console`` is now character device 5,1. ``/dev/console`` is now character device 5,1.
(You can also use a network device as a console. See (You can also use a network device as a console. See
``Documentation/networking/netconsole.txt`` for information on that.) ``Documentation/networking/netconsole.rst`` for information on that.)
Here's an example that will use ``/dev/ttyS1`` (COM2) as the console. Here's an example that will use ``/dev/ttyS1`` (COM2) as the console.
Replace the sample values as needed. Replace the sample values as needed.
......
...@@ -339,7 +339,9 @@ settings from init_net and for IPv6 we reset all settings to default. ...@@ -339,7 +339,9 @@ settings from init_net and for IPv6 we reset all settings to default.
If set to 1, both IPv4 and IPv6 settings are forced to inherit from If set to 1, both IPv4 and IPv6 settings are forced to inherit from
current ones in init_net. If set to 2, both IPv4 and IPv6 settings are current ones in init_net. If set to 2, both IPv4 and IPv6 settings are
forced to reset to their default values. forced to reset to their default values. If set to 3, both IPv4 and IPv6
settings are forced to inherit from current ones in the netns where this
new netns has been created.
Default : 0 (for compatibility reasons) Default : 0 (for compatibility reasons)
...@@ -353,8 +355,8 @@ socket's buffer. It will not take effect unless PF_UNIX flag is specified. ...@@ -353,8 +355,8 @@ socket's buffer. It will not take effect unless PF_UNIX flag is specified.
3. /proc/sys/net/ipv4 - IPV4 settings 3. /proc/sys/net/ipv4 - IPV4 settings
------------------------------------- -------------------------------------
Please see: Documentation/networking/ip-sysctl.txt and ipvs-sysctl.txt for Please see: Documentation/networking/ip-sysctl.rst and
descriptions of these entries. Documentation/admin-guide/sysctl/net.rst for descriptions of these entries.
4. Appletalk 4. Appletalk
......
...@@ -437,6 +437,21 @@ needed:: ...@@ -437,6 +437,21 @@ needed::
See the kernels selftest `Documentation/dev-tools/kselftest.rst`_ See the kernels selftest `Documentation/dev-tools/kselftest.rst`_
document for further documentation. document for further documentation.
To maximize the number of tests passing, the .config of the kernel
under test should match the config file fragment in
tools/testing/selftests/bpf as closely as possible.
Finally to ensure support for latest BPF Type Format features -
discussed in `Documentation/bpf/btf.rst`_ - pahole version 1.16
is required for kernels built with CONFIG_DEBUG_INFO_BTF=y.
pahole is delivered in the dwarves package or can be built
from source at
https://github.com/acmel/dwarves
Some distros have pahole version 1.16 packaged already, e.g.
Fedora, Gentoo.
Q: Which BPF kernel selftests version should I run my kernel against? Q: Which BPF kernel selftests version should I run my kernel against?
--------------------------------------------------------------------- ---------------------------------------------------------------------
A: If you run a kernel ``xyz``, then always run the BPF kernel selftests A: If you run a kernel ``xyz``, then always run the BPF kernel selftests
......
...@@ -7,7 +7,7 @@ Filter) facility, with a focus on the extended BPF version (eBPF). ...@@ -7,7 +7,7 @@ Filter) facility, with a focus on the extended BPF version (eBPF).
This kernel side documentation is still work in progress. The main This kernel side documentation is still work in progress. The main
textual documentation is (for historical reasons) described in textual documentation is (for historical reasons) described in
`Documentation/networking/filter.txt`_, which describe both classical `Documentation/networking/filter.rst`_, which describe both classical
and extended BPF instruction-set. and extended BPF instruction-set.
The Cilium project also maintains a `BPF and XDP Reference Guide`_ The Cilium project also maintains a `BPF and XDP Reference Guide`_
that goes into great technical depth about the BPF Architecture. that goes into great technical depth about the BPF Architecture.
...@@ -59,7 +59,7 @@ Testing and debugging BPF ...@@ -59,7 +59,7 @@ Testing and debugging BPF
.. Links: .. Links:
.. _Documentation/networking/filter.txt: ../networking/filter.txt .. _Documentation/networking/filter.rst: ../networking/filter.txt
.. _man-pages: https://www.kernel.org/doc/man-pages/ .. _man-pages: https://www.kernel.org/doc/man-pages/
.. _bpf(2): http://man7.org/linux/man-pages/man2/bpf.2.html .. _bpf(2): http://man7.org/linux/man-pages/man2/bpf.2.html
.. _BPF and XDP Reference Guide: http://cilium.readthedocs.io/en/latest/bpf/ .. _BPF and XDP Reference Guide: http://cilium.readthedocs.io/en/latest/bpf/
===============
BPF ring buffer
===============
This document describes BPF ring buffer design, API, and implementation details.
.. contents::
:local:
:depth: 2
Motivation
----------
There are two distinctive motivators for this work, which are not satisfied by
existing perf buffer, which prompted creation of a new ring buffer
implementation.
- more efficient memory utilization by sharing ring buffer across CPUs;
- preserving ordering of events that happen sequentially in time, even across
multiple CPUs (e.g., fork/exec/exit events for a task).
These two problems are independent, but perf buffer fails to satisfy both.
Both are a result of a choice to have per-CPU perf ring buffer. Both can be
also solved by having an MPSC implementation of ring buffer. The ordering
problem could technically be solved for perf buffer with some in-kernel
counting, but given the first one requires an MPSC buffer, the same solution
would solve the second problem automatically.
Semantics and APIs
------------------
Single ring buffer is presented to BPF programs as an instance of BPF map of
type ``BPF_MAP_TYPE_RINGBUF``. Two other alternatives considered, but
ultimately rejected.
One way would be to, similar to ``BPF_MAP_TYPE_PERF_EVENT_ARRAY``, make
``BPF_MAP_TYPE_RINGBUF`` could represent an array of ring buffers, but not
enforce "same CPU only" rule. This would be more familiar interface compatible
with existing perf buffer use in BPF, but would fail if application needed more
advanced logic to lookup ring buffer by arbitrary key.
``BPF_MAP_TYPE_HASH_OF_MAPS`` addresses this with current approach.
Additionally, given the performance of BPF ringbuf, many use cases would just
opt into a simple single ring buffer shared among all CPUs, for which current
approach would be an overkill.
Another approach could introduce a new concept, alongside BPF map, to represent
generic "container" object, which doesn't necessarily have key/value interface
with lookup/update/delete operations. This approach would add a lot of extra
infrastructure that has to be built for observability and verifier support. It
would also add another concept that BPF developers would have to familiarize
themselves with, new syntax in libbpf, etc. But then would really provide no
additional benefits over the approach of using a map. ``BPF_MAP_TYPE_RINGBUF``
doesn't support lookup/update/delete operations, but so doesn't few other map
types (e.g., queue and stack; array doesn't support delete, etc).
The approach chosen has an advantage of re-using existing BPF map
infrastructure (introspection APIs in kernel, libbpf support, etc), being
familiar concept (no need to teach users a new type of object in BPF program),
and utilizing existing tooling (bpftool). For common scenario of using a single
ring buffer for all CPUs, it's as simple and straightforward, as would be with
a dedicated "container" object. On the other hand, by being a map, it can be
combined with ``ARRAY_OF_MAPS`` and ``HASH_OF_MAPS`` map-in-maps to implement
a wide variety of topologies, from one ring buffer for each CPU (e.g., as
a replacement for perf buffer use cases), to a complicated application
hashing/sharding of ring buffers (e.g., having a small pool of ring buffers
with hashed task's tgid being a look up key to preserve order, but reduce
contention).
Key and value sizes are enforced to be zero. ``max_entries`` is used to specify
the size of ring buffer and has to be a power of 2 value.
There are a bunch of similarities between perf buffer
(``BPF_MAP_TYPE_PERF_EVENT_ARRAY``) and new BPF ring buffer semantics:
- variable-length records;
- if there is no more space left in ring buffer, reservation fails, no
blocking;
- memory-mappable data area for user-space applications for ease of
consumption and high performance;
- epoll notifications for new incoming data;
- but still the ability to do busy polling for new data to achieve the
lowest latency, if necessary.
BPF ringbuf provides two sets of APIs to BPF programs:
- ``bpf_ringbuf_output()`` allows to *copy* data from one place to a ring
buffer, similarly to ``bpf_perf_event_output()``;
- ``bpf_ringbuf_reserve()``/``bpf_ringbuf_commit()``/``bpf_ringbuf_discard()``
APIs split the whole process into two steps. First, a fixed amount of space
is reserved. If successful, a pointer to a data inside ring buffer data
area is returned, which BPF programs can use similarly to a data inside
array/hash maps. Once ready, this piece of memory is either committed or
discarded. Discard is similar to commit, but makes consumer ignore the
record.
``bpf_ringbuf_output()`` has disadvantage of incurring extra memory copy,
because record has to be prepared in some other place first. But it allows to
submit records of the length that's not known to verifier beforehand. It also
closely matches ``bpf_perf_event_output()``, so will simplify migration
significantly.
``bpf_ringbuf_reserve()`` avoids the extra copy of memory by providing a memory
pointer directly to ring buffer memory. In a lot of cases records are larger
than BPF stack space allows, so many programs have use extra per-CPU array as
a temporary heap for preparing sample. bpf_ringbuf_reserve() avoid this needs
completely. But in exchange, it only allows a known constant size of memory to
be reserved, such that verifier can verify that BPF program can't access memory
outside its reserved record space. bpf_ringbuf_output(), while slightly slower
due to extra memory copy, covers some use cases that are not suitable for
``bpf_ringbuf_reserve()``.
The difference between commit and discard is very small. Discard just marks
a record as discarded, and such records are supposed to be ignored by consumer
code. Discard is useful for some advanced use-cases, such as ensuring
all-or-nothing multi-record submission, or emulating temporary
``malloc()``/``free()`` within single BPF program invocation.
Each reserved record is tracked by verifier through existing
reference-tracking logic, similar to socket ref-tracking. It is thus
impossible to reserve a record, but forget to submit (or discard) it.
``bpf_ringbuf_query()`` helper allows to query various properties of ring
buffer. Currently 4 are supported:
- ``BPF_RB_AVAIL_DATA`` returns amount of unconsumed data in ring buffer;
- ``BPF_RB_RING_SIZE`` returns the size of ring buffer;
- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical possition
of consumer/producer, respectively.
Returned values are momentarily snapshots of ring buffer state and could be
off by the time helper returns, so this should be used only for
debugging/reporting reasons or for implementing various heuristics, that take
into account highly-changeable nature of some of those characteristics.
One such heuristic might involve more fine-grained control over poll/epoll
notifications about new data availability in ring buffer. Together with
``BPF_RB_NO_WAKEUP``/``BPF_RB_FORCE_WAKEUP`` flags for output/commit/discard
helpers, it allows BPF program a high degree of control and, e.g., more
efficient batched notifications. Default self-balancing strategy, though,
should be adequate for most applications and will work reliable and efficiently
already.
Design and Implementation
-------------------------
This reserve/commit schema allows a natural way for multiple producers, either
on different CPUs or even on the same CPU/in the same BPF program, to reserve
independent records and work with them without blocking other producers. This
means that if BPF program was interruped by another BPF program sharing the
same ring buffer, they will both get a record reserved (provided there is
enough space left) and can work with it and submit it independently. This
applies to NMI context as well, except that due to using a spinlock during
reservation, in NMI context, ``bpf_ringbuf_reserve()`` might fail to get
a lock, in which case reservation will fail even if ring buffer is not full.
The ring buffer itself internally is implemented as a power-of-2 sized
circular buffer, with two logical and ever-increasing counters (which might
wrap around on 32-bit architectures, that's not a problem):
- consumer counter shows up to which logical position consumer consumed the
data;
- producer counter denotes amount of data reserved by all producers.
Each time a record is reserved, producer that "owns" the record will
successfully advance producer counter. At that point, data is still not yet
ready to be consumed, though. Each record has 8 byte header, which contains the
length of reserved record, as well as two extra bits: busy bit to denote that
record is still being worked on, and discard bit, which might be set at commit
time if record is discarded. In the latter case, consumer is supposed to skip
the record and move on to the next one. Record header also encodes record's
relative offset from the beginning of ring buffer data area (in pages). This
allows ``bpf_ringbuf_commit()``/``bpf_ringbuf_discard()`` to accept only the
pointer to the record itself, without requiring also the pointer to ring buffer
itself. Ring buffer memory location will be restored from record metadata
header. This significantly simplifies verifier, as well as improving API
usability.
Producer counter increments are serialized under spinlock, so there is
a strict ordering between reservations. Commits, on the other hand, are
completely lockless and independent. All records become available to consumer
in the order of reservations, but only after all previous records where
already committed. It is thus possible for slow producers to temporarily hold
off submitted records, that were reserved later.
Reservation/commit/consumer protocol is verified by litmus tests in
Documentation/litmus_tests/bpf-rb/_.
One interesting implementation bit, that significantly simplifies (and thus
speeds up as well) implementation of both producers and consumers is how data
area is mapped twice contiguously back-to-back in the virtual memory. This
allows to not take any special measures for samples that have to wrap around
at the end of the circular buffer data area, because the next page after the
last data page would be first data page again, and thus the sample will still
appear completely contiguous in virtual memory. See comment and a simple ASCII
diagram showing this visually in ``bpf_ringbuf_area_alloc()``.
Another feature that distinguishes BPF ringbuf from perf ring buffer is
a self-pacing notifications of new data being availability.
``bpf_ringbuf_commit()`` implementation will send a notification of new record
being available after commit only if consumer has already caught up right up to
the record being committed. If not, consumer still has to catch up and thus
will see new data anyways without needing an extra poll notification.
Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbuf.c_) show that
this allows to achieve a very high throughput without having to resort to
tricks like "notify only every Nth sample", which are necessary with perf
buffer. For extreme cases, when BPF program wants more manual control of
notifications, commit/discard/output helpers accept ``BPF_RB_NO_WAKEUP`` and
``BPF_RB_FORCE_WAKEUP`` flags, which give full control over notifications of
data availability, but require extra caution and diligence in using this API.
...@@ -301,7 +301,8 @@ Helpers ...@@ -301,7 +301,8 @@ Helpers
.. kernel-doc:: tools/testing/selftests/kselftest_harness.h .. kernel-doc:: tools/testing/selftests/kselftest_harness.h
:functions: TH_LOG TEST TEST_SIGNAL FIXTURE FIXTURE_DATA FIXTURE_SETUP :functions: TH_LOG TEST TEST_SIGNAL FIXTURE FIXTURE_DATA FIXTURE_SETUP
FIXTURE_TEARDOWN TEST_F TEST_HARNESS_MAIN FIXTURE_TEARDOWN TEST_F TEST_HARNESS_MAIN FIXTURE_VARIANT
FIXTURE_VARIANT_ADD
Operators Operators
--------- ---------
......
Mediatek pericfg controller
===========================
The Mediatek pericfg controller provides various clocks and reset
outputs to the system.
Required Properties:
- compatible: Should be one of:
- "mediatek,mt2701-pericfg", "syscon"
- "mediatek,mt2712-pericfg", "syscon"
- "mediatek,mt7622-pericfg", "syscon"
- "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon"
- "mediatek,mt7629-pericfg", "syscon"
- "mediatek,mt8135-pericfg", "syscon"
- "mediatek,mt8173-pericfg", "syscon"
- "mediatek,mt8183-pericfg", "syscon"
- #clock-cells: Must be 1
- #reset-cells: Must be 1
The pericfg controller uses the common clk binding from
Documentation/devicetree/bindings/clock/clock-bindings.txt
The available clocks are defined in dt-bindings/clock/mt*-clk.h.
Also it uses the common reset controller binding from
Documentation/devicetree/bindings/reset/reset.txt.
The available reset outputs are defined in
dt-bindings/reset/mt*-resets.h
Example:
pericfg: power-controller@10003000 {
compatible = "mediatek,mt8173-pericfg", "syscon";
reg = <0 0x10003000 0 0x1000>;
#clock-cells = <1>;
#reset-cells = <1>;
};
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/arm/mediatek/mediatek,pericfg.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
title: MediaTek Peripheral Configuration Controller
maintainers:
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
description:
The Mediatek pericfg controller provides various clocks and reset outputs
to the system.
properties:
compatible:
oneOf:
- items:
- enum:
- mediatek,mt2701-pericfg
- mediatek,mt2712-pericfg
- mediatek,mt7622-pericfg
- mediatek,mt7629-pericfg
- mediatek,mt8135-pericfg
- mediatek,mt8173-pericfg
- mediatek,mt8183-pericfg
- mediatek,mt8516-pericfg
- const: syscon
- items:
# Special case for mt7623 for backward compatibility
- const: mediatek,mt7623-pericfg
- const: mediatek,mt2701-pericfg
- const: syscon
reg:
maxItems: 1
'#clock-cells':
const: 1
'#reset-cells':
const: 1
required:
- compatible
- reg
examples:
- |
pericfg@10003000 {
compatible = "mediatek,mt8173-pericfg", "syscon";
reg = <0x10003000 0x1000>;
#clock-cells = <1>;
#reset-cells = <1>;
};
- |
pericfg@10003000 {
compatible = "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon";
reg = <0x10003000 0x1000>;
#clock-cells = <1>;
#reset-cells = <1>;
};
...@@ -40,18 +40,22 @@ allOf: ...@@ -40,18 +40,22 @@ allOf:
then: then:
properties: properties:
clocks: clocks:
minItems: 3
maxItems: 4
items: items:
- description: GMAC main clock - description: GMAC main clock
- description: First parent clock of the internal mux - description: First parent clock of the internal mux
- description: Second parent clock of the internal mux - description: Second parent clock of the internal mux
- description: The clock which drives the timing adjustment logic
clock-names: clock-names:
minItems: 3 minItems: 3
maxItems: 3 maxItems: 4
items: items:
- const: stmmaceth - const: stmmaceth
- const: clkin0 - const: clkin0
- const: clkin1 - const: clkin1
- const: timing-adjustment
amlogic,tx-delay-ns: amlogic,tx-delay-ns:
$ref: /schemas/types.yaml#definitions/uint32 $ref: /schemas/types.yaml#definitions/uint32
...@@ -67,6 +71,19 @@ allOf: ...@@ -67,6 +71,19 @@ allOf:
PHY and MAC are adding a delay). PHY and MAC are adding a delay).
Any configuration is ignored when the phy-mode is set to "rmii". Any configuration is ignored when the phy-mode is set to "rmii".
amlogic,rx-delay-ns:
enum:
- 0
- 2
default: 0
description:
The internal RGMII RX clock delay (provided by this IP block) in
nanoseconds. When phy-mode is set to "rgmii" then the RX delay
should be explicitly configured. When the phy-mode is set to
either "rgmii-id" or "rgmii-rxid" the RX clock delay is already
provided by the PHY. Any configuration is ignored when the
phy-mode is set to "rmii".
properties: properties:
compatible: compatible:
additionalItems: true additionalItems: true
...@@ -107,7 +124,7 @@ examples: ...@@ -107,7 +124,7 @@ examples:
reg = <0xc9410000 0x10000>, <0xc8834540 0x8>; reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
interrupts = <8>; interrupts = <8>;
interrupt-names = "macirq"; interrupt-names = "macirq";
clocks = <&clk_eth>, <&clkc_fclk_div2>, <&clk_mpll2>; clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>;
clock-names = "stmmaceth", "clkin0", "clkin1"; clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment";
phy-mode = "rgmii"; phy-mode = "rgmii";
}; };
...@@ -81,7 +81,8 @@ properties: ...@@ -81,7 +81,8 @@ properties:
$ref: /schemas/types.yaml#definitions/flag $ref: /schemas/types.yaml#definitions/flag
description: description:
If set, indicates the PHY device does not correctly release If set, indicates the PHY device does not correctly release
the turn around line low at the end of a MDIO transaction. the turn around line low at end of the control phase of the
MDIO transaction.
enet-phy-lane-swap: enet-phy-lane-swap:
$ref: /schemas/types.yaml#definitions/flag $ref: /schemas/types.yaml#definitions/flag
......
...@@ -22,8 +22,11 @@ Optional properties: ...@@ -22,8 +22,11 @@ Optional properties:
- fsl,err006687-workaround-present: If present indicates that the system has - fsl,err006687-workaround-present: If present indicates that the system has
the hardware workaround for ERR006687 applied and does not need a software the hardware workaround for ERR006687 applied and does not need a software
workaround. workaround.
- gpr: phandle of SoC general purpose register mode. Required for wake on LAN - fsl,stop-mode: register bits of stop mode control, the format is
on some SoCs <&gpr req_gpr req_bit>.
gpr is the phandle to general purpose register node.
req_gpr is the gpr register offset for ENET stop request.
req_bit is the gpr bit offset for ENET stop request.
-interrupt-names: names of the interrupts listed in interrupts property in -interrupt-names: names of the interrupts listed in interrupts property in
the same order. The defaults if not specified are the same order. The defaults if not specified are
__Number of interrupts__ __Default__ __Number of interrupts__ __Default__
...@@ -82,6 +85,7 @@ ethernet@83fec000 { ...@@ -82,6 +85,7 @@ ethernet@83fec000 {
phy-supply = <&reg_fec_supply>; phy-supply = <&reg_fec_supply>;
phy-handle = <&ethphy>; phy-handle = <&ethphy>;
mdio { mdio {
clock-frequency = <5000000>;
ethphy: ethernet-phy@6 { ethphy: ethernet-phy@6 {
compatible = "ethernet-phy-ieee802.3-c22"; compatible = "ethernet-phy-ieee802.3-c22";
reg = <6>; reg = <6>;
......
IMX8 glue layer controller, NXP imx8 families support Synopsys MAC 5.10a IP.
This file documents platform glue layer for IMX.
Please see stmmac.txt for the other unchanged properties.
The device node has following properties.
Required properties:
- compatible: Should be "nxp,imx8mp-dwmac-eqos" to select glue layer
and "snps,dwmac-5.10a" to select IP version.
- clocks: Must contain a phandle for each entry in clock-names.
- clock-names: Should be "stmmaceth" for the host clock.
Should be "pclk" for the MAC apb clock.
Should be "ptp_ref" for the MAC timer clock.
Should be "tx" for the MAC RGMII TX clock:
Should be "mem" for EQOS MEM clock.
- "mem" clock is required for imx8dxl platform.
- "mem" clock is not required for imx8mp platform.
- interrupt-names: Should contain a list of interrupt names corresponding to
the interrupts in the interrupts property, if available.
Should be "macirq" for the main MAC IRQ
Should be "eth_wake_irq" for the IT which wake up system
- intf_mode: Should be phandle/offset pair. The phandle to the syscon node which
encompases the GPR register, and the offset of the GPR register.
- required for imx8mp platform.
- is optional for imx8dxl platform.
Optional properties:
- intf_mode: is optional for imx8dxl platform.
- snps,rmii_refclk_ext: to select RMII reference clock from external.
Example:
eqos: ethernet@30bf0000 {
compatible = "nxp,imx8mp-dwmac-eqos", "snps,dwmac-5.10a";
reg = <0x30bf0000 0x10000>;
interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "eth_wake_irq", "macirq";
clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>,
<&clk IMX8MP_CLK_QOS_ENET_ROOT>,
<&clk IMX8MP_CLK_ENET_QOS_TIMER>,
<&clk IMX8MP_CLK_ENET_QOS>;
clock-names = "stmmaceth", "pclk", "ptp_ref", "tx";
assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>,
<&clk IMX8MP_CLK_ENET_QOS_TIMER>,
<&clk IMX8MP_CLK_ENET_QOS>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>,
<&clk IMX8MP_SYS_PLL2_100M>,
<&clk IMX8MP_SYS_PLL2_125M>;
assigned-clock-rates = <0>, <100000000>, <125000000>;
nvmem-cells = <&eth_mac0>;
nvmem-cell-names = "mac-address";
nvmem_macaddr_swap;
intf_mode = <&gpr 0x4>;
status = "disabled";
};
...@@ -31,13 +31,25 @@ properties: ...@@ -31,13 +31,25 @@ properties:
maxItems: 1 maxItems: 1
description: description:
The phandle and specifier for the GPIO that controls the RESET The phandle and specifier for the GPIO that controls the RESET
lines of all PHYs on that MDIO bus. lines of all devices on that MDIO bus.
reset-delay-us: reset-delay-us:
description: description:
RESET pulse width in microseconds. It applies to all PHY devices RESET pulse width in microseconds. It applies to all MDIO devices
and must therefore be appropriately determined based on all PHY and must therefore be appropriately determined based on all devices
requirements (maximum value of all per-PHY RESET pulse widths). requirements (maximum value of all per-device RESET pulse widths).
clock-frequency:
description:
Desired MDIO bus clock frequency in Hz. Values greater than IEEE 802.3
defined 2.5MHz should only be used when all devices on the bus support
the given clock speed.
suppress-preamble:
description:
The 32 bit preamble should be suppressed. In order for this to
work, all devices on the bus must support suppressed preamble.
type: boolean
patternProperties: patternProperties:
"^ethernet-phy@[0-9a-f]+$": "^ethernet-phy@[0-9a-f]+$":
...@@ -48,7 +60,35 @@ patternProperties: ...@@ -48,7 +60,35 @@ patternProperties:
minimum: 0 minimum: 0
maximum: 31 maximum: 31
description: description:
The ID number for the PHY. The ID number for the device.
broken-turn-around:
$ref: /schemas/types.yaml#definitions/flag
description:
If set, indicates the MDIO device does not correctly release
the turn around line low at end of the control phase of the
MDIO transaction.
resets:
maxItems: 1
reset-names:
const: phy
reset-gpios:
maxItems: 1
description:
The GPIO phandle and specifier for the MDIO reset signal.
reset-assert-us:
description:
Delay after the reset was asserted in microseconds. If this
property is missing the delay will be skipped.
reset-deassert-us:
description:
Delay after the reset was deasserted in microseconds. If
this property is missing the delay will be skipped.
required: required:
- reg - reg
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/mediatek,star-emac.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: MediaTek STAR Ethernet MAC Controller
maintainers:
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
description:
This Ethernet MAC is used on the MT8* family of SoCs from MediaTek.
It's compliant with 802.3 standards and supports half- and full-duplex
modes with flow-control as well as CRC offloading and VLAN tags.
allOf:
- $ref: "ethernet-controller.yaml#"
properties:
compatible:
enum:
- mediatek,mt8516-eth
- mediatek,mt8518-eth
- mediatek,mt8175-eth
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
minItems: 3
maxItems: 3
clock-names:
additionalItems: false
items:
- const: core
- const: reg
- const: trans
mediatek,pericfg:
$ref: /schemas/types.yaml#definitions/phandle
description:
Phandle to the device containing the PERICFG register range. This is used
to control the MII mode.
mdio:
type: object
description:
Creates and registers an MDIO bus.
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
- mediatek,pericfg
- phy-handle
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/mt8516-clk.h>
ethernet: ethernet@11180000 {
compatible = "mediatek,mt8516-eth";
reg = <0x11180000 0x1000>;
mediatek,pericfg = <&pericfg>;
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>;
clocks = <&topckgen CLK_TOP_RG_ETH>,
<&topckgen CLK_TOP_66M_ETH>,
<&topckgen CLK_TOP_133M_ETH>;
clock-names = "core", "reg", "trans";
phy-handle = <&eth_phy>;
phy-mode = "rmii";
mdio {
#address-cells = <1>;
#size-cells = <0>;
eth_phy: ethernet-phy@0 {
reg = <0>;
};
};
};
# SPDX-License-Identifier: GPL-2.0+
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/nxp,tja11xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP TJA11xx PHY
maintainers:
- Andrew Lunn <andrew@lunn.ch>
- Florian Fainelli <f.fainelli@gmail.com>
- Heiner Kallweit <hkallweit1@gmail.com>
description:
Bindings for NXP TJA11xx automotive PHYs
allOf:
- $ref: ethernet-phy.yaml#
patternProperties:
"^ethernet-phy@[0-9a-f]+$":
type: object
description: |
Some packages have multiple PHYs. Secondary PHY should be defines as
subnode of the first (parent) PHY.
properties:
reg:
minimum: 0
maximum: 31
description:
The ID number for the child PHY. Should be +1 of parent PHY.
required:
- reg
examples:
- |
mdio {
#address-cells = <1>;
#size-cells = <0>;
tja1101_phy0: ethernet-phy@4 {
reg = <0x4>;
};
};
- |
mdio {
#address-cells = <1>;
#size-cells = <0>;
tja1102_phy0: ethernet-phy@4 {
reg = <0x4>;
#address-cells = <1>;
#size-cells = <0>;
tja1102_phy1: ethernet-phy@5 {
reg = <0x5>;
};
};
};
Required properties:
- compatible: Should be "qca,<soc>-eth". Currently support compatibles are:
qca,ar7100-eth - Atheros AR7100
qca,ar7240-eth - Atheros AR7240
qca,ar7241-eth - Atheros AR7241
qca,ar7242-eth - Atheros AR7242
qca,ar9130-eth - Atheros AR9130
qca,ar9330-eth - Atheros AR9330
qca,ar9340-eth - Atheros AR9340
qca,qca9530-eth - Qualcomm Atheros QCA9530
qca,qca9550-eth - Qualcomm Atheros QCA9550
qca,qca9560-eth - Qualcomm Atheros QCA9560
- reg : Address and length of the register set for the device
- interrupts : Should contain eth interrupt
- phy-mode : See ethernet.txt file in the same directory
- clocks: the clock used by the core
- clock-names: the names of the clock listed in the clocks property. These are
"eth" and "mdio".
- resets: Should contain phandles to the reset signals
- reset-names: Should contain the names of reset signal listed in the resets
property. These are "mac" and "mdio"
Optional properties:
- phy-handle : phandle to the PHY device connected to this device.
- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
Use instead of phy-handle.
Optional subnodes:
- mdio : specifies the mdio bus, used as a container for phy nodes
according to phy.txt in the same directory
Example:
ethernet@1a000000 {
compatible = "qca,ar9330-eth";
reg = <0x1a000000 0x200>;
interrupts = <5>;
resets = <&rst 13>, <&rst 23>;
reset-names = "mac", "mdio";
clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_MDIO>;
clock-names = "eth", "mdio";
phy-mode = "gmii";
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/qca,ar71xx.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: QCA AR71XX MAC
allOf:
- $ref: ethernet-controller.yaml#
maintainers:
- Oleksij Rempel <o.rempel@pengutronix.de>
properties:
compatible:
oneOf:
- items:
- enum:
- qca,ar7100-eth # Atheros AR7100
- qca,ar7240-eth # Atheros AR7240
- qca,ar7241-eth # Atheros AR7241
- qca,ar7242-eth # Atheros AR7242
- qca,ar9130-eth # Atheros AR9130
- qca,ar9330-eth # Atheros AR9330
- qca,ar9340-eth # Atheros AR9340
- qca,qca9530-eth # Qualcomm Atheros QCA9530
- qca,qca9550-eth # Qualcomm Atheros QCA9550
- qca,qca9560-eth # Qualcomm Atheros QCA9560
reg:
maxItems: 1
interrupts:
maxItems: 1
'#address-cells':
description: number of address cells for the MDIO bus
const: 1
'#size-cells':
description: number of size cells on the MDIO bus
const: 0
clocks:
items:
- description: MAC main clock
- description: MDIO clock
clock-names:
items:
- const: eth
- const: mdio
resets:
items:
- description: MAC reset
- description: MDIO reset
reset-names:
items:
- const: mac
- const: mdio
required:
- compatible
- reg
- interrupts
- phy-mode
- clocks
- clock-names
- resets
- reset-names
examples:
# Lager board
- |
eth0: ethernet@19000000 {
compatible = "qca,ar9330-eth";
reg = <0x19000000 0x200>;
interrupts = <4>;
resets = <&rst 9>, <&rst 22>;
reset-names = "mac", "mdio";
clocks = <&pll 1>, <&pll 2>;
clock-names = "eth", "mdio";
qca,ethcfg = <&ethcfg>;
phy-mode = "mii";
phy-handle = <&phy_port4>;
};
eth1: ethernet@1a000000 {
compatible = "qca,ar9330-eth";
reg = <0x1a000000 0x200>;
interrupts = <5>;
resets = <&rst 13>, <&rst 23>;
reset-names = "mac", "mdio";
clocks = <&pll 1>, <&pll 2>;
clock-names = "eth", "mdio";
phy-mode = "gmii";
status = "disabled";
fixed-link {
speed = <1000>;
full-duplex;
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
switch10: switch@10 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qca,ar9331-switch";
reg = <0x10>;
resets = <&rst 8>;
reset-names = "switch";
interrupt-parent = <&miscintc>;
interrupts = <12>;
interrupt-controller;
#interrupt-cells = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
switch_port0: port@0 {
reg = <0x0>;
label = "cpu";
ethernet = <&eth1>;
phy-mode = "gmii";
fixed-link {
speed = <1000>;
full-duplex;
};
};
switch_port1: port@1 {
reg = <0x1>;
phy-handle = <&phy_port0>;
phy-mode = "internal";
status = "disabled";
};
switch_port2: port@2 {
reg = <0x2>;
phy-handle = <&phy_port1>;
phy-mode = "internal";
status = "disabled";
};
switch_port3: port@3 {
reg = <0x3>;
phy-handle = <&phy_port2>;
phy-mode = "internal";
status = "disabled";
};
switch_port4: port@4 {
reg = <0x4>;
phy-handle = <&phy_port3>;
phy-mode = "internal";
status = "disabled";
};
};
mdio {
#address-cells = <1>;
#size-cells = <0>;
interrupt-parent = <&switch10>;
phy_port0: phy@0 {
reg = <0x0>;
interrupts = <0>;
status = "disabled";
};
phy_port1: phy@1 {
reg = <0x1>;
interrupts = <0>;
status = "disabled";
};
phy_port2: phy@2 {
reg = <0x2>;
interrupts = <0>;
status = "disabled";
};
phy_port3: phy@3 {
reg = <0x3>;
interrupts = <0>;
status = "disabled";
};
phy_port4: phy@4 {
reg = <0x4>;
interrupts = <0>;
status = "disabled";
};
};
};
};
};
...@@ -20,7 +20,10 @@ description: ...@@ -20,7 +20,10 @@ description:
The GSI is an integral part of the IPA, but it is logically isolated The GSI is an integral part of the IPA, but it is logically isolated
and has a distinct interrupt and a separately-defined address space. and has a distinct interrupt and a separately-defined address space.
See also soc/qcom/qcom,smp2p.txt and interconnect/interconnect.txt. See also soc/qcom/qcom,smp2p.txt and interconnect/interconnect.txt. See
iommu/iommu.txt and iommu/arm,smmu.yaml for more information about SMMU
bindings.
- | - |
-------- --------- -------- ---------
...@@ -54,6 +57,9 @@ properties: ...@@ -54,6 +57,9 @@ properties:
- const: ipa-shared - const: ipa-shared
- const: gsi - const: gsi
iommus:
maxItems: 1
clocks: clocks:
maxItems: 1 maxItems: 1
...@@ -126,6 +132,7 @@ properties: ...@@ -126,6 +132,7 @@ properties:
required: required:
- compatible - compatible
- iommus
- reg - reg
- clocks - clocks
- interrupts - interrupts
...@@ -164,6 +171,7 @@ examples: ...@@ -164,6 +171,7 @@ examples:
modem-init; modem-init;
modem-remoteproc = <&mss_pil>; modem-remoteproc = <&mss_pil>;
iommus = <&apps_smmu 0x720 0x3>;
reg = <0 0x1e40000 0 0x7000>, reg = <0 0x1e40000 0 0x7000>,
<0 0x1e47000 0 0x2000>, <0 0x1e47000 0 0x2000>,
<0 0x1e04000 0 0x2c000>; <0 0x1e04000 0 0x2c000>;
......
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/qcom,ipq4019-mdio.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Qualcomm IPQ40xx MDIO Controller Device Tree Bindings
maintainers:
- Robert Marko <robert.marko@sartura.hr>
allOf:
- $ref: "mdio.yaml#"
properties:
compatible:
const: qcom,ipq4019-mdio
"#address-cells":
const: 1
"#size-cells":
const: 0
reg:
maxItems: 1
required:
- compatible
- reg
- "#address-cells"
- "#size-cells"
examples:
- |
mdio@90000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "qcom,ipq4019-mdio";
reg = <0x90000 0x64>;
ethphy0: ethernet-phy@0 {
reg = <0>;
};
ethphy1: ethernet-phy@1 {
reg = <1>;
};
ethphy2: ethernet-phy@2 {
reg = <2>;
};
ethphy3: ethernet-phy@3 {
reg = <3>;
};
ethphy4: ethernet-phy@4 {
reg = <4>;
};
};
...@@ -10,9 +10,11 @@ device the slave device is attached to. ...@@ -10,9 +10,11 @@ device the slave device is attached to.
Required properties: Required properties:
- compatible: should contain one of the following: - compatible: should contain one of the following:
* "qcom,qca6174-bt" * "qcom,qca6174-bt"
* "qcom,qca9377-bt"
* "qcom,wcn3990-bt" * "qcom,wcn3990-bt"
* "qcom,wcn3991-bt" * "qcom,wcn3991-bt"
* "qcom,wcn3998-bt" * "qcom,wcn3998-bt"
* "qcom,qca6390-bt"
Optional properties for compatible string qcom,qca6174-bt: Optional properties for compatible string qcom,qca6174-bt:
...@@ -20,6 +22,10 @@ Optional properties for compatible string qcom,qca6174-bt: ...@@ -20,6 +22,10 @@ Optional properties for compatible string qcom,qca6174-bt:
- clocks: clock provided to the controller (SUSCLK_32KHZ) - clocks: clock provided to the controller (SUSCLK_32KHZ)
- firmware-name: specify the name of nvm firmware to load - firmware-name: specify the name of nvm firmware to load
Optional properties for compatible string qcom,qca9377-bt:
- max-speed: see Documentation/devicetree/bindings/serial/serial.yaml
Required properties for compatible string qcom,wcn399x-bt: Required properties for compatible string qcom,wcn399x-bt:
- vddio-supply: VDD_IO supply regulator handle. - vddio-supply: VDD_IO supply regulator handle.
......
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/realtek-bluetooth.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: RTL8723BS/RTL8723CS/RTL8822CS Bluetooth Device Tree Bindings
maintainers:
- Vasily Khoruzhick <anarsoul@gmail.com>
- Alistair Francis <alistair@alistair23.me>
description:
RTL8723CS/RTL8723CS/RTL8822CS is WiFi + BT chip. WiFi part is connected over
SDIO, while BT is connected over serial. It speaks H5 protocol with few
extra commands to upload firmware and change module speed.
properties:
compatible:
oneOf:
- const: "realtek,rtl8723bs-bt"
- const: "realtek,rtl8723cs-bt"
- const: "realtek,rtl8822cs-bt"
device-wake-gpios:
maxItems: 1
description: GPIO specifier, used to wakeup the BT module
enable-gpios:
maxItems: 1
description: GPIO specifier, used to enable the BT module
host-wake-gpios:
maxItems: 1
description: GPIO specifier, used to wakeup the host processor
required:
- compatible
examples:
- |
#include <dt-bindings/gpio/gpio.h>
uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
uart-has-rtscts = <1>;
bluetooth {
compatible = "realtek,rtl8723bs-bt";
device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
host-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
};
};
* Socionext AVE ethernet controller
This describes the devicetree bindings for AVE ethernet controller
implemented on Socionext UniPhier SoCs.
Required properties:
- compatible: Should be
- "socionext,uniphier-pro4-ave4" : for Pro4 SoC
- "socionext,uniphier-pxs2-ave4" : for PXs2 SoC
- "socionext,uniphier-ld11-ave4" : for LD11 SoC
- "socionext,uniphier-ld20-ave4" : for LD20 SoC
- "socionext,uniphier-pxs3-ave4" : for PXs3 SoC
- reg: Address where registers are mapped and size of region.
- interrupts: Should contain the MAC interrupt.
- phy-mode: See ethernet.txt in the same directory. Allow to choose
"rgmii", "rmii", "mii", or "internal" according to the PHY.
The acceptable mode is SoC-dependent.
- phy-handle: Should point to the external phy device.
See ethernet.txt file in the same directory.
- clocks: A phandle to the clock for the MAC.
For Pro4 SoC, that is "socionext,uniphier-pro4-ave4",
another MAC clock, GIO bus clock and PHY clock are also required.
- clock-names: Should contain
- "ether", "ether-gb", "gio", "ether-phy" for Pro4 SoC
- "ether" for others
- resets: A phandle to the reset control for the MAC. For Pro4 SoC,
GIO bus reset is also required.
- reset-names: Should contain
- "ether", "gio" for Pro4 SoC
- "ether" for others
- socionext,syscon-phy-mode: A phandle to syscon with one argument
that configures phy mode. The argument is the ID of MAC instance.
The MAC address will be determined using the optional properties
defined in ethernet.txt.
Required subnode:
- mdio: A container for child nodes representing phy nodes.
See phy.txt in the same directory.
Example:
ether: ethernet@65000000 {
compatible = "socionext,uniphier-ld20-ave4";
reg = <0x65000000 0x8500>;
interrupts = <0 66 4>;
phy-mode = "rgmii";
phy-handle = <&ethphy>;
clock-names = "ether";
clocks = <&sys_clk 6>;
reset-names = "ether";
resets = <&sys_rst 6>;
socionext,syscon-phy-mode = <&soc_glue 0>;
local-mac-address = [00 00 00 00 00 00];
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy: ethphy@1 {
reg = <1>;
};
};
};
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/socionext,uniphier-ave4.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Socionext AVE ethernet controller
maintainers:
- Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
description: |
This describes the devicetree bindings for AVE ethernet controller
implemented on Socionext UniPhier SoCs.
allOf:
- $ref: ethernet-controller.yaml#
properties:
compatible:
enum:
- socionext,uniphier-pro4-ave4
- socionext,uniphier-pxs2-ave4
- socionext,uniphier-ld11-ave4
- socionext,uniphier-ld20-ave4
- socionext,uniphier-pxs3-ave4
reg:
maxItems: 1
interrupts:
maxItems: 1
phy-mode: true
phy-handle: true
mac-address: true
local-mac-address: true
clocks:
minItems: 1
maxItems: 4
clock-names:
oneOf:
- items: # for Pro4
- const: gio
- const: ether
- const: ether-gb
- const: ether-phy
- const: ether # for others
resets:
minItems: 1
maxItems: 2
reset-names:
oneOf:
- items: # for Pro4
- const: gio
- const: ether
- const: ether # for others
socionext,syscon-phy-mode:
$ref: /schemas/types.yaml#definitions/phandle-array
description:
A phandle to syscon with one argument that configures phy mode.
The argument is the ID of MAC instance.
mdio:
$ref: mdio.yaml#
required:
- compatible
- reg
- interrupts
- phy-mode
- phy-handle
- clocks
- clock-names
- resets
- reset-names
- mdio
additionalProperties: false
examples:
- |
ether: ethernet@65000000 {
compatible = "socionext,uniphier-ld20-ave4";
reg = <0x65000000 0x8500>;
interrupts = <0 66 4>;
phy-mode = "rgmii";
phy-handle = <&ethphy>;
clock-names = "ether";
clocks = <&sys_clk 6>;
reset-names = "ether";
resets = <&sys_rst 6>;
socionext,syscon-phy-mode = <&soc_glue 0>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
ethphy: ethernet-phy@1 {
reg = <1>;
};
};
};
* Texas Instruments - dp83867 Giga bit ethernet phy
Required properties:
- reg - The ID number for the phy, usually a small integer
- ti,rx-internal-delay - RGMII Receive Clock Delay - see dt-bindings/net/ti-dp83867.h
for applicable values. Required only if interface type is
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_RXID
- ti,tx-internal-delay - RGMII Transmit Clock Delay - see dt-bindings/net/ti-dp83867.h
for applicable values. Required only if interface type is
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_TXID
Note: If the interface type is PHY_INTERFACE_MODE_RGMII the TX/RX clock delays
will be left at their default values, as set by the PHY's pin strapping.
The default strapping will use a delay of 2.00 ns. Thus
PHY_INTERFACE_MODE_RGMII, by default, does not behave as RGMII with no
internal delay, but as PHY_INTERFACE_MODE_RGMII_ID. The device tree
should use "rgmii-id" if internal delays are desired as this may be
changed in future to cause "rgmii" mode to disable delays.
Optional property:
- ti,min-output-impedance - MAC Interface Impedance control to set
the programmable output impedance to
minimum value (35 ohms).
- ti,max-output-impedance - MAC Interface Impedance control to set
the programmable output impedance to
maximum value (70 ohms).
- ti,dp83867-rxctrl-strap-quirk - This denotes the fact that the
board has RX_DV/RX_CTRL pin strapped in
mode 1 or 2. To ensure PHY operation,
there are specific actions that
software needs to take when this pin is
strapped in these modes. See data manual
for details.
- ti,clk-output-sel - Muxing option for CLK_OUT pin. See dt-bindings/net/ti-dp83867.h
for applicable values. The CLK_OUT pin can also
be disabled by this property. When omitted, the
PHY's default will be left as is.
- ti,sgmii-ref-clock-output-enable - This denotes which
SGMII configuration is used (4 or 6-wire modes).
Some MACs work with differential SGMII clock.
See data manual for details.
- ti,fifo-depth - Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h
for applicable values (deprecated)
-tx-fifo-depth - As defined in the ethernet-controller.yaml. Values for
the depth can be found in dt-bindings/net/ti-dp83867.h
-rx-fifo-depth - As defined in the ethernet-controller.yaml. Values for
the depth can be found in dt-bindings/net/ti-dp83867.h
Note: ti,min-output-impedance and ti,max-output-impedance are mutually
exclusive. When both properties are present ti,max-output-impedance
takes precedence.
Default child nodes are standard Ethernet PHY device
nodes as described in Documentation/devicetree/bindings/net/phy.txt
Example:
ethernet-phy@0 {
reg = <0>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
tx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
};
Datasheet can be found:
http://www.ti.com/product/DP83867IR/datasheet
# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
# Copyright (C) 2019 Texas Instruments Incorporated
%YAML 1.2
---
$id: "http://devicetree.org/schemas/net/ti,dp83867.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
title: TI DP83867 ethernet PHY
allOf:
- $ref: "ethernet-controller.yaml#"
maintainers:
- Dan Murphy <dmurphy@ti.com>
description: |
The DP83867 device is a robust, low power, fully featured Physical Layer
transceiver with integrated PMD sublayers to support 10BASE-Te, 100BASE-TX
and 1000BASE-T Ethernet protocols.
The DP83867 is designed for easy implementation of 10/100/1000 Mbps Ethernet
LANs. It interfaces directly to twisted pair media via an external
transformer. This device interfaces directly to the MAC layer through the
IEEE 802.3 Standard Media Independent Interface (MII), the IEEE 802.3 Gigabit
Media Independent Interface (GMII) or Reduced GMII (RGMII).
Specifications about the charger can be found at:
https://www.ti.com/lit/gpn/dp83867ir
properties:
reg:
maxItems: 1
ti,min-output-impedance:
type: boolean
description: |
MAC Interface Impedance control to set the programmable output impedance
to a minimum value (35 ohms).
ti,max-output-impedance:
type: boolean
description: |
MAC Interface Impedance control to set the programmable output impedance
to a maximum value (70 ohms).
Note: ti,min-output-impedance and ti,max-output-impedance are mutually
exclusive. When both properties are present ti,max-output-impedance
takes precedence.
tx-fifo-depth:
$ref: /schemas/types.yaml#definitions/uint32
description: |
Transmitt FIFO depth see dt-bindings/net/ti-dp83867.h for values
rx-fifo-depth:
$ref: /schemas/types.yaml#definitions/uint32
description: |
Receive FIFO depth see dt-bindings/net/ti-dp83867.h for values
ti,clk-output-sel:
$ref: /schemas/types.yaml#definitions/uint32
description: |
Muxing option for CLK_OUT pin. See dt-bindings/net/ti-dp83867.h
for applicable values. The CLK_OUT pin can also be disabled by this
property. When omitted, the PHY's default will be left as is.
ti,rx-internal-delay:
$ref: /schemas/types.yaml#definitions/uint32
description: |
RGMII Receive Clock Delay - see dt-bindings/net/ti-dp83867.h
for applicable values. Required only if interface type is
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_RXID.
ti,tx-internal-delay:
$ref: /schemas/types.yaml#definitions/uint32
description: |
RGMII Transmit Clock Delay - see dt-bindings/net/ti-dp83867.h
for applicable values. Required only if interface type is
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_TXID.
Note: If the interface type is PHY_INTERFACE_MODE_RGMII the TX/RX clock
delays will be left at their default values, as set by the PHY's pin
strapping. The default strapping will use a delay of 2.00 ns. Thus
PHY_INTERFACE_MODE_RGMII, by default, does not behave as RGMII with no
internal delay, but as PHY_INTERFACE_MODE_RGMII_ID. The device tree
should use "rgmii-id" if internal delays are desired as this may be
changed in future to cause "rgmii" mode to disable delays.
ti,dp83867-rxctrl-strap-quirk:
type: boolean
description: |
This denotes the fact that the board has RX_DV/RX_CTRL pin strapped in
mode 1 or 2. To ensure PHY operation, there are specific actions that
software needs to take when this pin is strapped in these modes.
See data manual for details.
ti,sgmii-ref-clock-output-enable:
type: boolean
description: |
This denotes which SGMII configuration is used (4 or 6-wire modes).
Some MACs work with differential SGMII clock. See data manual for details.
ti,fifo-depth:
deprecated: true
$ref: /schemas/types.yaml#definitions/uint32
description: |
Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h for applicable
values.
required:
- reg
examples:
- |
#include <dt-bindings/net/ti-dp83867.h>
mdio0 {
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@0 {
reg = <0>;
tx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
rx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
ti,max-output-impedance;
ti,clk-output-sel = <DP83867_CLK_O_SEL_CHN_A_RCLK>;
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
};
};
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
# Copyright (C) 2019 Texas Instruments Incorporated # Copyright (C) 2019 Texas Instruments Incorporated
%YAML 1.2 %YAML 1.2
--- ---
......
...@@ -144,6 +144,13 @@ patternProperties: ...@@ -144,6 +144,13 @@ patternProperties:
description: description:
CPSW MDIO bus. CPSW MDIO bus.
"^cpts@[0-9a-f]+":
type: object
allOf:
- $ref: "ti,k3-am654-cpts.yaml#"
description:
CPSW Common Platform Time Sync (CPTS) module.
required: required:
- compatible - compatible
- reg - reg
...@@ -164,6 +171,8 @@ examples: ...@@ -164,6 +171,8 @@ examples:
#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/pinctrl/k3.h>
#include <dt-bindings/soc/ti,sci_pm_domain.h> #include <dt-bindings/soc/ti,sci_pm_domain.h>
#include <dt-bindings/net/ti-dp83867.h> #include <dt-bindings/net/ti-dp83867.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
mcu_cpsw: ethernet@46000000 { mcu_cpsw: ethernet@46000000 {
compatible = "ti,am654-cpsw-nuss"; compatible = "ti,am654-cpsw-nuss";
...@@ -222,4 +231,15 @@ examples: ...@@ -222,4 +231,15 @@ examples:
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
}; };
}; };
cpts@3d000 {
compatible = "ti,am65-cpts";
reg = <0x0 0x3d000 0x0 0x400>;
clocks = <&k3_clks 18 2>;
clock-names = "cpts";
interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "cpts";
ti,cpts-ext-ts-inputs = <4>;
ti,cpts-periodic-outputs = <2>;
};
}; };
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/ti,k3-am654-cpts.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: The TI AM654x/J721E Common Platform Time Sync (CPTS) module Device Tree Bindings
maintainers:
- Grygorii Strashko <grygorii.strashko@ti.com>
- Sekhar Nori <nsekhar@ti.com>
description: |+
The TI AM654x/J721E CPTS module is used to facilitate host control of time
sync operations.
Main features of CPTS module are
- selection of multiple external clock sources
- Software control of time sync events via interrupt or polling
- 64-bit timestamp mode in ns with PPM and nudge adjustment.
- hardware timestamp push inputs (HWx_TS_PUSH)
- timestamp counter compare output (TS_COMP)
- timestamp counter bit output (TS_SYNC)
- periodic Generator function outputs (TS_GENFx)
- Ethernet Enhanced Scheduled Traffic Operations (CPTS_ESTFn) (TSN)
- external hardware timestamp push inputs (HWx_TS_PUSH) timestamping
Depending on integration it enables compliance with the IEEE 1588-2008
standard for a precision clock synchronization protocol, Ethernet Enhanced
Scheduled Traffic Operations (CPTS_ESTFn) and PCIe Subsystem Precision Time
Measurement (PTM).
TI AM654x/J721E SoCs has several similar CPTS modules integrated into the
different parts of the system which could be synchronized with each other
- Main CPTS
- MCU CPSW CPTS with IEEE 1588-2008 support
- PCIe subsystem CPTS for PTM support
Depending on CPTS module integration and when CPTS is integral part of
another module (MCU CPSW for example) "compatible" and "reg" can
be omitted - parent module is fully responsible for CPTS enabling and
configuration.
properties:
$nodename:
pattern: "^cpts@[0-9a-f]+$"
compatible:
oneOf:
- const: ti,am65-cpts
- const: ti,j721e-cpts
reg:
maxItems: 1
description:
The physical base address and size of CPTS IO range
reg-names:
items:
- const: cpts
clocks:
description: CPTS reference clock
clock-names:
items:
- const: cpts
interrupts:
items:
- description: CPTS events interrupt
interrupt-names:
items:
- const: cpts
ti,cpts-ext-ts-inputs:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
maximum: 8
description:
Number of hardware timestamp push inputs (HWx_TS_PUSH)
ti,cpts-periodic-outputs:
allOf:
- $ref: /schemas/types.yaml#/definitions/uint32
maximum: 8
description:
Number of timestamp Generator function outputs (TS_GENFx)
refclk-mux:
type: object
description: CPTS reference clock multiplexer clock
properties:
'#clock-cells':
const: 0
clocks:
maxItems: 8
assigned-clocks:
maxItems: 1
assigned-clocks-parents:
maxItems: 1
required:
- clocks
required:
- compatible
- reg
- clocks
- clock-names
- interrupts
- interrupt-names
additionalProperties: false
examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
cpts@310d0000 {
compatible = "ti,am65-cpts";
reg = <0x0 0x310d0000 0x0 0x400>;
reg-names = "cpts";
clocks = <&main_cpts_mux>;
clock-names = "cpts";
interrupts-extended = <&k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "cpts";
ti,cpts-periodic-outputs = <6>;
ti,cpts-ext-ts-inputs = <8>;
main_cpts_mux: refclk-mux {
#clock-cells = <0>;
clocks = <&k3_clks 118 5>, <&k3_clks 118 11>,
<&k3_clks 157 91>, <&k3_clks 157 77>,
<&k3_clks 157 102>, <&k3_clks 157 80>,
<&k3_clks 120 3>, <&k3_clks 121 3>;
assigned-clocks = <&main_cpts_mux>;
assigned-clock-parents = <&k3_clks 118 11>;
};
};
...@@ -25,6 +25,9 @@ Optional properties: ...@@ -25,6 +25,9 @@ Optional properties:
- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data - mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data
- big-endian: if the radio eeprom partition is written in big-endian, specify - big-endian: if the radio eeprom partition is written in big-endian, specify
this property this property
- mediatek,eeprom-merge-otp: Merge EEPROM data with OTP data. Can be used on
boards where the flash calibration data is generic and specific calibration
data should be pulled from the OTP ROM
The MAC address can as well be set with corresponding optional properties The MAC address can as well be set with corresponding optional properties
defined in net/ethernet.txt. defined in net/ethernet.txt.
......
...@@ -96,6 +96,17 @@ Optional properties: ...@@ -96,6 +96,17 @@ Optional properties:
- qcom,coexist-gpio-pin : gpio pin number information to support coex - qcom,coexist-gpio-pin : gpio pin number information to support coex
which will be used by wifi firmware. which will be used by wifi firmware.
* Subnodes
The ath10k wifi node can contain one optional firmware subnode.
Firmware subnode is needed when the platform does not have TustZone.
The firmware subnode must have:
- iommus:
Usage: required
Value type: <prop-encoded-array>
Definition: A list of phandle and IOMMU specifier pairs.
Example (to supply PCI based wifi block details): Example (to supply PCI based wifi block details):
In this example, the node is defined as child node of the PCI controller. In this example, the node is defined as child node of the PCI controller.
...@@ -196,4 +207,7 @@ wifi@18000000 { ...@@ -196,4 +207,7 @@ wifi@18000000 {
memory-region = <&wifi_msa_mem>; memory-region = <&wifi_msa_mem>;
iommus = <&apps_smmu 0x0040 0x1>; iommus = <&apps_smmu 0x0040 0x1>;
qcom,msa-fixed-perm; qcom,msa-fixed-perm;
wifi-firmware {
iommus = <&apps_iommu 0xc22 0x1>;
};
}; };
...@@ -372,6 +372,11 @@ MUX ...@@ -372,6 +372,11 @@ MUX
devm_mux_chip_register() devm_mux_chip_register()
devm_mux_control_get() devm_mux_control_get()
NET
devm_alloc_etherdev()
devm_alloc_etherdev_mqs()
devm_register_netdev()
PER-CPU MEM PER-CPU MEM
devm_alloc_percpu() devm_alloc_percpu()
devm_free_percpu() devm_free_percpu()
......
...@@ -70,7 +70,7 @@ list of volume location server IP addresses:: ...@@ -70,7 +70,7 @@ list of volume location server IP addresses::
The first module is the AF_RXRPC network protocol driver. This provides the The first module is the AF_RXRPC network protocol driver. This provides the
RxRPC remote operation protocol and may also be accessed from userspace. See: RxRPC remote operation protocol and may also be accessed from userspace. See:
Documentation/networking/rxrpc.txt Documentation/networking/rxrpc.rst
The second module is the kerberos RxRPC security driver, and the third module The second module is the kerberos RxRPC security driver, and the third module
is the actual filesystem driver for the AFS filesystem. is the actual filesystem driver for the AFS filesystem.
......
.. SPDX-License-Identifier: GPL-2.0-only
Broadcom BCM54140 Quad SGMII/QSGMII PHY
=======================================
Supported chips:
* Broadcom BCM54140
Datasheet: not public
Author: Michael Walle <michael@walle.cc>
Description
-----------
The Broadcom BCM54140 is a Quad SGMII/QSGMII PHY which supports monitoring
its die temperature as well as two analog voltages.
The AVDDL is a 1.0V analogue voltage, the AVDDH is a 3.3V analogue voltage.
Both voltages and the temperature are measured in a round-robin fashion.
Sysfs entries
-------------
The following attributes are supported.
======================= ========================================================
in0_label "AVDDL"
in0_input Measured AVDDL voltage.
in0_min Minimum AVDDL voltage.
in0_max Maximum AVDDL voltage.
in0_alarm AVDDL voltage alarm.
in1_label "AVDDH"
in1_input Measured AVDDH voltage.
in1_min Minimum AVDDH voltage.
in1_max Maximum AVDDH voltage.
in1_alarm AVDDH voltage alarm.
temp1_input Die temperature.
temp1_min Minimum die temperature.
temp1_max Maximum die temperature.
temp1_alarm Die temperature alarm.
======================= ========================================================
...@@ -43,6 +43,7 @@ Hardware Monitoring Kernel Drivers ...@@ -43,6 +43,7 @@ Hardware Monitoring Kernel Drivers
asb100 asb100
asc7621 asc7621
aspeed-pwm-tacho aspeed-pwm-tacho
bcm54140
bel-pfe bel-pfe
bt1-pvt bt1-pvt
coretemp coretemp
......
.. SPDX-License-Identifier: GPL-2.0
==============
6pack Protocol
==============
This is the 6pack-mini-HOWTO, written by This is the 6pack-mini-HOWTO, written by
Andreas Könsgen DG3KQ Andreas Könsgen DG3KQ
Internet: ajk@comnets.uni-bremen.de
AMPR-net: dg3kq@db0pra.ampr.org :Internet: ajk@comnets.uni-bremen.de
AX.25: dg3kq@db0ach.#nrw.deu.eu :AMPR-net: dg3kq@db0pra.ampr.org
:AX.25: dg3kq@db0ach.#nrw.deu.eu
Last update: April 7, 1998 Last update: April 7, 1998
1. What is 6pack, and what are the advantages to KISS? 1. What is 6pack, and what are the advantages to KISS?
======================================================
6pack is a transmission protocol for data exchange between the PC and 6pack is a transmission protocol for data exchange between the PC and
the TNC over a serial line. It can be used as an alternative to KISS. the TNC over a serial line. It can be used as an alternative to KISS.
6pack has two major advantages: 6pack has two major advantages:
- The PC is given full control over the radio - The PC is given full control over the radio
channel. Special control data is exchanged between the PC and the TNC so channel. Special control data is exchanged between the PC and the TNC so
that the PC knows at any time if the TNC is receiving data, if a TNC that the PC knows at any time if the TNC is receiving data, if a TNC
buffer underrun or overrun has occurred, if the PTT is buffer underrun or overrun has occurred, if the PTT is
set and so on. This control data is processed at a higher priority than set and so on. This control data is processed at a higher priority than
normal data, so a data stream can be interrupted at any time to issue an normal data, so a data stream can be interrupted at any time to issue an
important event. This helps to improve the channel access and timing important event. This helps to improve the channel access and timing
algorithms as everything is computed in the PC. It would even be possible algorithms as everything is computed in the PC. It would even be possible
to experiment with something completely different from the known CSMA and to experiment with something completely different from the known CSMA and
DAMA channel access methods. DAMA channel access methods.
This kind of real-time control is especially important to supply several This kind of real-time control is especially important to supply several
TNCs that are connected between each other and the PC by a daisy chain TNCs that are connected between each other and the PC by a daisy chain
...@@ -36,6 +45,7 @@ More details about 6pack are described in the file 6pack.ps that is located ...@@ -36,6 +45,7 @@ More details about 6pack are described in the file 6pack.ps that is located
in the doc directory of the AX.25 utilities package. in the doc directory of the AX.25 utilities package.
2. Who has developed the 6pack protocol? 2. Who has developed the 6pack protocol?
========================================
The 6pack protocol has been developed by Ekki Plicht DF4OR, Henning Rech The 6pack protocol has been developed by Ekki Plicht DF4OR, Henning Rech
DF9IC and Gunter Jost DK7WJ. A driver for 6pack, written by Gunter Jost and DF9IC and Gunter Jost DK7WJ. A driver for 6pack, written by Gunter Jost and
...@@ -44,12 +54,14 @@ They have also written a firmware for TNCs to perform the 6pack ...@@ -44,12 +54,14 @@ They have also written a firmware for TNCs to perform the 6pack
protocol (see section 4 below). protocol (see section 4 below).
3. Where can I get the latest version of 6pack for LinuX? 3. Where can I get the latest version of 6pack for LinuX?
=========================================================
At the moment, the 6pack stuff can obtained via anonymous ftp from At the moment, the 6pack stuff can obtained via anonymous ftp from
db0bm.automation.fh-aachen.de. In the directory /incoming/dg3kq, db0bm.automation.fh-aachen.de. In the directory /incoming/dg3kq,
there is a file named 6pack.tgz. there is a file named 6pack.tgz.
4. Preparing the TNC for 6pack operation 4. Preparing the TNC for 6pack operation
========================================
To be able to use 6pack, a special firmware for the TNC is needed. The EPROM To be able to use 6pack, a special firmware for the TNC is needed. The EPROM
of a newly bought TNC does not contain 6pack, so you will have to of a newly bought TNC does not contain 6pack, so you will have to
...@@ -75,12 +87,14 @@ and the status LED are lit for about a second if the firmware initialises ...@@ -75,12 +87,14 @@ and the status LED are lit for about a second if the firmware initialises
the TNC correctly. the TNC correctly.
5. Building and installing the 6pack driver 5. Building and installing the 6pack driver
===========================================
The driver has been tested with kernel version 2.1.90. Use with older The driver has been tested with kernel version 2.1.90. Use with older
kernels may lead to a compilation error because the interface to a kernel kernels may lead to a compilation error because the interface to a kernel
function has been changed in the 2.1.8x kernels. function has been changed in the 2.1.8x kernels.
How to turn on 6pack support: How to turn on 6pack support:
=============================
- In the linux kernel configuration program, select the code maturity level - In the linux kernel configuration program, select the code maturity level
options menu and turn on the prompting for development drivers. options menu and turn on the prompting for development drivers.
...@@ -94,27 +108,28 @@ To use the driver, the kissattach program delivered with the AX.25 utilities ...@@ -94,27 +108,28 @@ To use the driver, the kissattach program delivered with the AX.25 utilities
has to be modified. has to be modified.
- Do a cd to the directory that holds the kissattach sources. Edit the - Do a cd to the directory that holds the kissattach sources. Edit the
kissattach.c file. At the top, insert the following lines: kissattach.c file. At the top, insert the following lines::
#ifndef N_6PACK
#define N_6PACK (N_AX25+1)
#endif
#ifndef N_6PACK Then find the line:
#define N_6PACK (N_AX25+1)
#endif
Then find the line int disc = N_AX25;
int disc = N_AX25;
and replace N_AX25 by N_6PACK. and replace N_AX25 by N_6PACK.
- Recompile kissattach. Rename it to spattach to avoid confusions. - Recompile kissattach. Rename it to spattach to avoid confusions.
Installing the driver: Installing the driver:
----------------------
- Do an insmod 6pack. Look at your /var/log/messages file to check if the - Do an insmod 6pack. Look at your /var/log/messages file to check if the
module has printed its initialization message. module has printed its initialization message.
- Do a spattach as you would launch kissattach when starting a KISS port. - Do a spattach as you would launch kissattach when starting a KISS port.
Check if the kernel prints the message '6pack: TNC found'. Check if the kernel prints the message '6pack: TNC found'.
- From here, everything should work as if you were setting up a KISS port. - From here, everything should work as if you were setting up a KISS port.
The only difference is that the network device that represents The only difference is that the network device that represents
...@@ -138,6 +153,7 @@ from the PC to the TNC over the serial line, the status LED if data is ...@@ -138,6 +153,7 @@ from the PC to the TNC over the serial line, the status LED if data is
sent to the PC. sent to the PC.
6. Known problems 6. Known problems
=================
When testing the driver with 2.0.3x kernels and When testing the driver with 2.0.3x kernels and
operating with data rates on the radio channel of 9600 Baud or higher, operating with data rates on the radio channel of 9600 Baud or higher,
......
Altera Triple-Speed Ethernet MAC driver .. SPDX-License-Identifier: GPL-2.0
Copyright (C) 2008-2014 Altera Corporation .. include:: <isonum.txt>
=======================================
Altera Triple-Speed Ethernet MAC driver
=======================================
Copyright |copy| 2008-2014 Altera Corporation
This is the driver for the Altera Triple-Speed Ethernet (TSE) controllers This is the driver for the Altera Triple-Speed Ethernet (TSE) controllers
using the SGDMA and MSGDMA soft DMA IP components. The driver uses the using the SGDMA and MSGDMA soft DMA IP components. The driver uses the
...@@ -46,23 +52,33 @@ Jumbo frames are not supported at this time. ...@@ -46,23 +52,33 @@ Jumbo frames are not supported at this time.
The driver limits PHY operations to 10/100Mbps, and has not yet been fully The driver limits PHY operations to 10/100Mbps, and has not yet been fully
tested for 1Gbps. This support will be added in a future maintenance update. tested for 1Gbps. This support will be added in a future maintenance update.
1) Kernel Configuration 1. Kernel Configuration
=======================
The kernel configuration option is ALTERA_TSE: The kernel configuration option is ALTERA_TSE:
Device Drivers ---> Network device support ---> Ethernet driver support ---> Device Drivers ---> Network device support ---> Ethernet driver support --->
Altera Triple-Speed Ethernet MAC support (ALTERA_TSE) Altera Triple-Speed Ethernet MAC support (ALTERA_TSE)
2) Driver parameters list: 2. Driver parameters list
debug: message level (0: no output, 16: all); =========================
dma_rx_num: Number of descriptors in the RX list (default is 64);
dma_tx_num: Number of descriptors in the TX list (default is 64). - debug: message level (0: no output, 16: all);
- dma_rx_num: Number of descriptors in the RX list (default is 64);
- dma_tx_num: Number of descriptors in the TX list (default is 64).
3. Command line options
=======================
Driver parameters can be also passed in command line by using::
3) Command line options
Driver parameters can be also passed in command line by using:
altera_tse=dma_rx_num:128,dma_tx_num:512 altera_tse=dma_rx_num:128,dma_tx_num:512
4) Driver information and notes 4. Driver information and notes
===============================
4.1) Transmit process 4.1. Transmit process
---------------------
When the driver's transmit routine is called by the kernel, it sets up a When the driver's transmit routine is called by the kernel, it sets up a
transmit descriptor by calling the underlying DMA transmit routine (SGDMA or transmit descriptor by calling the underlying DMA transmit routine (SGDMA or
MSGDMA), and initiates a transmit operation. Once the transmit is complete, an MSGDMA), and initiates a transmit operation. Once the transmit is complete, an
...@@ -70,7 +86,8 @@ interrupt is driven by the transmit DMA logic. The driver handles the transmit ...@@ -70,7 +86,8 @@ interrupt is driven by the transmit DMA logic. The driver handles the transmit
completion in the context of the interrupt handling chain by recycling completion in the context of the interrupt handling chain by recycling
resource required to send and track the requested transmit operation. resource required to send and track the requested transmit operation.
4.2) Receive process 4.2. Receive process
--------------------
The driver will post receive buffers to the receive DMA logic during driver The driver will post receive buffers to the receive DMA logic during driver
initialization. Receive buffers may or may not be queued depending upon the initialization. Receive buffers may or may not be queued depending upon the
underlying DMA logic (MSGDMA is able queue receive buffers, SGDMA is not able underlying DMA logic (MSGDMA is able queue receive buffers, SGDMA is not able
...@@ -79,34 +96,39 @@ received, the DMA logic generates an interrupt. The driver handles a receive ...@@ -79,34 +96,39 @@ received, the DMA logic generates an interrupt. The driver handles a receive
interrupt by obtaining the DMA receive logic status, reaping receive interrupt by obtaining the DMA receive logic status, reaping receive
completions until no more receive completions are available. completions until no more receive completions are available.
4.3) Interrupt Mitigation 4.3. Interrupt Mitigation
-------------------------
The driver is able to mitigate the number of its DMA interrupts The driver is able to mitigate the number of its DMA interrupts
using NAPI for receive operations. Interrupt mitigation is not yet supported using NAPI for receive operations. Interrupt mitigation is not yet supported
for transmit operations, but will be added in a future maintenance release. for transmit operations, but will be added in a future maintenance release.
4.4) Ethtool support 4.4) Ethtool support
--------------------
Ethtool is supported. Driver statistics and internal errors can be taken using: Ethtool is supported. Driver statistics and internal errors can be taken using:
ethtool -S ethX command. It is possible to dump registers etc. ethtool -S ethX command. It is possible to dump registers etc.
4.5) PHY Support 4.5) PHY Support
----------------
The driver is compatible with PAL to work with PHY and GPHY devices. The driver is compatible with PAL to work with PHY and GPHY devices.
4.7) List of source files: 4.7) List of source files:
o Kconfig --------------------------
o Makefile - Kconfig
o altera_tse_main.c: main network device driver - Makefile
o altera_tse_ethtool.c: ethtool support - altera_tse_main.c: main network device driver
o altera_tse.h: private driver structure and common definitions - altera_tse_ethtool.c: ethtool support
o altera_msgdma.h: MSGDMA implementation function definitions - altera_tse.h: private driver structure and common definitions
o altera_sgdma.h: SGDMA implementation function definitions - altera_msgdma.h: MSGDMA implementation function definitions
o altera_msgdma.c: MSGDMA implementation - altera_sgdma.h: SGDMA implementation function definitions
o altera_sgdma.c: SGDMA implementation - altera_msgdma.c: MSGDMA implementation
o altera_sgdmahw.h: SGDMA register and descriptor definitions - altera_sgdma.c: SGDMA implementation
o altera_msgdmahw.h: MSGDMA register and descriptor definitions - altera_sgdmahw.h: SGDMA register and descriptor definitions
o altera_utils.c: Driver utility functions - altera_msgdmahw.h: MSGDMA register and descriptor definitions
o altera_utils.h: Driver utility function definitions - altera_utils.c: Driver utility functions
- altera_utils.h: Driver utility function definitions
5) Debug Information
5. Debug Information
====================
The driver exports debug information such as internal statistics, The driver exports debug information such as internal statistics,
debug information, MAC and DMA registers etc. debug information, MAC and DMA registers etc.
...@@ -118,17 +140,18 @@ or sees the MAC registers: e.g. using: ethtool -d ethX ...@@ -118,17 +140,18 @@ or sees the MAC registers: e.g. using: ethtool -d ethX
The developer can also use the "debug" module parameter to get The developer can also use the "debug" module parameter to get
further debug information. further debug information.
6) Statistics Support 6. Statistics Support
=====================
The controller and driver support a mix of IEEE standard defined statistics, The controller and driver support a mix of IEEE standard defined statistics,
RFC defined statistics, and driver or Altera defined statistics. The four RFC defined statistics, and driver or Altera defined statistics. The four
specifications containing the standard definitions for these statistics are specifications containing the standard definitions for these statistics are
as follows: as follows:
o IEEE 802.3-2012 - IEEE Standard for Ethernet. - IEEE 802.3-2012 - IEEE Standard for Ethernet.
o RFC 2863 found at http://www.rfc-editor.org/rfc/rfc2863.txt. - RFC 2863 found at http://www.rfc-editor.org/rfc/rfc2863.txt.
o RFC 2819 found at http://www.rfc-editor.org/rfc/rfc2819.txt. - RFC 2819 found at http://www.rfc-editor.org/rfc/rfc2819.txt.
o Altera Triple Speed Ethernet User Guide, found at http://www.altera.com - Altera Triple Speed Ethernet User Guide, found at http://www.altera.com
The statistics supported by the TSE and the device driver are as follows: The statistics supported by the TSE and the device driver are as follows:
......
.. SPDX-License-Identifier: GPL-2.0
===
ATM
===
In order to use anything but the most primitive functions of ATM, In order to use anything but the most primitive functions of ATM,
several user-mode programs are required to assist the kernel. These several user-mode programs are required to assist the kernel. These
programs and related material can be found via the ATM on Linux Web programs and related material can be found via the ATM on Linux Web
......
.. SPDX-License-Identifier: GPL-2.0
=====
AX.25
=====
To use the amateur radio protocols within Linux you will need to get a To use the amateur radio protocols within Linux you will need to get a
suitable copy of the AX.25 Utilities. More detailed information about suitable copy of the AX.25 Utilities. More detailed information about
AX.25, NET/ROM and ROSE, associated programs and and utilities can be AX.25, NET/ROM and ROSE, associated programs and and utilities can be
......
LINUX DRIVERS FOR BAYCOM MODEMS .. SPDX-License-Identifier: GPL-2.0
Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch> ===============================
Linux Drivers for Baycom Modems
===============================
!!NEW!! (04/98) The drivers for the baycom modems have been split into Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch>
The drivers for the baycom modems have been split into
separate drivers as they did not share any code, and the driver separate drivers as they did not share any code, and the driver
and device names have changed. and device names have changed.
This document describes the Linux Kernel Drivers for simple Baycom style This document describes the Linux Kernel Drivers for simple Baycom style
amateur radio modems. amateur radio modems.
The following drivers are available: The following drivers are available:
====================================
baycom_ser_fdx: baycom_ser_fdx:
This driver supports the SER12 modems either full or half duplex. This driver supports the SER12 modems either full or half duplex.
Its baud rate may be changed via the `baud' module parameter, Its baud rate may be changed via the ``baud`` module parameter,
therefore it supports just about every bit bang modem on a therefore it supports just about every bit bang modem on a
serial port. Its devices are called bcsf0 through bcsf3. serial port. Its devices are called bcsf0 through bcsf3.
This is the recommended driver for SER12 type modems, This is the recommended driver for SER12 type modems,
however if you have a broken UART clone that does not have working however if you have a broken UART clone that does not have working
delta status bits, you may try baycom_ser_hdx. delta status bits, you may try baycom_ser_hdx.
baycom_ser_hdx: baycom_ser_hdx:
This is an alternative driver for SER12 type modems. This is an alternative driver for SER12 type modems.
It only supports half duplex, and only 1200 baud. Its devices It only supports half duplex, and only 1200 baud. Its devices
are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx are called bcsh0 through bcsh3. Use this driver only if baycom_ser_fdx
...@@ -37,45 +42,48 @@ baycom_epp: ...@@ -37,45 +42,48 @@ baycom_epp:
The following modems are supported: The following modems are supported:
ser12: This is a very simple 1200 baud AFSK modem. The modem consists only ======= ========================================================================
of a modulator/demodulator chip, usually a TI TCM3105. The computer ser12 This is a very simple 1200 baud AFSK modem. The modem consists only
is responsible for regenerating the receiver bit clock, as well as of a modulator/demodulator chip, usually a TI TCM3105. The computer
for handling the HDLC protocol. The modem connects to a serial port, is responsible for regenerating the receiver bit clock, as well as
hence the name. Since the serial port is not used as an async serial for handling the HDLC protocol. The modem connects to a serial port,
port, the kernel driver for serial ports cannot be used, and this hence the name. Since the serial port is not used as an async serial
driver only supports standard serial hardware (8250, 16450, 16550) port, the kernel driver for serial ports cannot be used, and this
driver only supports standard serial hardware (8250, 16450, 16550)
par96: This is a modem for 9600 baud FSK compatible to the G3RUH standard.
The modem does all the filtering and regenerates the receiver clock. par96 This is a modem for 9600 baud FSK compatible to the G3RUH standard.
Data is transferred from and to the PC via a shift register. The modem does all the filtering and regenerates the receiver clock.
The shift register is filled with 16 bits and an interrupt is signalled. Data is transferred from and to the PC via a shift register.
The PC then empties the shift register in a burst. This modem connects The shift register is filled with 16 bits and an interrupt is signalled.
to the parallel port, hence the name. The modem leaves the The PC then empties the shift register in a burst. This modem connects
implementation of the HDLC protocol and the scrambler polynomial to to the parallel port, hence the name. The modem leaves the
the PC. implementation of the HDLC protocol and the scrambler polynomial to
the PC.
picpar: This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
is protocol compatible to par96, but uses only three low power ICs picpar This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
and can therefore be fed from the parallel port and does not require is protocol compatible to par96, but uses only three low power ICs
an additional power supply. Furthermore, it incorporates a carrier and can therefore be fed from the parallel port and does not require
detect circuitry. an additional power supply. Furthermore, it incorporates a carrier
detect circuitry.
EPP: This is a high-speed modem adaptor that connects to an enhanced parallel port.
Its target audience is users working over a high speed hub (76.8kbit/s). EPP This is a high-speed modem adaptor that connects to an enhanced parallel
port.
eppfpga: This is a redesign of the EPP adaptor.
Its target audience is users working over a high speed hub (76.8kbit/s).
eppfpga This is a redesign of the EPP adaptor.
======= ========================================================================
All of the above modems only support half duplex communications. However, All of the above modems only support half duplex communications. However,
the driver supports the KISS (see below) fullduplex command. It then simply the driver supports the KISS (see below) fullduplex command. It then simply
starts to send as soon as there's a packet to transmit and does not care starts to send as soon as there's a packet to transmit and does not care
about DCD, i.e. it starts to send even if there's someone else on the channel. about DCD, i.e. it starts to send even if there's someone else on the channel.
This command is required by some implementations of the DAMA channel This command is required by some implementations of the DAMA channel
access protocol. access protocol.
The Interface of the drivers The Interface of the drivers
============================
Unlike previous drivers, these drivers are no longer character devices, Unlike previous drivers, these drivers are no longer character devices,
but they are now true kernel network interfaces. Installation is therefore but they are now true kernel network interfaces. Installation is therefore
...@@ -88,20 +96,22 @@ me for WAMPES which allows attaching a kernel network interface directly. ...@@ -88,20 +96,22 @@ me for WAMPES which allows attaching a kernel network interface directly.
Configuring the driver Configuring the driver
======================
Every time a driver is inserted into the kernel, it has to know which Every time a driver is inserted into the kernel, it has to know which
modems it should access at which ports. This can be done with the setbaycom modems it should access at which ports. This can be done with the setbaycom
utility. If you are only using one modem, you can also configure the utility. If you are only using one modem, you can also configure the
driver from the insmod command line (or by means of an option line in driver from the insmod command line (or by means of an option line in
/etc/modprobe.d/*.conf). ``/etc/modprobe.d/*.conf``).
Examples::
Examples:
modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4 modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4 sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
Both lines configure the first port to drive a ser12 modem at the first Both lines configure the first port to drive a ser12 modem at the first
serial port (COM1 under DOS). The * in the mode parameter instructs the driver to use serial port (COM1 under DOS). The * in the mode parameter instructs the driver
the software DCD algorithm (see below). to use the software DCD algorithm (see below)::
insmod baycom_par mode="picpar" iobase=0x378 insmod baycom_par mode="picpar" iobase=0x378
sethdlc -i bcp0 -p mode "picpar" io 0x378 sethdlc -i bcp0 -p mode "picpar" io 0x378
...@@ -115,29 +125,33 @@ Note that both utilities interpret the values slightly differently. ...@@ -115,29 +125,33 @@ Note that both utilities interpret the values slightly differently.
Hardware DCD versus Software DCD Hardware DCD versus Software DCD
================================
To avoid collisions on the air, the driver must know when the channel is To avoid collisions on the air, the driver must know when the channel is
busy. This is the task of the DCD circuitry/software. The driver may either busy. This is the task of the DCD circuitry/software. The driver may either
utilise a software DCD algorithm (options=1) or use a DCD signal from utilise a software DCD algorithm (options=1) or use a DCD signal from
the hardware (options=0). the hardware (options=0).
ser12: if software DCD is utilised, the radio's squelch should always be ======= =================================================================
open. It is highly recommended to use the software DCD algorithm, ser12 if software DCD is utilised, the radio's squelch should always be
as it is much faster than most hardware squelch circuitry. The open. It is highly recommended to use the software DCD algorithm,
disadvantage is a slightly higher load on the system. as it is much faster than most hardware squelch circuitry. The
disadvantage is a slightly higher load on the system.
par96: the software DCD algorithm for this type of modem is rather poor. par96 the software DCD algorithm for this type of modem is rather poor.
The modem simply does not provide enough information to implement The modem simply does not provide enough information to implement
a reasonable DCD algorithm in software. Therefore, if your radio a reasonable DCD algorithm in software. Therefore, if your radio
feeds the DCD input of the PAR96 modem, the use of the hardware feeds the DCD input of the PAR96 modem, the use of the hardware
DCD circuitry is recommended. DCD circuitry is recommended.
picpar: the picpar modem features a builtin DCD hardware, which is highly picpar the picpar modem features a builtin DCD hardware, which is highly
recommended. recommended.
======= =================================================================
Compatibility with the rest of the Linux kernel Compatibility with the rest of the Linux kernel
===============================================
The serial driver and the baycom serial drivers compete The serial driver and the baycom serial drivers compete
for the same hardware resources. Of course only one driver can access a given for the same hardware resources. Of course only one driver can access a given
...@@ -154,5 +168,7 @@ The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem ...@@ -154,5 +168,7 @@ The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem
to arbitrate the ports between different client drivers. to arbitrate the ports between different client drivers.
vy 73s de vy 73s de
Tom Sailer, sailer@ife.ee.ethz.ch Tom Sailer, sailer@ife.ee.ethz.ch
hb9jnx @ hb9w.ampr.org hb9jnx @ hb9w.ampr.org
:orphan:
.. SPDX-License-Identifier: GPL-2.0 .. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt> .. include:: <isonum.txt>
......
.. SPDX-License-Identifier: GPL-2.0
CAIF
====
Contents:
.. toctree::
:maxdepth: 2
linux_caif
caif
spi_porting
.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>
==========
Linux CAIF Linux CAIF
=========== ==========
copyright (C) ST-Ericsson AB 2010
Author: Sjur Brendeland/ sjur.brandeland@stericsson.com Copyright |copy| ST-Ericsson AB 2010
License terms: GNU General Public License (GPL) version 2
:Author: Sjur Brendeland/ sjur.brandeland@stericsson.com
:License terms: GNU General Public License (GPL) version 2
Introduction Introduction
------------ ============
CAIF is a MUX protocol used by ST-Ericsson cellular modems for CAIF is a MUX protocol used by ST-Ericsson cellular modems for
communication between Modem and host. The host processes can open virtual AT communication between Modem and host. The host processes can open virtual AT
channels, initiate GPRS Data connections, Video channels and Utility Channels. channels, initiate GPRS Data connections, Video channels and Utility Channels.
...@@ -16,13 +23,16 @@ ST-Ericsson modems support a number of transports between modem ...@@ -16,13 +23,16 @@ ST-Ericsson modems support a number of transports between modem
and host. Currently, UART and Loopback are available for Linux. and host. Currently, UART and Loopback are available for Linux.
Architecture: Architecture
------------ ============
The implementation of CAIF is divided into: The implementation of CAIF is divided into:
* CAIF Socket Layer and GPRS IP Interface. * CAIF Socket Layer and GPRS IP Interface.
* CAIF Core Protocol Implementation * CAIF Core Protocol Implementation
* CAIF Link Layer, implemented as NET devices. * CAIF Link Layer, implemented as NET devices.
::
RTNL RTNL
! !
...@@ -46,12 +56,12 @@ The implementation of CAIF is divided into: ...@@ -46,12 +56,12 @@ The implementation of CAIF is divided into:
I M P L E M E N T A T I O N Implementation
=========================== ==============
CAIF Core Protocol Layer CAIF Core Protocol Layer
========================================= ------------------------
CAIF Core layer implements the CAIF protocol as defined by ST-Ericsson. CAIF Core layer implements the CAIF protocol as defined by ST-Ericsson.
It implements the CAIF protocol stack in a layered approach, where It implements the CAIF protocol stack in a layered approach, where
...@@ -59,8 +69,11 @@ each layer described in the specification is implemented as a separate layer. ...@@ -59,8 +69,11 @@ each layer described in the specification is implemented as a separate layer.
The architecture is inspired by the design patterns "Protocol Layer" and The architecture is inspired by the design patterns "Protocol Layer" and
"Protocol Packet". "Protocol Packet".
== CAIF structure == CAIF structure
^^^^^^^^^^^^^^
The Core CAIF implementation contains: The Core CAIF implementation contains:
- Simple implementation of CAIF. - Simple implementation of CAIF.
- Layered architecture (a la Streams), each layer in the CAIF - Layered architecture (a la Streams), each layer in the CAIF
specification is implemented in a separate c-file. specification is implemented in a separate c-file.
...@@ -73,7 +86,8 @@ The Core CAIF implementation contains: ...@@ -73,7 +86,8 @@ The Core CAIF implementation contains:
to the called function (except for framing layers' receive function) to the called function (except for framing layers' receive function)
Layered Architecture Layered Architecture
-------------------- ====================
The CAIF protocol can be divided into two parts: Support functions and Protocol The CAIF protocol can be divided into two parts: Support functions and Protocol
Implementation. The support functions include: Implementation. The support functions include:
...@@ -112,7 +126,7 @@ The CAIF Protocol implementation contains: ...@@ -112,7 +126,7 @@ The CAIF Protocol implementation contains:
- CFSERL CAIF Serial layer. Handles concatenation/split of frames - CFSERL CAIF Serial layer. Handles concatenation/split of frames
into CAIF Frames with correct length. into CAIF Frames with correct length.
::
+---------+ +---------+
| Config | | Config |
...@@ -143,18 +157,24 @@ The CAIF Protocol implementation contains: ...@@ -143,18 +157,24 @@ The CAIF Protocol implementation contains:
In this layered approach the following "rules" apply. In this layered approach the following "rules" apply.
- All layers embed the same structure "struct cflayer" - All layers embed the same structure "struct cflayer"
- A layer does not depend on any other layer's private data. - A layer does not depend on any other layer's private data.
- Layers are stacked by setting the pointers - Layers are stacked by setting the pointers::
layer->up , layer->dn layer->up , layer->dn
- In order to send data upwards, each layer should do
- In order to send data upwards, each layer should do::
layer->up->receive(layer->up, packet); layer->up->receive(layer->up, packet);
- In order to send data downwards, each layer should do
- In order to send data downwards, each layer should do::
layer->dn->transmit(layer->dn, packet); layer->dn->transmit(layer->dn, packet);
CAIF Socket and IP interface CAIF Socket and IP interface
=========================== ============================
The IP interface and CAIF socket API are implemented on top of the The IP interface and CAIF socket API are implemented on top of the
CAIF Core protocol. The IP Interface and CAIF socket have an instance of CAIF Core protocol. The IP Interface and CAIF socket have an instance of
......
- CAIF SPI porting - .. SPDX-License-Identifier: GPL-2.0
- CAIF SPI basics: ================
CAIF SPI porting
================
CAIF SPI basics
===============
Running CAIF over SPI needs some extra setup, owing to the nature of SPI. Running CAIF over SPI needs some extra setup, owing to the nature of SPI.
Two extra GPIOs have been added in order to negotiate the transfers Two extra GPIOs have been added in order to negotiate the transfers
between the master and the slave. The minimum requirement for running between the master and the slave. The minimum requirement for running
CAIF over SPI is a SPI slave chip and two GPIOs (more details below). CAIF over SPI is a SPI slave chip and two GPIOs (more details below).
Please note that running as a slave implies that you need to keep up Please note that running as a slave implies that you need to keep up
with the master clock. An overrun or underrun event is fatal. with the master clock. An overrun or underrun event is fatal.
- CAIF SPI framework: CAIF SPI framework
==================
To make porting as easy as possible, the CAIF SPI has been divided in To make porting as easy as possible, the CAIF SPI has been divided in
two parts. The first part (called the interface part) deals with all two parts. The first part (called the interface part) deals with all
...@@ -27,7 +33,9 @@ the physical hardware, both with regard to SPI and to GPIOs. ...@@ -27,7 +33,9 @@ the physical hardware, both with regard to SPI and to GPIOs.
need to implement the following need to implement the following
functions: functions:
int (*init_xfer) (struct cfspi_xfer * xfer, struct cfspi_dev *dev): ::
int (*init_xfer) (struct cfspi_xfer * xfer, struct cfspi_dev *dev):
This function is called by the CAIF SPI interface to give This function is called by the CAIF SPI interface to give
you a chance to set up your hardware to be ready to receive you a chance to set up your hardware to be ready to receive
...@@ -36,7 +44,9 @@ the physical hardware, both with regard to SPI and to GPIOs. ...@@ -36,7 +44,9 @@ the physical hardware, both with regard to SPI and to GPIOs.
of the transfer in both directions.The dev parameter can be used of the transfer in both directions.The dev parameter can be used
to map to different CAIF SPI slave devices. to map to different CAIF SPI slave devices.
void (*sig_xfer) (bool xfer, struct cfspi_dev *dev): ::
void (*sig_xfer) (bool xfer, struct cfspi_dev *dev):
This function is called by the CAIF SPI interface when the output This function is called by the CAIF SPI interface when the output
(SPI_INT) GPIO needs to change state. The boolean value of the xfer (SPI_INT) GPIO needs to change state. The boolean value of the xfer
...@@ -46,7 +56,9 @@ the physical hardware, both with regard to SPI and to GPIOs. ...@@ -46,7 +56,9 @@ the physical hardware, both with regard to SPI and to GPIOs.
- Functionality provided by the CAIF SPI interface: - Functionality provided by the CAIF SPI interface:
void (*ss_cb) (bool assert, struct cfspi_ifc *ifc); ::
void (*ss_cb) (bool assert, struct cfspi_ifc *ifc);
This function is called by the CAIF SPI slave device in order to This function is called by the CAIF SPI slave device in order to
signal a change of state of the input GPIO (SS) to the interface. signal a change of state of the input GPIO (SS) to the interface.
...@@ -55,7 +67,9 @@ the physical hardware, both with regard to SPI and to GPIOs. ...@@ -55,7 +67,9 @@ the physical hardware, both with regard to SPI and to GPIOs.
not to introduce latency). The ifc parameter should be the pointer not to introduce latency). The ifc parameter should be the pointer
returned from the platform probe function in the SPI device structure. returned from the platform probe function in the SPI device structure.
void (*xfer_done_cb) (struct cfspi_ifc *ifc); ::
void (*xfer_done_cb) (struct cfspi_ifc *ifc);
This function is called by the CAIF SPI slave device in order to This function is called by the CAIF SPI slave device in order to
report that a transfer is completed. This function should only be report that a transfer is completed. This function should only be
...@@ -68,17 +82,24 @@ the physical hardware, both with regard to SPI and to GPIOs. ...@@ -68,17 +82,24 @@ the physical hardware, both with regard to SPI and to GPIOs.
- Filling in the SPI slave device structure: - Filling in the SPI slave device structure:
Connect the necessary callback functions. Connect the necessary callback functions.
Indicate clock speed (used to calculate toggle delays).
Chose a suitable name (helps debugging if you use several CAIF Indicate clock speed (used to calculate toggle delays).
SPI slave devices).
Assign your private data (can be used to map to your structure). Chose a suitable name (helps debugging if you use several CAIF
SPI slave devices).
Assign your private data (can be used to map to your
structure).
- Filling in the SPI slave platform device structure: - Filling in the SPI slave platform device structure:
Add name of driver to connect to ("cfspi_sspi").
Assign the SPI slave device structure as platform data.
- Padding: Add name of driver to connect to ("cfspi_sspi").
Assign the SPI slave device structure as platform data.
Padding
=======
In order to optimize throughput, a number of SPI padding options are provided. In order to optimize throughput, a number of SPI padding options are provided.
Padding can be enabled independently for uplink and downlink transfers. Padding can be enabled independently for uplink and downlink transfers.
...@@ -87,122 +108,122 @@ The padding needs to be correctly configured on both sides of the link. ...@@ -87,122 +108,122 @@ The padding needs to be correctly configured on both sides of the link.
The padding can be changed via module parameters in cfspi_sspi.c or via The padding can be changed via module parameters in cfspi_sspi.c or via
the sysfs directory of the cfspi_sspi driver (before device registration). the sysfs directory of the cfspi_sspi driver (before device registration).
- CAIF SPI device template: - CAIF SPI device template::
/* /*
* Copyright (C) ST-Ericsson AB 2010 * Copyright (C) ST-Ericsson AB 2010
* Author: Daniel Martensson / Daniel.Martensson@stericsson.com * Author: Daniel Martensson / Daniel.Martensson@stericsson.com
* License terms: GNU General Public License (GPL), version 2. * License terms: GNU General Public License (GPL), version 2.
* *
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <net/caif/caif_spi.h> #include <net/caif/caif_spi.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
struct sspi_struct { struct sspi_struct {
struct cfspi_dev sdev; struct cfspi_dev sdev;
struct cfspi_xfer *xfer; struct cfspi_xfer *xfer;
}; };
static struct sspi_struct slave; static struct sspi_struct slave;
static struct platform_device slave_device; static struct platform_device slave_device;
static irqreturn_t sspi_irq(int irq, void *arg) static irqreturn_t sspi_irq(int irq, void *arg)
{ {
/* You only need to trigger on an edge to the active state of the /* You only need to trigger on an edge to the active state of the
* SS signal. Once a edge is detected, the ss_cb() function should be * SS signal. Once a edge is detected, the ss_cb() function should be
* called with the parameter assert set to true. It is OK * called with the parameter assert set to true. It is OK
* (and even advised) to call the ss_cb() function in IRQ context in * (and even advised) to call the ss_cb() function in IRQ context in
* order not to add any delay. */ * order not to add any delay. */
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static void sspi_complete(void *context) static void sspi_complete(void *context)
{ {
/* Normally the DMA or the SPI framework will call you back /* Normally the DMA or the SPI framework will call you back
* in something similar to this. The only thing you need to * in something similar to this. The only thing you need to
* do is to call the xfer_done_cb() function, providing the pointer * do is to call the xfer_done_cb() function, providing the pointer
* to the CAIF SPI interface. It is OK to call this function * to the CAIF SPI interface. It is OK to call this function
* from IRQ context. */ * from IRQ context. */
} }
static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev) static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev)
{ {
/* Store transfer info. For a normal implementation you should /* Store transfer info. For a normal implementation you should
* set up your DMA here and make sure that you are ready to * set up your DMA here and make sure that you are ready to
* receive the data from the master SPI. */ * receive the data from the master SPI. */
struct sspi_struct *sspi = (struct sspi_struct *)dev->priv; struct sspi_struct *sspi = (struct sspi_struct *)dev->priv;
sspi->xfer = xfer; sspi->xfer = xfer;
return 0; return 0;
} }
void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev) void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev)
{ {
/* If xfer is true then you should assert the SPI_INT to indicate to /* If xfer is true then you should assert the SPI_INT to indicate to
* the master that you are ready to receive the data from the master * the master that you are ready to receive the data from the master
* SPI. If xfer is false then you should de-assert SPI_INT to indicate * SPI. If xfer is false then you should de-assert SPI_INT to indicate
* that the transfer is done. * that the transfer is done.
*/ */
struct sspi_struct *sspi = (struct sspi_struct *)dev->priv; struct sspi_struct *sspi = (struct sspi_struct *)dev->priv;
} }
static void sspi_release(struct device *dev) static void sspi_release(struct device *dev)
{ {
/* /*
* Here you should release your SPI device resources. * Here you should release your SPI device resources.
*/ */
} }
static int __init sspi_init(void) static int __init sspi_init(void)
{ {
/* Here you should initialize your SPI device by providing the /* Here you should initialize your SPI device by providing the
* necessary functions, clock speed, name and private data. Once * necessary functions, clock speed, name and private data. Once
* done, you can register your device with the * done, you can register your device with the
* platform_device_register() function. This function will return * platform_device_register() function. This function will return
* with the CAIF SPI interface initialized. This is probably also * with the CAIF SPI interface initialized. This is probably also
* the place where you should set up your GPIOs, interrupts and SPI * the place where you should set up your GPIOs, interrupts and SPI
* resources. */ * resources. */
int res = 0; int res = 0;
/* Initialize slave device. */ /* Initialize slave device. */
slave.sdev.init_xfer = sspi_init_xfer; slave.sdev.init_xfer = sspi_init_xfer;
slave.sdev.sig_xfer = sspi_sig_xfer; slave.sdev.sig_xfer = sspi_sig_xfer;
slave.sdev.clk_mhz = 13; slave.sdev.clk_mhz = 13;
slave.sdev.priv = &slave; slave.sdev.priv = &slave;
slave.sdev.name = "spi_sspi"; slave.sdev.name = "spi_sspi";
slave_device.dev.release = sspi_release; slave_device.dev.release = sspi_release;
/* Initialize platform device. */ /* Initialize platform device. */
slave_device.name = "cfspi_sspi"; slave_device.name = "cfspi_sspi";
slave_device.dev.platform_data = &slave.sdev; slave_device.dev.platform_data = &slave.sdev;
/* Register platform device. */ /* Register platform device. */
res = platform_device_register(&slave_device); res = platform_device_register(&slave_device);
if (res) { if (res) {
printk(KERN_WARNING "sspi_init: failed to register dev.\n"); printk(KERN_WARNING "sspi_init: failed to register dev.\n");
return -ENODEV; return -ENODEV;
} }
return res; return res;
} }
static void __exit sspi_exit(void) static void __exit sspi_exit(void)
{ {
platform_device_del(&slave_device); platform_device_del(&slave_device);
} }
module_init(sspi_init); module_init(sspi_init);
module_exit(sspi_exit); module_exit(sspi_exit);
...@@ -1058,7 +1058,7 @@ drivers you mainly have to deal with: ...@@ -1058,7 +1058,7 @@ drivers you mainly have to deal with:
- TX: Put the CAN frame from the socket buffer to the CAN controller. - TX: Put the CAN frame from the socket buffer to the CAN controller.
- RX: Put the CAN frame from the CAN controller to the socket buffer. - RX: Put the CAN frame from the CAN controller to the socket buffer.
See e.g. at Documentation/networking/netdevices.txt . The differences See e.g. at Documentation/networking/netdevices.rst . The differences
for writing CAN network device driver are described below: for writing CAN network device driver are described below:
......
cdc_mbim - Driver for CDC MBIM Mobile Broadband modems .. SPDX-License-Identifier: GPL-2.0
========================================================
======================================================
cdc_mbim - Driver for CDC MBIM Mobile Broadband modems
======================================================
The cdc_mbim driver supports USB devices conforming to the "Universal The cdc_mbim driver supports USB devices conforming to the "Universal
Serial Bus Communications Class Subclass Specification for Mobile Serial Bus Communications Class Subclass Specification for Mobile
...@@ -19,9 +22,9 @@ by a cdc_ncm driver parameter: ...@@ -19,9 +22,9 @@ by a cdc_ncm driver parameter:
prefer_mbim prefer_mbim
----------- -----------
Type: Boolean :Type: Boolean
Valid Range: N/Y (0-1) :Valid Range: N/Y (0-1)
Default Value: Y (MBIM is preferred) :Default Value: Y (MBIM is preferred)
This parameter sets the system policy for NCM/MBIM functions. Such This parameter sets the system policy for NCM/MBIM functions. Such
functions will be handled by either the cdc_ncm driver or the cdc_mbim functions will be handled by either the cdc_ncm driver or the cdc_mbim
...@@ -44,11 +47,13 @@ userspace MBIM management application always is required to enable a ...@@ -44,11 +47,13 @@ userspace MBIM management application always is required to enable a
MBIM function. MBIM function.
Such userspace applications includes, but are not limited to: Such userspace applications includes, but are not limited to:
- mbimcli (included with the libmbim [3] library), and - mbimcli (included with the libmbim [3] library), and
- ModemManager [4] - ModemManager [4]
Establishing a MBIM IP session reequires at least these actions by the Establishing a MBIM IP session reequires at least these actions by the
management application: management application:
- open the control channel - open the control channel
- configure network connection settings - configure network connection settings
- connect to network - connect to network
...@@ -76,7 +81,7 @@ complies with all the control channel requirements in [1]. ...@@ -76,7 +81,7 @@ complies with all the control channel requirements in [1].
The cdc-wdmX device is created as a child of the MBIM control The cdc-wdmX device is created as a child of the MBIM control
interface USB device. The character device associated with a specific interface USB device. The character device associated with a specific
MBIM function can be looked up using sysfs. For example: MBIM function can be looked up using sysfs. For example::
bjorn@nemi:~$ ls /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc bjorn@nemi:~$ ls /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc
cdc-wdm0 cdc-wdm0
...@@ -119,13 +124,15 @@ negotiated control message size. ...@@ -119,13 +124,15 @@ negotiated control message size.
/dev/cdc-wdmX ioctl() /dev/cdc-wdmX ioctl()
-------------------- ---------------------
IOCTL_WDM_MAX_COMMAND: Get Maximum Command Size IOCTL_WDM_MAX_COMMAND: Get Maximum Command Size
This ioctl returns the wMaxControlMessage field of the CDC MBIM This ioctl returns the wMaxControlMessage field of the CDC MBIM
functional descriptor for MBIM devices. This is intended as a functional descriptor for MBIM devices. This is intended as a
convenience, eliminating the need to parse the USB descriptors from convenience, eliminating the need to parse the USB descriptors from
userspace. userspace.
::
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
...@@ -178,7 +185,7 @@ VLAN links prior to establishing MBIM IP sessions where the SessionId ...@@ -178,7 +185,7 @@ VLAN links prior to establishing MBIM IP sessions where the SessionId
is greater than 0. These links can be added by using the normal VLAN is greater than 0. These links can be added by using the normal VLAN
kernel interfaces, either ioctl or netlink. kernel interfaces, either ioctl or netlink.
For example, adding a link for a MBIM IP session with SessionId 3: For example, adding a link for a MBIM IP session with SessionId 3::
ip link add link wwan0 name wwan0.3 type vlan id 3 ip link add link wwan0 name wwan0.3 type vlan id 3
...@@ -207,6 +214,7 @@ the stream to the end user in an appropriate way for the stream type. ...@@ -207,6 +214,7 @@ the stream to the end user in an appropriate way for the stream type.
The network device ABI requires a dummy ethernet header for every DSS The network device ABI requires a dummy ethernet header for every DSS
data frame being transported. The contents of this header is data frame being transported. The contents of this header is
arbitrary, with the following exceptions: arbitrary, with the following exceptions:
- TX frames using an IP protocol (0x0800 or 0x86dd) will be dropped - TX frames using an IP protocol (0x0800 or 0x86dd) will be dropped
- RX frames will have the protocol field set to ETH_P_802_3 (but will - RX frames will have the protocol field set to ETH_P_802_3 (but will
not be properly formatted 802.3 frames) not be properly formatted 802.3 frames)
...@@ -218,7 +226,7 @@ adding the dummy ethernet header on TX and stripping it on RX. ...@@ -218,7 +226,7 @@ adding the dummy ethernet header on TX and stripping it on RX.
This is a simple example using tools commonly available, exporting This is a simple example using tools commonly available, exporting
DssSessionId 5 as a pty character device pointed to by a /dev/nmea DssSessionId 5 as a pty character device pointed to by a /dev/nmea
symlink: symlink::
ip link add link wwan0 name wwan0.dss5 type vlan id 261 ip link add link wwan0 name wwan0.dss5 type vlan id 261
ip link set dev wwan0.dss5 up ip link set dev wwan0.dss5 up
...@@ -236,7 +244,7 @@ map frames to the correct DSS session and adding 18 byte VLAN ethernet ...@@ -236,7 +244,7 @@ map frames to the correct DSS session and adding 18 byte VLAN ethernet
headers with the appropriate tag on TX. In this case using a socket headers with the appropriate tag on TX. In this case using a socket
filter is recommended, matching only the DSS VLAN subset. This avoid filter is recommended, matching only the DSS VLAN subset. This avoid
unnecessary copying of unrelated IP session data to userspace. For unnecessary copying of unrelated IP session data to userspace. For
example: example::
static struct sock_filter dssfilter[] = { static struct sock_filter dssfilter[] = {
/* use special negative offsets to get VLAN tag */ /* use special negative offsets to get VLAN tag */
...@@ -249,11 +257,11 @@ example: ...@@ -249,11 +257,11 @@ example:
BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 512, 3, 0), /* 511 is last DSS VLAN */ BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 512, 3, 0), /* 511 is last DSS VLAN */
/* verify ethertype */ /* verify ethertype */
BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 2 * ETH_ALEN), BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 2 * ETH_ALEN),
BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, ETH_P_802_3, 0, 1), BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, ETH_P_802_3, 0, 1),
BPF_STMT(BPF_RET|BPF_K, (u_int)-1), /* accept */ BPF_STMT(BPF_RET|BPF_K, (u_int)-1), /* accept */
BPF_STMT(BPF_RET|BPF_K, 0), /* ignore */ BPF_STMT(BPF_RET|BPF_K, 0), /* ignore */
}; };
...@@ -266,6 +274,7 @@ network device. ...@@ -266,6 +274,7 @@ network device.
This mapping implies a few restrictions on multiplexed IPS and DSS This mapping implies a few restrictions on multiplexed IPS and DSS
sessions, which may not always be practical: sessions, which may not always be practical:
- no IPS or DSS session can use a frame size greater than the MTU on - no IPS or DSS session can use a frame size greater than the MTU on
IP session 0 IP session 0
- no IPS or DSS session can be in the up state unless the network - no IPS or DSS session can be in the up state unless the network
...@@ -280,7 +289,7 @@ device. ...@@ -280,7 +289,7 @@ device.
Tip: It might be less confusing to the end user to name this VLAN Tip: It might be less confusing to the end user to name this VLAN
subdevice after the MBIM SessionID instead of the VLAN ID. For subdevice after the MBIM SessionID instead of the VLAN ID. For
example: example::
ip link add link wwan0 name wwan0.0 type vlan id 4094 ip link add link wwan0 name wwan0.0 type vlan id 4094
...@@ -290,7 +299,7 @@ VLAN mapping ...@@ -290,7 +299,7 @@ VLAN mapping
Summarizing the cdc_mbim driver mapping described above, we have this Summarizing the cdc_mbim driver mapping described above, we have this
relationship between VLAN tags on the wwanY network device and MBIM relationship between VLAN tags on the wwanY network device and MBIM
sessions on the shared USB data channel: sessions on the shared USB data channel::
VLAN ID MBIM type MBIM SessionID Notes VLAN ID MBIM type MBIM SessionID Notes
--------------------------------------------------------- ---------------------------------------------------------
...@@ -310,30 +319,37 @@ sessions on the shared USB data channel: ...@@ -310,30 +319,37 @@ sessions on the shared USB data channel:
References References
========== ==========
[1] USB Implementers Forum, Inc. - "Universal Serial Bus 1) USB Implementers Forum, Inc. - "Universal Serial Bus
Communications Class Subclass Specification for Mobile Broadband Communications Class Subclass Specification for Mobile Broadband
Interface Model", Revision 1.0 (Errata 1), May 1, 2013 Interface Model", Revision 1.0 (Errata 1), May 1, 2013
- http://www.usb.org/developers/docs/devclass_docs/ - http://www.usb.org/developers/docs/devclass_docs/
[2] USB Implementers Forum, Inc. - "Universal Serial Bus 2) USB Implementers Forum, Inc. - "Universal Serial Bus
Communications Class Subclass Specifications for Network Control Communications Class Subclass Specifications for Network Control
Model Devices", Revision 1.0 (Errata 1), November 24, 2010 Model Devices", Revision 1.0 (Errata 1), November 24, 2010
- http://www.usb.org/developers/docs/devclass_docs/ - http://www.usb.org/developers/docs/devclass_docs/
[3] libmbim - "a glib-based library for talking to WWAN modems and 3) libmbim - "a glib-based library for talking to WWAN modems and
devices which speak the Mobile Interface Broadband Model (MBIM) devices which speak the Mobile Interface Broadband Model (MBIM)
protocol" protocol"
- http://www.freedesktop.org/wiki/Software/libmbim/ - http://www.freedesktop.org/wiki/Software/libmbim/
[4] ModemManager - "a DBus-activated daemon which controls mobile 4) ModemManager - "a DBus-activated daemon which controls mobile
broadband (2G/3G/4G) devices and connections" broadband (2G/3G/4G) devices and connections"
- http://www.freedesktop.org/wiki/Software/ModemManager/ - http://www.freedesktop.org/wiki/Software/ModemManager/
[5] "MBIM (Mobile Broadband Interface Model) Registry" 5) "MBIM (Mobile Broadband Interface Model) Registry"
- http://compliance.usb.org/mbim/ - http://compliance.usb.org/mbim/
[6] "/sys/kernel/debug/usb/devices output format" 6) "/sys/kernel/debug/usb/devices output format"
- Documentation/driver-api/usb/usb.rst - Documentation/driver-api/usb/usb.rst
[7] "/sys/bus/usb/devices/.../descriptors" 7) "/sys/bus/usb/devices/.../descriptors"
- Documentation/ABI/stable/sysfs-bus-usb - Documentation/ABI/stable/sysfs-bus-usb
...@@ -59,7 +59,7 @@ recomputed for each resulting segment. See the skbuff.h comment (section 'E') ...@@ -59,7 +59,7 @@ recomputed for each resulting segment. See the skbuff.h comment (section 'E')
for more details. for more details.
A driver declares its offload capabilities in netdev->hw_features; see A driver declares its offload capabilities in netdev->hw_features; see
Documentation/networking/netdev-features.txt for more. Note that a device Documentation/networking/netdev-features.rst for more. Note that a device
which only advertises NETIF_F_IP[V6]_CSUM must still obey the csum_start and which only advertises NETIF_F_IP[V6]_CSUM must still obey the csum_start and
csum_offset given in the SKB; if it tries to deduce these itself in hardware csum_offset given in the SKB; if it tries to deduce these itself in hardware
(as some NICs do) the driver should check that the values in the SKB match (as some NICs do) the driver should check that the values in the SKB match
......
Text File for the COPS LocalTalk Linux driver (cops.c). .. SPDX-License-Identifier: GPL-2.0
By Jay Schulist <jschlst@samba.org>
========================================
The COPS LocalTalk Linux driver (cops.c)
========================================
By Jay Schulist <jschlst@samba.org>
This driver has two modes and they are: Dayna mode and Tangent mode. This driver has two modes and they are: Dayna mode and Tangent mode.
Each mode corresponds with the type of card. It has been found Each mode corresponds with the type of card. It has been found
that there are 2 main types of cards and all other cards are that there are 2 main types of cards and all other cards are
the same and just have different names or only have minor differences the same and just have different names or only have minor differences
such as more IO ports. As this driver is tested it will such as more IO ports. As this driver is tested it will
become more clear exactly what cards are supported. become more clear exactly what cards are supported.
Right now these cards are known to work with the COPS driver. The Right now these cards are known to work with the COPS driver. The
LT-200 cards work in a somewhat more limited capacity than the LT-200 cards work in a somewhat more limited capacity than the
DL200 cards, which work very well and are in use by many people. DL200 cards, which work very well and are in use by many people.
TANGENT driver mode: TANGENT driver mode:
Tangent ATB-II, Novell NL-1000, Daystar Digital LT-200 - Tangent ATB-II, Novell NL-1000, Daystar Digital LT-200
DAYNA driver mode: DAYNA driver mode:
Dayna DL2000/DaynaTalk PC (Half Length), COPS LT-95, - Dayna DL2000/DaynaTalk PC (Half Length), COPS LT-95,
Farallon PhoneNET PC III, Farallon PhoneNET PC II - Farallon PhoneNET PC III, Farallon PhoneNET PC II
Other cards possibly supported mode unknown though: Other cards possibly supported mode unknown though:
Dayna DL2000 (Full length) - Dayna DL2000 (Full length)
The COPS driver defaults to using Dayna mode. To change the driver's The COPS driver defaults to using Dayna mode. To change the driver's
mode if you built a driver with dual support use board_type=1 or mode if you built a driver with dual support use board_type=1 or
board_type=2 for Dayna or Tangent with insmod. board_type=2 for Dayna or Tangent with insmod.
** Operation/loading of the driver. Operation/loading of the driver
===============================
Use modprobe like this: /sbin/modprobe cops.o (IO #) (IRQ #) Use modprobe like this: /sbin/modprobe cops.o (IO #) (IRQ #)
If you do not specify any options the driver will try and use the IO = 0x240, If you do not specify any options the driver will try and use the IO = 0x240,
IRQ = 5. As of right now I would only use IRQ 5 for the card, if autoprobing. IRQ = 5. As of right now I would only use IRQ 5 for the card, if autoprobing.
To load multiple COPS driver Localtalk cards you can do one of the following. To load multiple COPS driver Localtalk cards you can do one of the following::
insmod cops io=0x240 irq=5
insmod -o cops2 cops io=0x260 irq=3
insmod cops io=0x240 irq=5 Or in lilo.conf put something like this::
insmod -o cops2 cops io=0x260 irq=3
Or in lilo.conf put something like this:
append="ether=5,0x240,lt0 ether=3,0x260,lt1" append="ether=5,0x240,lt0 ether=3,0x260,lt1"
Then bring up the interface with ifconfig. It will look something like this: Then bring up the interface with ifconfig. It will look something like this::
lt0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-F7-00-00-00-00-00-00-00-00
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 lt0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-F7-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING NOARP MULTICAST MTU:600 Metric:1 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
RX packets:0 errors:0 dropped:0 overruns:0 frame:0 UP BROADCAST RUNNING NOARP MULTICAST MTU:600 Metric:1
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0 RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0
Netatalk Configuration
======================
** Netatalk Configuration
You will need to configure atalkd with something like the following to make You will need to configure atalkd with something like the following to make
it work with the cops.c driver. it work with the cops.c driver.
* For single LTalk card use. * For single LTalk card use::
dummy -seed -phase 2 -net 2000 -addr 2000.10 -zone "1033"
lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033" dummy -seed -phase 2 -net 2000 -addr 2000.10 -zone "1033"
lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033"
* For multiple cards, Ethernet and LocalTalk. * For multiple cards, Ethernet and LocalTalk::
eth0 -seed -phase 2 -net 3000 -addr 3000.20 -zone "1033"
lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033" eth0 -seed -phase 2 -net 3000 -addr 3000.20 -zone "1033"
lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033"
* For multiple LocalTalk cards, and an Ethernet card. * For multiple LocalTalk cards, and an Ethernet card.
* Order seems to matter here, Ethernet last.
lt0 -seed -phase 1 -net 1000 -addr 1000.10 -zone "LocalTalk1" * Order seems to matter here, Ethernet last::
lt1 -seed -phase 1 -net 2000 -addr 2000.20 -zone "LocalTalk2"
eth0 -seed -phase 2 -net 3000 -addr 3000.30 -zone "EtherTalk" lt0 -seed -phase 1 -net 1000 -addr 1000.10 -zone "LocalTalk1"
lt1 -seed -phase 1 -net 2000 -addr 2000.20 -zone "LocalTalk2"
eth0 -seed -phase 2 -net 3000 -addr 3000.30 -zone "EtherTalk"
.. SPDX-License-Identifier: GPL-2.0
========================
ATM cxacru device driver
========================
Firmware is required for this device: http://accessrunner.sourceforge.net/ Firmware is required for this device: http://accessrunner.sourceforge.net/
While it is capable of managing/maintaining the ADSL connection without the While it is capable of managing/maintaining the ADSL connection without the
...@@ -19,29 +25,35 @@ several sysfs attribute files for retrieving device statistics: ...@@ -19,29 +25,35 @@ several sysfs attribute files for retrieving device statistics:
* adsl_headend * adsl_headend
* adsl_headend_environment * adsl_headend_environment
Information about the remote headend.
- Information about the remote headend.
* adsl_config * adsl_config
Configuration writing interface.
Write parameters in hexadecimal format <index>=<value>, - Configuration writing interface.
separated by whitespace, e.g.: - Write parameters in hexadecimal format <index>=<value>,
separated by whitespace, e.g.:
"1=0 a=5" "1=0 a=5"
Up to 7 parameters at a time will be sent and the modem will restart
the ADSL connection when any value is set. These are logged for future - Up to 7 parameters at a time will be sent and the modem will restart
reference. the ADSL connection when any value is set. These are logged for future
reference.
* downstream_attenuation (dB) * downstream_attenuation (dB)
* downstream_bits_per_frame * downstream_bits_per_frame
* downstream_rate (kbps) * downstream_rate (kbps)
* downstream_snr_margin (dB) * downstream_snr_margin (dB)
Downstream stats.
- Downstream stats.
* upstream_attenuation (dB) * upstream_attenuation (dB)
* upstream_bits_per_frame * upstream_bits_per_frame
* upstream_rate (kbps) * upstream_rate (kbps)
* upstream_snr_margin (dB) * upstream_snr_margin (dB)
* transmitter_power (dBm/Hz) * transmitter_power (dBm/Hz)
Upstream stats.
- Upstream stats.
* downstream_crc_errors * downstream_crc_errors
* downstream_fec_errors * downstream_fec_errors
...@@ -49,48 +61,56 @@ several sysfs attribute files for retrieving device statistics: ...@@ -49,48 +61,56 @@ several sysfs attribute files for retrieving device statistics:
* upstream_crc_errors * upstream_crc_errors
* upstream_fec_errors * upstream_fec_errors
* upstream_hec_errors * upstream_hec_errors
Error counts.
- Error counts.
* line_startable * line_startable
Indicates that ADSL support on the device
is/can be enabled, see adsl_start. - Indicates that ADSL support on the device
is/can be enabled, see adsl_start.
* line_status * line_status
"initialising"
"down" - "initialising"
"attempting to activate" - "down"
"training" - "attempting to activate"
"channel analysis" - "training"
"exchange" - "channel analysis"
"waiting" - "exchange"
"up" - "waiting"
- "up"
Changes between "down" and "attempting to activate" Changes between "down" and "attempting to activate"
if there is no signal. if there is no signal.
* link_status * link_status
"not connected"
"connected" - "not connected"
"lost" - "connected"
- "lost"
* mac_address * mac_address
* modulation * modulation
"" (when not connected)
"ANSI T1.413" - "" (when not connected)
"ITU-T G.992.1 (G.DMT)" - "ANSI T1.413"
"ITU-T G.992.2 (G.LITE)" - "ITU-T G.992.1 (G.DMT)"
- "ITU-T G.992.2 (G.LITE)"
* startup_attempts * startup_attempts
Count of total attempts to initialise ADSL.
- Count of total attempts to initialise ADSL.
To enable/disable ADSL, the following can be written to the adsl_state file: To enable/disable ADSL, the following can be written to the adsl_state file:
"start"
"stop
"restart" (stops, waits 1.5s, then starts)
"poll" (used to resume status polling if it was disabled due to failure)
Changes in adsl/line state are reported via kernel log messages: - "start"
- "stop
- "restart" (stops, waits 1.5s, then starts)
- "poll" (used to resume status polling if it was disabled due to failure)
Changes in adsl/line state are reported via kernel log messages::
[4942145.150704] ATM dev 0: ADSL state: running [4942145.150704] ATM dev 0: ADSL state: running
[4942243.663766] ATM dev 0: ADSL line: down [4942243.663766] ATM dev 0: ADSL line: down
[4942249.665075] ATM dev 0: ADSL line: attempting to activate [4942249.665075] ATM dev 0: ADSL line: attempting to activate
......
.. SPDX-License-Identifier: GPL-2.0
=============
DCCP protocol DCCP protocol
============= =============
Contents .. Contents
======== - Introduction
- Introduction - Missing features
- Missing features - Socket options
- Socket options - Sysctl variables
- Sysctl variables - IOCTLs
- IOCTLs - Other tunables
- Other tunables - Notes
- Notes
Introduction Introduction
...@@ -38,6 +40,7 @@ The Linux DCCP implementation does not currently support all the features that a ...@@ -38,6 +40,7 @@ The Linux DCCP implementation does not currently support all the features that a
specified in RFCs 4340...42. specified in RFCs 4340...42.
The known bugs are at: The known bugs are at:
http://www.linuxfoundation.org/collaborate/workgroups/networking/todo#DCCP http://www.linuxfoundation.org/collaborate/workgroups/networking/todo#DCCP
For more up-to-date versions of the DCCP implementation, please consider using For more up-to-date versions of the DCCP implementation, please consider using
...@@ -54,7 +57,8 @@ defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special, ...@@ -54,7 +57,8 @@ defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special,
and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an
u32 priority value as ancillary data to sendmsg(), where higher numbers indicate u32 priority value as ancillary data to sendmsg(), where higher numbers indicate
a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to
be formatted using a cmsg(3) message header filled in as follows: be formatted using a cmsg(3) message header filled in as follows::
cmsg->cmsg_level = SOL_DCCP; cmsg->cmsg_level = SOL_DCCP;
cmsg->cmsg_type = DCCP_SCM_PRIORITY; cmsg->cmsg_type = DCCP_SCM_PRIORITY;
cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */ cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */
...@@ -94,7 +98,7 @@ must be registered on the socket before calling connect() or listen(). ...@@ -94,7 +98,7 @@ must be registered on the socket before calling connect() or listen().
DCCP_SOCKOPT_TX_CCID is read/write. It returns the current CCID (if set) or sets DCCP_SOCKOPT_TX_CCID is read/write. It returns the current CCID (if set) or sets
the preference list for the TX CCID, using the same format as DCCP_SOCKOPT_CCID. the preference list for the TX CCID, using the same format as DCCP_SOCKOPT_CCID.
Please note that the getsockopt argument type here is `int', not uint8_t. Please note that the getsockopt argument type here is ``int``, not uint8_t.
DCCP_SOCKOPT_RX_CCID is analogous to DCCP_SOCKOPT_TX_CCID, but for the RX CCID. DCCP_SOCKOPT_RX_CCID is analogous to DCCP_SOCKOPT_TX_CCID, but for the RX CCID.
...@@ -113,6 +117,7 @@ be enabled at the receiver, too with suitable choice of CsCov. ...@@ -113,6 +117,7 @@ be enabled at the receiver, too with suitable choice of CsCov.
DCCP_SOCKOPT_SEND_CSCOV sets the sender checksum coverage. Values in the DCCP_SOCKOPT_SEND_CSCOV sets the sender checksum coverage. Values in the
range 0..15 are acceptable. The default setting is 0 (full coverage), range 0..15 are acceptable. The default setting is 0 (full coverage),
values between 1..15 indicate partial coverage. values between 1..15 indicate partial coverage.
DCCP_SOCKOPT_RECV_CSCOV is for the receiver and has a different meaning: it DCCP_SOCKOPT_RECV_CSCOV is for the receiver and has a different meaning: it
sets a threshold, where again values 0..15 are acceptable. The default sets a threshold, where again values 0..15 are acceptable. The default
of 0 means that all packets with a partial coverage will be discarded. of 0 means that all packets with a partial coverage will be discarded.
...@@ -123,11 +128,13 @@ DCCP_SOCKOPT_RECV_CSCOV is for the receiver and has a different meaning: it ...@@ -123,11 +128,13 @@ DCCP_SOCKOPT_RECV_CSCOV is for the receiver and has a different meaning: it
The following two options apply to CCID 3 exclusively and are getsockopt()-only. The following two options apply to CCID 3 exclusively and are getsockopt()-only.
In either case, a TFRC info struct (defined in <linux/tfrc.h>) is returned. In either case, a TFRC info struct (defined in <linux/tfrc.h>) is returned.
DCCP_SOCKOPT_CCID_RX_INFO DCCP_SOCKOPT_CCID_RX_INFO
Returns a `struct tfrc_rx_info' in optval; the buffer for optval and Returns a ``struct tfrc_rx_info`` in optval; the buffer for optval and
optlen must be set to at least sizeof(struct tfrc_rx_info). optlen must be set to at least sizeof(struct tfrc_rx_info).
DCCP_SOCKOPT_CCID_TX_INFO DCCP_SOCKOPT_CCID_TX_INFO
Returns a `struct tfrc_tx_info' in optval; the buffer for optval and Returns a ``struct tfrc_tx_info`` in optval; the buffer for optval and
optlen must be set to at least sizeof(struct tfrc_tx_info). optlen must be set to at least sizeof(struct tfrc_tx_info).
On unidirectional connections it is useful to close the unused half-connection On unidirectional connections it is useful to close the unused half-connection
...@@ -182,7 +189,7 @@ sync_ratelimit = 125 ms ...@@ -182,7 +189,7 @@ sync_ratelimit = 125 ms
IOCTLS IOCTLS
====== ======
FIONREAD FIONREAD
Works as in udp(7): returns in the `int' argument pointer the size of Works as in udp(7): returns in the ``int`` argument pointer the size of
the next pending datagram in bytes, or 0 when no datagram is pending. the next pending datagram in bytes, or 0 when no datagram is pending.
...@@ -191,10 +198,12 @@ Other tunables ...@@ -191,10 +198,12 @@ Other tunables
Per-route rto_min support Per-route rto_min support
CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value
of the RTO timer. This setting can be modified via the 'rto_min' option of the RTO timer. This setting can be modified via the 'rto_min' option
of iproute2; for example: of iproute2; for example::
> ip route change 10.0.0.0/24 rto_min 250j dev wlan0 > ip route change 10.0.0.0/24 rto_min 250j dev wlan0
> ip route add 10.0.0.254/32 rto_min 800j dev wlan0 > ip route add 10.0.0.254/32 rto_min 800j dev wlan0
> ip route show dev wlan0 > ip route show dev wlan0
CCID-3 also supports the rto_min setting: it is used to define the lower CCID-3 also supports the rto_min setting: it is used to define the lower
bound for the expiry of the nofeedback timer. This can be useful on LANs bound for the expiry of the nofeedback timer. This can be useful on LANs
with very low RTTs (e.g., loopback, Gbit ethernet). with very low RTTs (e.g., loopback, Gbit ethernet).
......
.. SPDX-License-Identifier: GPL-2.0
======================
DCTCP (DataCenter TCP) DCTCP (DataCenter TCP)
---------------------- ======================
DCTCP is an enhancement to the TCP congestion control algorithm for data DCTCP is an enhancement to the TCP congestion control algorithm for data
center networks and leverages Explicit Congestion Notification (ECN) in center networks and leverages Explicit Congestion Notification (ECN) in
the data center network to provide multi-bit feedback to the end hosts. the data center network to provide multi-bit feedback to the end hosts.
To enable it on end hosts: To enable it on end hosts::
sysctl -w net.ipv4.tcp_congestion_control=dctcp sysctl -w net.ipv4.tcp_congestion_control=dctcp
sysctl -w net.ipv4.tcp_ecn_fallback=0 (optional) sysctl -w net.ipv4.tcp_ecn_fallback=0 (optional)
...@@ -25,14 +28,19 @@ SIGCOMM/SIGMETRICS papers: ...@@ -25,14 +28,19 @@ SIGCOMM/SIGMETRICS papers:
i) Mohammad Alizadeh, Albert Greenberg, David A. Maltz, Jitendra Padhye, i) Mohammad Alizadeh, Albert Greenberg, David A. Maltz, Jitendra Padhye,
Parveen Patel, Balaji Prabhakar, Sudipta Sengupta, and Murari Sridharan: Parveen Patel, Balaji Prabhakar, Sudipta Sengupta, and Murari Sridharan:
"Data Center TCP (DCTCP)", Data Center Networks session
"Data Center TCP (DCTCP)", Data Center Networks session"
Proc. ACM SIGCOMM, New Delhi, 2010. Proc. ACM SIGCOMM, New Delhi, 2010.
http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp-final.pdf http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp-final.pdf
http://www.sigcomm.org/ccr/papers/2010/October/1851275.1851192 http://www.sigcomm.org/ccr/papers/2010/October/1851275.1851192
ii) Mohammad Alizadeh, Adel Javanmard, and Balaji Prabhakar: ii) Mohammad Alizadeh, Adel Javanmard, and Balaji Prabhakar:
"Analysis of DCTCP: Stability, Convergence, and Fairness" "Analysis of DCTCP: Stability, Convergence, and Fairness"
Proc. ACM SIGMETRICS, San Jose, 2011. Proc. ACM SIGMETRICS, San Jose, 2011.
http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp_analysis-full.pdf http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp_analysis-full.pdf
IETF informational draft: IETF informational draft:
......
Linux DECnet Networking Layer Information .. SPDX-License-Identifier: GPL-2.0
===========================================
1) Other documentation.... =========================================
Linux DECnet Networking Layer Information
=========================================
o Project Home Pages 1. Other documentation....
http://www.chygwyn.com/ - Kernel info ==========================
http://linux-decnet.sourceforge.net/ - Userland tools
http://www.sourceforge.net/projects/linux-decnet/ - Status page
2) Configuring the kernel - Project Home Pages
- http://www.chygwyn.com/ - Kernel info
- http://linux-decnet.sourceforge.net/ - Userland tools
- http://www.sourceforge.net/projects/linux-decnet/ - Status page
2. Configuring the kernel
=========================
Be sure to turn on the following options: Be sure to turn on the following options:
CONFIG_DECNET (obviously) - CONFIG_DECNET (obviously)
CONFIG_PROC_FS (to see what's going on) - CONFIG_PROC_FS (to see what's going on)
CONFIG_SYSCTL (for easy configuration) - CONFIG_SYSCTL (for easy configuration)
if you want to try out router support (not properly debugged yet) if you want to try out router support (not properly debugged yet)
you'll need the following options as well... you'll need the following options as well...
CONFIG_DECNET_ROUTER (to be able to add/delete routes) - CONFIG_DECNET_ROUTER (to be able to add/delete routes)
CONFIG_NETFILTER (will be required for the DECnet routing daemon) - CONFIG_NETFILTER (will be required for the DECnet routing daemon)
Don't turn on SIOCGIFCONF support for DECnet unless you are really sure Don't turn on SIOCGIFCONF support for DECnet unless you are really sure
that you need it, in general you won't and it can cause ifconfig to that you need it, in general you won't and it can cause ifconfig to
...@@ -29,7 +34,7 @@ malfunction. ...@@ -29,7 +34,7 @@ malfunction.
Run time configuration has changed slightly from the 2.4 system. If you Run time configuration has changed slightly from the 2.4 system. If you
want to configure an endnode, then the simplified procedure is as follows: want to configure an endnode, then the simplified procedure is as follows:
o Set the MAC address on your ethernet card before starting _any_ other - Set the MAC address on your ethernet card before starting _any_ other
network protocols. network protocols.
As soon as your network card is brought into the UP state, DECnet should As soon as your network card is brought into the UP state, DECnet should
...@@ -37,7 +42,8 @@ start working. If you need something more complicated or are unsure how ...@@ -37,7 +42,8 @@ start working. If you need something more complicated or are unsure how
to set the MAC address, see the next section. Also all configurations which to set the MAC address, see the next section. Also all configurations which
worked with 2.4 will work under 2.5 with no change. worked with 2.4 will work under 2.5 with no change.
3) Command line options 3. Command line options
=======================
You can set a DECnet address on the kernel command line for compatibility You can set a DECnet address on the kernel command line for compatibility
with the 2.4 configuration procedure, but in general it's not needed any more. with the 2.4 configuration procedure, but in general it's not needed any more.
...@@ -56,7 +62,7 @@ interface then you won't see any entries in /proc/net/neigh for the local ...@@ -56,7 +62,7 @@ interface then you won't see any entries in /proc/net/neigh for the local
host until such time as you start a connection. This doesn't affect the host until such time as you start a connection. This doesn't affect the
operation of the local communications in any other way though. operation of the local communications in any other way though.
The kernel command line takes options looking like the following: The kernel command line takes options looking like the following::
decnet.addr=1,2 decnet.addr=1,2
...@@ -82,7 +88,7 @@ address of the node in order for it to be autoconfigured (and then appear in ...@@ -82,7 +88,7 @@ address of the node in order for it to be autoconfigured (and then appear in
FTP sites called dn2ethaddr which can compute the correct ethernet FTP sites called dn2ethaddr which can compute the correct ethernet
address to use. The address can be set by ifconfig either before or address to use. The address can be set by ifconfig either before or
at the time the device is brought up. If you are using RedHat you can at the time the device is brought up. If you are using RedHat you can
add the line: add the line::
MACADDR=AA:00:04:00:03:04 MACADDR=AA:00:04:00:03:04
...@@ -95,7 +101,7 @@ verify with iproute2). ...@@ -95,7 +101,7 @@ verify with iproute2).
The default device for routing can be set through the /proc filesystem The default device for routing can be set through the /proc filesystem
by setting /proc/sys/net/decnet/default_device to the by setting /proc/sys/net/decnet/default_device to the
device you want DECnet to route packets out of when no specific route device you want DECnet to route packets out of when no specific route
is available. Usually this will be eth0, for example: is available. Usually this will be eth0, for example::
echo -n "eth0" >/proc/sys/net/decnet/default_device echo -n "eth0" >/proc/sys/net/decnet/default_device
...@@ -106,7 +112,9 @@ confirm that by looking in the default_device file of course. ...@@ -106,7 +112,9 @@ confirm that by looking in the default_device file of course.
There is a list of what the other files under /proc/sys/net/decnet/ do There is a list of what the other files under /proc/sys/net/decnet/ do
on the kernel patch web site (shown above). on the kernel patch web site (shown above).
4) Run time kernel configuration 4. Run time kernel configuration
================================
This is either done through the sysctl/proc interface (see the kernel web This is either done through the sysctl/proc interface (see the kernel web
pages for details on what the various options do) or through the iproute2 pages for details on what the various options do) or through the iproute2
...@@ -122,20 +130,21 @@ since its the _only_ way to add and delete routes currently. Eventually ...@@ -122,20 +130,21 @@ since its the _only_ way to add and delete routes currently. Eventually
there will be a routing daemon to send and receive routing messages for there will be a routing daemon to send and receive routing messages for
each interface and update the kernel routing tables accordingly. The each interface and update the kernel routing tables accordingly. The
routing daemon will use netfilter to listen to routing packets, and routing daemon will use netfilter to listen to routing packets, and
rtnetlink to update the kernels routing tables. rtnetlink to update the kernels routing tables.
The DECnet raw socket layer has been removed since it was there purely The DECnet raw socket layer has been removed since it was there purely
for use by the routing daemon which will now use netfilter (a much cleaner for use by the routing daemon which will now use netfilter (a much cleaner
and more generic solution) instead. and more generic solution) instead.
5) How can I tell if its working ? 5. How can I tell if its working?
=================================
Here is a quick guide of what to look for in order to know if your DECnet Here is a quick guide of what to look for in order to know if your DECnet
kernel subsystem is working. kernel subsystem is working.
- Is the node address set (see /proc/sys/net/decnet/node_address) - Is the node address set (see /proc/sys/net/decnet/node_address)
- Is the node of the correct type - Is the node of the correct type
(see /proc/sys/net/decnet/conf/<dev>/forwarding) (see /proc/sys/net/decnet/conf/<dev>/forwarding)
- Is the Ethernet MAC address of each Ethernet card set to match - Is the Ethernet MAC address of each Ethernet card set to match
the DECnet address. If in doubt use the dn2ethaddr utility available the DECnet address. If in doubt use the dn2ethaddr utility available
at the ftp archive. at the ftp archive.
...@@ -160,7 +169,8 @@ kernel subsystem is working. ...@@ -160,7 +169,8 @@ kernel subsystem is working.
network, and see if you can obtain the same results. network, and see if you can obtain the same results.
- At this point you are on your own... :-) - At this point you are on your own... :-)
6) How to send a bug report 6. How to send a bug report
===========================
If you've found a bug and want to report it, then there are several things If you've found a bug and want to report it, then there are several things
you can do to help me work out exactly what it is that is wrong. Useful you can do to help me work out exactly what it is that is wrong. Useful
...@@ -175,18 +185,19 @@ information (_most_ of which _is_ _essential_) includes: ...@@ -175,18 +185,19 @@ information (_most_ of which _is_ _essential_) includes:
- How much data was being transferred ? - How much data was being transferred ?
- Was the network congested ? - Was the network congested ?
- How can the problem be reproduced ? - How can the problem be reproduced ?
- Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of - Can you use tcpdump to get a trace ? (N.B. Most (all?) versions of
tcpdump don't understand how to dump DECnet properly, so including tcpdump don't understand how to dump DECnet properly, so including
the hex listing of the packet contents is _essential_, usually the -x flag. the hex listing of the packet contents is _essential_, usually the -x flag.
You may also need to increase the length grabbed with the -s flag. The You may also need to increase the length grabbed with the -s flag. The
-e flag also provides very useful information (ethernet MAC addresses)) -e flag also provides very useful information (ethernet MAC addresses))
7) MAC FAQ 7. MAC FAQ
==========
A quick FAQ on ethernet MAC addresses to explain how Linux and DECnet A quick FAQ on ethernet MAC addresses to explain how Linux and DECnet
interact and how to get the best performance from your hardware. interact and how to get the best performance from your hardware.
Ethernet cards are designed to normally only pass received network frames Ethernet cards are designed to normally only pass received network frames
to a host computer when they are addressed to it, or to the broadcast address. to a host computer when they are addressed to it, or to the broadcast address.
Linux has an interface which allows the setting of extra addresses for Linux has an interface which allows the setting of extra addresses for
...@@ -197,8 +208,8 @@ significant processor time and bus bandwidth can be used up on a busy ...@@ -197,8 +208,8 @@ significant processor time and bus bandwidth can be used up on a busy
network (see the NAPI documentation for a longer explanation of these network (see the NAPI documentation for a longer explanation of these
effects). effects).
DECnet makes use of this interface to allow running DECnet on an ethernet DECnet makes use of this interface to allow running DECnet on an ethernet
card which has already been configured using TCP/IP (presumably using the card which has already been configured using TCP/IP (presumably using the
built in MAC address of the card, as usual) and/or to allow multiple DECnet built in MAC address of the card, as usual) and/or to allow multiple DECnet
addresses on each physical interface. If you do this, be aware that if your addresses on each physical interface. If you do this, be aware that if your
ethernet card doesn't support perfect hashing in its MAC address filter ethernet card doesn't support perfect hashing in its MAC address filter
...@@ -210,7 +221,8 @@ to gain the best efficiency. Better still is to use a card which supports ...@@ -210,7 +221,8 @@ to gain the best efficiency. Better still is to use a card which supports
NAPI as well. NAPI as well.
8) Mailing list 8. Mailing list
===============
If you are keen to get involved in development, or want to ask questions If you are keen to get involved in development, or want to ask questions
about configuration, or even just report bugs, then there is a mailing about configuration, or even just report bugs, then there is a mailing
...@@ -218,7 +230,8 @@ list that you can join, details are at: ...@@ -218,7 +230,8 @@ list that you can join, details are at:
http://sourceforge.net/mail/?group_id=4993 http://sourceforge.net/mail/?group_id=4993
9) Legal Info 9. Legal Info
=============
The Linux DECnet project team have placed their code under the GPL. The The Linux DECnet project team have placed their code under the GPL. The
software is provided "as is" and without warranty express or implied. software is provided "as is" and without warranty express or implied.
......
Notes on the DEC FDDIcontroller 700 (DEFZA-xx) driver v.1.1.4. .. SPDX-License-Identifier: GPL-2.0
=====================================================
Notes on the DEC FDDIcontroller 700 (DEFZA-xx) driver
=====================================================
:Version: v.1.1.4
DEC FDDIcontroller 700 is DEC's first-generation TURBOchannel FDDI DEC FDDIcontroller 700 is DEC's first-generation TURBOchannel FDDI
......
.. SPDX-License-Identifier: GPL-2.0
=============================================================================
Linux and the 3Com EtherLink III Series Ethercards (driver v1.18c and higher) Linux and the 3Com EtherLink III Series Ethercards (driver v1.18c and higher)
---------------------------------------------------------------------------- =============================================================================
This file contains the instructions and caveats for v1.18c and higher versions This file contains the instructions and caveats for v1.18c and higher versions
of the 3c509 driver. You should not use the driver without reading this file. of the 3c509 driver. You should not use the driver without reading this file.
release 1.0 release 1.0
28 February 2002 28 February 2002
Current maintainer (corrections to): Current maintainer (corrections to):
David Ruggiero <jdr@farfalle.com> David Ruggiero <jdr@farfalle.com>
---------------------------------------------------------------------------- Introduction
============
(0) Introduction
The following are notes and information on using the 3Com EtherLink III series The following are notes and information on using the 3Com EtherLink III series
ethercards in Linux. These cards are commonly known by the most widely-used ethercards in Linux. These cards are commonly known by the most widely-used
...@@ -21,11 +25,11 @@ be (but sometimes are) confused with the similarly-numbered PCI-bus "3c905" ...@@ -21,11 +25,11 @@ be (but sometimes are) confused with the similarly-numbered PCI-bus "3c905"
provided by the module 3c509.c, which has code to support all of the following provided by the module 3c509.c, which has code to support all of the following
models: models:
3c509 (original ISA card) - 3c509 (original ISA card)
3c509B (later revision of the ISA card; supports full-duplex) - 3c509B (later revision of the ISA card; supports full-duplex)
3c589 (PCMCIA) - 3c589 (PCMCIA)
3c589B (later revision of the 3c589; supports full-duplex) - 3c589B (later revision of the 3c589; supports full-duplex)
3c579 (EISA) - 3c579 (EISA)
Large portions of this documentation were heavily borrowed from the guide Large portions of this documentation were heavily borrowed from the guide
written the original author of the 3c509 driver, Donald Becker. The master written the original author of the 3c509 driver, Donald Becker. The master
...@@ -33,32 +37,34 @@ copy of that document, which contains notes on older versions of the driver, ...@@ -33,32 +37,34 @@ copy of that document, which contains notes on older versions of the driver,
currently resides on Scyld web server: http://www.scyld.com/. currently resides on Scyld web server: http://www.scyld.com/.
(1) Special Driver Features Special Driver Features
=======================
Overriding card settings Overriding card settings
The driver allows boot- or load-time overriding of the card's detected IOADDR, The driver allows boot- or load-time overriding of the card's detected IOADDR,
IRQ, and transceiver settings, although this capability shouldn't generally be IRQ, and transceiver settings, although this capability shouldn't generally be
needed except to enable full-duplex mode (see below). An example of the syntax needed except to enable full-duplex mode (see below). An example of the syntax
for LILO parameters for doing this: for LILO parameters for doing this::
ether=10,0x310,3,0x3c509,eth0 ether=10,0x310,3,0x3c509,eth0
This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and This configures the first found 3c509 card for IRQ 10, base I/O 0x310, and
transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts
with other card types when overriding the I/O address. When the driver is with other card types when overriding the I/O address. When the driver is
loaded as a module, only the IRQ may be overridden. For example, loaded as a module, only the IRQ may be overridden. For example,
setting two cards to IRQ10 and IRQ11 is done by using the irq module setting two cards to IRQ10 and IRQ11 is done by using the irq module
option: option::
options 3c509 irq=10,11 options 3c509 irq=10,11
(2) Full-duplex mode Full-duplex mode
================
The v1.18c driver added support for the 3c509B's full-duplex capabilities. The v1.18c driver added support for the 3c509B's full-duplex capabilities.
In order to enable and successfully use full-duplex mode, three conditions In order to enable and successfully use full-duplex mode, three conditions
must be met: must be met:
(a) You must have a Etherlink III card model whose hardware supports full- (a) You must have a Etherlink III card model whose hardware supports full-
duplex operations. Currently, the only members of the 3c509 family that are duplex operations. Currently, the only members of the 3c509 family that are
...@@ -78,27 +84,32 @@ duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on ...@@ -78,27 +84,32 @@ duplex-capable Ethernet switch (*not* a hub), or a full-duplex-capable NIC on
another system that's connected directly to the 3c509B via a crossover cable. another system that's connected directly to the 3c509B via a crossover cable.
Full-duplex mode can be enabled using 'ethtool'. Full-duplex mode can be enabled using 'ethtool'.
/////Extremely important caution concerning full-duplex mode///// .. warning::
Understand that the 3c509B's hardware's full-duplex support is much more
limited than that provide by more modern network interface cards. Although Extremely important caution concerning full-duplex mode
at the physical layer of the network it fully supports full-duplex operation,
the card was designed before the current Ethernet auto-negotiation (N-way) Understand that the 3c509B's hardware's full-duplex support is much more
spec was written. This means that the 3c509B family ***cannot and will not limited than that provide by more modern network interface cards. Although
auto-negotiate a full-duplex connection with its link partner under any at the physical layer of the network it fully supports full-duplex operation,
circumstances, no matter how it is initialized***. If the full-duplex mode the card was designed before the current Ethernet auto-negotiation (N-way)
of the 3c509B is enabled, its link partner will very likely need to be spec was written. This means that the 3c509B family ***cannot and will not
independently _forced_ into full-duplex mode as well; otherwise various nasty auto-negotiate a full-duplex connection with its link partner under any
failures will occur - at the very least, you'll see massive numbers of packet circumstances, no matter how it is initialized***. If the full-duplex mode
collisions. This is one of very rare circumstances where disabling auto- of the 3c509B is enabled, its link partner will very likely need to be
negotiation and forcing the duplex mode of a network interface card or switch independently _forced_ into full-duplex mode as well; otherwise various nasty
would ever be necessary or desirable. failures will occur - at the very least, you'll see massive numbers of packet
collisions. This is one of very rare circumstances where disabling auto-
negotiation and forcing the duplex mode of a network interface card or switch
(3) Available Transceiver Types would ever be necessary or desirable.
Available Transceiver Types
===========================
For versions of the driver v1.18c and above, the available transceiver types are: For versions of the driver v1.18c and above, the available transceiver types are:
== =========================================================================
0 transceiver type from EEPROM config (normally 10baseT); force half-duplex 0 transceiver type from EEPROM config (normally 10baseT); force half-duplex
1 AUI (thick-net / DB15 connector) 1 AUI (thick-net / DB15 connector)
2 (undefined) 2 (undefined)
...@@ -106,6 +117,7 @@ For versions of the driver v1.18c and above, the available transceiver types are ...@@ -106,6 +117,7 @@ For versions of the driver v1.18c and above, the available transceiver types are
4 10baseT (RJ-45 connector); force half-duplex mode 4 10baseT (RJ-45 connector); force half-duplex mode
8 transceiver type and duplex mode taken from card's EEPROM config settings 8 transceiver type and duplex mode taken from card's EEPROM config settings
12 10baseT (RJ-45 connector); force full-duplex mode 12 10baseT (RJ-45 connector); force full-duplex mode
== =========================================================================
Prior to driver version 1.18c, only transceiver codes 0-4 were supported. Note Prior to driver version 1.18c, only transceiver codes 0-4 were supported. Note
that the new transceiver codes 8 and 12 are the *only* ones that will enable that the new transceiver codes 8 and 12 are the *only* ones that will enable
...@@ -116,26 +128,30 @@ it must always be explicitly enabled via one of these code in order to be ...@@ -116,26 +128,30 @@ it must always be explicitly enabled via one of these code in order to be
activated. activated.
The transceiver type can be changed using 'ethtool'. The transceiver type can be changed using 'ethtool'.
(4a) Interpretation of error messages and common problems
Interpretation of error messages and common problems
----------------------------------------------------
Error Messages Error Messages
^^^^^^^^^^^^^^
eth0: Infinite loop in interrupt, status 2011. eth0: Infinite loop in interrupt, status 2011.
These are "mostly harmless" message indicating that the driver had too much These are "mostly harmless" message indicating that the driver had too much
work during that interrupt cycle. With a status of 0x2011 you are receiving work during that interrupt cycle. With a status of 0x2011 you are receiving
packets faster than they can be removed from the card. This should be rare packets faster than they can be removed from the card. This should be rare
or impossible in normal operation. Possible causes of this error report are: or impossible in normal operation. Possible causes of this error report are:
- a "green" mode enabled that slows the processor down when there is no - a "green" mode enabled that slows the processor down when there is no
keyboard activity. keyboard activity.
- some other device or device driver hogging the bus or disabling interrupts. - some other device or device driver hogging the bus or disabling interrupts.
Check /proc/interrupts for excessive interrupt counts. The timer tick Check /proc/interrupts for excessive interrupt counts. The timer tick
interrupt should always be incrementing faster than the others. interrupt should always be incrementing faster than the others.
No received packets
^^^^^^^^^^^^^^^^^^^
No received packets
If a 3c509, 3c562 or 3c589 can successfully transmit packets, but never If a 3c509, 3c562 or 3c589 can successfully transmit packets, but never
receives packets (as reported by /proc/net/dev or 'ifconfig') you likely receives packets (as reported by /proc/net/dev or 'ifconfig') you likely
have an interrupt line problem. Check /proc/interrupts to verify that the have an interrupt line problem. Check /proc/interrupts to verify that the
...@@ -146,26 +162,37 @@ or IRQ5, and the easiest solution is to move the 3c509 to a different ...@@ -146,26 +162,37 @@ or IRQ5, and the easiest solution is to move the 3c509 to a different
interrupt line. If the device is receiving packets but 'ping' doesn't work, interrupt line. If the device is receiving packets but 'ping' doesn't work,
you have a routing problem. you have a routing problem.
Tx Carrier Errors Reported in /proc/net/dev Tx Carrier Errors Reported in /proc/net/dev
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If an EtherLink III appears to transmit packets, but the "Tx carrier errors" If an EtherLink III appears to transmit packets, but the "Tx carrier errors"
field in /proc/net/dev increments as quickly as the Tx packet count, you field in /proc/net/dev increments as quickly as the Tx packet count, you
likely have an unterminated network or the incorrect media transceiver selected. likely have an unterminated network or the incorrect media transceiver selected.
3c509B card is not detected on machines with an ISA PnP BIOS.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3c509B card is not detected on machines with an ISA PnP BIOS.
While the updated driver works with most PnP BIOS programs, it does not work While the updated driver works with most PnP BIOS programs, it does not work
with all. This can be fixed by disabling PnP support using the 3Com-supplied with all. This can be fixed by disabling PnP support using the 3Com-supplied
setup program. setup program.
3c509 card is not detected on overclocked machines
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3c509 card is not detected on overclocked machines
Increase the delay time in id_read_eeprom() from the current value, 500, Increase the delay time in id_read_eeprom() from the current value, 500,
to an absurdly high value, such as 5000. to an absurdly high value, such as 5000.
Decoding Status and Error Messages
----------------------------------
(4b) Decoding Status and Error Messages
The bits in the main status register are: The bits in the main status register are:
===== ======================================
value description value description
===== ======================================
0x01 Interrupt latch 0x01 Interrupt latch
0x02 Tx overrun, or Rx underrun 0x02 Tx overrun, or Rx underrun
0x04 Tx complete 0x04 Tx complete
...@@ -174,30 +201,38 @@ value description ...@@ -174,30 +201,38 @@ value description
0x20 A Rx packet has started to arrive 0x20 A Rx packet has started to arrive
0x40 The driver has requested an interrupt 0x40 The driver has requested an interrupt
0x80 Statistics counter nearly full 0x80 Statistics counter nearly full
===== ======================================
The bits in the transmit (Tx) status word are: The bits in the transmit (Tx) status word are:
value description ===== ============================================
0x02 Out-of-window collision. value description
0x04 Status stack overflow (normally impossible). ===== ============================================
0x08 16 collisions. 0x02 Out-of-window collision.
0x10 Tx underrun (not enough PCI bus bandwidth). 0x04 Status stack overflow (normally impossible).
0x20 Tx jabber. 0x08 16 collisions.
0x40 Tx interrupt requested. 0x10 Tx underrun (not enough PCI bus bandwidth).
0x80 Status is valid (this should always be set). 0x20 Tx jabber.
0x40 Tx interrupt requested.
0x80 Status is valid (this should always be set).
===== ============================================
When a transmit error occurs the driver produces a status message such as When a transmit error occurs the driver produces a status message such as::
eth0: Transmit error, Tx status register 82 eth0: Transmit error, Tx status register 82
The two values typically seen here are: The two values typically seen here are:
0x82 0x82
^^^^
Out of window collision. This typically occurs when some other Ethernet Out of window collision. This typically occurs when some other Ethernet
host is incorrectly set to full duplex on a half duplex network. host is incorrectly set to full duplex on a half duplex network.
0x88
^^^^
0x88
16 collisions. This typically occurs when the network is exceptionally busy 16 collisions. This typically occurs when the network is exceptionally busy
or when another host doesn't correctly back off after a collision. If this or when another host doesn't correctly back off after a collision. If this
error is mixed with 0x82 errors it is the result of a host incorrectly set error is mixed with 0x82 errors it is the result of a host incorrectly set
...@@ -207,7 +242,8 @@ Both of these errors are the result of network problems that should be ...@@ -207,7 +242,8 @@ Both of these errors are the result of network problems that should be
corrected. They do not represent driver malfunction. corrected. They do not represent driver malfunction.
(5) Revision history (this file) Revision history (this file)
============================
28Feb02 v1.0 DR New; major portions based on Becker original 3c509 docs 28Feb02 v1.0 DR New; major portions based on Becker original 3c509 docs
Documentation/networking/device_drivers/3com/vortex.txt .. SPDX-License-Identifier: GPL-2.0
=========================
3Com Vortex device driver
=========================
Documentation/networking/device_drivers/3com/vortex.rst
Andrew Morton Andrew Morton
30 April 2000 30 April 2000
...@@ -8,12 +16,12 @@ driver for Linux, 3c59x.c. ...@@ -8,12 +16,12 @@ driver for Linux, 3c59x.c.
The driver was written by Donald Becker <becker@scyld.com> The driver was written by Donald Becker <becker@scyld.com>
Don is no longer the prime maintainer of this version of the driver. Don is no longer the prime maintainer of this version of the driver.
Please report problems to one or more of: Please report problems to one or more of:
Andrew Morton - Andrew Morton
Netdev mailing list <netdev@vger.kernel.org> - Netdev mailing list <netdev@vger.kernel.org>
Linux kernel mailing list <linux-kernel@vger.kernel.org> - Linux kernel mailing list <linux-kernel@vger.kernel.org>
Please note the 'Reporting and Diagnosing Problems' section at the end Please note the 'Reporting and Diagnosing Problems' section at the end
of this file. of this file.
...@@ -24,58 +32,58 @@ Since kernel 2.3.99-pre6, this driver incorporates the support for the ...@@ -24,58 +32,58 @@ Since kernel 2.3.99-pre6, this driver incorporates the support for the
This driver supports the following hardware: This driver supports the following hardware:
3c590 Vortex 10Mbps - 3c590 Vortex 10Mbps
3c592 EISA 10Mbps Demon/Vortex - 3c592 EISA 10Mbps Demon/Vortex
3c597 EISA Fast Demon/Vortex - 3c597 EISA Fast Demon/Vortex
3c595 Vortex 100baseTx - 3c595 Vortex 100baseTx
3c595 Vortex 100baseT4 - 3c595 Vortex 100baseT4
3c595 Vortex 100base-MII - 3c595 Vortex 100base-MII
3c900 Boomerang 10baseT - 3c900 Boomerang 10baseT
3c900 Boomerang 10Mbps Combo - 3c900 Boomerang 10Mbps Combo
3c900 Cyclone 10Mbps TPO - 3c900 Cyclone 10Mbps TPO
3c900 Cyclone 10Mbps Combo - 3c900 Cyclone 10Mbps Combo
3c900 Cyclone 10Mbps TPC - 3c900 Cyclone 10Mbps TPC
3c900B-FL Cyclone 10base-FL - 3c900B-FL Cyclone 10base-FL
3c905 Boomerang 100baseTx - 3c905 Boomerang 100baseTx
3c905 Boomerang 100baseT4 - 3c905 Boomerang 100baseT4
3c905B Cyclone 100baseTx - 3c905B Cyclone 100baseTx
3c905B Cyclone 10/100/BNC - 3c905B Cyclone 10/100/BNC
3c905B-FX Cyclone 100baseFx - 3c905B-FX Cyclone 100baseFx
3c905C Tornado - 3c905C Tornado
3c920B-EMB-WNM (ATI Radeon 9100 IGP) - 3c920B-EMB-WNM (ATI Radeon 9100 IGP)
3c980 Cyclone - 3c980 Cyclone
3c980C Python-T - 3c980C Python-T
3cSOHO100-TX Hurricane - 3cSOHO100-TX Hurricane
3c555 Laptop Hurricane - 3c555 Laptop Hurricane
3c556 Laptop Tornado - 3c556 Laptop Tornado
3c556B Laptop Hurricane - 3c556B Laptop Hurricane
3c575 [Megahertz] 10/100 LAN CardBus - 3c575 [Megahertz] 10/100 LAN CardBus
3c575 Boomerang CardBus - 3c575 Boomerang CardBus
3CCFE575BT Cyclone CardBus - 3CCFE575BT Cyclone CardBus
3CCFE575CT Tornado CardBus - 3CCFE575CT Tornado CardBus
3CCFE656 Cyclone CardBus - 3CCFE656 Cyclone CardBus
3CCFEM656B Cyclone+Winmodem CardBus - 3CCFEM656B Cyclone+Winmodem CardBus
3CXFEM656C Tornado+Winmodem CardBus - 3CXFEM656C Tornado+Winmodem CardBus
3c450 HomePNA Tornado - 3c450 HomePNA Tornado
3c920 Tornado - 3c920 Tornado
3c982 Hydra Dual Port A - 3c982 Hydra Dual Port A
3c982 Hydra Dual Port B - 3c982 Hydra Dual Port B
3c905B-T4 - 3c905B-T4
3c920B-EMB-WNM Tornado - 3c920B-EMB-WNM Tornado
Module parameters Module parameters
================= =================
There are several parameters which may be provided to the driver when There are several parameters which may be provided to the driver when
its module is loaded. These are usually placed in /etc/modprobe.d/*.conf its module is loaded. These are usually placed in ``/etc/modprobe.d/*.conf``
configuration files. Example: configuration files. Example::
options 3c59x debug=3 rx_copybreak=300 options 3c59x debug=3 rx_copybreak=300
If you are using the PCMCIA tools (cardmgr) then the options may be If you are using the PCMCIA tools (cardmgr) then the options may be
placed in /etc/pcmcia/config.opts: placed in /etc/pcmcia/config.opts::
module "3c59x" opts "debug=3 rx_copybreak=300" module "3c59x" opts "debug=3 rx_copybreak=300"
The supported parameters are: The supported parameters are:
...@@ -89,7 +97,7 @@ options=N1,N2,N3,... ...@@ -89,7 +97,7 @@ options=N1,N2,N3,...
Each number in the list provides an option to the corresponding Each number in the list provides an option to the corresponding
network card. So if you have two 3c905's and you wish to provide network card. So if you have two 3c905's and you wish to provide
them with option 0x204 you would use: them with option 0x204 you would use::
options=0x204,0x204 options=0x204,0x204
...@@ -97,6 +105,8 @@ options=N1,N2,N3,... ...@@ -97,6 +105,8 @@ options=N1,N2,N3,...
have the following meanings: have the following meanings:
Possible media type settings Possible media type settings
== =================================
0 10baseT 0 10baseT
1 10Mbs AUI 1 10Mbs AUI
2 undefined 2 undefined
...@@ -108,17 +118,20 @@ options=N1,N2,N3,... ...@@ -108,17 +118,20 @@ options=N1,N2,N3,...
8 Autonegotiate 8 Autonegotiate
9 External MII 9 External MII
10 Use default setting from EEPROM 10 Use default setting from EEPROM
== =================================
When generating a value for the 'options' setting, the above media When generating a value for the 'options' setting, the above media
selection values may be OR'ed (or added to) the following: selection values may be OR'ed (or added to) the following:
====== =============================================
0x8000 Set driver debugging level to 7 0x8000 Set driver debugging level to 7
0x4000 Set driver debugging level to 2 0x4000 Set driver debugging level to 2
0x0400 Enable Wake-on-LAN 0x0400 Enable Wake-on-LAN
0x0200 Force full duplex mode. 0x0200 Force full duplex mode.
0x0010 Bus-master enable bit (Old Vortex cards only) 0x0010 Bus-master enable bit (Old Vortex cards only)
====== =============================================
For example: For example::
insmod 3c59x options=0x204 insmod 3c59x options=0x204
...@@ -127,14 +140,14 @@ options=N1,N2,N3,... ...@@ -127,14 +140,14 @@ options=N1,N2,N3,...
global_options=N global_options=N
Sets the `options' parameter for all 3c59x NICs in the machine. Sets the ``options`` parameter for all 3c59x NICs in the machine.
Entries in the `options' array above will override any setting of Entries in the ``options`` array above will override any setting of
this. this.
full_duplex=N1,N2,N3... full_duplex=N1,N2,N3...
Similar to bit 9 of 'options'. Forces the corresponding card into Similar to bit 9 of 'options'. Forces the corresponding card into
full-duplex mode. Please use this in preference to the `options' full-duplex mode. Please use this in preference to the ``options``
parameter. parameter.
In fact, please don't use this at all! You're better off getting In fact, please don't use this at all! You're better off getting
...@@ -143,13 +156,13 @@ full_duplex=N1,N2,N3... ...@@ -143,13 +156,13 @@ full_duplex=N1,N2,N3...
global_full_duplex=N1 global_full_duplex=N1
Sets full duplex mode for all 3c59x NICs in the machine. Entries Sets full duplex mode for all 3c59x NICs in the machine. Entries
in the `full_duplex' array above will override any setting of this. in the ``full_duplex`` array above will override any setting of this.
flow_ctrl=N1,N2,N3... flow_ctrl=N1,N2,N3...
Use 802.3x MAC-layer flow control. The 3com cards only support the Use 802.3x MAC-layer flow control. The 3com cards only support the
PAUSE command, which means that they will stop sending packets for a PAUSE command, which means that they will stop sending packets for a
short period if they receive a PAUSE frame from the link partner. short period if they receive a PAUSE frame from the link partner.
The driver only allows flow control on a link which is operating in The driver only allows flow control on a link which is operating in
full duplex mode. full duplex mode.
...@@ -170,14 +183,14 @@ rx_copybreak=M ...@@ -170,14 +183,14 @@ rx_copybreak=M
This is a speed/space tradeoff. This is a speed/space tradeoff.
The value of rx_copybreak is used to decide when to make the copy. The value of rx_copybreak is used to decide when to make the copy.
If the packet size is less than rx_copybreak, the packet is copied. If the packet size is less than rx_copybreak, the packet is copied.
The default value for rx_copybreak is 200 bytes. The default value for rx_copybreak is 200 bytes.
max_interrupt_work=N max_interrupt_work=N
The driver's interrupt service routine can handle many receive and The driver's interrupt service routine can handle many receive and
transmit packets in a single invocation. It does this in a loop. transmit packets in a single invocation. It does this in a loop.
The value of max_interrupt_work governs how many times the interrupt The value of max_interrupt_work governs how many times the interrupt
service routine will loop. The default value is 32 loops. If this service routine will loop. The default value is 32 loops. If this
is exceeded the interrupt service routine gives up and generates a is exceeded the interrupt service routine gives up and generates a
...@@ -186,7 +199,7 @@ max_interrupt_work=N ...@@ -186,7 +199,7 @@ max_interrupt_work=N
hw_checksums=N1,N2,N3,... hw_checksums=N1,N2,N3,...
Recent 3com NICs are able to generate IPv4, TCP and UDP checksums Recent 3com NICs are able to generate IPv4, TCP and UDP checksums
in hardware. Linux has used the Rx checksumming for a long time. in hardware. Linux has used the Rx checksumming for a long time.
The "zero copy" patch which is planned for the 2.4 kernel series The "zero copy" patch which is planned for the 2.4 kernel series
allows you to make use of the NIC's DMA scatter/gather and transmit allows you to make use of the NIC's DMA scatter/gather and transmit
checksumming as well. checksumming as well.
...@@ -196,11 +209,11 @@ hw_checksums=N1,N2,N3,... ...@@ -196,11 +209,11 @@ hw_checksums=N1,N2,N3,...
This module parameter has been provided so you can override this This module parameter has been provided so you can override this
decision. If you think that Tx checksums are causing a problem, you decision. If you think that Tx checksums are causing a problem, you
may disable the feature with `hw_checksums=0'. may disable the feature with ``hw_checksums=0``.
If you think your NIC should be performing Tx checksumming and the If you think your NIC should be performing Tx checksumming and the
driver isn't enabling it, you can force the use of hardware Tx driver isn't enabling it, you can force the use of hardware Tx
checksumming with `hw_checksums=1'. checksumming with ``hw_checksums=1``.
The driver drops a message in the logfiles to indicate whether or The driver drops a message in the logfiles to indicate whether or
not it is using hardware scatter/gather and hardware Tx checksums. not it is using hardware scatter/gather and hardware Tx checksums.
...@@ -210,8 +223,8 @@ hw_checksums=N1,N2,N3,... ...@@ -210,8 +223,8 @@ hw_checksums=N1,N2,N3,...
decrease in throughput for send(). There is no effect upon receive decrease in throughput for send(). There is no effect upon receive
efficiency. efficiency.
compaq_ioaddr=N compaq_ioaddr=N,
compaq_irq=N compaq_irq=N,
compaq_device_id=N compaq_device_id=N
"Variables to work-around the Compaq PCI BIOS32 problem".... "Variables to work-around the Compaq PCI BIOS32 problem"....
...@@ -219,7 +232,7 @@ compaq_device_id=N ...@@ -219,7 +232,7 @@ compaq_device_id=N
watchdog=N watchdog=N
Sets the time duration (in milliseconds) after which the kernel Sets the time duration (in milliseconds) after which the kernel
decides that the transmitter has become stuck and needs to be reset. decides that the transmitter has become stuck and needs to be reset.
This is mainly for debugging purposes, although it may be advantageous This is mainly for debugging purposes, although it may be advantageous
to increase this value on LANs which have very high collision rates. to increase this value on LANs which have very high collision rates.
The default value is 5000 (5.0 seconds). The default value is 5000 (5.0 seconds).
...@@ -227,7 +240,7 @@ watchdog=N ...@@ -227,7 +240,7 @@ watchdog=N
enable_wol=N1,N2,N3,... enable_wol=N1,N2,N3,...
Enable Wake-on-LAN support for the relevant interface. Donald Enable Wake-on-LAN support for the relevant interface. Donald
Becker's `ether-wake' application may be used to wake suspended Becker's ``ether-wake`` application may be used to wake suspended
machines. machines.
Also enables the NIC's power management support. Also enables the NIC's power management support.
...@@ -235,7 +248,7 @@ enable_wol=N1,N2,N3,... ...@@ -235,7 +248,7 @@ enable_wol=N1,N2,N3,...
global_enable_wol=N global_enable_wol=N
Sets enable_wol mode for all 3c59x NICs in the machine. Entries in Sets enable_wol mode for all 3c59x NICs in the machine. Entries in
the `enable_wol' array above will override any setting of this. the ``enable_wol`` array above will override any setting of this.
Media selection Media selection
--------------- ---------------
...@@ -325,12 +338,12 @@ Autonegotiation notes ...@@ -325,12 +338,12 @@ Autonegotiation notes
Cisco switches (Jeff Busch <jbusch@deja.com>) Cisco switches (Jeff Busch <jbusch@deja.com>)
My "standard config" for ports to which PC's/servers connect directly: My "standard config" for ports to which PC's/servers connect directly::
interface FastEthernet0/N interface FastEthernet0/N
description machinename description machinename
load-interval 30 load-interval 30
spanning-tree portfast spanning-tree portfast
If autonegotiation is a problem, you may need to specify "speed If autonegotiation is a problem, you may need to specify "speed
100" and "duplex full" as well (or "speed 10" and "duplex half"). 100" and "duplex full" as well (or "speed 10" and "duplex half").
...@@ -368,9 +381,9 @@ steps you should take: ...@@ -368,9 +381,9 @@ steps you should take:
But for most problems it is useful to provide the following: But for most problems it is useful to provide the following:
o Kernel version, driver version - Kernel version, driver version
o A copy of the banner message which the driver generates when - A copy of the banner message which the driver generates when
it is initialised. For example: it is initialised. For example:
eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19 eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
...@@ -378,68 +391,68 @@ steps you should take: ...@@ -378,68 +391,68 @@ steps you should take:
MII transceiver found at address 24, status 782d. MII transceiver found at address 24, status 782d.
Enabling bus-master transmits and whole-frame receives. Enabling bus-master transmits and whole-frame receives.
NOTE: You must provide the `debug=2' modprobe option to generate NOTE: You must provide the ``debug=2`` modprobe option to generate
a full detection message. Please do this: a full detection message. Please do this::
modprobe 3c59x debug=2 modprobe 3c59x debug=2
o If it is a PCI device, the relevant output from 'lspci -vx', eg: - If it is a PCI device, the relevant output from 'lspci -vx', eg::
00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74) 00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
Subsystem: 3Com Corporation: Unknown device 9200 Subsystem: 3Com Corporation: Unknown device 9200
Flags: bus master, medium devsel, latency 32, IRQ 19 Flags: bus master, medium devsel, latency 32, IRQ 19
I/O ports at a400 [size=128] I/O ports at a400 [size=128]
Memory at db000000 (32-bit, non-prefetchable) [size=128] Memory at db000000 (32-bit, non-prefetchable) [size=128]
Expansion ROM at <unassigned> [disabled] [size=128K] Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [dc] Power Management version 2 Capabilities: [dc] Power Management version 2
00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00 00: b7 10 00 92 07 00 10 02 74 00 00 02 08 20 00 00
10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00 10: 01 a4 00 00 00 00 00 db 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10 20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a 30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
o A description of the environment: 10baseT? 100baseT? - A description of the environment: 10baseT? 100baseT?
full/half duplex? switched or hubbed? full/half duplex? switched or hubbed?
o Any additional module parameters which you may be providing to the driver. - Any additional module parameters which you may be providing to the driver.
o Any kernel logs which are produced. The more the merrier. - Any kernel logs which are produced. The more the merrier.
If this is a large file and you are sending your report to a If this is a large file and you are sending your report to a
mailing list, mention that you have the logfile, but don't send mailing list, mention that you have the logfile, but don't send
it. If you're reporting direct to the maintainer then just send it. If you're reporting direct to the maintainer then just send
it. it.
To ensure that all kernel logs are available, add the To ensure that all kernel logs are available, add the
following line to /etc/syslog.conf: following line to /etc/syslog.conf::
kern.* /var/log/messages kern.* /var/log/messages
Then restart syslogd with: Then restart syslogd with::
/etc/rc.d/init.d/syslog restart /etc/rc.d/init.d/syslog restart
(The above may vary, depending upon which Linux distribution you use). (The above may vary, depending upon which Linux distribution you use).
o If your problem is reproducible then that's great. Try the - If your problem is reproducible then that's great. Try the
following: following:
1) Increase the debug level. Usually this is done via: 1) Increase the debug level. Usually this is done via:
a) modprobe driver debug=7 a) modprobe driver debug=7
b) In /etc/modprobe.d/driver.conf: b) In /etc/modprobe.d/driver.conf:
options driver debug=7 options driver debug=7
2) Recreate the problem with the higher debug level, 2) Recreate the problem with the higher debug level,
send all logs to the maintainer. send all logs to the maintainer.
3) Download you card's diagnostic tool from Donald 3) Download you card's diagnostic tool from Donald
Becker's website <http://www.scyld.com/ethercard_diag.html>. Becker's website <http://www.scyld.com/ethercard_diag.html>.
Download mii-diag.c as well. Build these. Download mii-diag.c as well. Build these.
a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is a) Run 'vortex-diag -aaee' and 'mii-diag -v' when the card is
working correctly. Save the output. working correctly. Save the output.
b) Run the above commands when the card is malfunctioning. Send b) Run the above commands when the card is malfunctioning. Send
both sets of output. both sets of output.
Finally, please be patient and be prepared to do some work. You may Finally, please be patient and be prepared to do some work. You may
end up working on this problem for a week or more as the maintainer end up working on this problem for a week or more as the maintainer
......
.. SPDX-License-Identifier: GPL-2.0
=====================
DM9000 Network driver DM9000 Network driver
===================== =====================
Copyright 2008 Simtec Electronics, Copyright 2008 Simtec Electronics,
Ben Dooks <ben@simtec.co.uk> <ben-linux@fluff.org> Ben Dooks <ben@simtec.co.uk> <ben-linux@fluff.org>
...@@ -30,9 +34,9 @@ These resources should be specified in that order, as the ordering of the ...@@ -30,9 +34,9 @@ These resources should be specified in that order, as the ordering of the
two address regions is important (the driver expects these to be address two address regions is important (the driver expects these to be address
and then data). and then data).
An example from arch/arm/mach-s3c2410/mach-bast.c is: An example from arch/arm/mach-s3c2410/mach-bast.c is::
static struct resource bast_dm9k_resource[] = { static struct resource bast_dm9k_resource[] = {
[0] = { [0] = {
.start = S3C2410_CS5 + BAST_PA_DM9000, .start = S3C2410_CS5 + BAST_PA_DM9000,
.end = S3C2410_CS5 + BAST_PA_DM9000 + 3, .end = S3C2410_CS5 + BAST_PA_DM9000 + 3,
...@@ -48,14 +52,14 @@ static struct resource bast_dm9k_resource[] = { ...@@ -48,14 +52,14 @@ static struct resource bast_dm9k_resource[] = {
.end = IRQ_DM9000, .end = IRQ_DM9000,
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
} }
}; };
static struct platform_device bast_device_dm9k = { static struct platform_device bast_device_dm9k = {
.name = "dm9000", .name = "dm9000",
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bast_dm9k_resource), .num_resources = ARRAY_SIZE(bast_dm9k_resource),
.resource = bast_dm9k_resource, .resource = bast_dm9k_resource,
}; };
Note the setting of the IRQ trigger flag in bast_dm9k_resource[2].flags, Note the setting of the IRQ trigger flag in bast_dm9k_resource[2].flags,
as this will generate a warning if it is not present. The trigger from as this will generate a warning if it is not present. The trigger from
...@@ -64,13 +68,13 @@ handler to ensure that the IRQ is setup correctly. ...@@ -64,13 +68,13 @@ handler to ensure that the IRQ is setup correctly.
This shows a typical platform device, without the optional configuration This shows a typical platform device, without the optional configuration
platform data supplied. The next example uses the same resources, but adds platform data supplied. The next example uses the same resources, but adds
the optional platform data to pass extra configuration data: the optional platform data to pass extra configuration data::
static struct dm9000_plat_data bast_dm9k_platdata = { static struct dm9000_plat_data bast_dm9k_platdata = {
.flags = DM9000_PLATF_16BITONLY, .flags = DM9000_PLATF_16BITONLY,
}; };
static struct platform_device bast_device_dm9k = { static struct platform_device bast_device_dm9k = {
.name = "dm9000", .name = "dm9000",
.id = 0, .id = 0,
.num_resources = ARRAY_SIZE(bast_dm9k_resource), .num_resources = ARRAY_SIZE(bast_dm9k_resource),
...@@ -78,7 +82,7 @@ static struct platform_device bast_device_dm9k = { ...@@ -78,7 +82,7 @@ static struct platform_device bast_device_dm9k = {
.dev = { .dev = {
.platform_data = &bast_dm9k_platdata, .platform_data = &bast_dm9k_platdata,
} }
}; };
The platform data is defined in include/linux/dm9000.h and described below. The platform data is defined in include/linux/dm9000.h and described below.
......
.. SPDX-License-Identifier: GPL-2.0
===========================
The Gianfar Ethernet Driver The Gianfar Ethernet Driver
===========================
Author: Andy Fleming <afleming@freescale.com> :Author: Andy Fleming <afleming@freescale.com>
Updated: 2005-07-28 :Updated: 2005-07-28
CHECKSUM OFFLOADING Checksum Offloading
===================
The eTSEC controller (first included in parts from late 2005 like The eTSEC controller (first included in parts from late 2005 like
the 8548) has the ability to perform TCP, UDP, and IP checksums the 8548) has the ability to perform TCP, UDP, and IP checksums
...@@ -15,13 +20,15 @@ packets. Use ethtool to enable or disable this feature for RX ...@@ -15,13 +20,15 @@ packets. Use ethtool to enable or disable this feature for RX
and TX. and TX.
VLAN VLAN
====
In order to use VLAN, please consult Linux documentation on In order to use VLAN, please consult Linux documentation on
configuring VLANs. The gianfar driver supports hardware insertion and configuring VLANs. The gianfar driver supports hardware insertion and
extraction of VLAN headers, but not filtering. Filtering will be extraction of VLAN headers, but not filtering. Filtering will be
done by the kernel. done by the kernel.
MULTICASTING Multicasting
============
The gianfar driver supports using the group hash table on the The gianfar driver supports using the group hash table on the
TSEC (and the extended hash table on the eTSEC) for multicast TSEC (and the extended hash table on the eTSEC) for multicast
...@@ -29,13 +36,15 @@ filtering. On the eTSEC, the exact-match MAC registers are used ...@@ -29,13 +36,15 @@ filtering. On the eTSEC, the exact-match MAC registers are used
before the hash tables. See Linux documentation on how to join before the hash tables. See Linux documentation on how to join
multicast groups. multicast groups.
PADDING Padding
=======
The gianfar driver supports padding received frames with 2 bytes The gianfar driver supports padding received frames with 2 bytes
to align the IP header to a 16-byte boundary, when supported by to align the IP header to a 16-byte boundary, when supported by
hardware. hardware.
ETHTOOL Ethtool
=======
The gianfar driver supports the use of ethtool for many The gianfar driver supports the use of ethtool for many
configuration options. You must run ethtool only on currently configuration options. You must run ethtool only on currently
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册