Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller: 1) Platform regulatory domain support for ath10k, from Bartosz Markowski. 2) Centralize min/max MTU checking, thus removing tons of duplicated code all of the the various drivers. From Jarod Wilson. 3) Support ingress actions in act_mirred, from Shmulik Ladkani. 4) Improve device adjacency tracking, from David Ahern. 5) Add support for LED triggers on PHY link state changes, from Zach Brown. 6) Improve UDP socket memory accounting, from Paolo Abeni. 7) Set SK_MEM_QUANTUM to a fixed size of 4096, instead of PAGE_SIZE. From Eric Dumazet. 8) Collapse TCP SKBs at retransmit time even if the right side SKB has frags. Also from Eric Dumazet. 9) Add IP_RECVFRAGSIZE and IPV6_RECVFRAGSIZE cmsgs, from Willem de Bruijn. 10) Support routing by UID, from Lorenzo Colitti. 11) Handle L3 domain binding (ie. VRF) for RAW sockets, from David Ahern. 12) tcp_get_info() can run lockless, from Eric Dumazet. 13) 4-tuple UDP hashing in SFC driver, from Edward Cree. 14) Avoid reorders in GRO code, from Eric Dumazet. 15) IPV6 Segment Routing support, from David Lebrun. 16) Support MPLS push and pop for L3 packets in openvswitch, from Jiri Benc. 17) Add LRU datastructure support for BPF, Martin KaFai Lau. 18) VF support in liquidio driver, from Raghu Vatsavayi. 19) Multiqueue support in alx driver, from Tobias Regnery. 20) Networking cgroup BPF support, from Daniel Mack. 21) TCP chronograph measurements, from Francis Yan. 22) XDP support for qed driver, from Yuval Mintz. 23) BPF based lwtunnels, from Thomas Graf. 24) Consistent FIB dumping to offloading drivers, from Ido Schimmel. 25) Many optimizations for UDP under high load, from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1522 commits) netfilter: nft_counter: rework atomic dump and reset e1000: use disable_hardirq() for e1000_netpoll() i40e: don't truncate match_method assignment net: ethernet: ti: netcp: add support of cpts net: phy: phy drivers should not set SUPPORTED_[Asym_]Pause net: l2tp: ppp: change PPPOL2TP_MSG_* => L2TP_MSG_* net: l2tp: deprecate PPPOL2TP_MSG_* in favour of L2TP_MSG_* net: l2tp: export debug flags to UAPI net: ethernet: stmmac: remove private tx queue lock net: ethernet: sxgbe: remove private tx queue lock net: bridge: shorten ageing time on topology change net: bridge: add helper to set topology change net: bridge: add helper to offload ageing time net: nicvf: use new api ethtool_{get|set}_link_ksettings net: ethernet: ti: cpsw: sync rates for channels in dual emac mode net: ethernet: ti: cpsw: re-split res only when speed is changed net: ethernet: ti: cpsw: combine budget and weight split and check net: ethernet: ti: cpsw: don't start queue twice net: ethernet: ti: cpsw: use same macros to get active slave net: mvneta: select GENERIC_ALLOCATOR ...
This commit is contained in:
commit
ce38aa9cbe
|
@ -2,11 +2,17 @@ Broadcom AMAC Ethernet Controller Device Tree Bindings
|
|||
-------------------------------------------------------------
|
||||
|
||||
Required properties:
|
||||
- compatible: "brcm,amac" or "brcm,nsp-amac"
|
||||
- reg: Address and length of the GMAC registers,
|
||||
Address and length of the GMAC IDM registers
|
||||
- reg-names: Names of the registers. Must have both "amac_base" and
|
||||
"idm_base"
|
||||
- compatible: "brcm,amac"
|
||||
"brcm,nsp-amac"
|
||||
"brcm,ns2-amac"
|
||||
- reg: Address and length of the register set for the device. It
|
||||
contains the information of registers in the same order as
|
||||
described by reg-names
|
||||
- reg-names: Names of the registers.
|
||||
"amac_base": Address and length of the GMAC registers
|
||||
"idm_base": Address and length of the GMAC IDM registers
|
||||
"nicpm_base": Address and length of the NIC Port Manager
|
||||
registers (required for Northstar2)
|
||||
- interrupts: Interrupt number
|
||||
|
||||
Optional properties:
|
||||
|
|
|
@ -10,6 +10,7 @@ Required properties:
|
|||
"renesas,can-r8a7793" if CAN controller is a part of R8A7793 SoC.
|
||||
"renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
|
||||
"renesas,can-r8a7795" if CAN controller is a part of R8A7795 SoC.
|
||||
"renesas,can-r8a7796" if CAN controller is a part of R8A7796 SoC.
|
||||
"renesas,rcar-gen1-can" for a generic R-Car Gen1 compatible device.
|
||||
"renesas,rcar-gen2-can" for a generic R-Car Gen2 compatible device.
|
||||
"renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device.
|
||||
|
@ -24,11 +25,12 @@ Required properties:
|
|||
- pinctrl-0: pin control group to be used for this controller.
|
||||
- pinctrl-names: must be "default".
|
||||
|
||||
Required properties for "renesas,can-r8a7795" compatible:
|
||||
In R8A7795 SoC, "clkp2" can be CANFD clock. This is a div6 clock and can be
|
||||
used by both CAN and CAN FD controller at the same time. It needs to be scaled
|
||||
to maximum frequency if any of these controllers use it. This is done using
|
||||
the below properties.
|
||||
Required properties for "renesas,can-r8a7795" and "renesas,can-r8a7796"
|
||||
compatible:
|
||||
In R8A7795 and R8A7796 SoCs, "clkp2" can be CANFD clock. This is a div6 clock
|
||||
and can be used by both CAN and CAN FD controller at the same time. It needs to
|
||||
be scaled to maximum frequency if any of these controllers use it. This is done
|
||||
using the below properties:
|
||||
|
||||
- assigned-clocks: phandle of clkp2(CANFD) clock.
|
||||
- assigned-clock-rates: maximum frequency of this clock.
|
||||
|
|
|
@ -5,13 +5,14 @@ Required properties:
|
|||
- compatible: Must contain one or more of the following:
|
||||
- "renesas,rcar-gen3-canfd" for R-Car Gen3 compatible controller.
|
||||
- "renesas,r8a7795-canfd" for R8A7795 (R-Car H3) compatible controller.
|
||||
- "renesas,r8a7796-canfd" for R8A7796 (R-Car M3) compatible controller.
|
||||
|
||||
When compatible with the generic version, nodes must list the
|
||||
SoC-specific version corresponding to the platform first, followed by the
|
||||
family-specific and/or generic versions.
|
||||
|
||||
- reg: physical base address and size of the R-Car CAN FD register map.
|
||||
- interrupts: interrupt specifier for the Global & Channel interrupts
|
||||
- interrupts: interrupt specifiers for the Channel & Global interrupts
|
||||
- clocks: phandles and clock specifiers for 3 clock inputs.
|
||||
- clock-names: 3 clock input name strings: "fck", "canfd", "can_clk".
|
||||
- pinctrl-0: pin control group to be used for this controller.
|
||||
|
@ -23,11 +24,12 @@ The name of the child nodes are "channel0" and "channel1" respectively. Each
|
|||
child node supports the "status" property only, which is used to
|
||||
enable/disable the respective channel.
|
||||
|
||||
Required properties for "renesas,r8a7795-canfd" compatible:
|
||||
In R8A7795 SoC, canfd clock is a div6 clock and can be used by both CAN
|
||||
and CAN FD controller at the same time. It needs to be scaled to maximum
|
||||
frequency if any of these controllers use it. This is done using the
|
||||
below properties.
|
||||
Required properties for "renesas,r8a7795-canfd" and "renesas,r8a7796-canfd"
|
||||
compatible:
|
||||
In R8A7795 and R8A7796 SoCs, canfd clock is a div6 clock and can be used by both
|
||||
CAN and CAN FD controller at the same time. It needs to be scaled to maximum
|
||||
frequency if any of these controllers use it. This is done using the below
|
||||
properties:
|
||||
|
||||
- assigned-clocks: phandle of canfd clock.
|
||||
- assigned-clock-rates: maximum frequency of this clock.
|
||||
|
|
|
@ -20,8 +20,6 @@ Required properties:
|
|||
- slaves : Specifies number for slaves
|
||||
- active_slave : Specifies the slave to use for time stamping,
|
||||
ethtool and SIOCGMIIPHY
|
||||
- cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
|
||||
- cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
|
||||
|
||||
Optional properties:
|
||||
- ti,hwmods : Must be "cpgmac0"
|
||||
|
@ -35,7 +33,11 @@ Optional properties:
|
|||
For example in dra72x-evm, pcf gpio has to be
|
||||
driven low so that cpsw slave 0 and phy data
|
||||
lines are connected via mux.
|
||||
|
||||
- cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds
|
||||
- cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds
|
||||
Mult and shift will be calculated basing on CPTS
|
||||
rftclk frequency if both cpts_clock_shift and
|
||||
cpts_clock_mult properties are not provided.
|
||||
|
||||
Slave Properties:
|
||||
Required properties:
|
||||
|
|
|
@ -14,22 +14,42 @@ The properties described here are those specific to Marvell devices.
|
|||
Additional required and optional properties can be found in dsa.txt.
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be one of "marvell,mv88e6085",
|
||||
- compatible : Should be one of "marvell,mv88e6085" or
|
||||
"marvell,mv88e6190"
|
||||
- reg : Address on the MII bus for the switch.
|
||||
|
||||
Optional properties:
|
||||
|
||||
- reset-gpios : Should be a gpio specifier for a reset line
|
||||
|
||||
- interrupt-parent : Parent interrupt controller
|
||||
- interrupts : Interrupt from the switch
|
||||
- interrupt-controller : Indicates the switch is itself an interrupt
|
||||
controller. This is used for the PHY interrupts.
|
||||
#interrupt-cells = <2> : Controller uses two cells, number and flag
|
||||
- mdio : container of PHY and devices on the switches MDIO
|
||||
bus
|
||||
Example:
|
||||
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
switch0: switch@0 {
|
||||
compatible = "marvell,mv88e6085";
|
||||
reg = <0>;
|
||||
reset-gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
switch1phy0: switch1phy0@0 {
|
||||
reg = <0>;
|
||||
interrupt-parent = <&switch0>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
Hisilicon hix5hd2 gmac controller
|
||||
|
||||
Required properties:
|
||||
- compatible: should be "hisilicon,hix5hd2-gmac".
|
||||
- compatible: should contain one of the following SoC strings:
|
||||
* "hisilicon,hix5hd2-gemac"
|
||||
* "hisilicon,hi3798cv200-gemac"
|
||||
and one of the following version string:
|
||||
* "hisilicon,hisi-gemac-v1"
|
||||
* "hisilicon,hisi-gemac-v2"
|
||||
- reg: specifies base physical address(s) and size of the device registers.
|
||||
The first region is the MAC register base and size.
|
||||
The second region is external interface control register.
|
||||
|
@ -12,6 +17,16 @@ Required properties:
|
|||
- phy-handle: see ethernet.txt [1].
|
||||
- mac-address: see ethernet.txt [1].
|
||||
- clocks: clock phandle and specifier pair.
|
||||
- clock-names: contain the clock name "mac_core"(required) and "mac_ifc"(optional).
|
||||
- resets: should contain the phandle to the MAC core reset signal(optional),
|
||||
the MAC interface reset signal(optional)
|
||||
and the PHY reset signal(optional).
|
||||
- reset-names: contain the reset signal name "mac_core"(optional),
|
||||
"mac_ifc"(optional) and "phy"(optional).
|
||||
- hisilicon,phy-reset-delays-us: triplet of delays if PHY reset signal given.
|
||||
The 1st cell is reset pre-delay in micro seconds.
|
||||
The 2nd cell is reset pulse in micro seconds.
|
||||
The 3rd cell is reset post-delay in micro seconds.
|
||||
|
||||
- PHY subnode: inherits from phy binding [2]
|
||||
|
||||
|
@ -20,15 +35,19 @@ Required properties:
|
|||
|
||||
Example:
|
||||
gmac0: ethernet@f9840000 {
|
||||
compatible = "hisilicon,hix5hd2-gmac";
|
||||
compatible = "hisilicon,hi3798cv200-gemac", "hisilicon,hisi-gemac-v2";
|
||||
reg = <0xf9840000 0x1000>,<0xf984300c 0x4>;
|
||||
interrupts = <0 71 4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
phy-mode = "mii";
|
||||
phy-mode = "rgmii";
|
||||
phy-handle = <&phy2>;
|
||||
mac-address = [00 00 00 00 00 00];
|
||||
clocks = <&clock HIX5HD2_MAC0_CLK>;
|
||||
clocks = <&crg HISTB_ETH0_MAC_CLK>, <&crg HISTB_ETH0_MACIF_CLK>;
|
||||
clock-names = "mac_core", "mac_ifc";
|
||||
resets = <&crg 0xcc 8>, <&crg 0xcc 10>, <&crg 0xcc 12>;
|
||||
reset-names = "mac_core", "mac_ifc", "phy";
|
||||
hisilicon,phy-reset-delays-us = <10000 10000 30000>;
|
||||
|
||||
phy2: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
|
|
|
@ -45,6 +45,12 @@ Required properties:
|
|||
depends on the hardware user manual.
|
||||
- port-mode-offset: is offset of port mode field for each port in dsaf. Its
|
||||
value depends on the hardware user manual.
|
||||
- mc-mac-mask: mask of multicast address, determines bit in multicast address
|
||||
to set:
|
||||
1 stands for this bit will be precisely matched, TCAM will check this bit of
|
||||
MAC address.
|
||||
0 stands for this bit will be fuzzy matched, TCAM won't care about this bit
|
||||
of MAC address.
|
||||
|
||||
[1] Documentation/devicetree/bindings/net/phy.txt
|
||||
|
||||
|
@ -74,10 +80,12 @@ dsaf0: dsa@c7000000 {
|
|||
reg = 0;
|
||||
phy-handle = <&phy0>;
|
||||
serdes-syscon = <&serdes>;
|
||||
mc-mac-mask = [ff f0 00 00 00 00];
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = 1;
|
||||
serdes-syscon = <&serdes>;
|
||||
mc-mac-mask = [ff f0 00 00 00 00];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
* Marvell Armada 370 / Armada XP Ethernet Controller (NETA)
|
||||
* Marvell Armada 370 / Armada XP / Armada 3700 Ethernet Controller (NETA)
|
||||
|
||||
Required properties:
|
||||
- compatible: "marvell,armada-370-neta" or "marvell,armada-xp-neta".
|
||||
- compatible: could be one of the followings
|
||||
"marvell,armada-370-neta"
|
||||
"marvell,armada-xp-neta"
|
||||
"marvell,armada-3700-neta"
|
||||
- reg: address and length of the register set for the device.
|
||||
- interrupts: interrupt for the device
|
||||
- phy: See ethernet.txt file in the same directory.
|
||||
|
|
|
@ -3,7 +3,7 @@ Properties for an MDIO bus multiplexer controlled by a memory-mapped device
|
|||
This is a special case of a MDIO bus multiplexer. A memory-mapped device,
|
||||
like an FPGA, is used to control which child bus is connected. The mdio-mux
|
||||
node must be a child of the memory-mapped device. The driver currently only
|
||||
supports devices with eight-bit registers.
|
||||
supports devices with 8, 16 or 32-bit registers.
|
||||
|
||||
Required properties in addition to the generic multiplexer properties:
|
||||
|
||||
|
@ -11,7 +11,7 @@ Required properties in addition to the generic multiplexer properties:
|
|||
|
||||
- reg : integer, contains the offset of the register that controls the bus
|
||||
multiplexer. The size field in the 'reg' property is the size of
|
||||
register, and must therefore be 1.
|
||||
register, and must therefore be 1, 2, or 4.
|
||||
|
||||
- mux-mask : integer, contains an eight-bit mask that specifies which
|
||||
bits in the register control the actual bus multiplexer. The
|
||||
|
|
|
@ -6,22 +6,27 @@ Required properties:
|
|||
Documentation/devicetree/bindings/net/phy.txt
|
||||
|
||||
Optional properties:
|
||||
- vsc8531,vddmac : The vddmac in mV.
|
||||
- vsc8531,vddmac : The vddmac in mV. Allowed values is listed
|
||||
in the first row of Table 1 (below).
|
||||
This property is only used in combination
|
||||
with the 'edge-slowdown' property.
|
||||
Default value is 3300.
|
||||
- vsc8531,edge-slowdown : % the edge should be slowed down relative to
|
||||
the fastest possible edge time. Native sign
|
||||
need not enter.
|
||||
the fastest possible edge time.
|
||||
Edge rate sets the drive strength of the MAC
|
||||
interface output signals. Changing the drive
|
||||
strength will affect the edge rate of the output
|
||||
signal. The goal of this setting is to help
|
||||
reduce electrical emission (EMI) by being able
|
||||
to reprogram drive strength and in effect slow
|
||||
down the edge rate if desired. Table 1 shows the
|
||||
impact to the edge rate per VDDMAC supply for each
|
||||
drive strength setting.
|
||||
Ref: Table:1 - Edge rate change below.
|
||||
|
||||
Note: see dt-bindings/net/mscc-phy-vsc8531.h for applicable values
|
||||
interface output signals. Changing the
|
||||
drive strength will affect the edge rate of
|
||||
the output signal. The goal of this setting
|
||||
is to help reduce electrical emission (EMI)
|
||||
by being able to reprogram drive strength
|
||||
and in effect slow down the edge rate if
|
||||
desired.
|
||||
To adjust the edge-slowdown, the 'vddmac'
|
||||
must be specified. Table 1 lists the
|
||||
supported edge-slowdown values for a given
|
||||
'vddmac'.
|
||||
Default value is 0%.
|
||||
Ref: Table:1 - Edge rate change (below).
|
||||
|
||||
Table: 1 - Edge rate change
|
||||
----------------------------------------------------------------|
|
||||
|
@ -29,23 +34,23 @@ Table: 1 - Edge rate change
|
|||
| |
|
||||
| 3300 mV 2500 mV 1800 mV 1500 mV |
|
||||
|---------------------------------------------------------------|
|
||||
| Default Deafult Default Default |
|
||||
| 0% 0% 0% 0% |
|
||||
| (Fastest) (recommended) (recommended) |
|
||||
|---------------------------------------------------------------|
|
||||
| -2% -3% -5% -6% |
|
||||
| 2% 3% 5% 6% |
|
||||
|---------------------------------------------------------------|
|
||||
| -4% -6% -9% -14% |
|
||||
| 4% 6% 9% 14% |
|
||||
|---------------------------------------------------------------|
|
||||
| -7% -10% -16% -21% |
|
||||
| 7% 10% 16% 21% |
|
||||
|(recommended) (recommended) |
|
||||
|---------------------------------------------------------------|
|
||||
| -10% -14% -23% -29% |
|
||||
| 10% 14% 23% 29% |
|
||||
|---------------------------------------------------------------|
|
||||
| -17% -23% -35% -42% |
|
||||
| 17% 23% 35% 42% |
|
||||
|---------------------------------------------------------------|
|
||||
| -29% -37% -52% -58% |
|
||||
| 29% 37% 52% 58% |
|
||||
|---------------------------------------------------------------|
|
||||
| -53% -63% -76% -77% |
|
||||
| 53% 63% 76% 77% |
|
||||
| (slowest) |
|
||||
|---------------------------------------------------------------|
|
||||
|
||||
|
@ -54,5 +59,5 @@ Example:
|
|||
vsc8531_0: ethernet-phy@0 {
|
||||
compatible = "ethernet-phy-id0007.0570";
|
||||
vsc8531,vddmac = <3300>;
|
||||
vsc8531,edge-slowdown = <21>;
|
||||
vsc8531,edge-slowdown = <7>;
|
||||
};
|
||||
|
|
39
Documentation/devicetree/bindings/net/oxnas-dwmac.txt
Normal file
39
Documentation/devicetree/bindings/net/oxnas-dwmac.txt
Normal file
|
@ -0,0 +1,39 @@
|
|||
* Oxford Semiconductor OXNAS DWMAC Ethernet controller
|
||||
|
||||
The device inherits all the properties of the dwmac/stmmac devices
|
||||
described in the file stmmac.txt in the current directory with the
|
||||
following changes.
|
||||
|
||||
Required properties on all platforms:
|
||||
|
||||
- compatible: For the OX820 SoC, it should be :
|
||||
- "oxsemi,ox820-dwmac" to select glue
|
||||
- "snps,dwmac-3.512" to select IP version.
|
||||
|
||||
- clocks: Should contain phandles to the following clocks
|
||||
- clock-names: Should contain the following:
|
||||
- "stmmaceth" for the host clock - see stmmac.txt
|
||||
- "gmac" for the peripheral gate clock
|
||||
|
||||
- oxsemi,sys-ctrl: a phandle to the system controller syscon node
|
||||
|
||||
Example :
|
||||
|
||||
etha: ethernet@40400000 {
|
||||
compatible = "oxsemi,ox820-dwmac", "snps,dwmac-3.512";
|
||||
reg = <0x40400000 0x2000>;
|
||||
interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "macirq", "eth_wake_irq";
|
||||
mac-address = [000000000000]; /* Filled in by U-Boot */
|
||||
phy-mode = "rgmii";
|
||||
|
||||
clocks = <&stdclk CLK_820_ETHA>, <&gmacclk>;
|
||||
clock-names = "gmac", "stmmaceth";
|
||||
resets = <&reset RESET_MAC>;
|
||||
|
||||
/* Regmap for sys registers */
|
||||
oxsemi,sys-ctrl = <&sys>;
|
||||
|
||||
status = "disabled";
|
||||
};
|
|
@ -35,6 +35,12 @@ Optional Properties:
|
|||
- broken-turn-around: If set, indicates the PHY device does not correctly
|
||||
release the turn around line low at the end of a MDIO transaction.
|
||||
|
||||
- enet-phy-lane-swap: If set, indicates the PHY will swap the TX/RX lanes to
|
||||
compensate for the board being designed with the lanes swapped.
|
||||
|
||||
- eee-broken-modes: Bits to clear in the MDIO_AN_EEE_ADV register to
|
||||
disable EEE broken modes.
|
||||
|
||||
Example:
|
||||
|
||||
ethernet-phy@0 {
|
||||
|
|
|
@ -13,3 +13,5 @@ Optional properties:
|
|||
16-bit access only.
|
||||
- power-gpios: GPIO to control the PWRDWN pin
|
||||
- reset-gpios: GPIO to control the RESET pin
|
||||
- pxa-u16-align4 : Boolean, put in place the workaround the force all
|
||||
u16 writes to be 32 bits aligned
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "snps,dwmac-<ip_version>" "snps,dwmac"
|
||||
- compatible: Should be "snps,dwmac-<ip_version>", "snps,dwmac"
|
||||
For backwards compatibility: "st,spear600-gmac" is also supported.
|
||||
- reg: Address and length of the register set for the device
|
||||
- interrupt-parent: Should be the phandle for the interrupt controller
|
||||
|
@ -34,7 +34,13 @@ Optional properties:
|
|||
platforms.
|
||||
- tx-fifo-depth: See ethernet.txt file in the same directory
|
||||
- rx-fifo-depth: See ethernet.txt file in the same directory
|
||||
- snps,pbl Programmable Burst Length
|
||||
- snps,pbl Programmable Burst Length (tx and rx)
|
||||
- snps,txpbl Tx Programmable Burst Length. Only for GMAC and newer.
|
||||
If set, DMA tx will use this value rather than snps,pbl.
|
||||
- snps,rxpbl Rx Programmable Burst Length. Only for GMAC and newer.
|
||||
If set, DMA rx will use this value rather than snps,pbl.
|
||||
- snps,no-pbl-x8 Don't multiply the pbl/txpbl/rxpbl values by 8.
|
||||
For core rev < 3.50, don't multiply the values by 4.
|
||||
- snps,aal Address-Aligned Beats
|
||||
- snps,fixed-burst Program the DMA to use the fixed burst mode
|
||||
- snps,mixed-burst Program the DMA to use the mixed burst mode
|
||||
|
@ -50,6 +56,8 @@ Optional properties:
|
|||
- snps,ps-speed: port selection speed that can be passed to the core when
|
||||
PCS is supported. For example, this is used in case of SGMII
|
||||
and MAC2MAC connection.
|
||||
- snps,tso: this enables the TSO feature otherwise it will be managed by
|
||||
MAC HW capability register. Only for GMAC4 and newer.
|
||||
- AXI BUS Mode parameters: below the list of all the parameters to program the
|
||||
AXI register inside the DMA module:
|
||||
- snps,lpi_en: enable Low Power Interface
|
||||
|
@ -62,8 +70,6 @@ Optional properties:
|
|||
- snps,fb: fixed-burst
|
||||
- snps,mb: mixed-burst
|
||||
- snps,rb: rebuild INCRx Burst
|
||||
- snps,tso: this enables the TSO feature otherwise it will be managed by
|
||||
MAC HW capability register.
|
||||
- mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus.
|
||||
|
||||
Examples:
|
||||
|
|
|
@ -9,6 +9,18 @@ Required properties:
|
|||
- ti,fifo-depth - Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h
|
||||
for applicable values
|
||||
|
||||
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).
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Marvell 8897/8997 (sd8897/sd8997) SDIO devices
|
||||
Marvell 8897/8997 (sd8897/sd8997/pcie8997) SDIO/PCIE devices
|
||||
------
|
||||
|
||||
This node provides properties for controlling the marvell sdio wireless device.
|
||||
The node is expected to be specified as a child node to the SDIO controller that
|
||||
This node provides properties for controlling the Marvell SDIO/PCIE wireless device.
|
||||
The node is expected to be specified as a child node to the SDIO/PCIE controller that
|
||||
connects the device to the system.
|
||||
|
||||
Required properties:
|
||||
|
@ -10,6 +10,8 @@ Required properties:
|
|||
- compatible : should be one of the following:
|
||||
* "marvell,sd8897"
|
||||
* "marvell,sd8997"
|
||||
* "pci11ab,2b42"
|
||||
* "pci1b4b,2b42"
|
||||
|
||||
Optional properties:
|
||||
|
48
Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
Normal file
48
Documentation/devicetree/bindings/net/wireless/qca,ath9k.txt
Normal file
|
@ -0,0 +1,48 @@
|
|||
* Qualcomm Atheros ath9k wireless devices
|
||||
|
||||
This node provides properties for configuring the ath9k wireless device. The
|
||||
node is expected to be specified as a child node of the PCI controller to
|
||||
which the wireless chip is connected.
|
||||
|
||||
Required properties:
|
||||
- compatible: For PCI and PCIe devices this should be an identifier following
|
||||
the format as defined in "PCI Bus Binding to Open Firmware"
|
||||
Revision 2.1. One of the possible formats is "pciVVVV,DDDD"
|
||||
where VVVV is the PCI vendor ID and DDDD is PCI device ID.
|
||||
Typically QCA's PCI vendor ID 168c is used while the PCI device
|
||||
ID depends on the chipset - see the following (possibly
|
||||
incomplete) list:
|
||||
- 0023 for AR5416
|
||||
- 0024 for AR5418
|
||||
- 0027 for AR9160
|
||||
- 0029 for AR9220 and AR9223
|
||||
- 002a for AR9280 and AR9283
|
||||
- 002b for AR9285
|
||||
- 002c for AR2427
|
||||
- 002d for AR9227
|
||||
- 002e for AR9287
|
||||
- 0030 for AR9380, AR9381 and AR9382
|
||||
- 0032 for AR9485
|
||||
- 0033 for AR9580 and AR9590
|
||||
- 0034 for AR9462
|
||||
- 0036 for AR9565
|
||||
- 0037 for AR9485
|
||||
- reg: Address and length of the register set for the device.
|
||||
|
||||
Optional properties:
|
||||
- qca,no-eeprom: Indicates that there is no physical EEPROM connected to the
|
||||
ath9k wireless chip (in this case the calibration /
|
||||
EEPROM data will be loaded from userspace using the
|
||||
kernel firmware loader).
|
||||
- mac-address: See ethernet.txt in the parent directory
|
||||
- local-mac-address: See ethernet.txt in the parent directory
|
||||
|
||||
|
||||
In this example, the node is defined as child node of the PCI controller:
|
||||
&pci0 {
|
||||
wifi@168c,002d {
|
||||
compatible = "pci168c,002d";
|
||||
reg = <0x7000 0 0 0 0x1000>;
|
||||
qca,no-eeprom;
|
||||
};
|
||||
};
|
|
@ -332,6 +332,10 @@ MEM
|
|||
MFD
|
||||
devm_mfd_add_devices()
|
||||
|
||||
PER-CPU MEM
|
||||
devm_alloc_percpu()
|
||||
devm_free_percpu()
|
||||
|
||||
PCI
|
||||
pcim_enable_device() : after success, all PCI ops become managed
|
||||
pcim_pin_device() : keep PCI device enabled after release
|
||||
|
|
|
@ -32,7 +32,7 @@ compatible interfaces. Once found, it will create subfolders in
|
|||
the /sys directories of each supported interface, e.g.
|
||||
|
||||
# ls /sys/class/net/eth0/batman_adv/
|
||||
# iface_status mesh_iface
|
||||
# elp_interval iface_status mesh_iface throughput_override
|
||||
|
||||
If an interface does not have the "batman_adv" subfolder it prob-
|
||||
ably is not supported. Not supported interfaces are: loopback,
|
||||
|
@ -71,17 +71,19 @@ All mesh wide settings can be found in batman's own interface
|
|||
folder:
|
||||
|
||||
# ls /sys/class/net/bat0/mesh/
|
||||
#aggregated_ogms distributed_arp_table gw_sel_class orig_interval
|
||||
#ap_isolation fragmentation hop_penalty routing_algo
|
||||
#bonding gw_bandwidth isolation_mark vlan0
|
||||
#bridge_loop_avoidance gw_mode log_level
|
||||
# aggregated_ogms fragmentation isolation_mark routing_algo
|
||||
# ap_isolation gw_bandwidth log_level vlan0
|
||||
# bonding gw_mode multicast_mode
|
||||
# bridge_loop_avoidance gw_sel_class network_coding
|
||||
# distributed_arp_table hop_penalty orig_interval
|
||||
|
||||
There is a special folder for debugging information:
|
||||
|
||||
# ls /sys/kernel/debug/batman_adv/bat0/
|
||||
# bla_backbone_table log transtable_global
|
||||
# bla_claim_table originators transtable_local
|
||||
# gateways socket
|
||||
# bla_backbone_table log neighbors transtable_local
|
||||
# bla_claim_table mcast_flags originators
|
||||
# dat_cache nc socket
|
||||
# gateways nc_nodes transtable_global
|
||||
|
||||
Some of the files contain all sort of status information regard-
|
||||
ing the mesh network. For example, you can view the table of
|
||||
|
@ -159,13 +161,16 @@ file in debugfs
|
|||
The additional debug output is by default disabled. It can be en-
|
||||
abled during run time. Following log_levels are defined:
|
||||
|
||||
0 - All debug output disabled
|
||||
1 - Enable messages related to routing / flooding / broadcasting
|
||||
2 - Enable messages related to route added / changed / deleted
|
||||
4 - Enable messages related to translation table operations
|
||||
8 - Enable messages related to bridge loop avoidance
|
||||
16 - Enable messaged related to DAT, ARP snooping and parsing
|
||||
31 - Enable all messages
|
||||
0 - All debug output disabled
|
||||
1 - Enable messages related to routing / flooding / broadcasting
|
||||
2 - Enable messages related to route added / changed / deleted
|
||||
4 - Enable messages related to translation table operations
|
||||
8 - Enable messages related to bridge loop avoidance
|
||||
16 - Enable messages related to DAT, ARP snooping and parsing
|
||||
32 - Enable messages related to network coding
|
||||
64 - Enable messages related to multicast
|
||||
128 - Enable messages related to throughput meter
|
||||
255 - Enable all messages
|
||||
|
||||
The debug output can be changed at runtime using the file
|
||||
/sys/class/net/bat0/mesh/log_level. e.g.
|
||||
|
|
|
@ -4,20 +4,20 @@
|
|||
|
||||
Introduction
|
||||
============
|
||||
The IEEE 802.15.4 working group focuses on standardization of bottom
|
||||
two layers: Medium Access Control (MAC) and Physical (PHY). And there
|
||||
The IEEE 802.15.4 working group focuses on standardization of the bottom
|
||||
two layers: Medium Access Control (MAC) and Physical access (PHY). And there
|
||||
are mainly two options available for upper layers:
|
||||
- ZigBee - proprietary protocol from the ZigBee Alliance
|
||||
- 6LoWPAN - IPv6 networking over low rate personal area networks
|
||||
|
||||
The linux-wpan project goal is to provide a complete implementation
|
||||
The goal of the Linux-wpan is to provide a complete implementation
|
||||
of the IEEE 802.15.4 and 6LoWPAN protocols. IEEE 802.15.4 is a stack
|
||||
of protocols for organizing Low-Rate Wireless Personal Area Networks.
|
||||
|
||||
The stack is composed of three main parts:
|
||||
- IEEE 802.15.4 layer; We have chosen to use plain Berkeley socket API,
|
||||
the generic Linux networking stack to transfer IEEE 802.15.4 messages
|
||||
and a special protocol over genetlink for configuration/management
|
||||
the generic Linux networking stack to transfer IEEE 802.15.4 data
|
||||
messages and a special protocol over netlink for configuration/management
|
||||
- MAC - provides access to shared channel and reliable data delivery
|
||||
- PHY - represents device drivers
|
||||
|
||||
|
@ -33,15 +33,13 @@ include/net/af_ieee802154.h header or in the special header
|
|||
in the userspace package (see either http://wpan.cakelab.org/ or the
|
||||
git tree at https://github.com/linux-wpan/wpan-tools).
|
||||
|
||||
One can use SOCK_RAW for passing raw data towards device xmit function. YMMV.
|
||||
|
||||
|
||||
Kernel side
|
||||
=============
|
||||
|
||||
Like with WiFi, there are several types of devices implementing IEEE 802.15.4.
|
||||
1) 'HardMAC'. The MAC layer is implemented in the device itself, the device
|
||||
exports MLME and data API.
|
||||
exports a management (e.g. MLME) and data API.
|
||||
2) 'SoftMAC' or just radio. These types of devices are just radio transceivers
|
||||
possibly with some kinds of acceleration like automatic CRC computation and
|
||||
comparation, automagic ACK handling, address matching, etc.
|
||||
|
@ -106,7 +104,7 @@ Fake drivers
|
|||
|
||||
In addition there is a driver available which simulates a real device with
|
||||
SoftMAC (fakelb - IEEE 802.15.4 loopback driver) interface. This option
|
||||
provides possibility to test and debug stack without usage of real hardware.
|
||||
provides a possibility to test and debug the stack without usage of real hardware.
|
||||
|
||||
See sources in drivers/net/ieee802154 folder for more details.
|
||||
|
||||
|
@ -125,17 +123,15 @@ to support the IPv6 minimum MTU requirement [RFC2460], and stateless header
|
|||
compression for IPv6 datagrams (LOWPAN_HC1 and LOWPAN_HC2) to reduce the
|
||||
relatively large IPv6 and UDP headers down to (in the best case) several bytes.
|
||||
|
||||
In Semptember 2011 the standard update was published - [RFC6282].
|
||||
In September 2011 the standard update was published - [RFC6282].
|
||||
It deprecates HC1 and HC2 compression and defines IPHC encoding format which is
|
||||
used in this Linux implementation.
|
||||
|
||||
All the code related to 6lowpan you may find in files: net/6lowpan/*
|
||||
and net/ieee802154/6lowpan/*
|
||||
|
||||
To setup 6lowpan interface you need (busybox release > 1.17.0):
|
||||
1. Add IEEE802.15.4 interface and initialize PANid;
|
||||
To setup a 6LoWPAN interface you need:
|
||||
1. Add IEEE802.15.4 interface and set channel and PAN ID;
|
||||
2. Add 6lowpan interface by command like:
|
||||
# ip link add link wpan0 name lowpan0 type lowpan
|
||||
3. Set MAC (if needs):
|
||||
# ip link set lowpan0 address de:ad:be:ef:ca:fe:ba:be
|
||||
4. Bring up 'lowpan0' interface
|
||||
3. Bring up 'lowpan0' interface
|
||||
|
|
|
@ -610,8 +610,13 @@ tcp_syn_retries - INTEGER
|
|||
with the current initial RTO of 1second. With this the final timeout
|
||||
for an active TCP connection attempt will happen after 127seconds.
|
||||
|
||||
tcp_timestamps - BOOLEAN
|
||||
Enable timestamps as defined in RFC1323.
|
||||
tcp_timestamps - INTEGER
|
||||
Enable timestamps as defined in RFC1323.
|
||||
0: Disabled.
|
||||
1: Enable timestamps as defined in RFC1323 and use random offset for
|
||||
each connection rather than only using the current time.
|
||||
2: Like 1, but without random offsets.
|
||||
Default: 1
|
||||
|
||||
tcp_min_tso_segs - INTEGER
|
||||
Minimal number of segments per TSO frame.
|
||||
|
@ -967,6 +972,21 @@ igmp_qrv - INTEGER
|
|||
Default: 2 (as specified by RFC2236 8.1)
|
||||
Minimum: 1 (as specified by RFC6636 4.5)
|
||||
|
||||
force_igmp_version - INTEGER
|
||||
0 - (default) No enforcement of a IGMP version, IGMPv1/v2 fallback
|
||||
allowed. Will back to IGMPv3 mode again if all IGMPv1/v2 Querier
|
||||
Present timer expires.
|
||||
1 - Enforce to use IGMP version 1. Will also reply IGMPv1 report if
|
||||
receive IGMPv2/v3 query.
|
||||
2 - Enforce to use IGMP version 2. Will fallback to IGMPv1 if receive
|
||||
IGMPv1 query message. Will reply report if receive IGMPv3 query.
|
||||
3 - Enforce to use IGMP version 3. The same react with default 0.
|
||||
|
||||
Note: this is not the same with force_mld_version because IGMPv3 RFC3376
|
||||
Security Considerations does not have clear description that we could
|
||||
ignore other version messages completely as MLDv2 RFC3810. So make
|
||||
this value as default 0 is recommended.
|
||||
|
||||
conf/interface/* changes special settings per interface (where
|
||||
"interface" is the name of your network interface)
|
||||
|
||||
|
@ -1714,6 +1734,15 @@ drop_unsolicited_na - BOOLEAN
|
|||
|
||||
By default this is turned off.
|
||||
|
||||
enhanced_dad - BOOLEAN
|
||||
Include a nonce option in the IPv6 neighbor solicitation messages used for
|
||||
duplicate address detection per RFC7527. A received DAD NS will only signal
|
||||
a duplicate address if the nonce is different. This avoids any false
|
||||
detection of duplicates due to loopback of the NS messages that we send.
|
||||
The nonce option will be sent on an interface unless both of
|
||||
conf/{all,interface}/enhanced_dad are set to FALSE.
|
||||
Default: TRUE
|
||||
|
||||
icmp/*:
|
||||
ratelimit - INTEGER
|
||||
Limit the maximal rates for sending ICMPv6 packets.
|
||||
|
|
|
@ -177,10 +177,10 @@ setsockopt on the PPPoX socket to set a debug mask.
|
|||
|
||||
The following debug mask bits are available:
|
||||
|
||||
PPPOL2TP_MSG_DEBUG verbose debug (if compiled in)
|
||||
PPPOL2TP_MSG_CONTROL userspace - kernel interface
|
||||
PPPOL2TP_MSG_SEQ sequence numbers handling
|
||||
PPPOL2TP_MSG_DATA data packets
|
||||
L2TP_MSG_DEBUG verbose debug (if compiled in)
|
||||
L2TP_MSG_CONTROL userspace - kernel interface
|
||||
L2TP_MSG_SEQ sequence numbers handling
|
||||
L2TP_MSG_DATA data packets
|
||||
|
||||
If enabled, files under a l2tp debugfs directory can be used to dump
|
||||
kernel state about L2TP tunnels and sessions. To access it, the
|
||||
|
|
|
@ -60,7 +60,7 @@ modprobe mac80211_hwsim
|
|||
hostapd hostapd.conf
|
||||
|
||||
# Run wpa_supplicant (station) for wlan1
|
||||
wpa_supplicant -Dwext -iwlan1 -c wpa_supplicant.conf
|
||||
wpa_supplicant -Dnl80211 -iwlan1 -c wpa_supplicant.conf
|
||||
|
||||
|
||||
More test cases are available in hostap.git:
|
||||
|
|
|
@ -96,6 +96,17 @@ nf_conntrack_max - INTEGER
|
|||
Size of connection tracking table. Default value is
|
||||
nf_conntrack_buckets value * 4.
|
||||
|
||||
nf_conntrack_default_on - BOOLEAN
|
||||
0 - don't register conntrack in new net namespaces
|
||||
1 - register conntrack in new net namespaces (default)
|
||||
|
||||
This controls wheter newly created network namespaces have connection
|
||||
tracking enabled by default. It will be enabled automatically
|
||||
regardless of this setting if the new net namespace requires
|
||||
connection tracking, e.g. when NAT rules are created.
|
||||
This setting is only visible in initial user namespace, it has no
|
||||
effect on existing namespaces.
|
||||
|
||||
nf_conntrack_tcp_be_liberal - BOOLEAN
|
||||
0 - disabled (default)
|
||||
not 0 - enabled
|
||||
|
|
|
@ -65,6 +65,83 @@ The MDIO bus
|
|||
drivers/net/ethernet/freescale/fsl_pq_mdio.c and an associated DTS file
|
||||
for one of the users. (e.g. "git grep fsl,.*-mdio arch/powerpc/boot/dts/")
|
||||
|
||||
(RG)MII/electrical interface considerations
|
||||
|
||||
The Reduced Gigabit Medium Independent Interface (RGMII) is a 12-pin
|
||||
electrical signal interface using a synchronous 125Mhz clock signal and several
|
||||
data lines. Due to this design decision, a 1.5ns to 2ns delay must be added
|
||||
between the clock line (RXC or TXC) and the data lines to let the PHY (clock
|
||||
sink) have enough setup and hold times to sample the data lines correctly. The
|
||||
PHY library offers different types of PHY_INTERFACE_MODE_RGMII* values to let
|
||||
the PHY driver and optionally the MAC driver, implement the required delay. The
|
||||
values of phy_interface_t must be understood from the perspective of the PHY
|
||||
device itself, leading to the following:
|
||||
|
||||
* PHY_INTERFACE_MODE_RGMII: the PHY is not responsible for inserting any
|
||||
internal delay by itself, it assumes that either the Ethernet MAC (if capable
|
||||
or the PCB traces) insert the correct 1.5-2ns delay
|
||||
|
||||
* PHY_INTERFACE_MODE_RGMII_TXID: the PHY should insert an internal delay
|
||||
for the transmit data lines (TXD[3:0]) processed by the PHY device
|
||||
|
||||
* PHY_INTERFACE_MODE_RGMII_RXID: the PHY should insert an internal delay
|
||||
for the receive data lines (RXD[3:0]) processed by the PHY device
|
||||
|
||||
* PHY_INTERFACE_MODE_RGMII_ID: the PHY should insert internal delays for
|
||||
both transmit AND receive data lines from/to the PHY device
|
||||
|
||||
Whenever possible, use the PHY side RGMII delay for these reasons:
|
||||
|
||||
* PHY devices may offer sub-nanosecond granularity in how they allow a
|
||||
receiver/transmitter side delay (e.g: 0.5, 1.0, 1.5ns) to be specified. Such
|
||||
precision may be required to account for differences in PCB trace lengths
|
||||
|
||||
* PHY devices are typically qualified for a large range of applications
|
||||
(industrial, medical, automotive...), and they provide a constant and
|
||||
reliable delay across temperature/pressure/voltage ranges
|
||||
|
||||
* PHY device drivers in PHYLIB being reusable by nature, being able to
|
||||
configure correctly a specified delay enables more designs with similar delay
|
||||
requirements to be operate correctly
|
||||
|
||||
For cases where the PHY is not capable of providing this delay, but the
|
||||
Ethernet MAC driver is capable of doing so, the correct phy_interface_t value
|
||||
should be PHY_INTERFACE_MODE_RGMII, and the Ethernet MAC driver should be
|
||||
configured correctly in order to provide the required transmit and/or receive
|
||||
side delay from the perspective of the PHY device. Conversely, if the Ethernet
|
||||
MAC driver looks at the phy_interface_t value, for any other mode but
|
||||
PHY_INTERFACE_MODE_RGMII, it should make sure that the MAC-level delays are
|
||||
disabled.
|
||||
|
||||
In case neither the Ethernet MAC, nor the PHY are capable of providing the
|
||||
required delays, as defined per the RGMII standard, several options may be
|
||||
available:
|
||||
|
||||
* Some SoCs may offer a pin pad/mux/controller capable of configuring a given
|
||||
set of pins'strength, delays, and voltage; and it may be a suitable
|
||||
option to insert the expected 2ns RGMII delay.
|
||||
|
||||
* Modifying the PCB design to include a fixed delay (e.g: using a specifically
|
||||
designed serpentine), which may not require software configuration at all.
|
||||
|
||||
Common problems with RGMII delay mismatch
|
||||
|
||||
When there is a RGMII delay mismatch between the Ethernet MAC and the PHY, this
|
||||
will most likely result in the clock and data line signals to be unstable when
|
||||
the PHY or MAC take a snapshot of these signals to translate them into logical
|
||||
1 or 0 states and reconstruct the data being transmitted/received. Typical
|
||||
symptoms include:
|
||||
|
||||
* Transmission/reception partially works, and there is frequent or occasional
|
||||
packet loss observed
|
||||
|
||||
* Ethernet MAC may report some or all packets ingressing with a FCS/CRC error,
|
||||
or just discard them all
|
||||
|
||||
* Switching to lower speeds such as 10/100Mbits/sec makes the problem go away
|
||||
(since there is enough setup/hold time in that case)
|
||||
|
||||
|
||||
Connecting to a PHY
|
||||
|
||||
Sometime during startup, the network driver needs to establish a connection
|
||||
|
@ -127,8 +204,9 @@ Letting the PHY Abstraction Layer do Everything
|
|||
values pruned from them which don't make sense for your controller (a 10/100
|
||||
controller may be connected to a gigabit capable PHY, so you would need to
|
||||
mask off SUPPORTED_1000baseT*). See include/linux/ethtool.h for definitions
|
||||
for these bitfields. Note that you should not SET any bits, or the PHY may
|
||||
get put into an unsupported state.
|
||||
for these bitfields. Note that you should not SET any bits, except the
|
||||
SUPPORTED_Pause and SUPPORTED_AsymPause bits (see below), or the PHY may get
|
||||
put into an unsupported state.
|
||||
|
||||
Lastly, once the controller is ready to handle network traffic, you call
|
||||
phy_start(phydev). This tells the PAL that you are ready, and configures the
|
||||
|
@ -139,6 +217,19 @@ Letting the PHY Abstraction Layer do Everything
|
|||
When you want to disconnect from the network (even if just briefly), you call
|
||||
phy_stop(phydev).
|
||||
|
||||
Pause frames / flow control
|
||||
|
||||
The PHY does not participate directly in flow control/pause frames except by
|
||||
making sure that the SUPPORTED_Pause and SUPPORTED_AsymPause bits are set in
|
||||
MII_ADVERTISE to indicate towards the link partner that the Ethernet MAC
|
||||
controller supports such a thing. Since flow control/pause frames generation
|
||||
involves the Ethernet MAC driver, it is recommended that this driver takes care
|
||||
of properly indicating advertisement and support for such features by setting
|
||||
the SUPPORTED_Pause and SUPPORTED_AsymPause bits accordingly. This can be done
|
||||
either before or after phy_connect() and/or as a result of implementing the
|
||||
ethtool::set_pauseparam feature.
|
||||
|
||||
|
||||
Keeping Close Tabs on the PAL
|
||||
|
||||
It is possible that the PAL's built-in state machine needs a little help to
|
||||
|
@ -251,39 +342,8 @@ Writing a PHY driver
|
|||
PHY_BASIC_FEATURES, but you can look in include/mii.h for other
|
||||
features.
|
||||
|
||||
Each driver consists of a number of function pointers:
|
||||
|
||||
soft_reset: perform a PHY software reset
|
||||
config_init: configures PHY into a sane state after a reset.
|
||||
For instance, a Davicom PHY requires descrambling disabled.
|
||||
probe: Allocate phy->priv, optionally refuse to bind.
|
||||
PHY may not have been reset or had fixups run yet.
|
||||
suspend/resume: power management
|
||||
config_aneg: Changes the speed/duplex/negotiation settings
|
||||
aneg_done: Determines the auto-negotiation result
|
||||
read_status: Reads the current speed/duplex/negotiation settings
|
||||
ack_interrupt: Clear a pending interrupt
|
||||
did_interrupt: Checks if the PHY generated an interrupt
|
||||
config_intr: Enable or disable interrupts
|
||||
remove: Does any driver take-down
|
||||
ts_info: Queries about the HW timestamping status
|
||||
match_phy_device: used for Clause 45 capable PHYs to match devices
|
||||
in package and ensure they are compatible
|
||||
hwtstamp: Set the PHY HW timestamping configuration
|
||||
rxtstamp: Requests a receive timestamp at the PHY level for a 'skb'
|
||||
txtsamp: Requests a transmit timestamp at the PHY level for a 'skb'
|
||||
set_wol: Enable Wake-on-LAN at the PHY level
|
||||
get_wol: Get the Wake-on-LAN status at the PHY level
|
||||
link_change_notify: called to inform the core is about to change the
|
||||
link state, can be used to work around bogus PHY between state changes
|
||||
read_mmd_indirect: Read PHY MMD indirect register
|
||||
write_mmd_indirect: Write PHY MMD indirect register
|
||||
module_info: Get the size and type of an EEPROM contained in an plug-in
|
||||
module
|
||||
module_eeprom: Get EEPROM information of a plug-in module
|
||||
get_sset_count: Get number of strings sets that get_strings will count
|
||||
get_strings: Get strings from requested objects (statistics)
|
||||
get_stats: Get the extended statistics from the PHY device
|
||||
Each driver consists of a number of function pointers, documented
|
||||
in include/linux/phy.h under the phy_driver structure.
|
||||
|
||||
Of these, only config_aneg and read_status are required to be
|
||||
assigned by the driver code. The rest are optional. Also, it is
|
||||
|
@ -347,3 +407,22 @@ Board Fixups
|
|||
The stubs set one of the two matching criteria, and set the other one to
|
||||
match anything.
|
||||
|
||||
When phy_register_fixup() or *_for_uid()/*_for_id() is called at module,
|
||||
unregister fixup and free allocate memory are required.
|
||||
|
||||
Call one of following function before unloading module.
|
||||
|
||||
int phy_unregister_fixup(const char *phy_id, u32 phy_uid, u32 phy_uid_mask);
|
||||
int phy_unregister_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask);
|
||||
int phy_register_fixup_for_id(const char *phy_id);
|
||||
|
||||
Standards
|
||||
|
||||
IEEE Standard 802.3: CSMA/CD Access Method and Physical Layer Specifications, Section Two:
|
||||
http://standards.ieee.org/getieee802/download/802.3-2008_section2.pdf
|
||||
|
||||
RGMII v1.3:
|
||||
http://web.archive.org/web/20160303212629/http://www.hp.com/rnd/pdfs/RGMIIv1_3.pdf
|
||||
|
||||
RGMII v2.0:
|
||||
http://web.archive.org/web/20160303171328/http://www.hp.com/rnd/pdfs/RGMIIv2_0_final_hp.pdf
|
||||
|
|
18
Documentation/networking/seg6-sysctl.txt
Normal file
18
Documentation/networking/seg6-sysctl.txt
Normal file
|
@ -0,0 +1,18 @@
|
|||
/proc/sys/net/conf/<iface>/seg6_* variables:
|
||||
|
||||
seg6_enabled - BOOL
|
||||
Accept or drop SR-enabled IPv6 packets on this interface.
|
||||
|
||||
Relevant packets are those with SRH present and DA = local.
|
||||
|
||||
0 - disabled (default)
|
||||
not 0 - enabled
|
||||
|
||||
seg6_require_hmac - INTEGER
|
||||
Define HMAC policy for ingress SR-enabled packets on this interface.
|
||||
|
||||
-1 - Ignore HMAC field
|
||||
0 - Accept SR packets without HMAC, validate SR packets with HMAC
|
||||
1 - Drop SR packets without HMAC, validate SR packets with HMAC
|
||||
|
||||
Default is 0.
|
|
@ -28,8 +28,6 @@ CONFIG_STMMAC_PCI: is to enable the pci driver.
|
|||
2) Driver parameters list:
|
||||
debug: message level (0: no output, 16: all);
|
||||
phyaddr: to manually provide the physical address to the PHY device;
|
||||
dma_rxsize: DMA rx ring size;
|
||||
dma_txsize: DMA tx ring size;
|
||||
buf_sz: DMA buffer size;
|
||||
tc: control the HW FIFO threshold;
|
||||
watchdog: transmit timeout (in milliseconds);
|
||||
|
@ -40,31 +38,31 @@ CONFIG_STMMAC_PCI: is to enable the pci driver.
|
|||
|
||||
3) Command line options
|
||||
Driver parameters can be also passed in command line by using:
|
||||
stmmaceth=dma_rxsize:128,dma_txsize:512
|
||||
stmmaceth=watchdog:100,chain_mode=1
|
||||
|
||||
4) Driver information and notes
|
||||
|
||||
4.1) Transmit process
|
||||
The xmit method is invoked when the kernel needs to transmit a packet; it sets
|
||||
the descriptors in the ring and informs the DMA engine that there is a packet
|
||||
the descriptors in the ring and informs the DMA engine, that there is a packet
|
||||
ready to be transmitted.
|
||||
By default, the driver sets the NETIF_F_SG bit in the features field of the
|
||||
net_device structure enabling the scatter-gather feature. This is true on
|
||||
net_device structure, enabling the scatter-gather feature. This is true on
|
||||
chips and configurations where the checksum can be done in hardware.
|
||||
Once the controller has finished transmitting the packet, napi will be
|
||||
Once the controller has finished transmitting the packet, timer will be
|
||||
scheduled to release the transmit resources.
|
||||
|
||||
4.2) Receive process
|
||||
When one or more packets are received, an interrupt happens. The interrupts
|
||||
are not queued so the driver has to scan all the descriptors in the ring during
|
||||
are not queued, so the driver has to scan all the descriptors in the ring during
|
||||
the receive process.
|
||||
This is based on NAPI so the interrupt handler signals only if there is work
|
||||
This is based on NAPI, so the interrupt handler signals only if there is work
|
||||
to be done, and it exits.
|
||||
Then the poll method will be scheduled at some future point.
|
||||
The incoming packets are stored, by the DMA, in a list of pre-allocated socket
|
||||
buffers in order to avoid the memcpy (zero-copy).
|
||||
|
||||
4.3) Interrupt Mitigation
|
||||
4.3) Interrupt mitigation
|
||||
The driver is able to mitigate the number of its DMA interrupts
|
||||
using NAPI for the reception on chips older than the 3.50.
|
||||
New chips have an HW RX-Watchdog used for this mitigation.
|
||||
|
@ -88,19 +86,20 @@ the list, hence creating the explicit chaining in the descriptor itself,
|
|||
whereas such explicit chaining is not possible in RING mode.
|
||||
|
||||
4.5.1) Extended descriptors
|
||||
The extended descriptors give us information about the Ethernet payload
|
||||
when it is carrying PTP packets or TCP/UDP/ICMP over IP.
|
||||
These are not available on GMAC Synopsys chips older than the 3.50.
|
||||
At probe time the driver will decide if these can be actually used.
|
||||
This support also is mandatory for PTPv2 because the extra descriptors
|
||||
are used for saving the hardware timestamps and Extended Status.
|
||||
The extended descriptors give us information about the Ethernet payload
|
||||
when it is carrying PTP packets or TCP/UDP/ICMP over IP.
|
||||
These are not available on GMAC Synopsys chips older than the 3.50.
|
||||
At probe time the driver will decide if these can be actually used.
|
||||
This support also is mandatory for PTPv2 because the extra descriptors
|
||||
are used for saving the hardware timestamps and Extended Status.
|
||||
|
||||
4.6) Ethtool support
|
||||
Ethtool is supported.
|
||||
|
||||
For example, driver statistics (including RMON), internal errors can be taken
|
||||
using:
|
||||
# ethtool -S ethX command
|
||||
# ethtool -S ethX
|
||||
command
|
||||
|
||||
4.7) Jumbo and Segmentation Offloading
|
||||
Jumbo frames are supported and tested for the GMAC.
|
||||
|
@ -153,8 +152,10 @@ Where:
|
|||
o dma_cfg: internal DMA parameters
|
||||
o pbl: the Programmable Burst Length is maximum number of beats to
|
||||
be transferred in one DMA transaction.
|
||||
GMAC also enables the 4xPBL by default.
|
||||
o fixed_burst/mixed_burst/burst_len
|
||||
GMAC also enables the 4xPBL by default. (8xPBL for GMAC 3.50 and newer)
|
||||
o txpbl/rxpbl: GMAC and newer supports independent DMA pbl for tx/rx.
|
||||
o pblx8: Enable 8xPBL (4xPBL for core rev < 3.50). Enabled by default.
|
||||
o fixed_burst/mixed_burst/aal
|
||||
o clk_csr: fixed CSR Clock range selection.
|
||||
o has_gmac: uses the GMAC core.
|
||||
o enh_desc: if sets the MAC will use the enhanced descriptor structure.
|
||||
|
@ -206,16 +207,24 @@ tuned according to the HW capabilities.
|
|||
|
||||
struct stmmac_dma_cfg {
|
||||
int pbl;
|
||||
int txpbl;
|
||||
int rxpbl;
|
||||
bool pblx8;
|
||||
int fixed_burst;
|
||||
int burst_len_supported;
|
||||
int mixed_burst;
|
||||
bool aal;
|
||||
};
|
||||
|
||||
Where:
|
||||
o pbl: Programmable Burst Length
|
||||
o pbl: Programmable Burst Length (tx and rx)
|
||||
o txpbl: Transmit Programmable Burst Length. Only for GMAC and newer.
|
||||
If set, DMA tx will use this value rather than pbl.
|
||||
o rxpbl: Receive Programmable Burst Length. Only for GMAC and newer.
|
||||
If set, DMA rx will use this value rather than pbl.
|
||||
o pblx8: Enable 8xPBL (4xPBL for core rev < 3.50). Enabled by default.
|
||||
o fixed_burst: program the DMA to use the fixed burst mode
|
||||
o burst_len: this is the value we put in the register
|
||||
supported values are provided as macros in
|
||||
linux/stmmac.h header file.
|
||||
o mixed_burst: program the DMA to use the mixed burst mode
|
||||
o aal: Address-Aligned Beats
|
||||
|
||||
---
|
||||
|
||||
|
@ -275,11 +284,11 @@ Please see the following document:
|
|||
Documentation/devicetree/bindings/net/stmmac.txt
|
||||
|
||||
4.11) This is a summary of the content of some relevant files:
|
||||
o stmmac_main.c: to implement the main network device driver;
|
||||
o stmmac_mdio.c: to provide mdio functions;
|
||||
o stmmac_pci: this the PCI driver;
|
||||
o stmmac_platform.c: this the platform driver (OF supported)
|
||||
o stmmac_ethtool.c: to implement the ethtool support;
|
||||
o stmmac_main.c: implements the main network device driver;
|
||||
o stmmac_mdio.c: provides MDIO functions;
|
||||
o stmmac_pci: this is the PCI driver;
|
||||
o stmmac_platform.c: this the platform driver (OF supported);
|
||||
o stmmac_ethtool.c: implements the ethtool support;
|
||||
o stmmac.h: private driver structure;
|
||||
o common.h: common definitions and VFTs;
|
||||
o mmc_core.c/mmc.h: Management MAC Counters;
|
||||
|
@ -381,12 +390,12 @@ In addition to the basic timestamp features mentioned in IEEE 1588-2002
|
|||
Timestamps, new GMAC cores support the advanced timestamp features.
|
||||
IEEE 1588-2008 that can be enabled when configure the Kernel.
|
||||
|
||||
8) SGMII/RGMII supports
|
||||
8) SGMII/RGMII support
|
||||
New GMAC devices provide own way to manage RGMII/SGMII.
|
||||
This information is available at run-time by looking at the
|
||||
HW capability register. This means that the stmmac can manage
|
||||
auto-negotiation and link status w/o using the PHYLIB stuff
|
||||
auto-negotiation and link status w/o using the PHYLIB stuff.
|
||||
In fact, the HW provides a subset of extended registers to
|
||||
restart the ANE, verify Full/Half duplex mode and Speed.
|
||||
Also thanks to these registers it is possible to look at the
|
||||
Thanks to these registers, it is possible to look at the
|
||||
Auto-negotiated Link Parter Ability.
|
||||
|
|
|
@ -182,6 +182,16 @@ SOF_TIMESTAMPING_OPT_TSONLY:
|
|||
the timestamp even if sysctl net.core.tstamp_allow_data is 0.
|
||||
This option disables SOF_TIMESTAMPING_OPT_CMSG.
|
||||
|
||||
SOF_TIMESTAMPING_OPT_STATS:
|
||||
|
||||
Optional stats that are obtained along with the transmit timestamps.
|
||||
It must be used together with SOF_TIMESTAMPING_OPT_TSONLY. When the
|
||||
transmit timestamp is available, the stats are available in a
|
||||
separate control message of type SCM_TIMESTAMPING_OPT_STATS, as a
|
||||
list of TLVs (struct nlattr) of types. These stats allow the
|
||||
application to associate various transport layer stats with
|
||||
the transmit timestamps, such as how long a certain block of
|
||||
data was limited by peer's receiver window.
|
||||
|
||||
New applications are encouraged to pass SOF_TIMESTAMPING_OPT_ID to
|
||||
disambiguate timestamps and SOF_TIMESTAMPING_OPT_TSONLY to operate
|
||||
|
|
11
MAINTAINERS
11
MAINTAINERS
|
@ -577,6 +577,11 @@ T: git git://linuxtv.org/anttip/media_tree.git
|
|||
S: Maintained
|
||||
F: drivers/media/usb/airspy/
|
||||
|
||||
ALACRITECH GIGABIT ETHERNET DRIVER
|
||||
M: Lino Sanfilippo <LinoSanfilippo@gmx.de>
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/alacritech/*
|
||||
|
||||
ALCATEL SPEEDTOUCH USB DRIVER
|
||||
M: Duncan Sands <duncan.sands@free.fr>
|
||||
L: linux-usb@vger.kernel.org
|
||||
|
@ -2537,6 +2542,8 @@ L: netdev@vger.kernel.org
|
|||
L: linux-kernel@vger.kernel.org
|
||||
S: Supported
|
||||
F: kernel/bpf/
|
||||
F: tools/testing/selftests/bpf/
|
||||
F: lib/test_bpf.c
|
||||
|
||||
BROADCOM B44 10/100 ETHERNET DRIVER
|
||||
M: Michael Chan <michael.chan@broadcom.com>
|
||||
|
@ -6103,6 +6110,7 @@ F: drivers/idle/i7300_idle.c
|
|||
|
||||
IEEE 802.15.4 SUBSYSTEM
|
||||
M: Alexander Aring <aar@pengutronix.de>
|
||||
M: Stefan Schmidt <stefan@osg.samsung.com>
|
||||
L: linux-wpan@vger.kernel.org
|
||||
W: http://wpan.cakelab.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
|
||||
|
@ -7565,8 +7573,10 @@ S: Maintained
|
|||
MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER
|
||||
M: Andrew Lunn <andrew@lunn.ch>
|
||||
M: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/dsa/mv88e6xxx/
|
||||
F: Documentation/devicetree/bindings/net/dsa/marvell.txt
|
||||
|
||||
MARVELL ARMADA DRM SUPPORT
|
||||
M: Russell King <rmk+kernel@armlinux.org.uk>
|
||||
|
@ -8457,7 +8467,6 @@ F: include/uapi/linux/net_namespace.h
|
|||
F: tools/net/
|
||||
F: tools/testing/selftests/net/
|
||||
F: lib/random32.c
|
||||
F: lib/test_bpf.c
|
||||
|
||||
NETWORKING [IPv4/IPv6]
|
||||
M: "David S. Miller" <davem@davemloft.net>
|
||||
|
|
|
@ -97,4 +97,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _UAPI_ASM_SOCKET_H */
|
||||
|
|
|
@ -59,15 +59,17 @@
|
|||
&davinci_mdio {
|
||||
dp83867_0: ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
|
||||
ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_NS>;
|
||||
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
|
||||
ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
|
||||
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
|
||||
ti,min-output-impedance;
|
||||
};
|
||||
|
||||
dp83867_1: ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
|
||||
ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_NS>;
|
||||
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
|
||||
ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
|
||||
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
|
||||
ti,min-output-imepdance;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -436,18 +436,20 @@
|
|||
};
|
||||
|
||||
gmac0: ethernet@1840000 {
|
||||
compatible = "hisilicon,hix5hd2-gmac";
|
||||
compatible = "hisilicon,hix5hd2-gemac", "hisilicon,hisi-gemac-v1";
|
||||
reg = <0x1840000 0x1000>,<0x184300c 0x4>;
|
||||
interrupts = <0 71 4>;
|
||||
clocks = <&clock HIX5HD2_MAC0_CLK>;
|
||||
clock-names = "mac_core";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gmac1: ethernet@1841000 {
|
||||
compatible = "hisilicon,hix5hd2-gmac";
|
||||
compatible = "hisilicon,hix5hd2-gemac", "hisilicon,hisi-gemac-v1";
|
||||
reg = <0x1841000 0x1000>,<0x1843010 0x4>;
|
||||
interrupts = <0 72 4>;
|
||||
clocks = <&clock HIX5HD2_MAC1_CLK>;
|
||||
clock-names = "mac_core";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -88,10 +88,16 @@
|
|||
|
||||
switch0: switch0@0 {
|
||||
compatible = "marvell,mv88e6085";
|
||||
pinctrl-0 = <&pinctrl_gpio_switch0>;
|
||||
pinctrl-names = "default";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
dsa,member = <0 0>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <27 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
|
@ -99,16 +105,19 @@
|
|||
port@0 {
|
||||
reg = <0>;
|
||||
label = "lan0";
|
||||
phy-handle = <&switch0phy0>;
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
label = "lan1";
|
||||
phy-handle = <&switch0phy1>;
|
||||
};
|
||||
|
||||
port@2 {
|
||||
reg = <2>;
|
||||
label = "lan2";
|
||||
phy-handle = <&switch0phy2>;
|
||||
};
|
||||
|
||||
switch0port5: port@5 {
|
||||
|
@ -133,6 +142,24 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
mdio {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
switch0phy0: switch0phy0@0 {
|
||||
reg = <0>;
|
||||
interrupt-parent = <&switch0>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
switch0phy1: switch1phy0@1 {
|
||||
reg = <1>;
|
||||
interrupt-parent = <&switch0>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH>; };
|
||||
switch0phy2: switch1phy0@2 {
|
||||
reg = <2>;
|
||||
interrupt-parent = <&switch0>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -143,10 +170,16 @@
|
|||
|
||||
switch1: switch1@0 {
|
||||
compatible = "marvell,mv88e6085";
|
||||
pinctrl-0 = <&pinctrl_gpio_switch1>;
|
||||
pinctrl-names = "default";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
dsa,member = <0 1>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
|
@ -196,12 +229,18 @@
|
|||
#size-cells = <0>;
|
||||
switch1phy0: switch1phy0@0 {
|
||||
reg = <0>;
|
||||
interrupt-parent = <&switch1>;
|
||||
interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
switch1phy1: switch1phy0@1 {
|
||||
reg = <1>;
|
||||
interrupt-parent = <&switch1>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
switch1phy2: switch1phy0@2 {
|
||||
reg = <2>;
|
||||
interrupt-parent = <&switch1>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -636,6 +675,18 @@
|
|||
>;
|
||||
};
|
||||
|
||||
pinctrl_gpio_switch0: pinctrl-gpio-switch0 {
|
||||
fsl,pins = <
|
||||
VF610_PAD_PTB5__GPIO_27 0x219d
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_gpio_switch1: pinctrl-gpio-switch1 {
|
||||
fsl,pins = <
|
||||
VF610_PAD_PTB4__GPIO_26 0x219d
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_i2c_mux_reset: pinctrl-i2c-mux-reset {
|
||||
fsl,pins = <
|
||||
VF610_PAD_PTE14__GPIO_119 0x31c2
|
||||
|
|
|
@ -85,6 +85,7 @@ static struct resource smc91x_resources[] = {
|
|||
static struct smc91x_platdata smc91x_platdata = {
|
||||
.flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
|
||||
SMC91X_USE_DMA | SMC91X_NOWAIT,
|
||||
.pxa_u16_align4 = true,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
|
|
|
@ -140,6 +140,7 @@ static struct resource smc91x_resources[] = {
|
|||
static struct smc91x_platdata mainstone_smc91x_info = {
|
||||
.flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT |
|
||||
SMC91X_NOWAIT | SMC91X_USE_DMA,
|
||||
.pxa_u16_align4 = true,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
|
|
|
@ -673,6 +673,7 @@ static struct resource smc91x_resources[] = {
|
|||
static struct smc91x_platdata stargate2_smc91x_info = {
|
||||
.flags = SMC91X_USE_8BIT | SMC91X_USE_16BIT | SMC91X_USE_32BIT
|
||||
| SMC91X_NOWAIT | SMC91X_USE_DMA,
|
||||
.pxa_u16_align4 = true,
|
||||
};
|
||||
|
||||
static struct platform_device smc91x_device = {
|
||||
|
|
|
@ -56,6 +56,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
&enet {
|
||||
status = "ok";
|
||||
};
|
||||
|
||||
&pci_phy0 {
|
||||
status = "ok";
|
||||
};
|
||||
|
@ -174,6 +178,7 @@
|
|||
&mdio_mux_iproc {
|
||||
mdio@10 {
|
||||
gphy0: eth-phy@10 {
|
||||
enet-phy-lane-swap;
|
||||
reg = <0x10>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -191,6 +191,18 @@
|
|||
|
||||
#include "ns2-clock.dtsi"
|
||||
|
||||
enet: ethernet@61000000 {
|
||||
compatible = "brcm,ns2-amac";
|
||||
reg = <0x61000000 0x1000>,
|
||||
<0x61090000 0x1000>,
|
||||
<0x61030000 0x100>;
|
||||
reg-names = "amac_base", "idm_base", "nicpm_base";
|
||||
interrupts = <GIC_SPI 341 IRQ_TYPE_LEVEL_HIGH>;
|
||||
phy-handle = <&gphy0>;
|
||||
phy-mode = "rgmii";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
dma0: dma@61360000 {
|
||||
compatible = "arm,pl330", "arm,primecell";
|
||||
reg = <0x61360000 0x1000>;
|
||||
|
|
|
@ -81,3 +81,26 @@
|
|||
&pcie0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
status = "okay";
|
||||
phy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
phy1: ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
phy-mode = "rgmii-id";
|
||||
phy = <&phy0>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ð1 {
|
||||
phy-mode = "sgmii";
|
||||
phy = <&phy1>;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -140,6 +140,29 @@
|
|||
};
|
||||
};
|
||||
|
||||
eth0: ethernet@30000 {
|
||||
compatible = "marvell,armada-3700-neta";
|
||||
reg = <0x30000 0x4000>;
|
||||
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&sb_periph_clk 8>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
mdio: mdio@32004 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "marvell,orion-mdio";
|
||||
reg = <0x32004 0x4>;
|
||||
};
|
||||
|
||||
eth1: ethernet@40000 {
|
||||
compatible = "marvell,armada-3700-neta";
|
||||
reg = <0x40000 0x4000>;
|
||||
interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&sb_periph_clk 7>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usb3: usb@58000 {
|
||||
compatible = "marvell,armada3700-xhci",
|
||||
"generic-xhci";
|
||||
|
|
|
@ -257,6 +257,7 @@ CONFIG_GPIO_DWAPB=y
|
|||
CONFIG_GPIO_PL061=y
|
||||
CONFIG_GPIO_RCAR=y
|
||||
CONFIG_GPIO_XGENE=y
|
||||
CONFIG_GPIO_XGENE_SB=y
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
CONFIG_GPIO_MAX77620=y
|
||||
|
|
|
@ -90,4 +90,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _UAPI__ASM_AVR32_SOCKET_H */
|
||||
|
|
|
@ -90,5 +90,7 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _ASM_SOCKET_H */
|
||||
|
||||
|
|
|
@ -99,4 +99,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _ASM_IA64_SOCKET_H */
|
||||
|
|
|
@ -90,4 +90,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _ASM_M32R_SOCKET_H */
|
||||
|
|
|
@ -184,7 +184,6 @@ static const struct net_device_ops nfeth_netdev_ops = {
|
|||
.ndo_start_xmit = nfeth_xmit,
|
||||
.ndo_tx_timeout = nfeth_tx_timeout,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
};
|
||||
|
||||
|
|
|
@ -108,4 +108,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _UAPI_ASM_SOCKET_H */
|
||||
|
|
|
@ -90,4 +90,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _ASM_SOCKET_H */
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#if SMC_CAN_USE_16BIT
|
||||
#define SMC_inw(a, r) inw((unsigned long) ((a) + (r)))
|
||||
#define SMC_outw(v, a, r) outw(v, (unsigned long) ((a) + (r)))
|
||||
#define SMC_outw(lp, v, a, r) outw(v, (unsigned long) ((a) + (r)))
|
||||
#define SMC_insw(a, r, p, l) insw((unsigned long) ((a) + (r)), (p), (l))
|
||||
#define SMC_outsw(a, r, p, l) outsw((unsigned long) ((a) + (r)), (p), (l))
|
||||
#endif
|
||||
|
|
|
@ -89,4 +89,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 0x402E
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 0x402F
|
||||
|
||||
#endif /* _UAPI_ASM_SOCKET_H */
|
||||
|
|
|
@ -1 +1,4 @@
|
|||
CONFIG_FSL_DPAA=y
|
||||
CONFIG_FSL_PAMU=y
|
||||
CONFIG_FSL_FMAN=y
|
||||
CONFIG_FSL_DPAA_ETH=y
|
||||
|
|
|
@ -97,4 +97,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _ASM_POWERPC_SOCKET_H */
|
||||
|
|
|
@ -766,7 +766,7 @@ emit_clear:
|
|||
func = (u8 *) __bpf_call_base + imm;
|
||||
|
||||
/* Save skb pointer if we need to re-cache skb data */
|
||||
if (bpf_helper_changes_skb_data(func))
|
||||
if (bpf_helper_changes_pkt_data(func))
|
||||
PPC_BPF_STL(3, 1, bpf_jit_stack_local(ctx));
|
||||
|
||||
bpf_jit_emit_func_call(image, ctx, (u64)func);
|
||||
|
@ -775,7 +775,7 @@ emit_clear:
|
|||
PPC_MR(b2p[BPF_REG_0], 3);
|
||||
|
||||
/* refresh skb cache */
|
||||
if (bpf_helper_changes_skb_data(func)) {
|
||||
if (bpf_helper_changes_pkt_data(func)) {
|
||||
/* reload skb pointer to r3 */
|
||||
PPC_BPF_LL(3, 1, bpf_jit_stack_local(ctx));
|
||||
bpf_jit_emit_skb_loads(image, ctx);
|
||||
|
|
|
@ -96,4 +96,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _ASM_SOCKET_H */
|
||||
|
|
|
@ -981,7 +981,7 @@ static noinline int bpf_jit_insn(struct bpf_jit *jit, struct bpf_prog *fp, int i
|
|||
EMIT2(0x0d00, REG_14, REG_W1);
|
||||
/* lgr %b0,%r2: load return value into %b0 */
|
||||
EMIT4(0xb9040000, BPF_REG_0, REG_2);
|
||||
if (bpf_helper_changes_skb_data((void *)func)) {
|
||||
if (bpf_helper_changes_pkt_data((void *)func)) {
|
||||
jit->seen |= SEEN_SKB_CHANGE;
|
||||
/* lg %b1,ST_OFF_SKBP(%r15) */
|
||||
EMIT6_DISP_LH(0xe3000000, 0x0004, BPF_REG_1, REG_0,
|
||||
|
|
|
@ -86,6 +86,8 @@
|
|||
|
||||
#define SO_CNX_ADVICE 0x0037
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 0x0038
|
||||
|
||||
/* Security levels - as per NRL IPv6 - don't actually do anything */
|
||||
#define SO_SECURITY_AUTHENTICATION 0x5001
|
||||
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
|
||||
|
|
|
@ -256,13 +256,6 @@ static void uml_net_tx_timeout(struct net_device *dev)
|
|||
netif_wake_queue(dev);
|
||||
}
|
||||
|
||||
static int uml_net_change_mtu(struct net_device *dev, int new_mtu)
|
||||
{
|
||||
dev->mtu = new_mtu;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
static void uml_net_poll_controller(struct net_device *dev)
|
||||
{
|
||||
|
@ -374,7 +367,6 @@ static const struct net_device_ops uml_netdev_ops = {
|
|||
.ndo_set_rx_mode = uml_net_set_multicast_list,
|
||||
.ndo_tx_timeout = uml_net_tx_timeout,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_change_mtu = uml_net_change_mtu,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = uml_net_poll_controller,
|
||||
|
|
|
@ -853,7 +853,7 @@ xadd: if (is_imm8(insn->off))
|
|||
func = (u8 *) __bpf_call_base + imm32;
|
||||
jmp_offset = func - (image + addrs[i]);
|
||||
if (seen_ld_abs) {
|
||||
reload_skb_data = bpf_helper_changes_skb_data(func);
|
||||
reload_skb_data = bpf_helper_changes_pkt_data(func);
|
||||
if (reload_skb_data) {
|
||||
EMIT1(0x57); /* push %rdi */
|
||||
jmp_offset += 22; /* pop, mov, sub, mov */
|
||||
|
|
|
@ -101,4 +101,6 @@
|
|||
|
||||
#define SO_CNX_ADVICE 53
|
||||
|
||||
#define SCM_TIMESTAMPING_OPT_STATS 54
|
||||
|
||||
#endif /* _XTENSA_SOCKET_H */
|
||||
|
|
|
@ -136,28 +136,27 @@ static void aead_wmem_wakeup(struct sock *sk)
|
|||
|
||||
static int aead_wait_for_data(struct sock *sk, unsigned flags)
|
||||
{
|
||||
DEFINE_WAIT_FUNC(wait, woken_wake_function);
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
struct aead_ctx *ctx = ask->private;
|
||||
long timeout;
|
||||
DEFINE_WAIT(wait);
|
||||
int err = -ERESTARTSYS;
|
||||
|
||||
if (flags & MSG_DONTWAIT)
|
||||
return -EAGAIN;
|
||||
|
||||
sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk);
|
||||
|
||||
add_wait_queue(sk_sleep(sk), &wait);
|
||||
for (;;) {
|
||||
if (signal_pending(current))
|
||||
break;
|
||||
prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
|
||||
timeout = MAX_SCHEDULE_TIMEOUT;
|
||||
if (sk_wait_event(sk, &timeout, !ctx->more)) {
|
||||
if (sk_wait_event(sk, &timeout, !ctx->more, &wait)) {
|
||||
err = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
finish_wait(sk_sleep(sk), &wait);
|
||||
remove_wait_queue(sk_sleep(sk), &wait);
|
||||
|
||||
sk_clear_bit(SOCKWQ_ASYNC_WAITDATA, sk);
|
||||
|
||||
|
|
|
@ -199,26 +199,26 @@ static void skcipher_free_sgl(struct sock *sk)
|
|||
|
||||
static int skcipher_wait_for_wmem(struct sock *sk, unsigned flags)
|
||||
{
|
||||
long timeout;
|
||||
DEFINE_WAIT(wait);
|
||||
DEFINE_WAIT_FUNC(wait, woken_wake_function);
|
||||
int err = -ERESTARTSYS;
|
||||
long timeout;
|
||||
|
||||
if (flags & MSG_DONTWAIT)
|
||||
return -EAGAIN;
|
||||
|
||||
sk_set_bit(SOCKWQ_ASYNC_NOSPACE, sk);
|
||||
|
||||
add_wait_queue(sk_sleep(sk), &wait);
|
||||
for (;;) {
|
||||
if (signal_pending(current))
|
||||
break;
|
||||
prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
|
||||
timeout = MAX_SCHEDULE_TIMEOUT;
|
||||
if (sk_wait_event(sk, &timeout, skcipher_writable(sk))) {
|
||||
if (sk_wait_event(sk, &timeout, skcipher_writable(sk), &wait)) {
|
||||
err = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
finish_wait(sk_sleep(sk), &wait);
|
||||
remove_wait_queue(sk_sleep(sk), &wait);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
@ -242,10 +242,10 @@ static void skcipher_wmem_wakeup(struct sock *sk)
|
|||
|
||||
static int skcipher_wait_for_data(struct sock *sk, unsigned flags)
|
||||
{
|
||||
DEFINE_WAIT_FUNC(wait, woken_wake_function);
|
||||
struct alg_sock *ask = alg_sk(sk);
|
||||
struct skcipher_ctx *ctx = ask->private;
|
||||
long timeout;
|
||||
DEFINE_WAIT(wait);
|
||||
int err = -ERESTARTSYS;
|
||||
|
||||
if (flags & MSG_DONTWAIT) {
|
||||
|
@ -254,17 +254,17 @@ static int skcipher_wait_for_data(struct sock *sk, unsigned flags)
|
|||
|
||||
sk_set_bit(SOCKWQ_ASYNC_WAITDATA, sk);
|
||||
|
||||
add_wait_queue(sk_sleep(sk), &wait);
|
||||
for (;;) {
|
||||
if (signal_pending(current))
|
||||
break;
|
||||
prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
|
||||
timeout = MAX_SCHEDULE_TIMEOUT;
|
||||
if (sk_wait_event(sk, &timeout, ctx->used)) {
|
||||
if (sk_wait_event(sk, &timeout, ctx->used, &wait)) {
|
||||
err = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
finish_wait(sk_sleep(sk), &wait);
|
||||
remove_wait_queue(sk_sleep(sk), &wait);
|
||||
|
||||
sk_clear_bit(SOCKWQ_ASYNC_WAITDATA, sk);
|
||||
|
||||
|
|
|
@ -82,8 +82,8 @@ static const struct genl_multicast_group acpi_event_mcgrps[] = {
|
|||
{ .name = ACPI_GENL_MCAST_GROUP_NAME, },
|
||||
};
|
||||
|
||||
static struct genl_family acpi_event_genl_family = {
|
||||
.id = GENL_ID_GENERATE,
|
||||
static struct genl_family acpi_event_genl_family __ro_after_init = {
|
||||
.module = THIS_MODULE,
|
||||
.name = ACPI_GENL_FAMILY_NAME,
|
||||
.version = ACPI_GENL_VERSION,
|
||||
.maxattr = ACPI_GENL_ATTR_MAX,
|
||||
|
@ -144,7 +144,7 @@ int acpi_bus_generate_netlink_event(const char *device_class,
|
|||
|
||||
EXPORT_SYMBOL(acpi_bus_generate_netlink_event);
|
||||
|
||||
static int acpi_event_genetlink_init(void)
|
||||
static int __init acpi_event_genetlink_init(void)
|
||||
{
|
||||
return genl_register_family(&acpi_event_genl_family);
|
||||
}
|
||||
|
|
|
@ -584,7 +584,7 @@ static ssize_t hardware_show(struct device *dev, struct device_attribute *attr,
|
|||
return sprintf(buf, "%d\n", data32);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(console, 0644, console_show, console_store);
|
||||
static DEVICE_ATTR_RW(console);
|
||||
|
||||
|
||||
#define SOLOS_ATTR_RO(x) static DEVICE_ATTR(x, 0444, solos_param_show, NULL);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/device.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/percpu.h>
|
||||
|
||||
#include "base.h"
|
||||
|
||||
|
@ -985,3 +986,68 @@ void devm_free_pages(struct device *dev, unsigned long addr)
|
|||
&devres));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_free_pages);
|
||||
|
||||
static void devm_percpu_release(struct device *dev, void *pdata)
|
||||
{
|
||||
void __percpu *p;
|
||||
|
||||
p = *(void __percpu **)pdata;
|
||||
free_percpu(p);
|
||||
}
|
||||
|
||||
static int devm_percpu_match(struct device *dev, void *data, void *p)
|
||||
{
|
||||
struct devres *devr = container_of(data, struct devres, data);
|
||||
|
||||
return *(void **)devr->data == p;
|
||||
}
|
||||
|
||||
/**
|
||||
* __devm_alloc_percpu - Resource-managed alloc_percpu
|
||||
* @dev: Device to allocate per-cpu memory for
|
||||
* @size: Size of per-cpu memory to allocate
|
||||
* @align: Alignment of per-cpu memory to allocate
|
||||
*
|
||||
* Managed alloc_percpu. Per-cpu memory allocated with this function is
|
||||
* automatically freed on driver detach.
|
||||
*
|
||||
* RETURNS:
|
||||
* Pointer to allocated memory on success, NULL on failure.
|
||||
*/
|
||||
void __percpu *__devm_alloc_percpu(struct device *dev, size_t size,
|
||||
size_t align)
|
||||
{
|
||||
void *p;
|
||||
void __percpu *pcpu;
|
||||
|
||||
pcpu = __alloc_percpu(size, align);
|
||||
if (!pcpu)
|
||||
return NULL;
|
||||
|
||||
p = devres_alloc(devm_percpu_release, sizeof(void *), GFP_KERNEL);
|
||||
if (!p) {
|
||||
free_percpu(pcpu);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*(void __percpu **)p = pcpu;
|
||||
|
||||
devres_add(dev, p);
|
||||
|
||||
return pcpu;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__devm_alloc_percpu);
|
||||
|
||||
/**
|
||||
* devm_free_percpu - Resource-managed free_percpu
|
||||
* @dev: Device this memory belongs to
|
||||
* @pdata: Per-cpu memory to free
|
||||
*
|
||||
* Free memory allocated with devm_alloc_percpu().
|
||||
*/
|
||||
void devm_free_percpu(struct device *dev, void __percpu *pdata)
|
||||
{
|
||||
WARN_ON(devres_destroy(dev, devm_percpu_release, devm_percpu_match,
|
||||
(void *)pdata));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_free_percpu);
|
||||
|
|
|
@ -295,6 +295,7 @@ static const struct pci_device_id bcma_pci_bridge_tbl[] = {
|
|||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4359) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4360) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, 0x4365, PCI_VENDOR_ID_DELL, 0x0016) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, 0x4365, PCI_VENDOR_ID_DELL, 0x0018) },
|
||||
{ PCI_DEVICE_SUB(PCI_VENDOR_ID_BROADCOM, 0x4365, PCI_VENDOR_ID_FOXCONN, 0xe092) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a0) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x43a9) },
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include <linux/of_platform.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/of_irq.h>
|
||||
|
||||
#define BTM_HEADER_LEN 4
|
||||
|
|
|
@ -733,9 +733,7 @@ static int bcsp_open(struct hci_uart *hu)
|
|||
skb_queue_head_init(&bcsp->rel);
|
||||
skb_queue_head_init(&bcsp->unrel);
|
||||
|
||||
init_timer(&bcsp->tbcsp);
|
||||
bcsp->tbcsp.function = bcsp_timed_event;
|
||||
bcsp->tbcsp.data = (u_long)hu;
|
||||
setup_timer(&bcsp->tbcsp, bcsp_timed_event, (u_long)hu);
|
||||
|
||||
bcsp->rx_state = BCSP_W4_PKT_DELIMITER;
|
||||
|
||||
|
|
|
@ -204,9 +204,7 @@ static int h5_open(struct hci_uart *hu)
|
|||
|
||||
h5_reset_rx(h5);
|
||||
|
||||
init_timer(&h5->timer);
|
||||
h5->timer.function = h5_timed_event;
|
||||
h5->timer.data = (unsigned long)hu;
|
||||
setup_timer(&h5->timer, h5_timed_event, (unsigned long)hu);
|
||||
|
||||
h5->tx_win = H5_TX_WIN_MAX;
|
||||
|
||||
|
|
|
@ -438,14 +438,11 @@ static int qca_open(struct hci_uart *hu)
|
|||
|
||||
hu->priv = qca;
|
||||
|
||||
init_timer(&qca->wake_retrans_timer);
|
||||
qca->wake_retrans_timer.function = hci_ibs_wake_retrans_timeout;
|
||||
qca->wake_retrans_timer.data = (u_long)hu;
|
||||
setup_timer(&qca->wake_retrans_timer, hci_ibs_wake_retrans_timeout,
|
||||
(u_long)hu);
|
||||
qca->wake_retrans = IBS_WAKE_RETRANS_TIMEOUT_MS;
|
||||
|
||||
init_timer(&qca->tx_idle_timer);
|
||||
qca->tx_idle_timer.function = hci_ibs_tx_idle_timeout;
|
||||
qca->tx_idle_timer.data = (u_long)hu;
|
||||
setup_timer(&qca->tx_idle_timer, hci_ibs_tx_idle_timeout, (u_long)hu);
|
||||
qca->tx_idle_delay = IBS_TX_IDLE_TIMEOUT_MS;
|
||||
|
||||
BT_DBG("HCI_UART_QCA open, tx_idle_delay=%u, wake_retrans=%u",
|
||||
|
|
|
@ -4248,7 +4248,6 @@ static void hdlcdev_rx(MGSLPC_INFO *info, char *buf, int size)
|
|||
static const struct net_device_ops hdlcdev_ops = {
|
||||
.ndo_open = hdlcdev_open,
|
||||
.ndo_stop = hdlcdev_close,
|
||||
.ndo_change_mtu = hdlc_change_mtu,
|
||||
.ndo_start_xmit = hdlc_start_xmit,
|
||||
.ndo_do_ioctl = hdlcdev_ioctl,
|
||||
.ndo_tx_timeout = hdlcdev_tx_timeout,
|
||||
|
|
|
@ -592,16 +592,18 @@ badkey_err:
|
|||
|
||||
static int cxgb4_is_crypto_q_full(struct net_device *dev, unsigned int idx)
|
||||
{
|
||||
int ret = 0;
|
||||
struct sge_ofld_txq *q;
|
||||
struct adapter *adap = netdev2adap(dev);
|
||||
struct sge_uld_txq_info *txq_info =
|
||||
adap->sge.uld_txq_info[CXGB4_TX_CRYPTO];
|
||||
struct sge_uld_txq *txq;
|
||||
int ret = 0;
|
||||
|
||||
local_bh_disable();
|
||||
q = &adap->sge.ofldtxq[idx];
|
||||
spin_lock(&q->sendq.lock);
|
||||
if (q->full)
|
||||
txq = &txq_info->uldtxq[idx];
|
||||
spin_lock(&txq->sendq.lock);
|
||||
if (txq->full)
|
||||
ret = -1;
|
||||
spin_unlock(&q->sendq.lock);
|
||||
spin_unlock(&txq->sendq.lock);
|
||||
local_bh_enable();
|
||||
return ret;
|
||||
}
|
||||
|
@ -674,11 +676,11 @@ static int chcr_device_init(struct chcr_context *ctx)
|
|||
}
|
||||
u_ctx = ULD_CTX(ctx);
|
||||
rxq_perchan = u_ctx->lldi.nrxq / u_ctx->lldi.nchan;
|
||||
ctx->dev->tx_channel_id = 0;
|
||||
rxq_idx = ctx->dev->tx_channel_id * rxq_perchan;
|
||||
rxq_idx += id % rxq_perchan;
|
||||
spin_lock(&ctx->dev->lock_chcr_dev);
|
||||
ctx->tx_channel_id = rxq_idx;
|
||||
ctx->dev->tx_channel_id = !ctx->dev->tx_channel_id;
|
||||
spin_unlock(&ctx->dev->lock_chcr_dev);
|
||||
}
|
||||
out:
|
||||
|
|
|
@ -42,6 +42,7 @@ static chcr_handler_func work_handlers[NUM_CPL_CMDS] = {
|
|||
static struct cxgb4_uld_info chcr_uld_info = {
|
||||
.name = DRV_MODULE_NAME,
|
||||
.nrxq = MAX_ULD_QSETS,
|
||||
.ntxq = MAX_ULD_QSETS,
|
||||
.rxq_size = 1024,
|
||||
.add = chcr_uld_add,
|
||||
.state_change = chcr_uld_state_change,
|
||||
|
@ -126,7 +127,7 @@ static int cpl_fw6_pld_handler(struct chcr_dev *dev,
|
|||
|
||||
int chcr_send_wr(struct sk_buff *skb)
|
||||
{
|
||||
return cxgb4_ofld_send(skb->dev, skb);
|
||||
return cxgb4_crypto_send(skb->dev, skb);
|
||||
}
|
||||
|
||||
static void *chcr_uld_add(const struct cxgb4_lld_info *lld)
|
||||
|
|
|
@ -1368,15 +1368,6 @@ static netdev_tx_t fwnet_tx(struct sk_buff *skb, struct net_device *net)
|
|||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static int fwnet_change_mtu(struct net_device *net, int new_mtu)
|
||||
{
|
||||
if (new_mtu < 68)
|
||||
return -EINVAL;
|
||||
|
||||
net->mtu = new_mtu;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct ethtool_ops fwnet_ethtool_ops = {
|
||||
.get_link = ethtool_op_get_link,
|
||||
};
|
||||
|
@ -1385,7 +1376,6 @@ static const struct net_device_ops fwnet_netdev_ops = {
|
|||
.ndo_open = fwnet_open,
|
||||
.ndo_stop = fwnet_stop,
|
||||
.ndo_start_xmit = fwnet_tx,
|
||||
.ndo_change_mtu = fwnet_change_mtu,
|
||||
};
|
||||
|
||||
static void fwnet_init_dev(struct net_device *net)
|
||||
|
@ -1454,7 +1444,6 @@ static int fwnet_probe(struct fw_unit *unit,
|
|||
struct net_device *net;
|
||||
bool allocated_netdev = false;
|
||||
struct fwnet_device *dev;
|
||||
unsigned max_mtu;
|
||||
int ret;
|
||||
union fwnet_hwaddr *ha;
|
||||
|
||||
|
@ -1493,13 +1482,9 @@ static int fwnet_probe(struct fw_unit *unit,
|
|||
goto out;
|
||||
dev->local_fifo = dev->handler.offset;
|
||||
|
||||
/*
|
||||
* Use the RFC 2734 default 1500 octets or the maximum payload
|
||||
* as initial MTU
|
||||
*/
|
||||
max_mtu = (1 << (card->max_receive + 1))
|
||||
- sizeof(struct rfc2734_header) - IEEE1394_GASP_HDR_SIZE;
|
||||
net->mtu = min(1500U, max_mtu);
|
||||
net->mtu = 1500U;
|
||||
net->min_mtu = ETH_MIN_MTU;
|
||||
net->max_mtu = 0xfff;
|
||||
|
||||
/* Set our hardware address while we're at it */
|
||||
ha = (union fwnet_hwaddr *)net->dev_addr;
|
||||
|
|
|
@ -960,15 +960,6 @@ static int ssip_pn_stop(struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ssip_pn_set_mtu(struct net_device *dev, int new_mtu)
|
||||
{
|
||||
if (new_mtu > SSIP_MAX_MTU || new_mtu < PHONET_MIN_MTU)
|
||||
return -EINVAL;
|
||||
dev->mtu = new_mtu;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ssip_xmit_work(struct work_struct *work)
|
||||
{
|
||||
struct ssi_protocol *ssi =
|
||||
|
@ -1060,7 +1051,6 @@ static const struct net_device_ops ssip_pn_ops = {
|
|||
.ndo_open = ssip_pn_open,
|
||||
.ndo_stop = ssip_pn_stop,
|
||||
.ndo_start_xmit = ssip_pn_xmit,
|
||||
.ndo_change_mtu = ssip_pn_set_mtu,
|
||||
};
|
||||
|
||||
static void ssip_pn_setup(struct net_device *dev)
|
||||
|
@ -1136,6 +1126,10 @@ static int ssi_protocol_probe(struct device *dev)
|
|||
goto out1;
|
||||
}
|
||||
|
||||
/* MTU range: 6 - 65535 */
|
||||
ssi->netdev->min_mtu = PHONET_MIN_MTU;
|
||||
ssi->netdev->max_mtu = SSIP_MAX_MTU;
|
||||
|
||||
SET_NETDEV_DEV(ssi->netdev, dev);
|
||||
netif_carrier_off(ssi->netdev);
|
||||
err = register_netdev(ssi->netdev);
|
||||
|
|
|
@ -116,7 +116,7 @@ static LIST_HEAD(dev_list);
|
|||
static LIST_HEAD(listen_any_list);
|
||||
static DEFINE_MUTEX(lock);
|
||||
static struct workqueue_struct *cma_wq;
|
||||
static int cma_pernet_id;
|
||||
static unsigned int cma_pernet_id;
|
||||
|
||||
struct cma_pernet {
|
||||
struct idr tcp_ps;
|
||||
|
|
|
@ -127,14 +127,7 @@ void ib_cache_release_one(struct ib_device *device);
|
|||
static inline bool rdma_is_upper_dev_rcu(struct net_device *dev,
|
||||
struct net_device *upper)
|
||||
{
|
||||
struct net_device *_upper = NULL;
|
||||
struct list_head *iter;
|
||||
|
||||
netdev_for_each_all_upper_dev_rcu(dev, _upper, iter)
|
||||
if (_upper == upper)
|
||||
break;
|
||||
|
||||
return _upper == upper;
|
||||
return netdev_has_upper_dev_all_rcu(dev, upper);
|
||||
}
|
||||
|
||||
int addr_init(void);
|
||||
|
|
|
@ -437,6 +437,28 @@ static void callback_for_addr_gid_device_scan(struct ib_device *device,
|
|||
&parsed->gid_attr);
|
||||
}
|
||||
|
||||
struct upper_list {
|
||||
struct list_head list;
|
||||
struct net_device *upper;
|
||||
};
|
||||
|
||||
static int netdev_upper_walk(struct net_device *upper, void *data)
|
||||
{
|
||||
struct upper_list *entry = kmalloc(sizeof(*entry), GFP_ATOMIC);
|
||||
struct list_head *upper_list = data;
|
||||
|
||||
if (!entry) {
|
||||
pr_info("roce_gid_mgmt: couldn't allocate entry to delete ndev\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
list_add_tail(&entry->list, upper_list);
|
||||
dev_hold(upper);
|
||||
entry->upper = upper;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void handle_netdev_upper(struct ib_device *ib_dev, u8 port,
|
||||
void *cookie,
|
||||
void (*handle_netdev)(struct ib_device *ib_dev,
|
||||
|
@ -444,30 +466,12 @@ static void handle_netdev_upper(struct ib_device *ib_dev, u8 port,
|
|||
struct net_device *ndev))
|
||||
{
|
||||
struct net_device *ndev = (struct net_device *)cookie;
|
||||
struct upper_list {
|
||||
struct list_head list;
|
||||
struct net_device *upper;
|
||||
};
|
||||
struct net_device *upper;
|
||||
struct list_head *iter;
|
||||
struct upper_list *upper_iter;
|
||||
struct upper_list *upper_temp;
|
||||
LIST_HEAD(upper_list);
|
||||
|
||||
rcu_read_lock();
|
||||
netdev_for_each_all_upper_dev_rcu(ndev, upper, iter) {
|
||||
struct upper_list *entry = kmalloc(sizeof(*entry),
|
||||
GFP_ATOMIC);
|
||||
|
||||
if (!entry) {
|
||||
pr_info("roce_gid_mgmt: couldn't allocate entry to delete ndev\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
list_add_tail(&entry->list, &upper_list);
|
||||
dev_hold(upper);
|
||||
entry->upper = upper;
|
||||
}
|
||||
netdev_walk_all_upper_dev_rcu(ndev, netdev_upper_walk, &upper_list);
|
||||
rcu_read_unlock();
|
||||
|
||||
handle_netdev(ib_dev, port, ndev);
|
||||
|
|
|
@ -1481,6 +1481,7 @@ static int c4iw_uld_control(void *handle, enum cxgb4_control control, ...)
|
|||
static struct cxgb4_uld_info c4iw_uld_info = {
|
||||
.name = DRV_NAME,
|
||||
.nrxq = MAX_ULD_QSETS,
|
||||
.ntxq = MAX_ULD_QSETS,
|
||||
.rxq_size = 511,
|
||||
.ciq = true,
|
||||
.lro = false,
|
||||
|
|
|
@ -1771,13 +1771,13 @@ static int mlx5_ib_destroy_flow(struct ib_flow *flow_id)
|
|||
mutex_lock(&dev->flow_db.lock);
|
||||
|
||||
list_for_each_entry_safe(iter, tmp, &handler->list, list) {
|
||||
mlx5_del_flow_rule(iter->rule);
|
||||
mlx5_del_flow_rules(iter->rule);
|
||||
put_flow_table(dev, iter->prio, true);
|
||||
list_del(&iter->list);
|
||||
kfree(iter);
|
||||
}
|
||||
|
||||
mlx5_del_flow_rule(handler->rule);
|
||||
mlx5_del_flow_rules(handler->rule);
|
||||
put_flow_table(dev, handler->prio, true);
|
||||
mutex_unlock(&dev->flow_db.lock);
|
||||
|
||||
|
@ -1857,7 +1857,7 @@ static struct mlx5_ib_flow_prio *get_flow_table(struct mlx5_ib_dev *dev,
|
|||
ft = mlx5_create_auto_grouped_flow_table(ns, priority,
|
||||
num_entries,
|
||||
num_groups,
|
||||
0);
|
||||
0, 0);
|
||||
|
||||
if (!IS_ERR(ft)) {
|
||||
prio->refcount = 0;
|
||||
|
@ -1877,10 +1877,10 @@ static struct mlx5_ib_flow_handler *create_flow_rule(struct mlx5_ib_dev *dev,
|
|||
{
|
||||
struct mlx5_flow_table *ft = ft_prio->flow_table;
|
||||
struct mlx5_ib_flow_handler *handler;
|
||||
struct mlx5_flow_act flow_act = {0};
|
||||
struct mlx5_flow_spec *spec;
|
||||
const void *ib_flow = (const void *)flow_attr + sizeof(*flow_attr);
|
||||
unsigned int spec_index;
|
||||
u32 action;
|
||||
int err = 0;
|
||||
|
||||
if (!is_valid_attr(flow_attr))
|
||||
|
@ -1905,12 +1905,12 @@ static struct mlx5_ib_flow_handler *create_flow_rule(struct mlx5_ib_dev *dev,
|
|||
}
|
||||
|
||||
spec->match_criteria_enable = get_match_criteria_enable(spec->match_criteria);
|
||||
action = dst ? MLX5_FLOW_CONTEXT_ACTION_FWD_DEST :
|
||||
flow_act.action = dst ? MLX5_FLOW_CONTEXT_ACTION_FWD_DEST :
|
||||
MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO;
|
||||
handler->rule = mlx5_add_flow_rule(ft, spec,
|
||||
action,
|
||||
MLX5_FS_DEFAULT_FLOW_TAG,
|
||||
dst);
|
||||
flow_act.flow_tag = MLX5_FS_DEFAULT_FLOW_TAG;
|
||||
handler->rule = mlx5_add_flow_rules(ft, spec,
|
||||
&flow_act,
|
||||
dst, 1);
|
||||
|
||||
if (IS_ERR(handler->rule)) {
|
||||
err = PTR_ERR(handler->rule);
|
||||
|
@ -1941,7 +1941,7 @@ static struct mlx5_ib_flow_handler *create_dont_trap_rule(struct mlx5_ib_dev *de
|
|||
handler_dst = create_flow_rule(dev, ft_prio,
|
||||
flow_attr, dst);
|
||||
if (IS_ERR(handler_dst)) {
|
||||
mlx5_del_flow_rule(handler->rule);
|
||||
mlx5_del_flow_rules(handler->rule);
|
||||
ft_prio->refcount--;
|
||||
kfree(handler);
|
||||
handler = handler_dst;
|
||||
|
@ -2004,7 +2004,7 @@ static struct mlx5_ib_flow_handler *create_leftovers_rule(struct mlx5_ib_dev *de
|
|||
&leftovers_specs[LEFTOVERS_UC].flow_attr,
|
||||
dst);
|
||||
if (IS_ERR(handler_ucast)) {
|
||||
mlx5_del_flow_rule(handler->rule);
|
||||
mlx5_del_flow_rules(handler->rule);
|
||||
ft_prio->refcount--;
|
||||
kfree(handler);
|
||||
handler = handler_ucast;
|
||||
|
@ -2046,7 +2046,7 @@ static struct mlx5_ib_flow_handler *create_sniffer_rule(struct mlx5_ib_dev *dev,
|
|||
return handler_rx;
|
||||
|
||||
err_tx:
|
||||
mlx5_del_flow_rule(handler_rx->rule);
|
||||
mlx5_del_flow_rules(handler_rx->rule);
|
||||
ft_rx->refcount--;
|
||||
kfree(handler_rx);
|
||||
err:
|
||||
|
@ -2358,6 +2358,8 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, void *context,
|
|||
ibev.event = IB_EVENT_CLIENT_REREGISTER;
|
||||
port = (u8)param;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
ibev.device = &ibdev->ib_dev;
|
||||
|
|
|
@ -153,7 +153,7 @@ struct mlx5_ib_flow_handler {
|
|||
struct list_head list;
|
||||
struct ib_flow ibflow;
|
||||
struct mlx5_ib_flow_prio *prio;
|
||||
struct mlx5_flow_rule *rule;
|
||||
struct mlx5_flow_handle *rule;
|
||||
};
|
||||
|
||||
struct mlx5_ib_flow_db {
|
||||
|
|
|
@ -65,7 +65,6 @@ MODULE_DESCRIPTION("NetEffect RNIC Low-level iWARP Driver");
|
|||
MODULE_LICENSE("Dual BSD/GPL");
|
||||
MODULE_VERSION(DRV_VERSION);
|
||||
|
||||
int max_mtu = 9000;
|
||||
int interrupt_mod_interval = 0;
|
||||
|
||||
/* Interoperability */
|
||||
|
|
|
@ -83,6 +83,8 @@
|
|||
#define NES_FIRST_QPN 64
|
||||
#define NES_SW_CONTEXT_ALIGN 1024
|
||||
|
||||
#define NES_MAX_MTU 9000
|
||||
|
||||
#define NES_NIC_MAX_NICS 16
|
||||
#define NES_MAX_ARP_TABLE_SIZE 4096
|
||||
|
||||
|
@ -169,8 +171,6 @@ do { \
|
|||
#include "nes_cm.h"
|
||||
#include "nes_mgt.h"
|
||||
|
||||
extern int max_mtu;
|
||||
#define max_frame_len (max_mtu+ETH_HLEN)
|
||||
extern int interrupt_mod_interval;
|
||||
extern int nes_if_count;
|
||||
extern int mpa_version;
|
||||
|
|
|
@ -981,20 +981,16 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu)
|
|||
{
|
||||
struct nes_vnic *nesvnic = netdev_priv(netdev);
|
||||
struct nes_device *nesdev = nesvnic->nesdev;
|
||||
int ret = 0;
|
||||
u8 jumbomode = 0;
|
||||
u32 nic_active;
|
||||
u32 nic_active_bit;
|
||||
u32 uc_all_active;
|
||||
u32 mc_all_active;
|
||||
|
||||
if ((new_mtu < ETH_ZLEN) || (new_mtu > max_mtu))
|
||||
return -EINVAL;
|
||||
|
||||
netdev->mtu = new_mtu;
|
||||
nesvnic->max_frame_size = new_mtu + VLAN_ETH_HLEN;
|
||||
|
||||
if (netdev->mtu > 1500) {
|
||||
if (netdev->mtu > ETH_DATA_LEN) {
|
||||
jumbomode=1;
|
||||
}
|
||||
nes_nic_init_timer_defaults(nesdev, jumbomode);
|
||||
|
@ -1020,7 +1016,7 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu)
|
|||
nes_write_indexed(nesdev, NES_IDX_NIC_UNICAST_ALL, nic_active);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1658,7 +1654,7 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
|
|||
|
||||
netdev->watchdog_timeo = NES_TX_TIMEOUT;
|
||||
netdev->irq = nesdev->pcidev->irq;
|
||||
netdev->mtu = ETH_DATA_LEN;
|
||||
netdev->max_mtu = NES_MAX_MTU;
|
||||
netdev->hard_header_len = ETH_HLEN;
|
||||
netdev->addr_len = ETH_ALEN;
|
||||
netdev->type = ARPHRD_ETHER;
|
||||
|
|
|
@ -292,6 +292,25 @@ static struct net_device *ipoib_get_master_net_dev(struct net_device *dev)
|
|||
return dev;
|
||||
}
|
||||
|
||||
struct ipoib_walk_data {
|
||||
const struct sockaddr *addr;
|
||||
struct net_device *result;
|
||||
};
|
||||
|
||||
static int ipoib_upper_walk(struct net_device *upper, void *_data)
|
||||
{
|
||||
struct ipoib_walk_data *data = _data;
|
||||
int ret = 0;
|
||||
|
||||
if (ipoib_is_dev_match_addr_rcu(data->addr, upper)) {
|
||||
dev_hold(upper);
|
||||
data->result = upper;
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find a net_device matching the given address, which is an upper device of
|
||||
* the given net_device.
|
||||
|
@ -304,27 +323,21 @@ static struct net_device *ipoib_get_master_net_dev(struct net_device *dev)
|
|||
static struct net_device *ipoib_get_net_dev_match_addr(
|
||||
const struct sockaddr *addr, struct net_device *dev)
|
||||
{
|
||||
struct net_device *upper,
|
||||
*result = NULL;
|
||||
struct list_head *iter;
|
||||
struct ipoib_walk_data data = {
|
||||
.addr = addr,
|
||||
};
|
||||
|
||||
rcu_read_lock();
|
||||
if (ipoib_is_dev_match_addr_rcu(addr, dev)) {
|
||||
dev_hold(dev);
|
||||
result = dev;
|
||||
data.result = dev;
|
||||
goto out;
|
||||
}
|
||||
|
||||
netdev_for_each_all_upper_dev_rcu(dev, upper, iter) {
|
||||
if (ipoib_is_dev_match_addr_rcu(addr, upper)) {
|
||||
dev_hold(upper);
|
||||
result = upper;
|
||||
break;
|
||||
}
|
||||
}
|
||||
netdev_walk_all_upper_dev_rcu(dev, ipoib_upper_walk, &data);
|
||||
out:
|
||||
rcu_read_unlock();
|
||||
return result;
|
||||
return data.result;
|
||||
}
|
||||
|
||||
/* returns the number of IPoIB netdevs on top a given ipoib device matching a
|
||||
|
@ -2016,6 +2029,7 @@ static struct net_device *ipoib_add_port(const char *format,
|
|||
/* MTU will be reset when mcast join happens */
|
||||
priv->dev->mtu = IPOIB_UD_MTU(priv->max_ib_mtu);
|
||||
priv->mcast_mtu = priv->admin_mtu = priv->dev->mtu;
|
||||
priv->dev->max_mtu = IPOIB_CM_MTU;
|
||||
|
||||
priv->dev->neigh_priv_len = sizeof(struct ipoib_neigh);
|
||||
|
||||
|
|
|
@ -232,7 +232,6 @@ static const struct net_device_ops hysdn_netdev_ops = {
|
|||
.ndo_open = net_open,
|
||||
.ndo_stop = net_close,
|
||||
.ndo_start_xmit = net_send_packet,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
|
|
@ -1198,7 +1198,6 @@ static const struct net_device_ops dvb_netdev_ops = {
|
|||
.ndo_start_xmit = dvb_net_tx,
|
||||
.ndo_set_rx_mode = dvb_net_set_multicast_list,
|
||||
.ndo_set_mac_address = dvb_net_set_mac,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
||||
|
@ -1209,6 +1208,7 @@ static void dvb_net_setup(struct net_device *dev)
|
|||
dev->header_ops = &dvb_header_ops;
|
||||
dev->netdev_ops = &dvb_netdev_ops;
|
||||
dev->mtu = 4096;
|
||||
dev->max_mtu = 4096;
|
||||
|
||||
dev->flags |= IFF_NOARP;
|
||||
}
|
||||
|
|
|
@ -548,16 +548,6 @@ mpt_lan_close(struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
static int
|
||||
mpt_lan_change_mtu(struct net_device *dev, int new_mtu)
|
||||
{
|
||||
if ((new_mtu < MPT_LAN_MIN_MTU) || (new_mtu > MPT_LAN_MAX_MTU))
|
||||
return -EINVAL;
|
||||
dev->mtu = new_mtu;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
/* Tx timeout handler. */
|
||||
static void
|
||||
|
@ -1304,7 +1294,6 @@ static const struct net_device_ops mpt_netdev_ops = {
|
|||
.ndo_open = mpt_lan_open,
|
||||
.ndo_stop = mpt_lan_close,
|
||||
.ndo_start_xmit = mpt_lan_sdu_send,
|
||||
.ndo_change_mtu = mpt_lan_change_mtu,
|
||||
.ndo_tx_timeout = mpt_lan_tx_timeout,
|
||||
};
|
||||
|
||||
|
@ -1375,6 +1364,10 @@ mpt_register_lan_device (MPT_ADAPTER *mpt_dev, int pnum)
|
|||
dev->netdev_ops = &mpt_netdev_ops;
|
||||
dev->watchdog_timeo = MPT_LAN_TX_TIMEOUT;
|
||||
|
||||
/* MTU range: 96 - 65280 */
|
||||
dev->min_mtu = MPT_LAN_MIN_MTU;
|
||||
dev->max_mtu = MPT_LAN_MAX_MTU;
|
||||
|
||||
dlprintk((KERN_INFO MYNAM ": Finished registering dev "
|
||||
"and setting initial values\n"));
|
||||
|
||||
|
|
|
@ -118,6 +118,8 @@ static DEFINE_SPINLOCK(xpnet_broadcast_lock);
|
|||
* now, the default is 64KB.
|
||||
*/
|
||||
#define XPNET_MAX_MTU (0x800000UL - L1_CACHE_BYTES)
|
||||
/* 68 comes from min TCP+IP+MAC header */
|
||||
#define XPNET_MIN_MTU 68
|
||||
/* 32KB has been determined to be the ideal */
|
||||
#define XPNET_DEF_MTU (0x8000UL)
|
||||
|
||||
|
@ -330,22 +332,6 @@ xpnet_dev_stop(struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
xpnet_dev_change_mtu(struct net_device *dev, int new_mtu)
|
||||
{
|
||||
/* 68 comes from min TCP+IP+MAC header */
|
||||
if ((new_mtu < 68) || (new_mtu > XPNET_MAX_MTU)) {
|
||||
dev_err(xpnet, "ifconfig %s mtu %d failed; value must be "
|
||||
"between 68 and %ld\n", dev->name, new_mtu,
|
||||
XPNET_MAX_MTU);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev->mtu = new_mtu;
|
||||
dev_dbg(xpnet, "ifconfig %s mtu set to %d\n", dev->name, new_mtu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Notification that the other end has received the message and
|
||||
* DMA'd the skb information. At this point, they are done with
|
||||
|
@ -519,7 +505,6 @@ static const struct net_device_ops xpnet_netdev_ops = {
|
|||
.ndo_open = xpnet_dev_open,
|
||||
.ndo_stop = xpnet_dev_stop,
|
||||
.ndo_start_xmit = xpnet_dev_hard_start_xmit,
|
||||
.ndo_change_mtu = xpnet_dev_change_mtu,
|
||||
.ndo_tx_timeout = xpnet_dev_tx_timeout,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
|
@ -555,6 +540,8 @@ xpnet_init(void)
|
|||
|
||||
xpnet_device->netdev_ops = &xpnet_netdev_ops;
|
||||
xpnet_device->mtu = XPNET_DEF_MTU;
|
||||
xpnet_device->min_mtu = XPNET_MIN_MTU;
|
||||
xpnet_device->max_mtu = XPNET_MAX_MTU;
|
||||
|
||||
/*
|
||||
* Multicast assumes the LSB of the first octet is set for multicast
|
||||
|
|
|
@ -59,7 +59,6 @@ static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
|
|||
static const struct net_device_ops ipddp_netdev_ops = {
|
||||
.ndo_start_xmit = ipddp_xmit,
|
||||
.ndo_do_ioctl = ipddp_ioctl,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
|
|
@ -950,13 +950,61 @@ static void alb_send_lp_vid(struct slave *slave, u8 mac_addr[],
|
|||
dev_queue_xmit(skb);
|
||||
}
|
||||
|
||||
struct alb_walk_data {
|
||||
struct bonding *bond;
|
||||
struct slave *slave;
|
||||
u8 *mac_addr;
|
||||
bool strict_match;
|
||||
};
|
||||
|
||||
static int alb_upper_dev_walk(struct net_device *upper, void *_data)
|
||||
{
|
||||
struct alb_walk_data *data = _data;
|
||||
bool strict_match = data->strict_match;
|
||||
struct bonding *bond = data->bond;
|
||||
struct slave *slave = data->slave;
|
||||
u8 *mac_addr = data->mac_addr;
|
||||
struct bond_vlan_tag *tags;
|
||||
|
||||
if (is_vlan_dev(upper) && vlan_get_encap_level(upper) == 0) {
|
||||
if (strict_match &&
|
||||
ether_addr_equal_64bits(mac_addr,
|
||||
upper->dev_addr)) {
|
||||
alb_send_lp_vid(slave, mac_addr,
|
||||
vlan_dev_vlan_proto(upper),
|
||||
vlan_dev_vlan_id(upper));
|
||||
} else if (!strict_match) {
|
||||
alb_send_lp_vid(slave, upper->dev_addr,
|
||||
vlan_dev_vlan_proto(upper),
|
||||
vlan_dev_vlan_id(upper));
|
||||
}
|
||||
}
|
||||
|
||||
/* If this is a macvlan device, then only send updates
|
||||
* when strict_match is turned off.
|
||||
*/
|
||||
if (netif_is_macvlan(upper) && !strict_match) {
|
||||
tags = bond_verify_device_path(bond->dev, upper, 0);
|
||||
if (IS_ERR_OR_NULL(tags))
|
||||
BUG();
|
||||
alb_send_lp_vid(slave, upper->dev_addr,
|
||||
tags[0].vlan_proto, tags[0].vlan_id);
|
||||
kfree(tags);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[],
|
||||
bool strict_match)
|
||||
{
|
||||
struct bonding *bond = bond_get_bond_by_slave(slave);
|
||||
struct net_device *upper;
|
||||
struct list_head *iter;
|
||||
struct bond_vlan_tag *tags;
|
||||
struct alb_walk_data data = {
|
||||
.strict_match = strict_match,
|
||||
.mac_addr = mac_addr,
|
||||
.slave = slave,
|
||||
.bond = bond,
|
||||
};
|
||||
|
||||
/* send untagged */
|
||||
alb_send_lp_vid(slave, mac_addr, 0, 0);
|
||||
|
@ -965,33 +1013,7 @@ static void alb_send_learning_packets(struct slave *slave, u8 mac_addr[],
|
|||
* for that device.
|
||||
*/
|
||||
rcu_read_lock();
|
||||
netdev_for_each_all_upper_dev_rcu(bond->dev, upper, iter) {
|
||||
if (is_vlan_dev(upper) && vlan_get_encap_level(upper) == 0) {
|
||||
if (strict_match &&
|
||||
ether_addr_equal_64bits(mac_addr,
|
||||
upper->dev_addr)) {
|
||||
alb_send_lp_vid(slave, mac_addr,
|
||||
vlan_dev_vlan_proto(upper),
|
||||
vlan_dev_vlan_id(upper));
|
||||
} else if (!strict_match) {
|
||||
alb_send_lp_vid(slave, upper->dev_addr,
|
||||
vlan_dev_vlan_proto(upper),
|
||||
vlan_dev_vlan_id(upper));
|
||||
}
|
||||
}
|
||||
|
||||
/* If this is a macvlan device, then only send updates
|
||||
* when strict_match is turned off.
|
||||
*/
|
||||
if (netif_is_macvlan(upper) && !strict_match) {
|
||||
tags = bond_verify_device_path(bond->dev, upper, 0);
|
||||
if (IS_ERR_OR_NULL(tags))
|
||||
BUG();
|
||||
alb_send_lp_vid(slave, upper->dev_addr,
|
||||
tags[0].vlan_proto, tags[0].vlan_id);
|
||||
kfree(tags);
|
||||
}
|
||||
}
|
||||
netdev_walk_all_upper_dev_rcu(bond->dev, alb_upper_dev_walk, &data);
|
||||
rcu_read_unlock();
|
||||
}
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ MODULE_PARM_DESC(lp_interval, "The number of seconds between instances where "
|
|||
atomic_t netpoll_block_tx = ATOMIC_INIT(0);
|
||||
#endif
|
||||
|
||||
int bond_net_id __read_mostly;
|
||||
unsigned int bond_net_id __read_mostly;
|
||||
|
||||
static __be32 arp_target[BOND_MAX_ARP_TARGETS];
|
||||
static int arp_ip_count;
|
||||
|
@ -2270,22 +2270,23 @@ re_arm:
|
|||
}
|
||||
}
|
||||
|
||||
static int bond_upper_dev_walk(struct net_device *upper, void *data)
|
||||
{
|
||||
__be32 ip = *((__be32 *)data);
|
||||
|
||||
return ip == bond_confirm_addr(upper, 0, ip);
|
||||
}
|
||||
|
||||
static bool bond_has_this_ip(struct bonding *bond, __be32 ip)
|
||||
{
|
||||
struct net_device *upper;
|
||||
struct list_head *iter;
|
||||
bool ret = false;
|
||||
|
||||
if (ip == bond_confirm_addr(bond->dev, 0, ip))
|
||||
return true;
|
||||
|
||||
rcu_read_lock();
|
||||
netdev_for_each_all_upper_dev_rcu(bond->dev, upper, iter) {
|
||||
if (ip == bond_confirm_addr(upper, 0, ip)) {
|
||||
ret = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (netdev_walk_all_upper_dev_rcu(bond->dev, bond_upper_dev_walk, &ip))
|
||||
ret = true;
|
||||
rcu_read_unlock();
|
||||
|
||||
return ret;
|
||||
|
@ -4079,16 +4080,16 @@ static netdev_tx_t bond_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int bond_ethtool_get_settings(struct net_device *bond_dev,
|
||||
struct ethtool_cmd *ecmd)
|
||||
static int bond_ethtool_get_link_ksettings(struct net_device *bond_dev,
|
||||
struct ethtool_link_ksettings *cmd)
|
||||
{
|
||||
struct bonding *bond = netdev_priv(bond_dev);
|
||||
unsigned long speed = 0;
|
||||
struct list_head *iter;
|
||||
struct slave *slave;
|
||||
|
||||
ecmd->duplex = DUPLEX_UNKNOWN;
|
||||
ecmd->port = PORT_OTHER;
|
||||
cmd->base.duplex = DUPLEX_UNKNOWN;
|
||||
cmd->base.port = PORT_OTHER;
|
||||
|
||||
/* Since bond_slave_can_tx returns false for all inactive or down slaves, we
|
||||
* do not need to check mode. Though link speed might not represent
|
||||
|
@ -4099,12 +4100,12 @@ static int bond_ethtool_get_settings(struct net_device *bond_dev,
|
|||
if (bond_slave_can_tx(slave)) {
|
||||
if (slave->speed != SPEED_UNKNOWN)
|
||||
speed += slave->speed;
|
||||
if (ecmd->duplex == DUPLEX_UNKNOWN &&
|
||||
if (cmd->base.duplex == DUPLEX_UNKNOWN &&
|
||||
slave->duplex != DUPLEX_UNKNOWN)
|
||||
ecmd->duplex = slave->duplex;
|
||||
cmd->base.duplex = slave->duplex;
|
||||
}
|
||||
}
|
||||
ethtool_cmd_speed_set(ecmd, speed ? : SPEED_UNKNOWN);
|
||||
cmd->base.speed = speed ? : SPEED_UNKNOWN;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -4120,8 +4121,8 @@ static void bond_ethtool_get_drvinfo(struct net_device *bond_dev,
|
|||
|
||||
static const struct ethtool_ops bond_ethtool_ops = {
|
||||
.get_drvinfo = bond_ethtool_get_drvinfo,
|
||||
.get_settings = bond_ethtool_get_settings,
|
||||
.get_link = ethtool_op_get_link,
|
||||
.get_link_ksettings = bond_ethtool_get_link_ksettings,
|
||||
};
|
||||
|
||||
static const struct net_device_ops bond_netdev_ops = {
|
||||
|
|
|
@ -459,7 +459,7 @@ struct kvaser_usb {
|
|||
struct usb_endpoint_descriptor *bulk_in, *bulk_out;
|
||||
struct usb_anchor rx_submitted;
|
||||
|
||||
/* @max_tx_urbs: Firmware-reported maximum number of oustanding,
|
||||
/* @max_tx_urbs: Firmware-reported maximum number of outstanding,
|
||||
* not yet ACKed, transmissions on this device. This value is
|
||||
* also used as a sentinel for marking free tx contexts.
|
||||
*/
|
||||
|
@ -2027,7 +2027,7 @@ static int kvaser_usb_probe(struct usb_interface *intf,
|
|||
((dev->fw_version >> 16) & 0xff),
|
||||
(dev->fw_version & 0xffff));
|
||||
|
||||
dev_dbg(&intf->dev, "Max oustanding tx = %d URBs\n", dev->max_tx_urbs);
|
||||
dev_dbg(&intf->dev, "Max outstanding tx = %d URBs\n", dev->max_tx_urbs);
|
||||
|
||||
err = kvaser_usb_get_card_info(dev);
|
||||
if (err) {
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/types.h>
|
||||
|
@ -264,7 +261,6 @@ static const struct net_device_ops e100_netdev_ops = {
|
|||
.ndo_do_ioctl = e100_ioctl,
|
||||
.ndo_set_mac_address = e100_set_mac_address,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_change_mtu = eth_change_mtu,
|
||||
.ndo_set_config = e100_set_config,
|
||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
.ndo_poll_controller = e100_netpoll,
|
||||
|
@ -412,6 +408,7 @@ etrax_ethernet_init(void)
|
|||
led_next_time = jiffies;
|
||||
return 0;
|
||||
}
|
||||
device_initcall(etrax_ethernet_init)
|
||||
|
||||
/* set MAC address of the interface. called from the core after a
|
||||
* SIOCSIFADDR ioctl, and from the bootup above.
|
||||
|
@ -1715,11 +1712,6 @@ e100_netpoll(struct net_device* netdev)
|
|||
}
|
||||
#endif
|
||||
|
||||
static int
|
||||
etrax_init_module(void)
|
||||
{
|
||||
return etrax_ethernet_init();
|
||||
}
|
||||
|
||||
static int __init
|
||||
e100_boot_setup(char* str)
|
||||
|
@ -1742,5 +1734,3 @@ e100_boot_setup(char* str)
|
|||
}
|
||||
|
||||
__setup("etrax100_eth=", e100_boot_setup);
|
||||
|
||||
module_init(etrax_init_module);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
config NET_DSA_MV88E6XXX
|
||||
tristate "Marvell 88E6xxx Ethernet switch fabric support"
|
||||
depends on NET_DSA
|
||||
select IRQ_DOMAIN
|
||||
select NET_DSA_TAG_EDSA
|
||||
select NET_DSA_TAG_DSA
|
||||
help
|
||||
|
|
|
@ -2,3 +2,4 @@ obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx.o
|
|||
mv88e6xxx-objs := chip.o
|
||||
mv88e6xxx-objs += global1.o
|
||||
mv88e6xxx-$(CONFIG_NET_DSA_MV88E6XXX_GLOBAL2) += global2.o
|
||||
mv88e6xxx-objs += port.o
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -32,3 +32,370 @@ int mv88e6xxx_g1_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask)
|
|||
{
|
||||
return mv88e6xxx_wait(chip, chip->info->global1_addr, reg, mask);
|
||||
}
|
||||
|
||||
/* Offset 0x00: Switch Global Status Register */
|
||||
|
||||
static int mv88e6185_g1_wait_ppu_disabled(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 state;
|
||||
int i, err;
|
||||
|
||||
for (i = 0; i < 16; i++) {
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_STATUS, &state);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Check the value of the PPUState bits 15:14 */
|
||||
state &= GLOBAL_STATUS_PPU_STATE_MASK;
|
||||
if (state != GLOBAL_STATUS_PPU_STATE_POLLING)
|
||||
return 0;
|
||||
|
||||
usleep_range(1000, 2000);
|
||||
}
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int mv88e6185_g1_wait_ppu_polling(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 state;
|
||||
int i, err;
|
||||
|
||||
for (i = 0; i < 16; ++i) {
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_STATUS, &state);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Check the value of the PPUState bits 15:14 */
|
||||
state &= GLOBAL_STATUS_PPU_STATE_MASK;
|
||||
if (state == GLOBAL_STATUS_PPU_STATE_POLLING)
|
||||
return 0;
|
||||
|
||||
usleep_range(1000, 2000);
|
||||
}
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int mv88e6352_g1_wait_ppu_polling(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 state;
|
||||
int i, err;
|
||||
|
||||
for (i = 0; i < 16; ++i) {
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_STATUS, &state);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Check the value of the PPUState (or InitState) bit 15 */
|
||||
if (state & GLOBAL_STATUS_PPU_STATE)
|
||||
return 0;
|
||||
|
||||
usleep_range(1000, 2000);
|
||||
}
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int mv88e6xxx_g1_wait_init_ready(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
const unsigned long timeout = jiffies + 1 * HZ;
|
||||
u16 val;
|
||||
int err;
|
||||
|
||||
/* Wait up to 1 second for the switch to be ready. The InitReady bit 11
|
||||
* is set to a one when all units inside the device (ATU, VTU, etc.)
|
||||
* have finished their initialization and are ready to accept frames.
|
||||
*/
|
||||
while (time_before(jiffies, timeout)) {
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_STATUS, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (val & GLOBAL_STATUS_INIT_READY)
|
||||
break;
|
||||
|
||||
usleep_range(1000, 2000);
|
||||
}
|
||||
|
||||
if (time_after(jiffies, timeout))
|
||||
return -ETIMEDOUT;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Offset 0x04: Switch Global Control Register */
|
||||
|
||||
int mv88e6185_g1_reset(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 val;
|
||||
int err;
|
||||
|
||||
/* Set the SWReset bit 15 along with the PPUEn bit 14, to also restart
|
||||
* the PPU, including re-doing PHY detection and initialization
|
||||
*/
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_CONTROL, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
val |= GLOBAL_CONTROL_SW_RESET;
|
||||
val |= GLOBAL_CONTROL_PPU_ENABLE;
|
||||
|
||||
err = mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mv88e6xxx_g1_wait_init_ready(chip);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return mv88e6185_g1_wait_ppu_polling(chip);
|
||||
}
|
||||
|
||||
int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 val;
|
||||
int err;
|
||||
|
||||
/* Set the SWReset bit 15 */
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_CONTROL, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
val |= GLOBAL_CONTROL_SW_RESET;
|
||||
|
||||
err = mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = mv88e6xxx_g1_wait_init_ready(chip);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return mv88e6352_g1_wait_ppu_polling(chip);
|
||||
}
|
||||
|
||||
int mv88e6185_g1_ppu_enable(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 val;
|
||||
int err;
|
||||
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_CONTROL, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
val |= GLOBAL_CONTROL_PPU_ENABLE;
|
||||
|
||||
err = mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return mv88e6185_g1_wait_ppu_polling(chip);
|
||||
}
|
||||
|
||||
int mv88e6185_g1_ppu_disable(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 val;
|
||||
int err;
|
||||
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_CONTROL, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
val &= ~GLOBAL_CONTROL_PPU_ENABLE;
|
||||
|
||||
err = mv88e6xxx_g1_write(chip, GLOBAL_CONTROL, val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return mv88e6185_g1_wait_ppu_disabled(chip);
|
||||
}
|
||||
|
||||
/* Offset 0x1a: Monitor Control */
|
||||
/* Offset 0x1a: Monitor & MGMT Control on some devices */
|
||||
|
||||
int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port)
|
||||
{
|
||||
u16 reg;
|
||||
int err;
|
||||
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_MONITOR_CONTROL, ®);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
reg &= ~(GLOBAL_MONITOR_CONTROL_INGRESS_MASK |
|
||||
GLOBAL_MONITOR_CONTROL_EGRESS_MASK);
|
||||
|
||||
reg |= port << GLOBAL_MONITOR_CONTROL_INGRESS_SHIFT |
|
||||
port << GLOBAL_MONITOR_CONTROL_EGRESS_SHIFT;
|
||||
|
||||
return mv88e6xxx_g1_write(chip, GLOBAL_MONITOR_CONTROL, reg);
|
||||
}
|
||||
|
||||
/* Older generations also call this the ARP destination. It has been
|
||||
* generalized in more modern devices such that more than ARP can
|
||||
* egress it
|
||||
*/
|
||||
int mv88e6095_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port)
|
||||
{
|
||||
u16 reg;
|
||||
int err;
|
||||
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_MONITOR_CONTROL, ®);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
reg &= ~GLOBAL_MONITOR_CONTROL_ARP_MASK;
|
||||
reg |= port << GLOBAL_MONITOR_CONTROL_ARP_SHIFT;
|
||||
|
||||
return mv88e6xxx_g1_write(chip, GLOBAL_MONITOR_CONTROL, reg);
|
||||
}
|
||||
|
||||
static int mv88e6390_g1_monitor_write(struct mv88e6xxx_chip *chip,
|
||||
u16 pointer, u8 data)
|
||||
{
|
||||
u16 reg;
|
||||
|
||||
reg = GLOBAL_MONITOR_CONTROL_UPDATE | pointer | data;
|
||||
|
||||
return mv88e6xxx_g1_write(chip, GLOBAL_MONITOR_CONTROL, reg);
|
||||
}
|
||||
|
||||
int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = mv88e6390_g1_monitor_write(chip, GLOBAL_MONITOR_CONTROL_INGRESS,
|
||||
port);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return mv88e6390_g1_monitor_write(chip, GLOBAL_MONITOR_CONTROL_EGRESS,
|
||||
port);
|
||||
}
|
||||
|
||||
int mv88e6390_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port)
|
||||
{
|
||||
return mv88e6390_g1_monitor_write(chip, GLOBAL_MONITOR_CONTROL_CPU_DEST,
|
||||
port);
|
||||
}
|
||||
|
||||
int mv88e6390_g1_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* 01:c2:80:00:00:00:00-01:c2:80:00:00:00:07 are Management */
|
||||
err = mv88e6390_g1_monitor_write(
|
||||
chip, GLOBAL_MONITOR_CONTROL_0180C280000000XLO, 0xff);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* 01:c2:80:00:00:00:08-01:c2:80:00:00:00:0f are Management */
|
||||
err = mv88e6390_g1_monitor_write(
|
||||
chip, GLOBAL_MONITOR_CONTROL_0180C280000000XHI, 0xff);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* 01:c2:80:00:00:00:20-01:c2:80:00:00:00:27 are Management */
|
||||
err = mv88e6390_g1_monitor_write(
|
||||
chip, GLOBAL_MONITOR_CONTROL_0180C280000002XLO, 0xff);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* 01:c2:80:00:00:00:28-01:c2:80:00:00:00:2f are Management */
|
||||
return mv88e6390_g1_monitor_write(
|
||||
chip, GLOBAL_MONITOR_CONTROL_0180C280000002XHI, 0xff);
|
||||
}
|
||||
|
||||
/* Offset 0x1c: Global Control 2 */
|
||||
|
||||
int mv88e6390_g1_stats_set_histogram(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 val;
|
||||
int err;
|
||||
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_CONTROL_2, &val);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
val |= GLOBAL_CONTROL_2_HIST_RX_TX;
|
||||
|
||||
err = mv88e6xxx_g1_write(chip, GLOBAL_CONTROL_2, val);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Offset 0x1d: Statistics Operation 2 */
|
||||
|
||||
int mv88e6xxx_g1_stats_wait(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
return mv88e6xxx_g1_wait(chip, GLOBAL_STATS_OP, GLOBAL_STATS_OP_BUSY);
|
||||
}
|
||||
|
||||
int mv88e6xxx_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* Snapshot the hardware statistics counters for this port. */
|
||||
err = mv88e6xxx_g1_write(chip, GLOBAL_STATS_OP,
|
||||
GLOBAL_STATS_OP_CAPTURE_PORT |
|
||||
GLOBAL_STATS_OP_HIST_RX_TX | port);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Wait for the snapshotting to complete. */
|
||||
return mv88e6xxx_g1_stats_wait(chip);
|
||||
}
|
||||
|
||||
int mv88e6320_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port)
|
||||
{
|
||||
port = (port + 1) << 5;
|
||||
|
||||
return mv88e6xxx_g1_stats_snapshot(chip, port);
|
||||
}
|
||||
|
||||
int mv88e6390_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port)
|
||||
{
|
||||
int err;
|
||||
|
||||
port = (port + 1) << 5;
|
||||
|
||||
/* Snapshot the hardware statistics counters for this port. */
|
||||
err = mv88e6xxx_g1_write(chip, GLOBAL_STATS_OP,
|
||||
GLOBAL_STATS_OP_CAPTURE_PORT | port);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Wait for the snapshotting to complete. */
|
||||
return mv88e6xxx_g1_stats_wait(chip);
|
||||
}
|
||||
|
||||
void mv88e6xxx_g1_stats_read(struct mv88e6xxx_chip *chip, int stat, u32 *val)
|
||||
{
|
||||
u32 value;
|
||||
u16 reg;
|
||||
int err;
|
||||
|
||||
*val = 0;
|
||||
|
||||
err = mv88e6xxx_g1_write(chip, GLOBAL_STATS_OP,
|
||||
GLOBAL_STATS_OP_READ_CAPTURED | stat);
|
||||
if (err)
|
||||
return;
|
||||
|
||||
err = mv88e6xxx_g1_stats_wait(chip);
|
||||
if (err)
|
||||
return;
|
||||
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_STATS_COUNTER_32, ®);
|
||||
if (err)
|
||||
return;
|
||||
|
||||
value = reg << 16;
|
||||
|
||||
err = mv88e6xxx_g1_read(chip, GLOBAL_STATS_COUNTER_01, ®);
|
||||
if (err)
|
||||
return;
|
||||
|
||||
*val = value | reg;
|
||||
}
|
||||
|
|
|
@ -20,4 +20,22 @@ int mv88e6xxx_g1_read(struct mv88e6xxx_chip *chip, int reg, u16 *val);
|
|||
int mv88e6xxx_g1_write(struct mv88e6xxx_chip *chip, int reg, u16 val);
|
||||
int mv88e6xxx_g1_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask);
|
||||
|
||||
int mv88e6185_g1_reset(struct mv88e6xxx_chip *chip);
|
||||
int mv88e6352_g1_reset(struct mv88e6xxx_chip *chip);
|
||||
|
||||
int mv88e6185_g1_ppu_enable(struct mv88e6xxx_chip *chip);
|
||||
int mv88e6185_g1_ppu_disable(struct mv88e6xxx_chip *chip);
|
||||
|
||||
int mv88e6xxx_g1_stats_wait(struct mv88e6xxx_chip *chip);
|
||||
int mv88e6xxx_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port);
|
||||
int mv88e6320_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port);
|
||||
int mv88e6390_g1_stats_snapshot(struct mv88e6xxx_chip *chip, int port);
|
||||
int mv88e6390_g1_stats_set_histogram(struct mv88e6xxx_chip *chip);
|
||||
void mv88e6xxx_g1_stats_read(struct mv88e6xxx_chip *chip, int stat, u32 *val);
|
||||
int mv88e6095_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port);
|
||||
int mv88e6390_g1_set_egress_port(struct mv88e6xxx_chip *chip, int port);
|
||||
int mv88e6095_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port);
|
||||
int mv88e6390_g1_set_cpu_port(struct mv88e6xxx_chip *chip, int port);
|
||||
int mv88e6390_g1_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip);
|
||||
|
||||
#endif /* _MV88E6XXX_GLOBAL1_H */
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Marvell 88E6xxx Switch Global 2 Registers support (device address 0x1C)
|
||||
* Marvell 88E6xxx Switch Global 2 Registers support (device address
|
||||
* 0x1C)
|
||||
*
|
||||
* Copyright (c) 2008 Marvell Semiconductor
|
||||
*
|
||||
|
@ -11,6 +12,7 @@
|
|||
* (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/irqdomain.h>
|
||||
#include "mv88e6xxx.h"
|
||||
#include "global2.h"
|
||||
|
||||
|
@ -36,6 +38,31 @@ static int mv88e6xxx_g2_wait(struct mv88e6xxx_chip *chip, int reg, u16 mask)
|
|||
return mv88e6xxx_wait(chip, ADDR_GLOBAL2, reg, mask);
|
||||
}
|
||||
|
||||
/* Offset 0x02: Management Enable 2x */
|
||||
/* Offset 0x03: Management Enable 0x */
|
||||
|
||||
int mv88e6095_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* Consider the frames with reserved multicast destination
|
||||
* addresses matching 01:80:c2:00:00:2x as MGMT.
|
||||
*/
|
||||
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_MGMT_EN_2X)) {
|
||||
err = mv88e6xxx_g2_write(chip, GLOBAL2_MGMT_EN_2X, 0xffff);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Consider the frames with reserved multicast destination
|
||||
* addresses matching 01:80:c2:00:00:0x as MGMT.
|
||||
*/
|
||||
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_MGMT_EN_0X))
|
||||
return mv88e6xxx_g2_write(chip, GLOBAL2_MGMT_EN_0X, 0xffff);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Offset 0x06: Device Mapping Table register */
|
||||
|
||||
static int mv88e6xxx_g2_device_mapping_write(struct mv88e6xxx_chip *chip,
|
||||
|
@ -417,29 +444,154 @@ int mv88e6xxx_g2_smi_phy_write(struct mv88e6xxx_chip *chip, int addr, int reg,
|
|||
return mv88e6xxx_g2_smi_phy_cmd(chip, cmd);
|
||||
}
|
||||
|
||||
static void mv88e6xxx_g2_irq_mask(struct irq_data *d)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);
|
||||
unsigned int n = d->hwirq;
|
||||
|
||||
chip->g2_irq.masked |= (1 << n);
|
||||
}
|
||||
|
||||
static void mv88e6xxx_g2_irq_unmask(struct irq_data *d)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);
|
||||
unsigned int n = d->hwirq;
|
||||
|
||||
chip->g2_irq.masked &= ~(1 << n);
|
||||
}
|
||||
|
||||
static irqreturn_t mv88e6xxx_g2_irq_thread_fn(int irq, void *dev_id)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = dev_id;
|
||||
unsigned int nhandled = 0;
|
||||
unsigned int sub_irq;
|
||||
unsigned int n;
|
||||
int err;
|
||||
u16 reg;
|
||||
|
||||
mutex_lock(&chip->reg_lock);
|
||||
err = mv88e6xxx_g2_read(chip, GLOBAL2_INT_SOURCE, ®);
|
||||
mutex_unlock(&chip->reg_lock);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
for (n = 0; n < 16; ++n) {
|
||||
if (reg & (1 << n)) {
|
||||
sub_irq = irq_find_mapping(chip->g2_irq.domain, n);
|
||||
handle_nested_irq(sub_irq);
|
||||
++nhandled;
|
||||
}
|
||||
}
|
||||
out:
|
||||
return (nhandled > 0 ? IRQ_HANDLED : IRQ_NONE);
|
||||
}
|
||||
|
||||
static void mv88e6xxx_g2_irq_bus_lock(struct irq_data *d)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);
|
||||
|
||||
mutex_lock(&chip->reg_lock);
|
||||
}
|
||||
|
||||
static void mv88e6xxx_g2_irq_bus_sync_unlock(struct irq_data *d)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = irq_data_get_irq_chip_data(d);
|
||||
|
||||
mv88e6xxx_g2_write(chip, GLOBAL2_INT_MASK, ~chip->g2_irq.masked);
|
||||
|
||||
mutex_unlock(&chip->reg_lock);
|
||||
}
|
||||
|
||||
static struct irq_chip mv88e6xxx_g2_irq_chip = {
|
||||
.name = "mv88e6xxx-g2",
|
||||
.irq_mask = mv88e6xxx_g2_irq_mask,
|
||||
.irq_unmask = mv88e6xxx_g2_irq_unmask,
|
||||
.irq_bus_lock = mv88e6xxx_g2_irq_bus_lock,
|
||||
.irq_bus_sync_unlock = mv88e6xxx_g2_irq_bus_sync_unlock,
|
||||
};
|
||||
|
||||
static int mv88e6xxx_g2_irq_domain_map(struct irq_domain *d,
|
||||
unsigned int irq,
|
||||
irq_hw_number_t hwirq)
|
||||
{
|
||||
struct mv88e6xxx_chip *chip = d->host_data;
|
||||
|
||||
irq_set_chip_data(irq, d->host_data);
|
||||
irq_set_chip_and_handler(irq, &chip->g2_irq.chip, handle_level_irq);
|
||||
irq_set_noprobe(irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct irq_domain_ops mv88e6xxx_g2_irq_domain_ops = {
|
||||
.map = mv88e6xxx_g2_irq_domain_map,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
||||
void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int irq, virq;
|
||||
|
||||
free_irq(chip->device_irq, chip);
|
||||
irq_dispose_mapping(chip->device_irq);
|
||||
|
||||
for (irq = 0; irq < 16; irq++) {
|
||||
virq = irq_find_mapping(chip->g2_irq.domain, irq);
|
||||
irq_dispose_mapping(virq);
|
||||
}
|
||||
|
||||
irq_domain_remove(chip->g2_irq.domain);
|
||||
}
|
||||
|
||||
int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
int err, irq, virq;
|
||||
|
||||
if (!chip->dev->of_node)
|
||||
return -EINVAL;
|
||||
|
||||
chip->g2_irq.domain = irq_domain_add_simple(
|
||||
chip->dev->of_node, 16, 0, &mv88e6xxx_g2_irq_domain_ops, chip);
|
||||
if (!chip->g2_irq.domain)
|
||||
return -ENOMEM;
|
||||
|
||||
for (irq = 0; irq < 16; irq++)
|
||||
irq_create_mapping(chip->g2_irq.domain, irq);
|
||||
|
||||
chip->g2_irq.chip = mv88e6xxx_g2_irq_chip;
|
||||
chip->g2_irq.masked = ~0;
|
||||
|
||||
chip->device_irq = irq_find_mapping(chip->g1_irq.domain,
|
||||
GLOBAL_STATUS_IRQ_DEVICE);
|
||||
if (chip->device_irq < 0) {
|
||||
err = chip->device_irq;
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = request_threaded_irq(chip->device_irq, NULL,
|
||||
mv88e6xxx_g2_irq_thread_fn,
|
||||
IRQF_ONESHOT, "mv88e6xxx-g1", chip);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
for (irq = 0; irq < 16; irq++) {
|
||||
virq = irq_find_mapping(chip->g2_irq.domain, irq);
|
||||
irq_dispose_mapping(virq);
|
||||
}
|
||||
|
||||
irq_domain_remove(chip->g2_irq.domain);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
u16 reg;
|
||||
int err;
|
||||
|
||||
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_MGMT_EN_2X)) {
|
||||
/* Consider the frames with reserved multicast destination
|
||||
* addresses matching 01:80:c2:00:00:2x as MGMT.
|
||||
*/
|
||||
err = mv88e6xxx_g2_write(chip, GLOBAL2_MGMT_EN_2X, 0xffff);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_MGMT_EN_0X)) {
|
||||
/* Consider the frames with reserved multicast destination
|
||||
* addresses matching 01:80:c2:00:00:0x as MGMT.
|
||||
*/
|
||||
err = mv88e6xxx_g2_write(chip, GLOBAL2_MGMT_EN_0X, 0xffff);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Ignore removed tag data on doubly tagged packets, disable
|
||||
* flow control messages, force flow control priority to the
|
||||
* highest, and send all special multicast frames to the CPU
|
||||
|
|
|
@ -33,6 +33,9 @@ int mv88e6xxx_g2_get_eeprom16(struct mv88e6xxx_chip *chip,
|
|||
int mv88e6xxx_g2_set_eeprom16(struct mv88e6xxx_chip *chip,
|
||||
struct ethtool_eeprom *eeprom, u8 *data);
|
||||
int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip);
|
||||
int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip);
|
||||
void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip);
|
||||
int mv88e6095_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip);
|
||||
|
||||
#else /* !CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 */
|
||||
|
||||
|
@ -83,6 +86,20 @@ static inline int mv88e6xxx_g2_setup(struct mv88e6xxx_chip *chip)
|
|||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
static inline void mv88e6xxx_g2_irq_free(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int mv88e6095_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 */
|
||||
|
||||
#endif /* _MV88E6XXX_GLOBAL2_H */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue