History log of /linux-master/drivers/net/fddi/defza.c
Revision Date Author Comments
# a0c8c337 25-Oct-2021 Jakub Kicinski <kuba@kernel.org>

fddi: defza: add missing pointer type cast

hw_addr is a uint AKA unsigned int. dev_addr_set() takes
a u8 *.

drivers/net/fddi/defza.c:1383:27: error: passing argument 2 of 'dev_addr_set' from incompatible pointer type [-Werror=incompatible-pointer-types]

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 1e9258c389ee ("fddi: defxx,defza: use dev_addr_set()")
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://lore.kernel.org/r/20211025160000.2803818-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>


# 1e9258c3 21-Oct-2021 Jakub Kicinski <kuba@kernel.org>

fddi: defxx,defza: use dev_addr_set()

Commit 406f42fa0d3c ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.

Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>


# deb7178e 13-Jul-2021 Pavel Skripkin <paskripkin@gmail.com>

net: fddi: fix UAF in fza_probe

fp is netdev private data and it cannot be
used after free_netdev() call. Using fp after free_netdev()
can cause UAF bug. Fix it by moving free_netdev() after error message.

Fixes: 61414f5ec983 ("FDDI: defza: Add support for DEC FDDIcontroller 700
TURBOchannel adapter")
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# aa27b8f7 10-Mar-2021 Maciej W. Rozycki <macro@orcam.me.uk>

FDDI: defza: Update my e-mail address

Following the recent update to MAINTAINERS update my e-mail address.

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4bdc0d67 06-Jan-2020 Christoph Hellwig <hch@lst.de>

remove ioremap_nocache and devm_ioremap_nocache

ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>


# 262e4c38 20-Jun-2019 Paul Burton <paulburton@kernel.org>

FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h

Currently arch/mips/include/asm/io.h provides 64b memory accessor
functions such as readq & writeq even on MIPS32 platforms where those
accessors cannot actually perform a 64b memory access. They instead
BUG(). This is unfortunate for drivers which either #ifdef on the
presence of these accessors, or can function with non-atomic
implementations of them found in either linux/io-64-nonatomic-lo-hi.h or
linux/io-64-nonatomic-hi-lo.h. As such we're preparing to remove the
definitions of these 64b accessor functions for MIPS32 kernels.

In preparation for this, include linux/io-64-nonatomic-lo-hi.h in
defza.c in order to provide a non-atomic implementation of the
readq_relaxed & writeq_relaxed functions that are used by this code. In
practice this will have no runtime effect, since use of the 64b accessor
functions is conditional upon sizeof(unsigned long) == 8, ie. upon
CONFIG_64BIT=y. This means the calls to these non-atomic readq & writeq
implementations will be optimized out anyway, but we need their
definitions to keep the compiler happy.

For 64bit kernels using this code this change should also have no effect
because asm/io.h will continue to provide the definitions of
readq_relaxed & writeq_relaxed, which linux/io-64-nonatomic-lo-hi.h
checks for before defining itself.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Acked-by: Maciej W. Rozycki <macro@linux-mips.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Serge Semin <Sergey.Semin@t-platforms.ru>
Cc: netdev@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org


# 8f5365eb 06-Nov-2018 Maciej W. Rozycki <macro@linux-mips.org>

FDDI: defza: Make the driver version string constant

The driver version string is obviously not meant to be changed at run
time, so mark it `const'.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 04453b6b 06-Nov-2018 Maciej W. Rozycki <macro@linux-mips.org>

FDDI: defza: Move SMT Tx data buffer declaration next to its skb

Move the temporary data buffer used when tapping into the SMT Tx queue
from the outer function level into the conditional block it's actually
used in and its containing skb is also declared, making the structure of
code better.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 96ed82cc 06-Nov-2018 Maciej W. Rozycki <macro@linux-mips.org>

FDDI: defza: Fix SPDX annotation

The SPDX annotation for this driver does not match the license text,
which specifies GNU GPL 2 or later. Make the two match by correcting
the SPDX tag.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 9f9a742d 09-Oct-2018 Maciej W. Rozycki <macro@linux-mips.org>

FDDI: defza: Support capturing outgoing SMT traffic

DEC FDDIcontroller 700 (DEFZA) uses a Tx/Rx queue pair to communicate
SMT frames with adapter's firmware. Any SMT frame received from the RMC
via the Rx queue is queued back by the driver to the SMT Rx queue for
the firmware to process. Similarly the firmware uses the SMT Tx queue
to supply the driver with SMT frames which are queued back to the Tx
queue for the RMC to send to the ring.

When a network tap is attached to an FDDI interface handled by `defza'
any incoming SMT frames captured are queued to our usual processing of
network data received, which in turn delivers them to any listening
taps.

However the outgoing SMT frames produced by the firmware bypass our
network protocol stack and are therefore not delivered to taps. This in
turn means that taps are missing a part of network traffic sent by the
adapter, which may make it more difficult to track down network problems
or do general traffic analysis.

Call `dev_queue_xmit_nit' then in the SMT Tx path, having checked that
a network tap is attached, with a newly-created `dev_nit_active' helper
wrapping the usual condition used in the transmit path.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 61414f5e 09-Oct-2018 Maciej W. Rozycki <macro@linux-mips.org>

FDDI: defza: Add support for DEC FDDIcontroller 700 TURBOchannel adapter

Add support for the DEC FDDIcontroller 700 (DEFZA), Digital Equipment
Corporation's first-generation FDDI network interface adapter, made for
TURBOchannel and based on a discrete version of what eventually became
Motorola's widely used CAMEL chipset.

The CAMEL chipset is present for example in the DEC FDDIcontroller
TURBOchannel, EISA and PCI adapters (DEFTA/DEFEA/DEFPA) that we support
with the `defxx' driver, however the host bus interface logic and the
firmware API are different in the DEFZA and hence a separate driver is
required.

There isn't much to say about the driver except that it works, but there
is one peculiarity to mention. The adapter implements two Tx/Rx queue
pairs.

Of these one pair is the usual network Tx/Rx queue pair, in this case
used by the adapter to exchange frames with the ring, via the RMC (Ring
Memory Controller) chip. The Tx queue is handled directly by the RMC
chip and resides in onboard packet memory. The Rx queue is maintained
via DMA in host memory by adapter's firmware copying received data
stored by the RMC in onboard packet memory.

The other pair is used to communicate SMT frames with adapter's
firmware. Any SMT frame received from the RMC via the Rx queue must be
queued back by the driver to the SMT Rx queue for the firmware to
process. Similarly the firmware uses the SMT Tx queue to supply the
driver with SMT frames that must be queued back to the Tx queue for the
RMC to send to the ring.

This solution was chosen because the designers ran out of PCB space and
could not squeeze in more logic onto the board that would be required to
handle this SMT frame traffic without the need to involve the driver, as
with the later DEFTA/DEFEA/DEFPA adapters.

Finally the driver does some Frame Control byte decoding, so to avoid
magic numbers some macros are added to <linux/if_fddi.h>.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>