summaryrefslogtreecommitdiff
path: root/drivers/s390/net/qeth_core_sys.c
AgeCommit message (Collapse)Author
2018-09-26s390/qeth: reset layer2 attribute on layer switchJulian Wiedmann
[ Upstream commit 70551dc46ffa3555a0b5f3545b0cd87ab67fd002 ] 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> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-07s390/qeth: unbreak OSM and OSN supportJulian Wiedmann
[ Upstream commit 2d2ebb3ed0c6acfb014f98e427298673a5d07b82 ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-07s390/qeth: handle sysfs error during initializationUrsula Braun
[ Upstream commit 9111e7880ccf419548c7b0887df020b08eadb075 ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-16qeth: omit outbound queue 3 for unicast packets in Priority Queuing on ↵Hans Wippel
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>
2015-09-21qeth: move OSA portname into deprecated statusUrsula Braun
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>
2015-01-17qeth: sysfs: replace strcmp() with sysfs_streq()Eugene Crosser
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>
2015-01-17qeth: use qeth_card_hw_is_reachable() everywhereEugene Crosser
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>
2014-07-21qeth: Display adjacent switch attributesStefan Raspl
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>
2014-04-28qeth: Add new priority queueing optionsStefan Raspl
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>
2014-04-28qeth: Fix default queue setting in priority queueingStefan Raspl
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>
2013-01-21qeth: Support VEPA modeStefan Raspl
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>
2012-07-20s390/comments: unify copyright messages and remove file namesHeiko Carstens
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>
2012-05-16s390/qeth: stop using struct ccwgroup driver for discipline callbacksSebastian Ott
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>
2012-05-16s390/qeth: switch to ccwgroup_create_devSebastian Ott
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>
2011-05-13qeth: add OSA concurrent hardware trapFrank Blaschka
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>
2010-11-28drivers/s390/net: Remove unnecessary semicolonsJoe Perches
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>
2010-07-23qeth: serialize sysfs-triggered device configurationsUrsula Braun
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>
2010-07-23qeth: Clear mac_bits field when switching between Layer 2 and Layer 3Carsten Otte
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>
2010-05-17qeth: support the new OSA CHPID types OSX and OSMUrsula Braun
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>
2010-05-16qeth: synchronize configuration interfaceFrank Blaschka
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>
2010-03-10qeth: enable kmsg hash processing in qeth_core_sys.cUrsula Braun
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>
2010-01-13qeth: default BLKT values for new OSA/3 hardwareEinar Lueck
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>
2010-01-13qeth: HiperSockets Network Traffic AnalyzerUrsula Braun
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>
2009-11-16qeth: rework TSO functionsFrank Blaschka
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>
2009-11-16qeth: Exploit Connection IsolationEinar Lueck
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>
2009-08-26qeth: display "undefined" value of sysfs-attribute "layer2"Ursula Braun
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>
2009-03-25qeth: remove EDDPFrank Blaschka
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>
2008-06-10qeth: reduce number of kernel messagesFrank Blaschka
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>
2008-03-17qeth: new qeth device driverFrank Blaschka
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>