History log of /linux-master/drivers/s390/net/qeth_core_sys.c
Revision Date Author Comments
# dde8769b 08-Feb-2023 Thorsten Winkler <twinkler@linux.ibm.com>

s390/qeth: Convert sysfs sprintf to sysfs_emit

Following the advice of the Documentation/filesystems/sysfs.rst.
All sysfs related show()-functions should only use sysfs_emit() or
sysfs_emit_at() when formatting the value to be returned to user space.

Reported-by: Jules Irenge <jbi.octave@gmail.com>
Reported-by: Joe Perches <joe@perches.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Thorsten Winkler <twinkler@linux.ibm.com>
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>


# c2052189 27-Dec-2022 Xuezhi Zhang <zhangxuezhi1@coolpad.com>

s390/qeth: convert sysfs snprintf to sysfs_emit

Follow the advice of the Documentation/filesystems/sysfs.rst
and show() should only use sysfs_emit() or sysfs_emit_at()
when formatting the value to be returned to user space.

Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# a8c7629c 20-Jul-2021 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: remove OSN support

Commit fb64de1bc36c ("s390/qeth: phase out OSN support") spelled out
why the OSN support in qeth is in a bad shape, and put any remaining
interested parties on notice to speak up before it gets ripped out.

It's 2021 now, so make true on that promise and remove all the
OSN-specific parts from qeth. This also means that we no longer need to
export various parts of the cmd & data path internals to the L2 driver.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ea12f1b3 27-Jan-2021 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: clean up load/remove code for disciplines

We have two usage patterns:
1. get & ->setup() a new discipline, or
2. ->remove() & put the currently loaded one.

Add corresponding helpers that hide the internals & error handling.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>


# 0b8da811 07-Dec-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: use dev->groups for common sysfs attributes

All qeth devices have a minimum set of sysfs attributes, and non-OSN
devices share a group of additional attributes. Depending on whether
the device is forced to use a specific discipline, the device_type then
specifies further attributes.

Shift the common attributes into dev->groups, so that the device_type
only contains the discipline-specific attributes. This avoids exposing
the common attributes to the disciplines, and nicely cleans up our
sysfs code.

While replacing the qeth_l*_*_device_attributes() helpers, switch from
sysfs_*_groups() to the more generic device_*_groups().

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 84c91482 01-Oct-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: use netdev_name()

Replace our custom version of netdev_name().

Once we started to allocate the netdev at probe time with
commit d3d1b205e89f ("s390/qeth: allocate netdevice early"), this
stopped working as intended anyway.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 949bbf4d 01-Oct-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: allow configuration of TX queues for OSA devices

For OSA devices that are _not_ configured in prio-queue mode, give users
the option of selecting the number of active TX queues.
This requires setting up the HW queues with a reasonable default QoS
value in the QIB's PQUE parm area.

As with the other device types, we bring up the device with a minimal
number of TX queues for compatibility reasons.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ab29c480 23-Sep-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: replace deprecated simple_stroul()

Convert the remaining occurences in sysfs code to kstrtouint().

While at it move some input parsing out of locked sections, replace an
open-coded clamp() and remove some unnecessary run-time checks for
ipatoe->mask_bits that are already enforced when creating the object.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 65878fd9 14-Jul-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: clean up error handling for isolation mode cmds

As the cmd IO path has learned to propagate errnos back to its callers,
let them deal with errors instead of trying to restore their previous
configuration from within the IO error path.

Also translate the HW error to a meaningful errno, instead of returning
-EIO for all cases (and don't map this to -EOPNOTSUPP later on...).

While at it, add a READ_ONCE() / WRITE_ONCE() pair to ensure that the
data path always sees a valid isolation mode during reconfiguration.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7005b754 06-May-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: return error when starting a reset fails

When starting the reset worker via sysfs is unsuccessful, return an
error to the user.
Modernize the sysfs input parsing while at it.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c91a1fb7 25-Mar-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: keep track of fixed prio-queue configuration

When a device is configured in prio-queue mode to pin all traffic onto
a specific HW queue, treat this as a distinct variant of prio-queueing
instead of QETH_NO_PRIO_QUEUEING.

This corrects an error message from qeth_osa_set_output_queues() for
devices configured in such a mode.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 1c103cf8 18-Mar-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: remove prio-queueing support for z/VM NICs

z/VM NICs don't offer HW QoS for TX rings. So just use netdev_pick_tx()
to distribute the connections equally over all enabled TX queues.

We start with just 1 enabled TX queue (this matches the typical
configuration without prio-queueing). A follow-on patch will allow users
to enable additional TX queues.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 5d4f7856 11-Mar-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: implement smarter resizing of the RX buffer pool

The RX buffer pool is allocated in qeth_alloc_qdio_queues().
A subsequent pool resizing is then handled in a very simple way:
first free the current pool, then allocate a new pool of the requested
size.

There's two ways where this can go wrong:
1. if the resize action happens _before_ the initial pool was allocated,
then a subsequent initialization will call qeth_alloc_qdio_queues()
and fill the pool with a second(!) set of pages. We consume twice the
planned amount of memory.
This is easy to fix - just skip the resizing if the queues haven't
been allocated yet.
2. if the initial pool was created by qeth_alloc_qdio_queues() but a
subsequent resizing fails, then the device has no(!) RX buffer pool.
The next initialization will _not_ call qeth_alloc_qdio_queues(), and
attempting to back the RX buffers with pages in
qeth_init_qdio_queues() will fail.
Not very difficult to fix either - instead of re-allocating the whole
pool, just allocate/free as many entries to match the desired size.

Fixes: 4a71df50047f ("qeth: new qeth device driver")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 17d9723e 25-Jan-2020 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: remove HARDSETUP state

qeth_l?_stop_card() is _never_ called while in HARDSETUP state, and
there's no other usage of the card state that relies on the
DOWN -> HARDSETUP -> SOFTSETUP transition.

As related cleanup, remove the check in qeth_realloc_buffer_pool() as it
is already done by the callers.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 39bdbf3e 18-Dec-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: don't return -ENOTSUPP to userspace

ENOTSUPP is not uapi, use EOPNOTSUPP instead.

Fixes: d66cb37e9664 ("qeth: Add new priority queueing options")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 0b81c6c6 14-Nov-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: don't check drvdata in sysfs code

Given the way how the sysfs attributes are registered / unregistered,
the show/store helpers will never be called with a NULL drvdata.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 379ac99e 25-Apr-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: use IS_* helpers for checking device type

We have helper macros for all possible device types, replace all
remaining open-coded accesses to the type fields.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# e6c15b5f 17-Apr-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: simplify QoS code

qeth_get_priority_queue() is no longer used for IQD devices, remove the
special-casing of their mcast queue.

This effectively reverts
commit 70deb01662b1 ("qeth: omit outbound queue 3 for unicast packets in Priority Queuing on HiperSockets").

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 3a18d754 17-Apr-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: add TX multiqueue support for IQD devices

qeth has been supporting multiple HW Output Queues for a long time. But
rather than exposing those queues to the stack, it uses its own queue
selection logic in .ndo_start_xmit... with all the drawbacks that
entails.
Start off by switching IQD devices over to a proper mqs net_device,
and converting all the netdev_queue management code.

One oddity with IQD devices is the requirement to place all mcast
traffic on the _highest_ established HW queue. Doing so via
.ndo_select_queue seems straight-forward - but that won't work if only
some of the HW queues are active
(ie. when dev->real_num_tx_queues < dev->num_tx_queues), since
netdev_cap_txqueue() will not allow us to put skbs on the higher queues.

To make this work, we
1. let .ndo_select_queue() map all mcast traffic to netdev_queue 0, and
2. later re-map the netdev_queue and HW queue indices in
.ndo_start_xmit and the TX completion handler.

With this patch we default to a fixed set of 1 ucast and 1 mcast queue.
Support for dynamic reconfiguration is added at a later time.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 0f7aedbd 28-Feb-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: drop redundant state checking

Now that qeth always uses dev_close() to shutdown the interface, we can
trust the locking and remove some custom state checks.
qeth_l?_stop_card() is no longer called for a card in UP state, so remove
the checks there too. This basically makes the UP state obsolete, so rip
out the whole thing (except for the sysfs-visible string).

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7bd2275c 28-Feb-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: unconditionally clear MAC_REGISTERED flag

In its attempt to run only the minimal amount of tear down steps,
qeth_l2_stop_card() fails to reset the "is dev_addr registered?" flag
in some rare scenarios. But a future change to the tear down sequence
would cause us to _always_ hit this issue, so patch it up before that
code lands.

Fix it by unconditionally clearing the flag bit. This also allows us to
remove the additional cleanup step in qeth_dev_layer2_store().

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d7d543f2 28-Feb-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: remove RECOVER state

The offline code uses a specific RECOVER state to indicate that the
interface should be brought up when a qeth device is set online again.

Rather than having a specific card-state for this, just put it in an
internal flag bit and set the state to DOWN. When working with the
card's state transitions, this reduces the complexity quite a bit.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# b0abc4f5 15-Feb-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: overhaul ethtool statistics

Accumulate per-TX queue statistics, and increase their size to 64 bit.
Don't bother with enabling/disabling the statistics, the overhead is
negligible.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 0aa35a36 15-Feb-2019 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: allow manual recovery when device is SOFTSETUP

Once a qeth ccwgroup device is set online, it's also armed for internal
recovery. So allow for testing that code path via sysfs, regardless of
whether the interface is up or down.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 91cc98f5 26-Sep-2018 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: remove duplicated carrier state tracking

The netdevice is always available, apply any carrier state changes to it
without caching them.
On a STARTLAN event (ie. carrier-up), defer updating the state to
qeth_core_hardsetup_card() in the subsequent recovery action.

Also remove the carrier-state checks from the xmit routines. Stopping
transmission on carrier-down is the responsibility of upper-level code
(eg see dev_direct_xmit()).

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c1a935f6 26-Sep-2018 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: fix discipline unload after setup error

Device initialization code usually first loads a subdriver
(via qeth_core_load_discipline()), and then runs its setup() callback.
If this fails, it rolls back the load via qeth_core_free_discipline().

qeth_core_free_discipline() expects the options.layer attribute to be
initialized, but on error in setup() that's currently not the case.
Resulting in misbalanced symbol_put() calls.

Fix this by setting options.layer when loading the subdriver.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 4fda3354 26-Sep-2018 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: convert layer attribute to enum

While the raw values are fixed due to their use in a sysfs attribute,
we can still use the proper QETH_DISCIPLINE_* enum within the driver.

Also move the initialization into qeth_set_initial_options(), along with
all other user-configurable fields.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 92d27209 18-Jul-2018 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: don't cache HW port number

The netdevice is always available now, so get the portno from there.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d3d1b205 18-Jul-2018 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: allocate netdevice early

Allocation of the netdevice is currently delayed until a qeth card first
goes online. This complicates matters in several places, where we need
to cache values instead of applying them straight to the netdevice.

Improve on this by moving the allocation up to where the qeth card
itself is created. This is also one step in direction of eventually
placing the qeth card into netdev_priv().

In all subsequent code, remove the now redundant checks whether
card->dev is valid.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 70551dc4 18-Jul-2018 Julian Wiedmann <jwi@linux.ibm.com>

s390/qeth: reset layer2 attribute on layer switch

After the subdriver's remove() routine has completed, the card's layer
mode is undetermined again. Reflect this in the layer2 field.

If qeth_dev_layer2_store() hits an error after remove() was called, the
card _always_ requires a setup(), even if the previous layer mode is
requested again.
But qeth_dev_layer2_store() bails out early if the requested layer mode
still matches the current one. So unless we reset the layer2 field,
re-probing the card back to its previous mode is currently not possible.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 71c46897 26-Apr-2018 Ursula Braun <ursula.braun@de.ibm.com>

s390/net: set HW port number in netdevice

struct net_device contains a dev_port field. Store the OSA port number
in this field.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Reviewed-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# ab9953ff 14-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

s390: net: add SPDX identifiers to the remaining files

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/s390/net/ files with the correct SPDX license
identifier based on the license text in the file itself. The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Cc: Ursula Braun <ubraun@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>


# ed2e93ef 18-Oct-2017 Julian Wiedmann <jwi@linux.vnet.ibm.com>

s390/qeth: remove duplicated device matching

With commit "s390/ccwgroup: tie a ccwgroup driver to its ccw driver",
the ccwgroup core now ensures that a qeth group device only consists of
ccw devices which are supported by qeth. Therefore remove qeth's
internal device matching, and use .driver_info to determine the card
type.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# cef6ff22 15-Aug-2017 Julian Wiedmann <jwi@linux.vnet.ibm.com>

s390/net: reduce inlining

Clean up the inline cruft in s390 net drivers. Many of the inlined
functions had only one caller anyway.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c70eb09d 06-Jun-2017 Julian Wiedmann <jwi@linux.vnet.ibm.com>

s390/qeth: do early device setup for z/VM IQD NICs

qeth currently supports early setup for OSM and OSN devices.
This patch adds early setup support for z/VM HiperSockets,
since they can only be coupled to L3 networks.

Based on an initial version by Dmitriy Lakhvich.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 2d2ebb3e 10-May-2017 Julian Wiedmann <jwi@linux.vnet.ibm.com>

s390/qeth: unbreak OSM and OSN support

commit b4d72c08b358 ("qeth: bridgeport support - basic control")
broke the support for OSM and OSN devices as follows:

As OSM and OSN are L2 only, qeth_core_probe_device() does an early
setup by loading the l2 discipline and calling qeth_l2_probe_device().
In this context, adding the l2-specific bridgeport sysfs attributes
via qeth_l2_create_device_attributes() hits a BUG_ON in fs/sysfs/group.c,
since the basic sysfs infrastructure for the device hasn't been
established yet.

Note that OSN actually has its own unique sysfs attributes
(qeth_osn_devtype), so the additional attributes shouldn't be created
at all.
For OSM, add a new qeth_l2_devtype that contains all the common
and l2-specific sysfs attributes.
When qeth_core_probe_device() does early setup for OSM or OSN, assign
the corresponding devtype so that the ccwgroup probe code creates the
full set of sysfs attributes.
This allows us to skip qeth_l2_create_device_attributes() in case
of an early setup.

Any device that can't do early setup will initially have only the
generic sysfs attributes, and when it's probed later
qeth_l2_probe_device() adds the l2-specific attributes.

If an early-setup device is removed (by calling ccwgroup_ungroup()),
device_unregister() will - using the devtype - delete the
l2-specific attributes before qeth_l2_remove_device() is called.
So make sure to not remove them twice.

What complicates the issue is that qeth_l2_probe_device() and
qeth_l2_remove_device() is also called on a device when its
layer2 attribute changes (ie. its layer mode is switched).
For early-setup devices this wouldn't work properly - we wouldn't
remove the l2-specific attributes when switching to L3.
But switching the layer mode doesn't actually make any sense;
we already decided that the device can only operate in L2!
So just refuse to switch the layer mode on such devices. Note that
OSN doesn't have a layer2 attribute, so we only need to special-case
OSM.

Based on an initial patch by Ursula Braun.

Fixes: b4d72c08b358 ("qeth: bridgeport support - basic control")
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 9111e788 10-May-2017 Ursula Braun <ubraun@linux.vnet.ibm.com>

s390/qeth: handle sysfs error during initialization

When setting up the device from within the layer discipline's
probe routine, creating the layer-specific sysfs attributes can fail.
Report this error back to the caller, and handle it by
releasing the layer discipline.

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
[jwi: updated commit msg, moved an OSN change to a subsequent patch]
Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 70deb016 16-Jun-2016 Hans Wippel <hwippel@linux.vnet.ibm.com>

qeth: omit outbound queue 3 for unicast packets in Priority Queuing on HiperSockets

On HiperSockets only outbound queues 0 to 2 are available for unicast
packets. Current Priority Queuing implementation in the qeth driver puts
outgoing packets in outbound queues 0 to 3.

This puts outgoing unicast packets into outbound queue 2 instead of
outbound queue 3 when using Priority Queuing on a HiperSocket.
Additionally, the default outbound queue cannot be set to outbound queue 3
on HiperSockets.

Signed-off-by: Hans Wippel <hwippel@linux.vnet.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 239ff408 18-Sep-2015 Ursula Braun <ursula.braun@de.ibm.com>

qeth: move OSA portname into deprecated status

An OSA-Express port name was required to identify a shared OSA port.
All operating system instances that shared the port had to use the
same port name. This requirement no longer applies.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7e846d6b 16-Jan-2015 Eugene Crosser <Eugene.Crosser@ru.ibm.com>

qeth: sysfs: replace strcmp() with sysfs_streq()

Replace combination of strsep() and a temporary char *
followed by a series of "if (!strcmp(...))" with a series
of "if (sysfs_streq(...))".

Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reviewed-by: Thomas-Mich Richter <tmricht@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c3521254 16-Jan-2015 Eugene Crosser <Eugene.Crosser@ru.ibm.com>

qeth: use qeth_card_hw_is_reachable() everywhere

qeth_card_hw_is_reachable() was introduced as part of a new
functionality, but it is a useful abstraction that can replace
verbose checks througout the rest of the `qeth` driver.

Signed-off-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reviewed-by: Thomas-Mich Richter <tmricht@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 45cbb2e4 20-Jul-2014 Stefan Raspl <raspl@linux.vnet.ibm.com>

qeth: Display adjacent switch attributes

Add support to display the adjacent switch port's forwarding
attributes. Currently supports info on forwarding modes '802.1'
and 'rr' (reflective relay).

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d66cb37e 28-Apr-2014 Stefan Raspl <raspl@linux.vnet.ibm.com>

qeth: Add new priority queueing options

The existing options for priority queueing within OSA devices were based on
the now partially defunct TOS field. This patch adds two new options as
follows:
- prio_queueing_skb: bases priority queueing on skb-priority
- prio_queueing_vlan: uses the priority code point in the 802.1Q header

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 0f8ee7fc 28-Apr-2014 Stefan Raspl <raspl@linux.vnet.ibm.com>

qeth: Fix default queue setting in priority queueing

The default queue for queueing modes prio_queueing_prec and
prio_queueing_tos is supposed to be QETH_DEFAULT_QUEUE. However, neither
mode will reset the default default_out_queue value when enabled, leaving
a previously set value activate as the default.
E.g. enabling one of the fixed queueing modes, e.g. no_prio_queueing:0,
and successively switching to any of the prio_queueing_* modes will
leave default_out_queue at the previous (wrong) value 0.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 0f54761d 20-Jan-2013 Stefan Raspl <raspl@linux.vnet.ibm.com>

qeth: Support VEPA mode

The existing port isolation mode 'forward' will now verify that the adjacent
switch port supports the required reflective relay (RR) mode. This patch adds
the required error handling for the cases where enabling port isolation mode
'forward' can now fail.
Furthermore, once established, we never fall back from one of the port
isolation modes to a non-isolated mode without further user-interaction.
This includes cases where the isolation mode was enabled successfully, but
ceases to work e.g. due to configuration changes at the switch port.
Finally, configuring an isolation mode with the device being offline
will make onlining the device fail permanently upon errors encountered until
either errors are resolved or the isolation mode is changed by the user to a
different mode.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# a53c8fab 20-Jul-2012 Heiko Carstens <hca@linux.ibm.com>

s390/comments: unify copyright messages and remove file names

Remove the file name from the comment at top of many files. In most
cases the file name was wrong anyway, so it's rather pointless.

Also unify the IBM copyright statement. We did have a lot of sightly
different statements and wanted to change them one after another
whenever a file gets touched. However that never happened. Instead
people start to take the old/"wrong" statements to use as a template
for new files.
So unify all of them in one go.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>


# c041f2d487 15-May-2012 Sebastian Ott <sebott@linux.vnet.ibm.com>

s390/qeth: stop using struct ccwgroup driver for discipline callbacks

The interface between qeth and its disciplines should not depend on
struct ccwgroup_driver, as a qeth discipline is not a ccwgroup
driver on its own. Instead provide the particular callbacks in struct
qeth_discipline.

Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>


# b7169c51 15-May-2012 Sebastian Ott <sebott@linux.vnet.ibm.com>

s390/qeth: switch to ccwgroup_create_dev

Switch to the new ccwgroup_create_dev interface. Also wrap device
attributes in a struct device_type and let the driver core create
these attributes automagically.

Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>


# 1da74b1c 12-May-2011 Frank Blaschka <frank.blaschka@de.ibm.com>

qeth: add OSA concurrent hardware trap

This patch improves FFDC (first failure data capture) by requesting
a hardware trace in case the device driver, the hardware or a user
detects an error.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# cdac082e 25-Nov-2010 Joe Perches <joe@perches.com>

drivers/s390/net: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 9dc48ccc 22-Jul-2010 Ursula Braun <ursula.braun@de.ibm.com>

qeth: serialize sysfs-triggered device configurations

This patch serializes device removal and other sysfs-triggered
configurations by moving removal of sysfs-attributes to the beginning
of the remove functions. And it serializes online/offline setting
and discipline-switching (causing reestablishing of the net_device)
by making use of a new discipline mutex.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 75e0de13 22-Jul-2010 Carsten Otte <cotte@de.ibm.com>

qeth: Clear mac_bits field when switching between Layer 2 and Layer 3

This patch fixes a problem that occurs when switching from layer 3 to layer 2
mode. Resetting this mac_bits makes sure that we retrieve our mac address from
the card, otherwise the interface simply would'nt work.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 5113fec0 16-May-2010 Ursula Braun <ursula.braun@de.ibm.com>

qeth: support the new OSA CHPID types OSX and OSM

The qeth driver is enabled to support the new OSA CHPID types OSX
and OSM.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c4949f07 11-May-2010 Frank Blaschka <frank.blaschka@de.ibm.com>

qeth: synchronize configuration interface

Synchronize access to the drivers configuration interface.
Also do not allow configuration changes during online/offline
transition.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# fe7a2625 08-Mar-2010 Ursula Braun <ursula.braun@de.ibm.com>

qeth: enable kmsg hash processing in qeth_core_sys.c

provide qeth kmsg definitions to enable hash string generation for
kernel message created with dev_err().

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# a60389ab 10-Jan-2010 Einar Lueck <elelueck@de.ibm.com>

qeth: default BLKT values for new OSA/3 hardware

Set default BLKT values for new OSA/3 hardware.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 76b11f8e 10-Jan-2010 Ursula Braun <ursula.braun@de.ibm.com>

qeth: HiperSockets Network Traffic Analyzer

New feature to trace HiperSockets network traffic for debugging
purposes.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# c3b4a740 11-Nov-2009 Frank Blaschka <frank.blaschka@de.ibm.com>

qeth: rework TSO functions

The maximum TSO size OSA can handle is 15 * PAGE_SIZE. This
patch reduces gso_max_size to this value and adds some sanity
checks and statistics to the TSO implementation.
Since only layer 3 is able to do TSO move all TSO related functions
to the qeth_l3 module.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# d64ecc22 11-Nov-2009 Einar Lueck <elelueck@de.ibm.com>

qeth: Exploit Connection Isolation

Isolate data connection to a shared OSA card against other data
connections to the same OSA card. Connectivity between isolated
data connections sharing the same OSA card is therefore possible only
through external network gear (e.g. a router).

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7c6a3ed5 25-Aug-2009 Ursula Braun <ursula.braun@de.ibm.com>

qeth: display "undefined" value of sysfs-attribute "layer2"

If nothing has been written into the qeth sysfs-attribute layer2,
its value is "-1" meaning "not yet defined". But the value is
displayed as "1" meaning "layer2 selected". The patch changes the
reading of this "-1"-value to "-1" to make clear the layer2-attribute
has not yet been defined.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 64ef8957 24-Mar-2009 Frank Blaschka <frank.blaschka@de.ibm.com>

qeth: remove EDDP

Performance measurements showed EDDP does not lower CPU costs but increase
them. So we dump out EDDP code from qeth driver.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 14cc21b6 05-Jun-2008 Frank Blaschka <frank.blaschka@de.ibm.com>

qeth: reduce number of kernel messages

Remove unnecessary messages. Write important debug information to
s390dbf.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>


# 4a71df50 15-Feb-2008 Frank Blaschka <frank.blaschka@de.ibm.com>

qeth: new qeth device driver

List of major changes and improvements:
no manipulation of the global ARP constructor
clean code split into core, layer 2 and layer 3 functionality
better exploitation of the ethtool interface
better representation of the various hardware capabilities
fix packet socket support (tcpdump), no fake_ll required
osasnmpd notification via udev events
coding style and beautification

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>