|
@@ -1028,7 +1028,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
|
|
qeth_bridgeport_query_support(card);
|
|
qeth_bridgeport_query_support(card);
|
|
if (card->options.sbp.supported_funcs)
|
|
if (card->options.sbp.supported_funcs)
|
|
dev_info(&card->gdev->dev,
|
|
dev_info(&card->gdev->dev,
|
|
- "The device represents a HiperSockets Bridge Capable Port\n");
|
|
|
|
|
|
+ "The device represents a Bridge Capable Port\n");
|
|
qeth_trace_features(card);
|
|
qeth_trace_features(card);
|
|
|
|
|
|
if (!card->dev && qeth_l2_setup_netdev(card)) {
|
|
if (!card->dev && qeth_l2_setup_netdev(card)) {
|
|
@@ -1281,7 +1281,8 @@ static int qeth_l2_control_event(struct qeth_card *card,
|
|
struct qeth_ipa_cmd *cmd)
|
|
struct qeth_ipa_cmd *cmd)
|
|
{
|
|
{
|
|
switch (cmd->hdr.command) {
|
|
switch (cmd->hdr.command) {
|
|
- case IPA_CMD_SETBRIDGEPORT:
|
|
|
|
|
|
+ case IPA_CMD_SETBRIDGEPORT_OSA:
|
|
|
|
+ case IPA_CMD_SETBRIDGEPORT_IQD:
|
|
if (cmd->data.sbp.hdr.command_code ==
|
|
if (cmd->data.sbp.hdr.command_code ==
|
|
IPA_SBP_BRIDGE_PORT_STATE_CHANGE) {
|
|
IPA_SBP_BRIDGE_PORT_STATE_CHANGE) {
|
|
qeth_bridge_state_change(card, cmd);
|
|
qeth_bridge_state_change(card, cmd);
|
|
@@ -1567,7 +1568,7 @@ static void qeth_bridge_host_event_worker(struct work_struct *work)
|
|
|
|
|
|
if (data->hostevs.lost_event_mask) {
|
|
if (data->hostevs.lost_event_mask) {
|
|
dev_info(&data->card->gdev->dev,
|
|
dev_info(&data->card->gdev->dev,
|
|
-"Address notification from the HiperSockets Bridge Port stopped %s (%s)\n",
|
|
|
|
|
|
+"Address notification from the Bridge Port stopped %s (%s)\n",
|
|
data->card->dev->name,
|
|
data->card->dev->name,
|
|
(data->hostevs.lost_event_mask == 0x01)
|
|
(data->hostevs.lost_event_mask == 0x01)
|
|
? "Overflow"
|
|
? "Overflow"
|
|
@@ -1651,70 +1652,80 @@ static int qeth_bridgeport_makerc(struct qeth_card *card,
|
|
struct _qeth_sbp_cbctl *cbctl, enum qeth_ipa_sbp_cmd setcmd)
|
|
struct _qeth_sbp_cbctl *cbctl, enum qeth_ipa_sbp_cmd setcmd)
|
|
{
|
|
{
|
|
int rc;
|
|
int rc;
|
|
|
|
+ int is_iqd = (card->info.type == QETH_CARD_TYPE_IQD);
|
|
|
|
|
|
- switch (cbctl->ipa_rc) {
|
|
|
|
- case IPA_RC_SUCCESS:
|
|
|
|
|
|
+ if ((is_iqd && (cbctl->ipa_rc == IPA_RC_SUCCESS)) ||
|
|
|
|
+ (!is_iqd && (cbctl->ipa_rc == cbctl->cmd_rc)))
|
|
switch (cbctl->cmd_rc) {
|
|
switch (cbctl->cmd_rc) {
|
|
case 0x0000:
|
|
case 0x0000:
|
|
rc = 0;
|
|
rc = 0;
|
|
break;
|
|
break;
|
|
|
|
+ case 0x2B04:
|
|
case 0x0004:
|
|
case 0x0004:
|
|
rc = -ENOSYS;
|
|
rc = -ENOSYS;
|
|
break;
|
|
break;
|
|
|
|
+ case 0x2B0C:
|
|
case 0x000C: /* Not configured as bridge Port */
|
|
case 0x000C: /* Not configured as bridge Port */
|
|
rc = -ENODEV; /* maybe not the best code here? */
|
|
rc = -ENODEV; /* maybe not the best code here? */
|
|
dev_err(&card->gdev->dev,
|
|
dev_err(&card->gdev->dev,
|
|
- "The HiperSockets device is not configured as a Bridge Port\n");
|
|
|
|
|
|
+ "The device is not configured as a Bridge Port\n");
|
|
break;
|
|
break;
|
|
|
|
+ case 0x2B14:
|
|
case 0x0014: /* Another device is Primary */
|
|
case 0x0014: /* Another device is Primary */
|
|
switch (setcmd) {
|
|
switch (setcmd) {
|
|
case IPA_SBP_SET_PRIMARY_BRIDGE_PORT:
|
|
case IPA_SBP_SET_PRIMARY_BRIDGE_PORT:
|
|
rc = -EEXIST;
|
|
rc = -EEXIST;
|
|
dev_err(&card->gdev->dev,
|
|
dev_err(&card->gdev->dev,
|
|
- "The HiperSockets LAN already has a primary Bridge Port\n");
|
|
|
|
|
|
+ "The LAN already has a primary Bridge Port\n");
|
|
break;
|
|
break;
|
|
case IPA_SBP_SET_SECONDARY_BRIDGE_PORT:
|
|
case IPA_SBP_SET_SECONDARY_BRIDGE_PORT:
|
|
rc = -EBUSY;
|
|
rc = -EBUSY;
|
|
dev_err(&card->gdev->dev,
|
|
dev_err(&card->gdev->dev,
|
|
- "The HiperSockets device is already a primary Bridge Port\n");
|
|
|
|
|
|
+ "The device is already a primary Bridge Port\n");
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
rc = -EIO;
|
|
rc = -EIO;
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
|
|
+ case 0x2B18:
|
|
case 0x0018: /* This device is currently Secondary */
|
|
case 0x0018: /* This device is currently Secondary */
|
|
rc = -EBUSY;
|
|
rc = -EBUSY;
|
|
dev_err(&card->gdev->dev,
|
|
dev_err(&card->gdev->dev,
|
|
- "The HiperSockets device is already a secondary Bridge Port\n");
|
|
|
|
|
|
+ "The device is already a secondary Bridge Port\n");
|
|
break;
|
|
break;
|
|
|
|
+ case 0x2B1C:
|
|
case 0x001C: /* Limit for Secondary devices reached */
|
|
case 0x001C: /* Limit for Secondary devices reached */
|
|
rc = -EEXIST;
|
|
rc = -EEXIST;
|
|
dev_err(&card->gdev->dev,
|
|
dev_err(&card->gdev->dev,
|
|
- "The HiperSockets LAN cannot have more secondary Bridge Ports\n");
|
|
|
|
|
|
+ "The LAN cannot have more secondary Bridge Ports\n");
|
|
break;
|
|
break;
|
|
|
|
+ case 0x2B24:
|
|
case 0x0024: /* This device is currently Primary */
|
|
case 0x0024: /* This device is currently Primary */
|
|
rc = -EBUSY;
|
|
rc = -EBUSY;
|
|
dev_err(&card->gdev->dev,
|
|
dev_err(&card->gdev->dev,
|
|
- "The HiperSockets device is already a primary Bridge Port\n");
|
|
|
|
|
|
+ "The device is already a primary Bridge Port\n");
|
|
break;
|
|
break;
|
|
|
|
+ case 0x2B20:
|
|
case 0x0020: /* Not authorized by zManager */
|
|
case 0x0020: /* Not authorized by zManager */
|
|
rc = -EACCES;
|
|
rc = -EACCES;
|
|
dev_err(&card->gdev->dev,
|
|
dev_err(&card->gdev->dev,
|
|
- "The HiperSockets device is not authorized to be a Bridge Port\n");
|
|
|
|
|
|
+ "The device is not authorized to be a Bridge Port\n");
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
rc = -EIO;
|
|
rc = -EIO;
|
|
}
|
|
}
|
|
- break;
|
|
|
|
- case IPA_RC_NOTSUPP:
|
|
|
|
- rc = -ENOSYS;
|
|
|
|
- break;
|
|
|
|
- case IPA_RC_UNSUPPORTED_COMMAND:
|
|
|
|
- rc = -ENOSYS;
|
|
|
|
- break;
|
|
|
|
- default:
|
|
|
|
- rc = -EIO;
|
|
|
|
- }
|
|
|
|
|
|
+ else
|
|
|
|
+ switch (cbctl->ipa_rc) {
|
|
|
|
+ case IPA_RC_NOTSUPP:
|
|
|
|
+ rc = -ENOSYS;
|
|
|
|
+ break;
|
|
|
|
+ case IPA_RC_UNSUPPORTED_COMMAND:
|
|
|
|
+ rc = -ENOSYS;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ rc = -EIO;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (rc) {
|
|
if (rc) {
|
|
QETH_CARD_TEXT_(card, 2, "SBPi%04x", cbctl->ipa_rc);
|
|
QETH_CARD_TEXT_(card, 2, "SBPi%04x", cbctl->ipa_rc);
|
|
QETH_CARD_TEXT_(card, 2, "SBPc%04x", cbctl->cmd_rc);
|
|
QETH_CARD_TEXT_(card, 2, "SBPc%04x", cbctl->cmd_rc);
|
|
@@ -1722,6 +1733,13 @@ static int qeth_bridgeport_makerc(struct qeth_card *card,
|
|
return rc;
|
|
return rc;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static inline int ipa_cmd_sbp(struct qeth_card *card)
|
|
|
|
+{
|
|
|
|
+ return (card->info.type == QETH_CARD_TYPE_IQD) ?
|
|
|
|
+ IPA_CMD_SETBRIDGEPORT_IQD :
|
|
|
|
+ IPA_CMD_SETBRIDGEPORT_OSA;
|
|
|
|
+}
|
|
|
|
+
|
|
static int qeth_bridgeport_query_support_cb(struct qeth_card *card,
|
|
static int qeth_bridgeport_query_support_cb(struct qeth_card *card,
|
|
struct qeth_reply *reply, unsigned long data)
|
|
struct qeth_reply *reply, unsigned long data)
|
|
{
|
|
{
|
|
@@ -1753,7 +1771,7 @@ static void qeth_bridgeport_query_support(struct qeth_card *card)
|
|
struct _qeth_sbp_cbctl cbctl;
|
|
struct _qeth_sbp_cbctl cbctl;
|
|
|
|
|
|
QETH_CARD_TEXT(card, 2, "brqsuppo");
|
|
QETH_CARD_TEXT(card, 2, "brqsuppo");
|
|
- iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0);
|
|
|
|
|
|
+ iob = qeth_get_ipacmd_buffer(card, ipa_cmd_sbp(card), 0);
|
|
if (!iob)
|
|
if (!iob)
|
|
return;
|
|
return;
|
|
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
|
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
|
@@ -1830,7 +1848,7 @@ int qeth_bridgeport_query_ports(struct qeth_card *card,
|
|
QETH_CARD_TEXT(card, 2, "brqports");
|
|
QETH_CARD_TEXT(card, 2, "brqports");
|
|
if (!(card->options.sbp.supported_funcs & IPA_SBP_QUERY_BRIDGE_PORTS))
|
|
if (!(card->options.sbp.supported_funcs & IPA_SBP_QUERY_BRIDGE_PORTS))
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
- iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0);
|
|
|
|
|
|
+ iob = qeth_get_ipacmd_buffer(card, ipa_cmd_sbp(card), 0);
|
|
if (!iob)
|
|
if (!iob)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
|
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
|
@@ -1897,7 +1915,7 @@ int qeth_bridgeport_setrole(struct qeth_card *card, enum qeth_sbp_roles role)
|
|
}
|
|
}
|
|
if (!(card->options.sbp.supported_funcs & setcmd))
|
|
if (!(card->options.sbp.supported_funcs & setcmd))
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
- iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETBRIDGEPORT, 0);
|
|
|
|
|
|
+ iob = qeth_get_ipacmd_buffer(card, ipa_cmd_sbp(card), 0);
|
|
if (!iob)
|
|
if (!iob)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|
|
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
|