mc-cmd.h contains some low level functions used to encode and decode
commands to the MC. They are used by the drivers so move them to the
public headers and get rid of the mc-cmd.h header.
Signed-off-by: Laurentiu Tudor <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
mc-sys.h contains the API to send commands to the MC and is used
by drivers. Move it to the public headers and get rid of the mc-sys.h
header.
Signed-off-by: Laurentiu Tudor <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
mc-cmd.h contains some low level functions used to encode and decode
commands to the MC. They are used by the drivers so move them to the
public headers and get rid of the mc-cmd.h header.
Signed-off-by: Laurentiu Tudor <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
mc-sys.h contains the API to send commands to the MC and is used
by drivers. Move it to the public headers and get rid of the mc-sys.h
header.
Signed-off-by: Laurentiu Tudor <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dpni.c is using byte order macros and error codes but does
not explicitly include the required kernel header, so add it.
Signed-off-by: Laurentiu Tudor <[email protected]>
Acked-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Currently, the netdevice is allocated with a default number of Rx/Tx
queues equal to CONFIG_NR_CPUS, meaning the maximum number of cores
supported by the current kernel. The actual number of queues is
reflected by the DPNI object attribute, so update the netdevice
configuration based on that.
Signed-off-by: Bogdan Purcareata <[email protected]>
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The driver logic for allocating a MAC address to a net device
is complicated enough to deserve a function of its own. While
here, cleanup a bit the code comments.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
On the egress path, frame errors are reported using both a FD control
field and the frame annotation status. The current code only handles
FAS errors. Update to look at both fields when accounting Tx errors.
Signed-off-by: Bogdan Purcareata <[email protected]>
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We only need to know the buffer pool id, so save exactly
that in the device's private structure, instead of the
entire DPBP attributes struct.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove the dpni_id and buffer_layout fields from device's
private structure. They're only used at probe so we don't
need to store them for further use.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Introduce a helper macro for accessing the frame annotation
status field in a frame buffer.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add a label to the ethtool statistics counters, to differentiate
between hardware counters and driver specific ones.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If the Ethernet driver doesn't find any DPIO devices during probe,
it may be either because there's none available or because they
haven't been probed yet. Request deferred probing in case it's
the latter.
Signed-off-by: Bharat Bhushan <[email protected]>
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Reset the buffer pool object before using it, like we do
for the other DPAA2 objects.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The function itself checks whether GRO support is enabled
and acts accordingly, so we don't need to verify it in the
driver as well.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Don't use GFP_DMA when allocating memory for the hash key,
as we don't actually need to allocate from the lowest zone.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We already have a variable for the DMA mapping device,
so use that directly.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
A few error/warning messages lacked a newline at the end
of the text. Add it for improved consistency and cosmetics.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Not having Rx hashing distribution enabled for an
interface is a valid configuration and shouldn't be
treated as an error.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
ndo_start_xmit() returns a value of type netdev_tx_t. Update
our ndo function to use the correct type.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In dpni_get_irq_status(), status is both in and out parameter,
so initialize before use.
Issue found through static analysis tool.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Make a couple of locally used functions and structures static.
Issue found through static analysis tool.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
WRIOP hardware may need to write to the hardware annotation
area of Tx buffers (e.g. frame status bits) and also to
the data area (e.g. L4 checksum in frame header).
Map these buffers as DMA_BIDIRECTIONAL, otherwise the
write transaction through SMMU will not be allowed.
Signed-off-by: Nipun Gupta <[email protected]>
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Use the correct mechanisms for translating a DMA-mapped IOVA
address into a virtual one. Without this fix, once SMMU is
enabled on Layerscape platforms, the Ethernet driver throws
IOMMU translation faults.
Signed-off-by: Nipun Gupta <[email protected]>
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add a list of TODO items for the Ethernet driver
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add trace events in significant places of the data path.
Useful for debuggging.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add custom statistics to be reported via ethtool -S. These include
driver specific per-cpu statistics as well as queue and channel
counters.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add support for several ethtool operations: show hardware statistics,
get/set link settings, get hash configuration.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Bogdan Hamciuc <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Introduce the DPAA2 Ethernet driver, which manages Datapath
Network Interface (DPNI) objects discovered on the MC bus.
In addition to DPNIs, the Ethernet driver uses several other
MC objects to build a network interface abstraction: buffer
pools (DPBPs), I/O Portals (DPIOs) and concentrators (DPCONs).
A more detailed description of the driver can be found in the
associated README file.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Bogdan Hamciuc <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add the command build/parse APIs for operating on DPNI objects through
the DPAA2 Management Complex.
Signed-off-by: Ioana Radulescu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>