s390/qeth: Improve handling of OSA RCs
Subsystems (4)
Aswin Karuvally
maintainercover s390/qeth: Improve handling of OSA RCs
This two patch series aims to improve how return codes from OSA Express are handled in the qeth driver.
OSA defines a number of return codes whose meaning is determined by the issuing command, ie. they are ambiguous. The first patch moves definitions of all return codes including the ambiguous ones to a single enum block to aid readability and maintainability.
The second patch implements a mechanism to interpret return codes based on the issuing command to ensure accurate debug messages. While at it, remove extern keyword and fix indentation for function declarations to be in line with Linux kernel coding style.
Aswin Karuvally (2):
s390/qeth: Move all OSA RCs to single enum
s390/qeth: Handle ambiguous OSA RCs in s390dbf
drivers/s390/net/qeth_core_main.c | 2 +- drivers/s390/net/qeth_core_mpc.c | 247 ++++++++++++++++++++++++------ drivers/s390/net/qeth_core_mpc.h | 20 +-- 3 files changed, 210 insertions(+), 59 deletions(-)
Signature · 1 line
2.48.1
Aswin Karuvally
maintainerPATCH 1/2 s390/qeth: Move all OSA RCs to single enum
OSA Express defines a number of return codes whose meaning is determined by the issuing command, making them ambiguous. Move definitions of all return codes including the ambiguous ones to a single enum block to aid readability and maintainability.
--- drivers/s390/net/qeth_core_mpc.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/s390/net/qeth_core_mpc.h +5 -10
@@ -159,13 +159,17 @@ enum qeth_ipa_return_codes {IPA_RC_SUCCESS =0x0000 ,IPA_RC_NOTSUPP =0x0001 ,IPA_RC_IP_TABLE_FULL =0x0002 , +IPA_RC_INVALID_SUBCMD =0x0002 ,IPA_RC_UNKNOWN_ERROR =0x0003 , +IPA_RC_HARDWARE_AUTH_ERROR =0x0003 ,IPA_RC_UNSUPPORTED_COMMAND =0x0004 ,IPA_RC_TRACE_ALREADY_ACTIVE =0x0005 , +IPA_RC_VNICC_OOSEQ =0x0005 ,IPA_RC_INVALID_FORMAT =0x0006 ,IPA_RC_DUP_IPV6_REMOTE =0x0008 ,IPA_RC_SBP_IQD_NOT_CONFIGURED =0x000C ,IPA_RC_DUP_IPV6_HOME =0x0010 , +IPA_RC_SBP_IQD_OS_MISMATCH =0x0010 ,IPA_RC_UNREGISTERED_ADDR =0x0011 ,IPA_RC_NO_ID_AVAILABLE =0x0012 , IPA_RC_ID_NOT_FOUND = 0x0013,
@@ -173,6 +177,7 @@ enum qeth_ipa_return_codes {IPA_RC_SBP_IQD_CURRENT_SECOND =0x0018 ,IPA_RC_SBP_IQD_LIMIT_SECOND =0x001C ,IPA_RC_INVALID_IP_VERSION =0x0020 , +IPA_RC_SBP_IQD_NOT_AUTHD_BY_ZMAN =0x0020 ,IPA_RC_SBP_IQD_CURRENT_PRIMARY =0x0024 ,IPA_RC_LAN_FRAME_MISMATCH =0x0040 , IPA_RC_SBP_IQD_NO_QDIO_QUEUES = 0x00EB,
@@ -220,16 +225,6 @@ enum qeth_ipa_return_codes {IPA_RC_INVALID_IP_VERSION2 =0xf001 ,IPA_RC_FFFF =0xffff }; -/* for VNIC Characteristics */ -#define IPA_RC_VNICC_OOSEQ 0x0005 - -/* for SET_DIAGNOSTIC_ASSIST */ -#define IPA_RC_INVALID_SUBCMD IPA_RC_IP_TABLE_FULL -#define IPA_RC_HARDWARE_AUTH_ERROR IPA_RC_UNKNOWN_ERROR - -/* for SETBRIDGEPORT (double occupancies) */ -#define IPA_RC_SBP_IQD_OS_MISMATCH IPA_RC_DUP_IPV6_HOME -#define IPA_RC_SBP_IQD_NOT_AUTHD_BY_ZMAN IPA_RC_INVALID_IP_VERSION/* IPA function flags; each flag marks availability of respective function */ enum qeth_ipa_funcs {
Signature · 1 line
2.48.1
Aswin Karuvally
maintainerPATCH 2/2 s390/qeth: Handle ambiguous OSA RCs in s390dbf
In reply to Aswin KaruvallyOSA Express defines a number of return codes whose meaning is determined by the issuing command, making them ambiguous. The important ones are reported as debug messages through the s390 debug feature.
The qeth driver currently does not take the issuing command into account when interpreting the return code which sometimes leads to incorrect debug messages.
Implement a mechanism to interpret and report these return codes properly. While at it, remove extern keyword and fix indentation for function declarations to be in line with Linux kernel coding style.
--- drivers/s390/net/qeth_core_main.c | 2 +- drivers/s390/net/qeth_core_mpc.c | 247 ++++++++++++++++++++++++------ drivers/s390/net/qeth_core_mpc.h | 5 +- 3 files changed, 205 insertions(+), 49 deletions(-)
drivers/s390/net/qeth_core_main.c +1 -1
@@ -761,7 +761,7 @@ static void qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, int rc,if (rc)QETH_DBF_MESSAGE (2 ,"IPA: %s(%#x) for device %x returned %#x \"%s\"\n" , ipa_name, com,CARD_DEVID (card), rc, -qeth_get_ipa_msg (rc)); +qeth_get_ipa_msg (com, rc));else QETH_DBF_MESSAGE (5 ,"IPA: %s(%#x) for device %x succeeded\n" , ipa_name, com,CARD_DEVID (card));
drivers/s390/net/qeth_core_mpc.c +201 -46
283 lines not on this page · raw message
drivers/s390/net/qeth_core_mpc.h +3 -2
@@ -857,8 +857,9 @@ enum qeth_ipa_arp_return_codes { QETH_IPA_ARP_RC_Q_NO_DATA = 0x0008, }; -extern const char *qeth_get_ipa_msg (enum qeth_ipa_return_codes rc); -extern const char *qeth_get_ipa_cmd_name (enum qeth_ipa_cmds cmd); +const char *qeth_get_ipa_msg (enum qeth_ipa_cmds cmd, +enum qeth_ipa_return_codes rc); +const char *qeth_get_ipa_cmd_name (enum qeth_ipa_cmds cmd);/* Helper functions */ #define IS_IPA_REPLY (cmd) ((cmd)->hdr.initiator == IPA_CMD_INITIATOR_HOST)
Signature · 1 line
2.48.1
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Thu, 13 Nov 2025 15:42:07 +0100 you wrote:
This two patch series aims to improve how return codes from OSA Express are handled in the qeth driver.
OSA defines a number of return codes whose meaning is determined by the issuing command, ie. they are ambiguous. The first patch moves definitions of all return codes including the ambiguous ones to a single enum block to aid readability and maintainability.
[...]
Here is the summary with links:
- [net-next,1/2] s390/qeth: Move all OSA RCs to single enum
https://git.kernel.org/netdev/net-next/c/eef1f5ae73d1 - [net-next,2/2] s390/qeth: Handle ambiguous OSA RCs in s390dbf https://git.kernel.org/netdev/net-next/c/53e58437b470
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html