Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/qeth: add ipa return codes for bridgeport

add ipa return codes for Bridgeport (HiperSockets and OSA) according to
system level design.

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

authored by

Kittipon Meesompop and committed by
David S. Miller
2063a5f5 5ee8aa68

+49 -17
+14
drivers/s390/net/qeth_core_mpc.c
··· 170 170 {IPA_RC_TRACE_ALREADY_ACTIVE, "trace already active"}, 171 171 {IPA_RC_INVALID_FORMAT, "invalid format or length"}, 172 172 {IPA_RC_DUP_IPV6_REMOTE, "ipv6 address already registered remote"}, 173 + {IPA_RC_SBP_IQD_NOT_CONFIGURED, "Not configured for bridgeport"}, 173 174 {IPA_RC_DUP_IPV6_HOME, "ipv6 address already registered"}, 174 175 {IPA_RC_UNREGISTERED_ADDR, "Address not registered"}, 175 176 {IPA_RC_NO_ID_AVAILABLE, "No identifiers available"}, 176 177 {IPA_RC_ID_NOT_FOUND, "Identifier not found"}, 178 + {IPA_RC_SBP_IQD_ANO_DEV_PRIMARY, "Primary bridgeport exists already"}, 179 + {IPA_RC_SBP_IQD_CURRENT_SECOND, "Bridgeport is currently secondary"}, 180 + {IPA_RC_SBP_IQD_LIMIT_SECOND, "Limit of secondary bridgeports reached"}, 177 181 {IPA_RC_INVALID_IP_VERSION, "IP version incorrect"}, 182 + {IPA_RC_SBP_IQD_CURRENT_PRIMARY, "Bridgeport is currently primary"}, 178 183 {IPA_RC_LAN_FRAME_MISMATCH, "LAN and frame mismatch"}, 184 + {IPA_RC_SBP_IQD_NO_QDIO_QUEUES, "QDIO queues not established"}, 179 185 {IPA_RC_L2_UNSUPPORTED_CMD, "Unsupported layer 2 command"}, 180 186 {IPA_RC_L2_DUP_MAC, "Duplicate MAC address"}, 181 187 {IPA_RC_L2_ADDR_TABLE_FULL, "Layer2 address table full"}, ··· 193 187 {IPA_RC_L2_INVALID_VLAN_ID, "L2 invalid vlan id"}, 194 188 {IPA_RC_L2_DUP_VLAN_ID, "L2 duplicate vlan id"}, 195 189 {IPA_RC_L2_VLAN_ID_NOT_FOUND, "L2 vlan id not found"}, 190 + {IPA_RC_SBP_OSA_NOT_CONFIGURED, "Not configured for bridgeport"}, 191 + {IPA_RC_SBP_OSA_OS_MISMATCH, "OS mismatch"}, 192 + {IPA_RC_SBP_OSA_ANO_DEV_PRIMARY, "Primary bridgeport exists already"}, 193 + {IPA_RC_SBP_OSA_CURRENT_SECOND, "Bridgeport is currently secondary"}, 194 + {IPA_RC_SBP_OSA_LIMIT_SECOND, "Limit of secondary bridgeports reached"}, 195 + {IPA_RC_SBP_OSA_NOT_AUTHD_BY_ZMAN, "Not authorized by zManager"}, 196 + {IPA_RC_SBP_OSA_CURRENT_PRIMARY, "Bridgeport is currently primary"}, 197 + {IPA_RC_SBP_OSA_NO_QDIO_QUEUES, "QDIO queues not established"}, 196 198 {IPA_RC_DATA_MISMATCH, "Data field mismatch (v4/v6 mixed)"}, 197 199 {IPA_RC_INVALID_MTU_SIZE, "Invalid MTU size"}, 198 200 {IPA_RC_INVALID_LANTYPE, "Invalid LAN type"},
+18
drivers/s390/net/qeth_core_mpc.h
··· 142 142 IPA_RC_TRACE_ALREADY_ACTIVE = 0x0005, 143 143 IPA_RC_INVALID_FORMAT = 0x0006, 144 144 IPA_RC_DUP_IPV6_REMOTE = 0x0008, 145 + IPA_RC_SBP_IQD_NOT_CONFIGURED = 0x000C, 145 146 IPA_RC_DUP_IPV6_HOME = 0x0010, 146 147 IPA_RC_UNREGISTERED_ADDR = 0x0011, 147 148 IPA_RC_NO_ID_AVAILABLE = 0x0012, 148 149 IPA_RC_ID_NOT_FOUND = 0x0013, 150 + IPA_RC_SBP_IQD_ANO_DEV_PRIMARY = 0x0014, 151 + IPA_RC_SBP_IQD_CURRENT_SECOND = 0x0018, 152 + IPA_RC_SBP_IQD_LIMIT_SECOND = 0x001C, 149 153 IPA_RC_INVALID_IP_VERSION = 0x0020, 154 + IPA_RC_SBP_IQD_CURRENT_PRIMARY = 0x0024, 150 155 IPA_RC_LAN_FRAME_MISMATCH = 0x0040, 156 + IPA_RC_SBP_IQD_NO_QDIO_QUEUES = 0x00EB, 151 157 IPA_RC_L2_UNSUPPORTED_CMD = 0x2003, 152 158 IPA_RC_L2_DUP_MAC = 0x2005, 153 159 IPA_RC_L2_ADDR_TABLE_FULL = 0x2006, ··· 165 159 IPA_RC_L2_INVALID_VLAN_ID = 0x2015, 166 160 IPA_RC_L2_DUP_VLAN_ID = 0x2016, 167 161 IPA_RC_L2_VLAN_ID_NOT_FOUND = 0x2017, 162 + IPA_RC_SBP_OSA_NOT_CONFIGURED = 0x2B0C, 163 + IPA_RC_SBP_OSA_OS_MISMATCH = 0x2B10, 164 + IPA_RC_SBP_OSA_ANO_DEV_PRIMARY = 0x2B14, 165 + IPA_RC_SBP_OSA_CURRENT_SECOND = 0x2B18, 166 + IPA_RC_SBP_OSA_LIMIT_SECOND = 0x2B1C, 167 + IPA_RC_SBP_OSA_NOT_AUTHD_BY_ZMAN = 0x2B20, 168 + IPA_RC_SBP_OSA_CURRENT_PRIMARY = 0x2B24, 169 + IPA_RC_SBP_OSA_NO_QDIO_QUEUES = 0x2BEB, 168 170 IPA_RC_DATA_MISMATCH = 0xe001, 169 171 IPA_RC_INVALID_MTU_SIZE = 0xe002, 170 172 IPA_RC_INVALID_LANTYPE = 0xe003, ··· 200 186 /* for SET_DIAGNOSTIC_ASSIST */ 201 187 #define IPA_RC_INVALID_SUBCMD IPA_RC_IP_TABLE_FULL 202 188 #define IPA_RC_HARDWARE_AUTH_ERROR IPA_RC_UNKNOWN_ERROR 189 + 190 + /* for SETBRIDGEPORT (double occupancies) */ 191 + #define IPA_RC_SBP_IQD_OS_MISMATCH IPA_RC_DUP_IPV6_HOME 192 + #define IPA_RC_SBP_IQD_NOT_AUTHD_BY_ZMAN IPA_RC_INVALID_IP_VERSION 203 193 204 194 /* IPA function flags; each flag marks availability of respective function */ 205 195 enum qeth_ipa_funcs {
+17 -17
drivers/s390/net/qeth_l2_main.c
··· 1650 1650 if ((is_iqd && (cbctl->ipa_rc == IPA_RC_SUCCESS)) || 1651 1651 (!is_iqd && (cbctl->ipa_rc == cbctl->cmd_rc))) 1652 1652 switch (cbctl->cmd_rc) { 1653 - case 0x0000: 1653 + case IPA_RC_SUCCESS: 1654 1654 rc = 0; 1655 1655 break; 1656 - case 0x2B04: 1657 - case 0x0004: 1656 + case IPA_RC_L2_UNSUPPORTED_CMD: 1657 + case IPA_RC_UNSUPPORTED_COMMAND: 1658 1658 rc = -EOPNOTSUPP; 1659 1659 break; 1660 - case 0x2B0C: 1661 - case 0x000C: /* Not configured as bridge Port */ 1660 + case IPA_RC_SBP_OSA_NOT_CONFIGURED: 1661 + case IPA_RC_SBP_IQD_NOT_CONFIGURED: 1662 1662 rc = -ENODEV; /* maybe not the best code here? */ 1663 1663 dev_err(&card->gdev->dev, 1664 1664 "The device is not configured as a Bridge Port\n"); 1665 1665 break; 1666 - case 0x2B10: 1667 - case 0x0010: /* OS mismatch */ 1666 + case IPA_RC_SBP_OSA_OS_MISMATCH: 1667 + case IPA_RC_SBP_IQD_OS_MISMATCH: 1668 1668 rc = -EPERM; 1669 1669 dev_err(&card->gdev->dev, 1670 1670 "A Bridge Port is already configured by a different operating system\n"); 1671 1671 break; 1672 - case 0x2B14: 1673 - case 0x0014: /* Another device is Primary */ 1672 + case IPA_RC_SBP_OSA_ANO_DEV_PRIMARY: 1673 + case IPA_RC_SBP_IQD_ANO_DEV_PRIMARY: 1674 1674 switch (setcmd) { 1675 1675 case IPA_SBP_SET_PRIMARY_BRIDGE_PORT: 1676 1676 rc = -EEXIST; ··· 1686 1686 rc = -EIO; 1687 1687 } 1688 1688 break; 1689 - case 0x2B18: 1690 - case 0x0018: /* This device is currently Secondary */ 1689 + case IPA_RC_SBP_OSA_CURRENT_SECOND: 1690 + case IPA_RC_SBP_IQD_CURRENT_SECOND: 1691 1691 rc = -EBUSY; 1692 1692 dev_err(&card->gdev->dev, 1693 1693 "The device is already a secondary Bridge Port\n"); 1694 1694 break; 1695 - case 0x2B1C: 1696 - case 0x001C: /* Limit for Secondary devices reached */ 1695 + case IPA_RC_SBP_OSA_LIMIT_SECOND: 1696 + case IPA_RC_SBP_IQD_LIMIT_SECOND: 1697 1697 rc = -EEXIST; 1698 1698 dev_err(&card->gdev->dev, 1699 1699 "The LAN cannot have more secondary Bridge Ports\n"); 1700 1700 break; 1701 - case 0x2B24: 1702 - case 0x0024: /* This device is currently Primary */ 1701 + case IPA_RC_SBP_OSA_CURRENT_PRIMARY: 1702 + case IPA_RC_SBP_IQD_CURRENT_PRIMARY: 1703 1703 rc = -EBUSY; 1704 1704 dev_err(&card->gdev->dev, 1705 1705 "The device is already a primary Bridge Port\n"); 1706 1706 break; 1707 - case 0x2B20: 1708 - case 0x0020: /* Not authorized by zManager */ 1707 + case IPA_RC_SBP_OSA_NOT_AUTHD_BY_ZMAN: 1708 + case IPA_RC_SBP_IQD_NOT_AUTHD_BY_ZMAN: 1709 1709 rc = -EACCES; 1710 1710 dev_err(&card->gdev->dev, 1711 1711 "The device is not authorized to be a Bridge Port\n");