net: prueth: add debug stats counters
During the packet loss investigation, additional debug counters were
added to root cause the issue. Make these part of the ethtool stats
so that it can be used for debugging and support of the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
During the packet loss investigation, additional debug counters were
added to root cause the issue. Make these part of the ethtool stats
so that it can be used for debugging and support of the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: prueth: fix compiler warning of unused variable
This patch fixes the compiler warnings for unused variables,
dram1 and colq_desc that was introduced by an earlier commit to
clean up rx collision queue usage in the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
This patch fixes the compiler warnings for unused variables,
dram1 and colq_desc that was introduced by an earlier commit to
clean up rx collision queue usage in the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: prueth: suppress promiscuous related log message
Recent changes to support promiscuous mode has introduced a log message
'prueth pruss2_eth eth3: emac_ndo_set_rx_mode: promisc mode not supported
for switch' which gets displayed many times when hsr/prp interface is
created or link goes down and is unnecessary. Convert the log to a debug
message instead of error message
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Recent changes to support promiscuous mode has introduced a log message
'prueth pruss2_eth eth3: emac_ndo_set_rx_mode: promisc mode not supported
for switch' which gets displayed many times when hsr/prp interface is
created or link goes down and is unnecessary. Convert the log to a debug
message instead of error message
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
crypto: keystone: correct enc_offset and enc_len values
Correct calculated values of enc_offset and enc_len because the associated
authentication data scatterlist in aead_request, which was a separate
scatterlist in kernel 3.10, is now the first SG entry of the src
scatterlist in kernel 4.4. The associated auth data SG entry contains
the IV.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Correct calculated values of enc_offset and enc_len because the associated
authentication data scatterlist in aead_request, which was a separate
scatterlist in kernel 3.10, is now the first SG entry of the src
scatterlist in kernel 4.4. The associated auth data SG entry contains
the IV.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
crypto: keystone: enable EVICT flag by default
Enable the EVICT flag by default to allow the key to be changed for
an AEAD (crypto_aead_setkey called more than once), like what is done
during crypto selftests.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Enable the EVICT flag by default to allow the key to be changed for
an AEAD (crypto_aead_setkey called more than once), like what is done
during crypto selftests.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
crypto: keystone: fix crypto selftests
Load firmware before registering algs. Without this change, encryption
selftest 1 would fail for authenc(hmac(sha1),cbc(aes))-keystone-sa,
followed by a WARNING/stack traces of crypto_wait_for_test, followed
by error prints about the failure to load firmware on the SA, and that
task cryptomgr_test was hung/blocked.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Load firmware before registering algs. Without this change, encryption
selftest 1 would fail for authenc(hmac(sha1),cbc(aes))-keystone-sa,
followed by a WARNING/stack traces of crypto_wait_for_test, followed
by error prints about the failure to load firmware on the SA, and that
task cryptomgr_test was hung/blocked.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
crypto: keystone: add driver statistics
This patch exposes packets statistics through sysfs interface
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This patch exposes packets statistics through sysfs interface
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
ARM: dts: k2l: add device binding for crypto accelerator
This patch enables K2L HW crypto accelerator by adding device binding
for it.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This patch enables K2L HW crypto accelerator by adding device binding
for it.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
ARM: dts: k2e: add device binding for crypto accelerator
This patch enables K2E HW crypto accelerator by adding device binding
for it.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This patch enables K2E HW crypto accelerator by adding device binding
for it.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
ARM: dts: k2hk: add device binding for crypto accelerator
This patch enables HW crypto accelerator by adding device binding for it.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This patch enables HW crypto accelerator by adding device binding for it.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
crypto: ks2: add processing functions and aead algorithms
This commit adds security contexts and packet processing functions, which
actually makes the driver functional.
It also register the following algorhithms:
- authenc(hmac(sha1),cbc(aes));
- authenc(hmac(sha1),cbc(des3_ede));
- authenc(xcbc(aes),cbc(aes));
- authenc(xcbc(aes),cbc(des3_ede));
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This commit adds security contexts and packet processing functions, which
actually makes the driver functional.
It also register the following algorhithms:
- authenc(hmac(sha1),cbc(aes));
- authenc(hmac(sha1),cbc(des3_ede));
- authenc(xcbc(aes),cbc(aes));
- authenc(xcbc(aes),cbc(des3_ede));
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
crypto: ks2: add command label functions
KS2 SA hardware performs transformations accordingly to the instructions
given to it in the packet hardware descriptor ps_info fields.
TI LLD has utility functions to format and update those instructions.
LLD calls those instructions as "command label"
This commit ports those functions to the linux driver.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
KS2 SA hardware performs transformations accordingly to the instructions
given to it in the packet hardware descriptor ps_info fields.
TI LLD has utility functions to format and update those instructions.
LLD calls those instructions as "command label"
This commit ports those functions to the linux driver.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
crypto: ks2: add low level crypto hardware interface code
The driver is based on TI SA Low Level Driver (LLD). This commit introduces
the keystone-sa-lld.c file, which re-implements/copies number of helper
functions provided by LLD.
Keystone SA module performs transformation accordingly to command sequence
corresponding to required transformation algorithm. Those sequences are
provided by TI as binary format as so called mci table and therefore has
to be loaded to the driver as firmware. This commit also adds a function
to load mci table.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
The driver is based on TI SA Low Level Driver (LLD). This commit introduces
the keystone-sa-lld.c file, which re-implements/copies number of helper
functions provided by LLD.
Keystone SA module performs transformation accordingly to command sequence
corresponding to required transformation algorithm. Those sequences are
provided by TI as binary format as so called mci table and therefore has
to be loaded to the driver as firmware. This commit also adds a function
to load mci table.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
crypto: ks2: add dma resources allocation code
Keystone crypto accelerator uses KS2 HW queues and dma channels for its
operation. This commit adds code to allocate required memory and buffer
pools, open necessary queues and dma channels. It also adds the code to
release allocated resources and creates stub tasklets for TX and RX
completion processes.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Keystone crypto accelerator uses KS2 HW queues and dma channels for its
operation. This commit adds code to allocate required memory and buffer
pools, open necessary queues and dma channels. It also adds the code to
release allocated resources and creates stub tasklets for TX and RX
completion processes.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
crypto: ks2: read driver configuration parameters from dtb
This commit adds configuration fields such tx and rx queue numbers,
buffer sizes, etc. to the driver instance data structure.
It also adds the function to read the corresponding parameters from dtb.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This commit adds configuration fields such tx and rx queue numbers,
buffer sizes, etc. to the driver instance data structure.
It also adds the function to read the corresponding parameters from dtb.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
crypto: ks2: add SA crypto accelerator definitions
This commit adds definitions that can be used to configure SA hardware
module. The definitions are taken from TI low level driver code (LLD),
which intended to be common for most OSes.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This commit adds definitions that can be used to configure SA hardware
module. The definitions are taken from TI low level driver code (LLD),
which intended to be common for most OSes.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
crypto: add stub keystone crypto accelerator driver
This driver only enables clock for now
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This driver only enables clock for now
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Documentation: devicetree: bindings: arm: keystone: keystone-crypto.txt
Added device tree bindings for the side-band Security Accelerator
on keystone device.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Added device tree bindings for the side-band Security Accelerator
on keystone device.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
arm: move aes_glue.h to the arch/arm/include/asm directory
The aes_glue.h defines function which might be used from drivers.
This commit moves the file to the arch/arm/include/asm to be accessible
publicly.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
The aes_glue.h defines function which might be used from drivers.
This commit moves the file to the arch/arm/include/asm to be accessible
publicly.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
soc: ti: add missing include to knav_dma.h
The knav_dma.h uses "enum dma_transfer_direction" defined in dmaengine.h
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
The knav_dma.h uses "enum dma_transfer_direction" defined in dmaengine.h
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: improvements to lre statistics handling
Add a statistics for number of supervisor frames send by the driver
so that better accounting can be done for number of supervisor frames
vs others. While at it also fix the cnt_tx_c,cnt_rx_c statistics
counters. As per IEC62439 specification, TXC is number of frames sent
to application interface and RXC is number of frames received at the
interface. Present code does it in the reverse way. So fix the
same by interchanging the variable displayed as part of lre statistics.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Add a statistics for number of supervisor frames send by the driver
so that better accounting can be done for number of supervisor frames
vs others. While at it also fix the cnt_tx_c,cnt_rx_c statistics
counters. As per IEC62439 specification, TXC is number of frames sent
to application interface and RXC is number of frames received at the
interface. Present code does it in the reverse way. So fix the
same by interchanging the variable displayed as part of lre statistics.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: prueth: remove unnecessary logs and code comment
The pcp-rxq-map is now not configurable and is static. First 4 levels
of PCP are mapped to first queue and others to the second queue. So
remove the associated log which was applicable when the same is
configurable and the variable, pcp-rxq-map that is unused. Also there
is an unnecessary logs that appear when a link is disconnected while
traffic is ongoing on the wire. This also seems to introduce packet
drop when link fail over happens. So remove the same. Additionally
remove a TODO comment which is not relevant any more.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
The pcp-rxq-map is now not configurable and is static. First 4 levels
of PCP are mapped to first queue and others to the second queue. So
remove the associated log which was applicable when the same is
configurable and the variable, pcp-rxq-map that is unused. Also there
is an unnecessary logs that appear when a link is disconnected while
traffic is ongoing on the wire. This also seems to introduce packet
drop when link fail over happens. So remove the same. Additionally
remove a TODO comment which is not relevant any more.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: prueth: fix incorrect reporting of packet drop at egress for emac
When the xmit function runs out of buffer, the right procedure is
to stop the queue and return NETDEV_TX_BUSY so that the driver can
resume transmission when buffer becomes available. Thus fix this
by calling netif_stop_queue() when this condition occurs and return
correct error code to caller. Currently switch firmware doesn't
support tx interrupt. So do this conditionally for emac for now.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
When the xmit function runs out of buffer, the right procedure is
to stop the queue and return NETDEV_TX_BUSY so that the driver can
resume transmission when buffer becomes available. Thus fix this
by calling netif_stop_queue() when this condition occurs and return
correct error code to caller. Currently switch firmware doesn't
support tx interrupt. So do this conditionally for emac for now.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: prueth: change rx packet processing to use irq thread instead of NAPI
NAPI requires typically more buffers (some example shows about 10 buffers
of MTU size) to allow enough buffering so that packets get queued for NAPI
processing without receive overflow. Since there is only about 4 buffers
of MTU size in the receive direction, the NAPI processing does introduce
packet loss with MTU size packets. One way to fix this is to use irq thread
to process packets. Test has shown that with this change, there is no
packet loss when MTU sized packets are receieved at a rate as high as
88Mbps. So use irq thread to handle received packets instead of NAPI.
This patch uses netif_rx() instead of netif_receive_skb() as the later is
not expected to be used inside a softirq context. Gets a warning trace
when netif_receive_skb() used. At the transmit side, firmware currently
doesn't support tx interrupts. So the same code to request/free irq is
not done for switch based firmwares (Switch/HSR/PRP).
Note that this breaks compatibility with older firmware as previous version
of the firmware and driver uses a shared interrupt at the receive side.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
NAPI requires typically more buffers (some example shows about 10 buffers
of MTU size) to allow enough buffering so that packets get queued for NAPI
processing without receive overflow. Since there is only about 4 buffers
of MTU size in the receive direction, the NAPI processing does introduce
packet loss with MTU size packets. One way to fix this is to use irq thread
to process packets. Test has shown that with this change, there is no
packet loss when MTU sized packets are receieved at a rate as high as
88Mbps. So use irq thread to handle received packets instead of NAPI.
This patch uses netif_rx() instead of netif_receive_skb() as the later is
not expected to be used inside a softirq context. Gets a warning trace
when netif_receive_skb() used. At the transmit side, firmware currently
doesn't support tx interrupts. So the same code to request/free irq is
not done for switch based firmwares (Switch/HSR/PRP).
Note that this breaks compatibility with older firmware as previous version
of the firmware and driver uses a shared interrupt at the receive side.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
arm: dts: am57xx-idk-common: remove unused red-rx and red-tx irq properties
Based on latest update to PRU Ethernet driver, for switch case also same
rx interrupts are used as in EMAC case. So remove the red-tx/rx DT
properties from the DTS file.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Based on latest update to PRU Ethernet driver, for switch case also same
rx interrupts are used as in EMAC case. So remove the red-tx/rx DT
properties from the DTS file.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: prueth: remove collision queue support at ingress
At ingress, the firmware no more use collision queue. So remove the
associated code from the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
At ingress, the firmware no more use collision queue. So remove the
associated code from the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: prueth: update to support 2 queues per port at ingress/egress
One of the issue present in the current version of the firmware is that
there is a collision queue that can hold at the max one MTU sized frame.
In the case of HSR/PRP, the chances of two frames arriving simultaneously
at two ingress ports is high which results in one frame getting dropped
when the Host is still not read the previous frames in the Host interface
FIFO. Also same FIFO is shared by both PRUs making collision theoretically
possible. Instead the new design in firmware allocates 2 queues per PRU
per priority that is used exclusively by the PRU thereby avoiding
collision scenario. Tests have shown that this helps in eliminating
collision as long as the Host driver is able to drain the packet from the
queue fast enough to avoid buffer overflow. Additional buffers freed
from the collision queue is allocated to Q0-Q3 at host receive interface.
This patch makes update to the driver to use two separate interrupts per
port for switch case similar to of EMAC case. The Ingress/Egress queue
usage is also made similar to EMAC. i.e 2 queues per priority per port
at Ingress. At the Egress, 4 queues used as in EMAC case plus a collision
queue.
The existing pcp to queue map is changed to map a group of PCPs to a queue.
Since two priority levels are supported at the ingress, 0-3 are mapped to
one queue and 4-7 to another queue for each PRU.
sw_pcp_rx_priority_queue_map[] provides this map and is written to shared
memory for firmware use.
Note that, this version of the driver is not compatible with prior version
(1.2) of the PRU firmware and will work only with PRU firmware version 1.3.
So this change has to go in sync with firmware version 1.3.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
One of the issue present in the current version of the firmware is that
there is a collision queue that can hold at the max one MTU sized frame.
In the case of HSR/PRP, the chances of two frames arriving simultaneously
at two ingress ports is high which results in one frame getting dropped
when the Host is still not read the previous frames in the Host interface
FIFO. Also same FIFO is shared by both PRUs making collision theoretically
possible. Instead the new design in firmware allocates 2 queues per PRU
per priority that is used exclusively by the PRU thereby avoiding
collision scenario. Tests have shown that this helps in eliminating
collision as long as the Host driver is able to drain the packet from the
queue fast enough to avoid buffer overflow. Additional buffers freed
from the collision queue is allocated to Q0-Q3 at host receive interface.
This patch makes update to the driver to use two separate interrupts per
port for switch case similar to of EMAC case. The Ingress/Egress queue
usage is also made similar to EMAC. i.e 2 queues per priority per port
at Ingress. At the Egress, 4 queues used as in EMAC case plus a collision
queue.
The existing pcp to queue map is changed to map a group of PCPs to a queue.
Since two priority levels are supported at the ingress, 0-3 are mapped to
one queue and 4-7 to another queue for each PRU.
sw_pcp_rx_priority_queue_map[] provides this map and is written to shared
memory for firmware use.
Note that, this version of the driver is not compatible with prior version
(1.2) of the PRU firmware and will work only with PRU firmware version 1.3.
So this change has to go in sync with firmware version 1.3.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: prueth: Add promiscuous mode support
Add support to enable/disable promiscuous mode.
There shouldn't be firmware compatibility breakage as
we're not using RELEASE version and HOST_Q1_RX_CONTEXT_OFFSET remains
unchanged while adding the PROMISCUOUS_MODE control.
Although Ethernet will work with existing firmware,
a firmware update is required for promiscuous mode to work.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Add support to enable/disable promiscuous mode.
There shouldn't be firmware compatibility breakage as
we're not using RELEASE version and HOST_Q1_RX_CONTEXT_OFFSET remains
unchanged while adding the PROMISCUOUS_MODE control.
Although Ethernet will work with existing firmware,
a firmware update is required for promiscuous mode to work.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
arm: dtb: am572x-idk: add dts files to support jailhouse inmates
This commit adds dts files to support jailhouse inmate on am572x-idk
with 2 supported LCDs and w/o LCD.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
This commit adds dts files to support jailhouse inmate on am572x-idk
with 2 supported LCDs and w/o LCD.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
arm: dts: rename am572x-idk-jailhouse.dts to dtsi
We need to create two more dts files for IDK with LCD support.
This commit renames jailhouse dts to dtsi, which will be included to all
idk-jailhouse dts files.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
We need to create two more dts files for IDK with LCD support.
This commit renames jailhouse dts to dtsi, which will be included to all
idk-jailhouse dts files.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
arm: dts: am57xx: allow mt9t111 support in the default dtbs
Signed-off-by: Hongmei Gou <h-gou@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Signed-off-by: Hongmei Gou <h-gou@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
prueth: parse red-rx/red-tx DT property only if eth type is switch
Currently prueth driver parser the red-tx/red-rx DT property always
causing issues on platforms that don't support switch. Fix this by
adding a conditional check to see if the device type is switch and
then parse the checking if the driver is working as switch and parse
the red-rx/red-tx DT property.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Currently prueth driver parser the red-tx/red-rx DT property always
causing issues on platforms that don't support switch. Fix this by
adding a conditional check to see if the device type is switch and
then parse the checking if the driver is working as switch and parse
the red-rx/red-tx DT property.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
prueth: support run time change of protocol at pru Ethernet device
The ICSS PRU is capable of running different firmware to support
various industrial Ethernet protocols. This requires a capability
to configure and run a specific protocol at PRU from user space.
The ethtool command already provide -K option to allow offload
features to hardware. Use this facility to allow offload of
HSR/PRP or any future protocol offload to firmware and there by
allow user to bring up Ethernet with a specific protocol running
at firmware. If user would like to run plain Ethernet using EMAC
firmware, user may switch off the offload using ethtool -K option
and bring up Ethernet interface using EMAC firmware.
Here is an example sequence to switch from EMAC to HSR assuming
eth2 and eth3 are in use.
ifconfig eth3 0.0.0.0 down
ethtool -K eth2 hsr-rx-offload on
ethtool -K eth3 hsr-rx-offload on
ifconfig eth2 hw ether <LRE MAC>
ifconfig eth3 hw ether <LRE MAC>
ip link add name hsr0 type hsr .....
Similarly to switch from HSR to PRP, user may do
ip link delete hsr0
ifconfig eth2 down
ifconfig eth3 down
ethtool -K eth2 hsr-rx-offload off
ethtool -K eth3 hsr-rx-offload off
ethtool -K eth2 prp-rx-offload on
ethtool -K eth3 prp-rx-offload on
ifconfig eth2 hw ether <LRE MAC>
ifconfig eth3 hw ether <LRE MAC>
ip link add name prp0 type prp ....
Similar way, user may switch from PRP to HSR or EMAC and so on.
To support this functionality, move some of the code related to
Host or Port configuration from probe() to ndo_open(). The Ethernet
device configuration or initialization consists of initializing the
Host specific part followed by port specific part. Since the
Host specific configuration/init is common across both ports,
it is required to protect this code through a mutex to make
sure concurrent ndo device open happens properly. i.e second net
device open wait for the common initialization to be complete before
proceeding to initialize its own port. The variable, emac_configured,
is used to skip the common code when second device is opened.
Additional implement ndo ops, emac_ndo_fix_features() and
emac_ndo_set_features() to support ethtool -K option and keep separate
variables for storing switch/emac irqs so that device can use it
based on eth_tye without having to parse the DTS everytime.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
The ICSS PRU is capable of running different firmware to support
various industrial Ethernet protocols. This requires a capability
to configure and run a specific protocol at PRU from user space.
The ethtool command already provide -K option to allow offload
features to hardware. Use this facility to allow offload of
HSR/PRP or any future protocol offload to firmware and there by
allow user to bring up Ethernet with a specific protocol running
at firmware. If user would like to run plain Ethernet using EMAC
firmware, user may switch off the offload using ethtool -K option
and bring up Ethernet interface using EMAC firmware.
Here is an example sequence to switch from EMAC to HSR assuming
eth2 and eth3 are in use.
ifconfig eth3 0.0.0.0 down
ethtool -K eth2 hsr-rx-offload on
ethtool -K eth3 hsr-rx-offload on
ifconfig eth2 hw ether <LRE MAC>
ifconfig eth3 hw ether <LRE MAC>
ip link add name hsr0 type hsr .....
Similarly to switch from HSR to PRP, user may do
ip link delete hsr0
ifconfig eth2 down
ifconfig eth3 down
ethtool -K eth2 hsr-rx-offload off
ethtool -K eth3 hsr-rx-offload off
ethtool -K eth2 prp-rx-offload on
ethtool -K eth3 prp-rx-offload on
ifconfig eth2 hw ether <LRE MAC>
ifconfig eth3 hw ether <LRE MAC>
ip link add name prp0 type prp ....
Similar way, user may switch from PRP to HSR or EMAC and so on.
To support this functionality, move some of the code related to
Host or Port configuration from probe() to ndo_open(). The Ethernet
device configuration or initialization consists of initializing the
Host specific part followed by port specific part. Since the
Host specific configuration/init is common across both ports,
it is required to protect this code through a mutex to make
sure concurrent ndo device open happens properly. i.e second net
device open wait for the common initialization to be complete before
proceeding to initialize its own port. The variable, emac_configured,
is used to skip the common code when second device is opened.
Additional implement ndo ops, emac_ndo_fix_features() and
emac_ndo_set_features() to support ethtool -K option and keep separate
variables for storing switch/emac irqs so that device can use it
based on eth_tye without having to parse the DTS everytime.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
prueth: preparatory patch to add run time protocol change support
The run time change of protocol requires moving some of the initialization
for host and port configuration to emac_ndo_open() from probe(). This
requires that some of the internal functions are moved to right place
in the file so that forward declaration of the functions can be avoided.
This also helps in identifying the changes when the above functionality
is added without which, a lot of churn happens in the code and will be
hard to see what is changed. So this preparatory patch is added to help
add support for run time configuration of protocol change in the Ethernet
device. There is no functionality change except that the functions are
moved around.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
The run time change of protocol requires moving some of the initialization
for host and port configuration to emac_ndo_open() from probe(). This
requires that some of the internal functions are moved to right place
in the file so that forward declaration of the functions can be avoided.
This also helps in identifying the changes when the above functionality
is added without which, a lot of churn happens in the code and will be
hard to see what is changed. So this preparatory patch is added to help
add support for run time configuration of protocol change in the Ethernet
device. There is no functionality change except that the functions are
moved around.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
hsr/prp: do sanity check for offload before creating the interface
Add more sanity check before creating the offloaded hsr/prp interface.
For example, if the underlying device offload hsr, then prp setup
must be blocked. Also both slaves must have the same offload flag
to create the offloaded interface.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Add more sanity check before creating the offloaded hsr/prp interface.
For example, if the underlying device offload hsr, then prp setup
must be blocked. Also both slaves must have the same offload flag
to create the offloaded interface.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
prueth: remove NETIF_F_HW_L2FW_DOFFLOAD requirement for PRP
For PRP offload, there is no need to have NETIF_F_HW_L2FW_DOFFLOAD.
So remove this requirement from the Ethernet device driver for
PRP mode.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
For PRP offload, there is no need to have NETIF_F_HW_L2FW_DOFFLOAD.
So remove this requirement from the Ethernet device driver for
PRP mode.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
prp: remove NETIF_F_HW_L2FW_DOFFLOAD requirement
For PRP offload, there is no L2 offload happening at the lower layer
firmware or hardware. So remove this dependency from the drivers.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
For PRP offload, there is no L2 offload happening at the lower layer
firmware or hardware. So remove this dependency from the drivers.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
prueth: fix incorrect OCMC_RAM_SIZE in the driver
The logic to set the OCMC ram size is flipped and causes a PRU Ethernet
driver crash on AM335x. Following crash trace is seen on this device
during boot up
[ 11.359677] Unable to handle kernel NULL pointer dereference at
virtual address 00000000
[ 11.367831] pgd = ce158000
[ 11.470791] [00000000] *pgd=00000000
[ 11.474416] Internal error: Oops: 805 [#1] PREEMPT ARM
[ 11.474482] Modules linked in: prueth(+) xfrm4_tunnel ipcomp
xfrm_ipcomp pru_rproc esp4 ah4 af_key xfrm_algo wkup_m3_rproc pm33xx pruss
pruss_intc wkup_m3_ipc omap_aes_driver remoteproc omap_sham crypto_engine
ti_emif_sram pruss_soc_bus gpio_pisosr gpio_pca953x gpio_tpic2810 rtc_omap
omap_wdt ti_am335x_tscadc gpio_decoder input_polldev sch_fq_codel
uio_module_drv(O) uio cryptodev(O)
[ 11.474496] CPU: 0 PID: 171 Comm: systemd-udevd Tainted: G
O 4.9.28-rt16-g786e64041b #1
[ 11.474499] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 11.474505] task: ce132080 task.stack: ce154000
[ 11.474526] PC is at memset+0x30/0xe0
[ 11.474532] LR is at 0x0
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
The logic to set the OCMC ram size is flipped and causes a PRU Ethernet
driver crash on AM335x. Following crash trace is seen on this device
during boot up
[ 11.359677] Unable to handle kernel NULL pointer dereference at
virtual address 00000000
[ 11.367831] pgd = ce158000
[ 11.470791] [00000000] *pgd=00000000
[ 11.474416] Internal error: Oops: 805 [#1] PREEMPT ARM
[ 11.474482] Modules linked in: prueth(+) xfrm4_tunnel ipcomp
xfrm_ipcomp pru_rproc esp4 ah4 af_key xfrm_algo wkup_m3_rproc pm33xx pruss
pruss_intc wkup_m3_ipc omap_aes_driver remoteproc omap_sham crypto_engine
ti_emif_sram pruss_soc_bus gpio_pisosr gpio_pca953x gpio_tpic2810 rtc_omap
omap_wdt ti_am335x_tscadc gpio_decoder input_polldev sch_fq_codel
uio_module_drv(O) uio cryptodev(O)
[ 11.474496] CPU: 0 PID: 171 Comm: systemd-udevd Tainted: G
O 4.9.28-rt16-g786e64041b #1
[ 11.474499] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 11.474505] task: ce132080 task.stack: ce154000
[ 11.474526] PC is at memset+0x30/0xe0
[ 11.474532] LR is at 0x0
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
prueth: fix irq cleanup
When prueth device is stopped, the irq is freed only for the
last device. This results in irq request still pending for the
first device. This patch fixes the issue.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
When prueth device is stopped, the irq is freed only for the
last device. This results in irq request still pending for the
first device. This patch fixes the issue.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
arm: dts: am57xx-idk-common: add support of hsr/prp vlan pcp to rx queue map"
Usage:
pcp-rxq-map = /bits/ 8 <3 3 2 2 1 1 0 0>;
where (from left to right) low-pcp to high-pcp:
pcp rxq
-------------
0 3 (q4)
1 3 (q4)
2 2 (q3)
3 2 (q3)
4 1 (q2)
5 1 (q2)
6 0 (q1)
7 0 (q1)
Note 1:
If no pcp-rxq-map is defined, the default is
<3 3 2 2 1 1 0 0>.
Note 2:
If a pcp is mapped to a rx queue (even it is the
default case), it is user's responsibility to make
sure that the rx queue have enough buffers, ie. 48,
to receive at least one regular size frame.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Usage:
pcp-rxq-map = /bits/ 8 <3 3 2 2 1 1 0 0>;
where (from left to right) low-pcp to high-pcp:
pcp rxq
-------------
0 3 (q4)
1 3 (q4)
2 2 (q3)
3 2 (q3)
4 1 (q2)
5 1 (q2)
6 0 (q1)
7 0 (q1)
Note 1:
If no pcp-rxq-map is defined, the default is
<3 3 2 2 1 1 0 0>.
Note 2:
If a pcp is mapped to a rx queue (even it is the
default case), it is user's responsibility to make
sure that the rx queue have enough buffers, ie. 48,
to receive at least one regular size frame.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
net: prueth: add support of hsr/prp vlan pcp to rx queue map
Usage: in dts/pruss2_eth{} node, add property
pcp-rxq-map = /bits/ 8 <3 3 2 2 1 1 0 0>;
where (from left to right) low-pcp to high-pcp:
pcp rxq
------------------------------
0 3 (q4) low priority
1 3 (q4)
2 2 (q3)
3 2 (q3)
4 1 (q2)
5 1 (q2)
6 0 (q1)
7 0 (q1) high priority
Note 1:
If no pcp-rxq-map is defined, the default is
<3 3 2 2 1 1 0 0>.
Note 2:
If a pcp is mapped to a rx queue (even it is the
default case), it is user's responsibility to make
sure that the rx queue have enough buffers, ie. 48,
to receive at least one regular size frame.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Usage: in dts/pruss2_eth{} node, add property
pcp-rxq-map = /bits/ 8 <3 3 2 2 1 1 0 0>;
where (from left to right) low-pcp to high-pcp:
pcp rxq
------------------------------
0 3 (q4) low priority
1 3 (q4)
2 2 (q3)
3 2 (q3)
4 1 (q2)
5 1 (q2)
6 0 (q1)
7 0 (q1) high priority
Note 1:
If no pcp-rxq-map is defined, the default is
<3 3 2 2 1 1 0 0>.
Note 2:
If a pcp is mapped to a rx queue (even it is the
default case), it is user's responsibility to make
sure that the rx queue have enough buffers, ie. 48,
to receive at least one regular size frame.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: add mode T support for HSR in offload case
For HSR, add support for mode T which is transparent mode. In this
mode, the hsr device just duplicate the packets and send it over
its slaves.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
For HSR, add support for mode T which is transparent mode. In this
mode, the hsr device just duplicate the packets and send it over
its slaves.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
prueth: use constants for busy/overflow bits
Instead of hardcoded values, use constants for the status/overflow
bits.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Instead of hardcoded values, use constants for the status/overflow
bits.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
tmp: prueth: add debugfs file to show/write configuration parameters
Add a debugfs interface to configure the configuration parameter MIBs
for HSR/PRP device. This is an intermediate solution to integrate the
net-snmp queries/set function to allow modification of the parameters
through snmp agent. This is expected to be changed in the future to
use proper redundancy device operations. For now this is marked as a
temporary patch for prototyping. While at it, also change the annoying
debug prints when executing the ethtool command by changing it to a
debug print instead of error. Remove the unused shadow variable and
move the error stats display to use debugfs.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Add a debugfs interface to configure the configuration parameter MIBs
for HSR/PRP device. This is an intermediate solution to integrate the
net-snmp queries/set function to allow modification of the parameters
through snmp agent. This is expected to be changed in the future to
use proper redundancy device operations. For now this is marked as a
temporary patch for prototyping. While at it, also change the annoying
debug prints when executing the ethtool command by changing it to a
debug print instead of error. Remove the unused shadow variable and
move the error stats display to use debugfs.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
arm: dts: am57xx-idk-common: add prueth HSR PRP bindings
Syntax:
rx-queue-size = /bits/ 16 <q1 q2 q3 q4 colq>
tx-queue-size = /bits/ 16 <q1 q2 q3 q4 colq>
For EMAC, only the first 4 q sizes take effect.
The 5th (if present) will be ignored.
For Switch/HSR/PRP, all 5 q sizes take effect.
All 5 must present if need to config q sizes.
If no q size config exists for a particular port in
dts, the following defaults for that port will
be used.
HSR/PRP Defaults:
host: rx-queue-size = /bits/ 16 <254 134 134 254 48>
mii0: tx-queue-size = /bits/ 16 <97 97 97 97 48>
mii1: tx-queue-size = /bits/ 16 <97 97 97 97 48>
EMAC Defaults:
host: rx-queue-size = /bits/ 16 <194 194 194 194 48>
mii0: tx-queue-size = /bits/ 16 <97 97 97 97 48>
mii1: tx-queue-size = /bits/ 16 <97 97 97 97 48>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Syntax:
rx-queue-size = /bits/ 16 <q1 q2 q3 q4 colq>
tx-queue-size = /bits/ 16 <q1 q2 q3 q4 colq>
For EMAC, only the first 4 q sizes take effect.
The 5th (if present) will be ignored.
For Switch/HSR/PRP, all 5 q sizes take effect.
All 5 must present if need to config q sizes.
If no q size config exists for a particular port in
dts, the following defaults for that port will
be used.
HSR/PRP Defaults:
host: rx-queue-size = /bits/ 16 <254 134 134 254 48>
mii0: tx-queue-size = /bits/ 16 <97 97 97 97 48>
mii1: tx-queue-size = /bits/ 16 <97 97 97 97 48>
EMAC Defaults:
host: rx-queue-size = /bits/ 16 <194 194 194 194 48>
mii0: tx-queue-size = /bits/ 16 <97 97 97 97 48>
mii1: tx-queue-size = /bits/ 16 <97 97 97 97 48>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
net: prueth: Add TI PRUSS Ethernet driver support of HSR PRP
This patch adds the Ethernet driver support of HSR (High-availability
Seamless Redundancy) and PRP (Parallel Redundancy Protocol)
functionality on TI SoCs that support the aforementioned protocols
over PRUSS loaded with the appropriate PRU firmware.
Usage:
in u-boot env (note line continuation "\" for netargs):
setenv netargs 'setenv bootargs console=${console} ${optargs} \
root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp \
prueth.pruss1_ethtype=${pruss1_ethtype} \
prueth.pruss2_ethtype=${pruss2_ethtype}'
setenv pruss1_ethtype 1
setenv pruss2_ethtype 2
where prussX_ethtype value
0 => emac
1 => hsr
2 => prp
Missing prueth.prussrX_ethtype => emac for that pruss.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This patch adds the Ethernet driver support of HSR (High-availability
Seamless Redundancy) and PRP (Parallel Redundancy Protocol)
functionality on TI SoCs that support the aforementioned protocols
over PRUSS loaded with the appropriate PRU firmware.
Usage:
in u-boot env (note line continuation "\" for netargs):
setenv netargs 'setenv bootargs console=${console} ${optargs} \
root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp \
prueth.pruss1_ethtype=${pruss1_ethtype} \
prueth.pruss2_ethtype=${pruss2_ethtype}'
setenv pruss1_ethtype 1
setenv pruss2_ethtype 2
where prussX_ethtype value
0 => emac
1 => hsr
2 => prp
Missing prueth.prussrX_ethtype => emac for that pruss.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
prp: Use existing definition for VLAN
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: Fix misleading log.
Current log is misleading as driver is re-used for PRP.
Also avoid checkpatch warning.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Current log is misleading as driver is re-used for PRP.
Also avoid checkpatch warning.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: fix filling up hsr tag error
When filling in the fields of hsr tag, current implementation
incorrectly places the hsr tag in front of the vlan tag (if
one presents). This patch fixes the error.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
When filling in the fields of hsr tag, current implementation
incorrectly places the hsr tag in front of the vlan tag (if
one presents). This patch fixes the error.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: fix debugfs so that multiple instances can be supported
Use the netdev name to create the debugfs file for hsr and prp so that
multiple instances can be supported.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Use the netdev name to create the debugfs file for hsr and prp so that
multiple instances can be supported.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: Don't update error count for incorrect lan
The LRE stats for incorrect LAN is applicable only for PRP. So remove
the same for hsr case.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
The LRE stats for incorrect LAN is applicable only for PRP. So remove
the same for hsr case.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: fix protocol version number setting error
The protocol version number needs to be set before it is used. Otherwise
the behavior is undetermined. For example, in the case of PRP, the RCT
will have an incorrect LanID which that leads to receiving duplicate
frames, such as 3 duplicate ping responses (a total of 4 responses) for
each ping request generated.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
The protocol version number needs to be set before it is used. Otherwise
the behavior is undetermined. For example, in the case of PRP, the RCT
will have an incorrect LanID which that leads to receiving duplicate
frames, such as 3 duplicate ping responses (a total of 4 responses) for
each ping request generated.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: fix uninitialized variable compiler warning
Initialize the node table entry to fix the compiler
warning of uninitialized variable.
Singed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Initialize the node table entry to fix the compiler
warning of uninitialized variable.
Singed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
prp: fix LSDU size calculation
Currently, driver includes the Tag size twice in the calculation
of LSDU size. This patch fixes the same.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Currently, driver includes the Tag size twice in the calculation
of LSDU size. This patch fixes the same.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
prp: offload LRE functions at RX to firmware/hardware
The hardware/firmware will do LRE rx processing and forward
only one frame to Linux network interface. This patch checks if
the prp lower level driver support offload and enable flags so
that same pocessing gets disabled at the Linux PRP driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
The hardware/firmware will do LRE rx processing and forward
only one frame to Linux network interface. This patch checks if
the prp lower level driver support offload and enable flags so
that same pocessing gets disabled at the Linux PRP driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: handle untagged frame at the ingress
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: Remove self node from node table list for query
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: add sanity check to accept only configured protocol packets
When DAN is configured for HSR, discard PRP packets and vice-versa.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
When DAN is configured for HSR, discard PRP packets and vice-versa.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: bail out if skb data not pointing to mac header
Currently if hsr/prp driver receives a packet and the mac
header is not pointing to skb->data, then we do an skb_push()
and pass the skb for processing. But there is no check if
the mac header is matching with skb->data. This patch adds the
additional check and bail out.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Currently if hsr/prp driver receives a packet and the mac
header is not pointing to skb->data, then we do an skb_push()
and pass the skb for processing. But there is no check if
the mac header is matching with skb->data. This patch adds the
additional check and bail out.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: add vlan support
This patch add support for creating vlan interfaces
over hsr/prp interface.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This patch add support for creating vlan interfaces
over hsr/prp interface.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr/prp: improvement and fixes for lan_id handling
Currently lan id is not set in supervisor frames. Also do a sanity
check for frames at the ingress for proper lan_id and update the
error stats counter when they don't match. This is needed to help
fix possible lan connection issues. For example, by observing the
stats counter, user can make sure the connection is done correctly. i.e
Slave-A should be connected to slave-A of the adjacent node for HSR ring
or PRP network A. Otherwise, cnt_rx_wrong_lan_a and cnt_rx_wrong_lan_b
will increment.
This also pass the rct ptr to prp_check_lsdu_size() to check LSDU size
instead of calling the skb_get_PRP_rct() again as the same is available
to the caller.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Currently lan id is not set in supervisor frames. Also do a sanity
check for frames at the ingress for proper lan_id and update the
error stats counter when they don't match. This is needed to help
fix possible lan connection issues. For example, by observing the
stats counter, user can make sure the connection is done correctly. i.e
Slave-A should be connected to slave-A of the adjacent node for HSR ring
or PRP network A. Otherwise, cnt_rx_wrong_lan_a and cnt_rx_wrong_lan_b
will increment.
This also pass the rct ptr to prp_check_lsdu_size() to check LSDU size
instead of calling the skb_get_PRP_rct() again as the same is available
to the caller.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr:prp: add LRE stats support
Add LRE stats struct to hsr/prp device node private data to allow
update of various stats at the slave interfaces and master interface
as per iec-63439 mibs spec.
Add debugfs file stats to show LRE stats for hsr and prp nodes from
user space
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Add LRE stats struct to hsr/prp device node private data to allow
update of various stats at the slave interfaces and master interface
as per iec-63439 mibs spec.
Add debugfs file stats to show LRE stats for hsr and prp nodes from
user space
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
prp: add packet handling support
DAN-P nodes are to receive traditional ip packets as well
PRP (Parallel Redundancy Protocol) tagged (trailor) packets.
This patch adds logic to format L2 frames from network
stack to add a trailor and send it as duplciates over the
slave interfaces. At the ingress, it strips the trailor,
do duplicate detection and rejection and forward a stripped
frame up the network stack.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
DAN-P nodes are to receive traditional ip packets as well
PRP (Parallel Redundancy Protocol) tagged (trailor) packets.
This patch adds logic to format L2 frames from network
stack to add a trailor and send it as duplciates over the
slave interfaces. At the ingress, it strips the trailor,
do duplicate detection and rejection and forward a stripped
frame up the network stack.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
prp: add supervision frame generation and handling support
Add support for sending and handling supervision frames. For PRP,
supervision frame format is similar to HSR version 0, but have a
PRP Redunancy Control Trailor (RCT) added.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Add support for sending and handling supervision frames. For PRP,
supervision frame format is similar to HSR version 0, but have a
PRP Redunancy Control Trailor (RCT) added.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: add netlink interface to create prp device
This patch adds a netlink interface to create a prp device similar in
line with hsr. Also add a notifier for the same.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This patch adds a netlink interface to create a prp device similar in
line with hsr. Also add a notifier for the same.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: move notification handling to a common file for re-use
Move the code for handling interface notification to a common file
hsr_prp_main.c so that it can be re-used from prp main code as well.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Move the code for handling interface notification to a common file
hsr_prp_main.c so that it can be re-used from prp main code as well.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: rename files to introduce prp protocol support
To re-use files for PRP implementation, rename some of the files
which are common across both protocol implementation. While at
it rename the directory under net to net/hsr-prp as well.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
To re-use files for PRP implementation, rename some of the files
which are common across both protocol implementation. While at
it rename the directory under net to net/hsr-prp as well.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: rename functions to introduce prp protocol support
There are many similarities between a DAN-H (using HSR protocol) and
DAN-P (using PRP protocol) node. So the code can be re-used across
both implementations. As a preparatory patch, rename functions that
are common across two protocol handlers. While at it also, rename some
of the private structure to indicate they are common.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
There are many similarities between a DAN-H (using HSR protocol) and
DAN-P (using PRP protocol) node. So the code can be re-used across
both implementations. As a preparatory patch, rename functions that
are common across two protocol handlers. While at it also, rename some
of the private structure to indicate they are common.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: preparatary update for adding prp support
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: cleanup to fix coding style and checkpatch issues
Fix camel case usage and checkpatch related issues in the code
as a preparatory patch before adding more code to add support
for PRP protocol in the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Fix camel case usage and checkpatch related issues in the code
as a preparatory patch before adding more code to add support
for PRP protocol in the driver.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: add address B port in the debugfs print
For debug, it will be helpful to show the address B port
as well when displaying the remote node stats.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
For debug, it will be helpful to show the address B port
as well when displaying the remote node stats.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: remove the warn_once for non hsr frame
Remove the annoying WARN_ONCE() which happens while the hsr
interface is being setup. Also check the validity of mac B
address as it can be zero when same MAC is used on both
interfaces.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Remove the annoying WARN_ONCE() which happens while the hsr
interface is being setup. Also check the validity of mac B
address as it can be zero when same MAC is used on both
interfaces.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: add tx stats for master interface
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: update to support lre rx and l2 forward offload
hsr LRE functionality as well L2 forwarding is expected to be offloaded
to hardware (h/w) or firmware (f/w). When the LRE Ingress function is
offloaded, the LRE function of duplicating and tagging in egress direction
is still handled in the hsr driver. At the ingress, the supervisor
frames are processed at h/w or f/w and is responsible for maintaining the
node table for remote nodes and statistics. h/w or f/w is also expected to
drop duplicate of the received frames to host and forward only one copy to
slave A or Slave B depending on which interface frame came first. Non Host
and broadcast/multicast frames gets forwarded through hsr L2 forwarder
code if NETIF_F_HW_L2FW_DOFFLOAD is not supported. If supported, then no
forwarding happens in the hsr L2 forwarder and the same is assumed to be
handled at h/w or f/w.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr LRE functionality as well L2 forwarding is expected to be offloaded
to hardware (h/w) or firmware (f/w). When the LRE Ingress function is
offloaded, the LRE function of duplicating and tagging in egress direction
is still handled in the hsr driver. At the ingress, the supervisor
frames are processed at h/w or f/w and is responsible for maintaining the
node table for remote nodes and statistics. h/w or f/w is also expected to
drop duplicate of the received frames to host and forward only one copy to
slave A or Slave B depending on which interface frame came first. Non Host
and broadcast/multicast frames gets forwarded through hsr L2 forwarder
code if NETIF_F_HW_L2FW_DOFFLOAD is not supported. If supported, then no
forwarding happens in the hsr L2 forwarder and the same is assumed to be
handled at h/w or f/w.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: introduce rx offload feature flags for HSR and PRP
This patch introduces the HSR/PRP rx offload flag to allow offload
of LRE rx side processing such as duplicate detect/drop, node_table,
etc to h/w. Lower level Ethernet drivers that support h/w with these
protocol handling list this feature in the feature flag of the
net_device.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This patch introduces the HSR/PRP rx offload flag to allow offload
of LRE rx side processing such as duplicate detect/drop, node_table,
etc to h/w. Lower level Ethernet drivers that support h/w with these
protocol handling list this feature in the feature flag of the
net_device.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
hsr: add debugfs support for display node list
This adds a debugfs interface to allow display the nodes learned
by the hsr master.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This adds a debugfs interface to allow display the nodes learned
by the hsr master.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
arm: dts: am572x: add am572x-evm-jailhouse dts
This commit add the am572x-evm-jailhouse.dts which is extension of the
am57xx-evm-reva3.dts. It allows to demonstrate Jailhouse hypervisor and run
couple of bare-metal as well as TI PDK test application.
1) reserve memory for jailhouse and jailhouse inmate
2) disable timer8 at Linux but left it power-on
3) disable uart9 (with some evm modification uart9 may be used by an
inmate)
4) skip interrupts 134 and 135 (they will be used by inmates)
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This commit add the am572x-evm-jailhouse.dts which is extension of the
am57xx-evm-reva3.dts. It allows to demonstrate Jailhouse hypervisor and run
couple of bare-metal as well as TI PDK test application.
1) reserve memory for jailhouse and jailhouse inmate
2) disable timer8 at Linux but left it power-on
3) disable uart9 (with some evm modification uart9 may be used by an
inmate)
4) skip interrupts 134 and 135 (they will be used by inmates)
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
arm: dts: am572x: add am572x-idk-jailhouse dts
This commit add the am572x-idk-jailhouse.dts which is extension of the
am572x-idk.dts. It allows to demonstrate Jailhouse hypervisor and run
couple of bare-metal as well as TI-RTOS test applications like PRUSS and
ICSS_EMAC.
1) reserve memory for jailhouse and jailhouse inmate
2) disable timer2 and timer8 at Linux but left them power-on
3) disable uart9 (with some evm modification uart9 may be used by an
inmate)
4) disable pruss, gpio3 and gpio5. They will be used by TI-RTOS examples.
5) skip some interrupts to be used by inmates
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
This commit add the am572x-idk-jailhouse.dts which is extension of the
am572x-idk.dts. It allows to demonstrate Jailhouse hypervisor and run
couple of bare-metal as well as TI-RTOS test applications like PRUSS and
ICSS_EMAC.
1) reserve memory for jailhouse and jailhouse inmate
2) disable timer2 and timer8 at Linux but left them power-on
3) disable uart9 (with some evm modification uart9 may be used by an
inmate)
4) disable pruss, gpio3 and gpio5. They will be used by TI-RTOS examples.
5) skip some interrupts to be used by inmates
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
arm: Export __boot_cpu_mode for use in Jailhouse driver module
Onlining a CPU while Jailhouse was running sets BOOT_CPU_MODE_MISMATCH
because the kernel detect that the CPU will now only come up in SVC
mode. Therefore, we need to fix up the flag after disabling Jailhouse
again.
Moreover, exporting the symbol allows to use is_hyp_mode_available() in
the driver, thus prevents us from crashing during Jailhouse activation
when there is no hyp stub installed.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Onlining a CPU while Jailhouse was running sets BOOT_CPU_MODE_MISMATCH
because the kernel detect that the CPU will now only come up in SVC
mode. Therefore, we need to fix up the flag after disabling Jailhouse
again.
Moreover, exporting the symbol allows to use is_hyp_mode_available() in
the driver, thus prevents us from crashing during Jailhouse activation
when there is no hyp stub installed.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
ti_config_fragments: am33xx_only: enable spidev module
* The spidev module is to be used to manage the spi0 interface in the
am335x-boneblack-iot-cape device tree.
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
* The spidev module is to be used to manage the spi0 interface in the
am335x-boneblack-iot-cape device tree.
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
ARM: dts: am335x-boneblack-iot-cape: add custom device tree
* This device tree enables various HW interfaces such as SPI
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
* This device tree enables various HW interfaces such as SPI
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
ARM: dts: am335x-boneblack-spi0: add spi0 configuration
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
Merge branch 'ti-linux-4.9.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-lsk-linux-4.9.y
TI-Feature: ti_linux_base_lsk
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.9.y
* 'ti-linux-4.9.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
ti_config_fragments/connectivity.cfg: Enable PCIe Endpoint in Keystone
Signed-off-by: Dan Murphy <dmurphy@ti.com>
TI-Feature: ti_linux_base_lsk
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.9.y
* 'ti-linux-4.9.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
ti_config_fragments/connectivity.cfg: Enable PCIe Endpoint in Keystone
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Merge branch 'ti-linux-4.9.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-lsk-linux-4.9.y
TI-Feature: ti_linux_base_lsk
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.9.y
* 'ti-linux-4.9.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel: (111 commits)
Linux 4.9.41
ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
ASoC: Intel: Skylake: Release FW ctx in cleanup
scsi: bfa: Increase requested firmware version to 3.2.5.1
scsi: snic: Return error code on memory allocation failure
scsi: fnic: Avoid sending reset to firmware when another reset is in progress
HID: ignore Petzl USB headlamp
ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode
perf/x86: Set pmu->module in Intel PMU modules
x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev'
ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion
ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP
sh_eth: enable RX descriptor word 0 shift on SH7734
ASoC: fsl_ssi: set fifo watermark to more reliable value
net: usb: asix_devices: add .reset_resume for USB PM
nvmem: imx-ocotp: Fix wrong register size
arm64: mm: fix show_pte KERN_CONT fallout
vfio-pci: Handle error from pci_iomap
video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
perf symbols: Robustify reading of build-id from sysfs
...
Signed-off-by: Dan Murphy <dmurphy@ti.com>
TI-Feature: ti_linux_base_lsk
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.9.y
* 'ti-linux-4.9.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel: (111 commits)
Linux 4.9.41
ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
ASoC: Intel: Skylake: Release FW ctx in cleanup
scsi: bfa: Increase requested firmware version to 3.2.5.1
scsi: snic: Return error code on memory allocation failure
scsi: fnic: Avoid sending reset to firmware when another reset is in progress
HID: ignore Petzl USB headlamp
ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode
perf/x86: Set pmu->module in Intel PMU modules
x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev'
ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion
ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP
sh_eth: enable RX descriptor word 0 shift on SH7734
ASoC: fsl_ssi: set fifo watermark to more reliable value
net: usb: asix_devices: add .reset_resume for USB PM
nvmem: imx-ocotp: Fix wrong register size
arm64: mm: fix show_pte KERN_CONT fallout
vfio-pci: Handle error from pci_iomap
video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
perf symbols: Robustify reading of build-id from sysfs
...
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Merge branch 'connectivity-ti-linux-4.9.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-4.9.y
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.9.y
* 'connectivity-ti-linux-4.9.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
ti_config_fragments/connectivity.cfg: Enable PCIe Endpoint in Keystone
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.9.y
* 'connectivity-ti-linux-4.9.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
ti_config_fragments/connectivity.cfg: Enable PCIe Endpoint in Keystone
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
ti_config_fragments/connectivity.cfg: Enable PCIe Endpoint in Keystone
Enable PCIe Endpoint in Keystone.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Enable PCIe Endpoint in Keystone.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merge tag 'v4.9.41' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into ti-linux-4.9.y
This is the 4.9.41 stable release
* tag 'v4.9.41' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (106 commits)
Linux 4.9.41
ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
ASoC: Intel: Skylake: Release FW ctx in cleanup
scsi: bfa: Increase requested firmware version to 3.2.5.1
scsi: snic: Return error code on memory allocation failure
scsi: fnic: Avoid sending reset to firmware when another reset is in progress
HID: ignore Petzl USB headlamp
ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode
perf/x86: Set pmu->module in Intel PMU modules
x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev'
ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion
ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP
sh_eth: enable RX descriptor word 0 shift on SH7734
ASoC: fsl_ssi: set fifo watermark to more reliable value
net: usb: asix_devices: add .reset_resume for USB PM
nvmem: imx-ocotp: Fix wrong register size
arm64: mm: fix show_pte KERN_CONT fallout
vfio-pci: Handle error from pci_iomap
video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
perf symbols: Robustify reading of build-id from sysfs
...
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
This is the 4.9.41 stable release
* tag 'v4.9.41' of http://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable: (106 commits)
Linux 4.9.41
ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
ASoC: Intel: Skylake: Release FW ctx in cleanup
scsi: bfa: Increase requested firmware version to 3.2.5.1
scsi: snic: Return error code on memory allocation failure
scsi: fnic: Avoid sending reset to firmware when another reset is in progress
HID: ignore Petzl USB headlamp
ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode
perf/x86: Set pmu->module in Intel PMU modules
x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev'
ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion
ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP
sh_eth: enable RX descriptor word 0 shift on SH7734
ASoC: fsl_ssi: set fifo watermark to more reliable value
net: usb: asix_devices: add .reset_resume for USB PM
nvmem: imx-ocotp: Fix wrong register size
arm64: mm: fix show_pte KERN_CONT fallout
vfio-pci: Handle error from pci_iomap
video: fbdev: cobalt_lcdfb: Handle return NULL error from devm_ioremap
perf symbols: Robustify reading of build-id from sysfs
...
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Linux 4.9.41
ASoC: dpcm: Avoid putting stream state to STOP when FE stream is paused
[ Upstream commit 9f169b9f52a4afccdab7a7d2311b0c53a78a1e6b ]
When multiple front-ends are using the same back-end, putting state of a
front-end to STOP state upon receiving pause command will result in backend
stream getting released by DPCM framework unintentionally. In order to
avoid backend to be released when another active front-end stream is
present, put the stream state to PAUSED state instead of STOP state.
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 9f169b9f52a4afccdab7a7d2311b0c53a78a1e6b ]
When multiple front-ends are using the same back-end, putting state of a
front-end to STOP state upon receiving pause command will result in backend
stream getting released by DPCM framework unintentionally. In order to
avoid backend to be released when another active front-end stream is
present, put the stream state to PAUSED state instead of STOP state.
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ASoC: Intel: Skylake: Release FW ctx in cleanup
[ Upstream commit bc65a326c579e93a5c2120a65ede72f11369ee5a ]
Saved firmware ctx was not never released, so release Firmware
ctx in cleanup routine.
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit bc65a326c579e93a5c2120a65ede72f11369ee5a ]
Saved firmware ctx was not never released, so release Firmware
ctx in cleanup routine.
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scsi: bfa: Increase requested firmware version to 3.2.5.1
[ Upstream commit 2d1148f0f45079d25a0fa0d67e4fdb2a656d12fb ]
bna & bfa firmware version 3.2.5.1 was submitted to linux-firmware on
Feb 17 19:10:20 2015 -0500 in 0ab54ff1dc ("linux-firmware: Add QLogic BR
Series Adapter Firmware").
bna was updated to use the newer firmware on Feb 19 16:02:32 2015 -0500 in
3f307c3d70 ("bna: Update the Driver and Firmware Version")
bfa was not updated. I presume this was an oversight but it broke support
for bfa+bna cards such as the following
04:00.0 Fibre Channel [0c04]: Brocade Communications Systems, Inc.
1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01)
04:00.1 Fibre Channel [0c04]: Brocade Communications Systems, Inc.
1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01)
04:00.2 Ethernet controller [0200]: Brocade Communications Systems,
Inc. 1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01)
04:00.3 Ethernet controller [0200]: Brocade Communications Systems,
Inc. 1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01)
Currently, if the bfa module is loaded first, bna fails to probe the
respective devices with
[ 215.026787] bna: QLogic BR-series 10G Ethernet driver - version: 3.2.25.1
[ 215.043707] bna 0000:04:00.2: bar0 mapped to ffffc90001fc0000, len 262144
[ 215.060656] bna 0000:04:00.2: initialization failed err=1
[ 215.073893] bna 0000:04:00.3: bar0 mapped to ffffc90002040000, len 262144
[ 215.090644] bna 0000:04:00.3: initialization failed err=1
Whereas if bna is loaded first, bfa fails with
[ 249.592109] QLogic BR-series BFA FC/FCOE SCSI driver - version: 3.2.25.0
[ 249.610738] bfa 0000:04:00.0: Running firmware version is incompatible with the driver version
[ 249.833513] bfa 0000:04:00.0: bfa init failed
[ 249.833919] scsi host6: QLogic BR-series FC/FCOE Adapter, hwpath: 0000:04:00.0 driver: 3.2.25.0
[ 249.841446] bfa 0000:04:00.1: Running firmware version is incompatible with the driver version
[ 250.045449] bfa 0000:04:00.1: bfa init failed
[ 250.045962] scsi host7: QLogic BR-series FC/FCOE Adapter, hwpath: 0000:04:00.1 driver: 3.2.25.0
Increase bfa's requested firmware version. Also increase the driver
version. I only tested that all of the devices probe without error.
Reported-by: Tim Ehlers <tehlers@gwdg.de>
Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 2d1148f0f45079d25a0fa0d67e4fdb2a656d12fb ]
bna & bfa firmware version 3.2.5.1 was submitted to linux-firmware on
Feb 17 19:10:20 2015 -0500 in 0ab54ff1dc ("linux-firmware: Add QLogic BR
Series Adapter Firmware").
bna was updated to use the newer firmware on Feb 19 16:02:32 2015 -0500 in
3f307c3d70 ("bna: Update the Driver and Firmware Version")
bfa was not updated. I presume this was an oversight but it broke support
for bfa+bna cards such as the following
04:00.0 Fibre Channel [0c04]: Brocade Communications Systems, Inc.
1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01)
04:00.1 Fibre Channel [0c04]: Brocade Communications Systems, Inc.
1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01)
04:00.2 Ethernet controller [0200]: Brocade Communications Systems,
Inc. 1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01)
04:00.3 Ethernet controller [0200]: Brocade Communications Systems,
Inc. 1010/1020/1007/1741 10Gbps CNA [1657:0014] (rev 01)
Currently, if the bfa module is loaded first, bna fails to probe the
respective devices with
[ 215.026787] bna: QLogic BR-series 10G Ethernet driver - version: 3.2.25.1
[ 215.043707] bna 0000:04:00.2: bar0 mapped to ffffc90001fc0000, len 262144
[ 215.060656] bna 0000:04:00.2: initialization failed err=1
[ 215.073893] bna 0000:04:00.3: bar0 mapped to ffffc90002040000, len 262144
[ 215.090644] bna 0000:04:00.3: initialization failed err=1
Whereas if bna is loaded first, bfa fails with
[ 249.592109] QLogic BR-series BFA FC/FCOE SCSI driver - version: 3.2.25.0
[ 249.610738] bfa 0000:04:00.0: Running firmware version is incompatible with the driver version
[ 249.833513] bfa 0000:04:00.0: bfa init failed
[ 249.833919] scsi host6: QLogic BR-series FC/FCOE Adapter, hwpath: 0000:04:00.0 driver: 3.2.25.0
[ 249.841446] bfa 0000:04:00.1: Running firmware version is incompatible with the driver version
[ 250.045449] bfa 0000:04:00.1: bfa init failed
[ 250.045962] scsi host7: QLogic BR-series FC/FCOE Adapter, hwpath: 0000:04:00.1 driver: 3.2.25.0
Increase bfa's requested firmware version. Also increase the driver
version. I only tested that all of the devices probe without error.
Reported-by: Tim Ehlers <tehlers@gwdg.de>
Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Acked-by: Rasesh Mody <rasesh.mody@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scsi: snic: Return error code on memory allocation failure
[ Upstream commit 0371adcdaca92912baaa3256ed13e058a016e62d ]
If a call to mempool_create_slab_pool() in snic_probe() returns NULL,
return -ENOMEM to indicate failure. mempool_creat_slab_pool() only fails
if it cannot allocate memory.
https://bugzilla.kernel.org/show_bug.cgi?id=189061
Reported-by: bianpan2010@ruc.edu.cn
Signed-off-by: Burak Ok <burak-kernel@bur0k.de>
Signed-off-by: Andreas Schaertl <andreas.schaertl@fau.de>
Acked-by: Narsimhulu Musini <nmusini@cisco.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 0371adcdaca92912baaa3256ed13e058a016e62d ]
If a call to mempool_create_slab_pool() in snic_probe() returns NULL,
return -ENOMEM to indicate failure. mempool_creat_slab_pool() only fails
if it cannot allocate memory.
https://bugzilla.kernel.org/show_bug.cgi?id=189061
Reported-by: bianpan2010@ruc.edu.cn
Signed-off-by: Burak Ok <burak-kernel@bur0k.de>
Signed-off-by: Andreas Schaertl <andreas.schaertl@fau.de>
Acked-by: Narsimhulu Musini <nmusini@cisco.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scsi: fnic: Avoid sending reset to firmware when another reset is in progress
[ Upstream commit 9698b6f473555a722bf81a3371998427d5d27bde ]
This fix is to avoid calling fnic_fw_reset_handler through
fnic_host_reset when a finc reset is alreay in progress.
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 9698b6f473555a722bf81a3371998427d5d27bde ]
This fix is to avoid calling fnic_fw_reset_handler through
fnic_host_reset when a finc reset is alreay in progress.
Signed-off-by: Satish Kharat <satishkh@cisco.com>
Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
HID: ignore Petzl USB headlamp
[ Upstream commit 08f9572671c8047e7234cbf150869aa3c3d59a97 ]
This headlamp contains a dummy HID descriptor which pretends to be
a mouse-like device, but can't be used as a mouse at all.
Reported-by: Lukas Ocilka <lukas.ocilka@suse.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 08f9572671c8047e7234cbf150869aa3c3d59a97 ]
This headlamp contains a dummy HID descriptor which pretends to be
a mouse-like device, but can't be used as a mouse at all.
Reported-by: Lukas Ocilka <lukas.ocilka@suse.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ASoC: Intel: bytcr-rt5640: fix settings in internal clock mode
[ Upstream commit 60448b077ed93d227e6c117a9e87db76ff0c1911 ]
Frequency value of zero did not make sense, use same 24.576MHz
setting and only change the clock source in idle mode
Suggested-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 60448b077ed93d227e6c117a9e87db76ff0c1911 ]
Frequency value of zero did not make sense, use same 24.576MHz
setting and only change the clock source in idle mode
Suggested-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
perf/x86: Set pmu->module in Intel PMU modules
[ Upstream commit 74545f63890e38520eb4d1dbedcadaa9c0dbc824 ]
The conversion of Intel PMU drivers into modules did not include reference
counting. The machine will crash when attempting to access deleted code
if an event from a module PMU is started and the module removed before the
event is destroyed.
i.e. this crashes the machine:
$ insmod intel-rapl-perf.ko
$ perf stat -e power/energy-cores/ -C 0 &
$ rmmod intel-rapl-perf.ko
Set THIS_MODULE to pmu->module in Intel module PMUs so that generic code
can handle reference counting and deny rmmod while an event still exists.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1482455860-116269-1-git-send-email-davidcc@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 74545f63890e38520eb4d1dbedcadaa9c0dbc824 ]
The conversion of Intel PMU drivers into modules did not include reference
counting. The machine will crash when attempting to access deleted code
if an event from a module PMU is started and the module removed before the
event is destroyed.
i.e. this crashes the machine:
$ insmod intel-rapl-perf.ko
$ perf stat -e power/energy-cores/ -C 0 &
$ rmmod intel-rapl-perf.ko
Set THIS_MODULE to pmu->module in Intel module PMUs so that generic code
can handle reference counting and deny rmmod while an event still exists.
Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Turner <pjt@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1482455860-116269-1-git-send-email-davidcc@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
x86/platform/intel-mid: Rename 'spidev' to 'mrfld_spidev'
[ Upstream commit 159d3726db12b3476bc59ea0ab0a702103d466b5 ]
The current implementation supports only Intel Merrifield platforms. Don't mess
with the rest of the Intel MID family by not registering device with wrong
properties.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170102092450.87229-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 159d3726db12b3476bc59ea0ab0a702103d466b5 ]
The current implementation supports only Intel Merrifield platforms. Don't mess
with the rest of the Intel MID family by not registering device with wrong
properties.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170102092450.87229-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ALSA: usb-audio: test EP_FLAG_RUNNING at urb completion
[ Upstream commit 13a6c8328e6056932dc680e447d4c5e8ad9add17 ]
Testing EP_FLAG_RUNNING in snd_complete_urb() before running the completion
logic allows us to save a few cpu cycles by returning early, skipping the
pending urb in case the stream was stopped; the stop logic handles the urb
and sets the completion callbacks to NULL.
Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 13a6c8328e6056932dc680e447d4c5e8ad9add17 ]
Testing EP_FLAG_RUNNING in snd_complete_urb() before running the completion
logic allows us to save a few cpu cycles by returning early, skipping the
pending urb in case the stream was stopped; the stop logic handles the urb
and sets the completion callbacks to NULL.
Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP
[ Upstream commit e51d5d02f688c45b6f644f472f0c80fdfa73f0cb ]
It is necessary to call entry/exit functions for parent interrupt
controllers for proper masking/unmasking of interrupt lines.
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit e51d5d02f688c45b6f644f472f0c80fdfa73f0cb ]
It is necessary to call entry/exit functions for parent interrupt
controllers for proper masking/unmasking of interrupt lines.
Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sh_eth: enable RX descriptor word 0 shift on SH7734
[ Upstream commit 71eae1ca77fd6be218d8a952d97bba827e56516d ]
The RX descriptor word 0 on SH7734 has the RFS[9:0] field in bits 16-25
(bits 0-15 usually used for that are occupied by the packet checksum).
Thus we need to set the 'shift_rd0' field in the SH7734 SoC data...
Fixes: f0e81fecd4f8 ("net: sh_eth: Add support SH7734")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[ Upstream commit 71eae1ca77fd6be218d8a952d97bba827e56516d ]
The RX descriptor word 0 on SH7734 has the RFS[9:0] field in bits 16-25
(bits 0-15 usually used for that are occupied by the packet checksum).
Thus we need to set the 'shift_rd0' field in the SH7734 SoC data...
Fixes: f0e81fecd4f8 ("net: sh_eth: Add support SH7734")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>