aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUrsula Braun <braunu@de.ibm.com>2007-08-29 05:26:57 -0400
committerJeff Garzik <jeff@garzik.org>2007-08-31 06:52:58 -0400
commit6e55cab9f004e6e7a9ab5d7b27fb705ed0de838e (patch)
tree70ab35142abfe2d08bce38e9e11849c5d1205132
parent6d4f3d182b1c6074b84feaadd84a0957059a5940 (diff)
qeth: provide specific message for OSA-adapters exclusively used
Exclusive usage of OSA-cards has been introduced. Even though Linux does not make use of it, qeth should be prepared to receive a bad RC for some initialization steps. A meaningful message is now given, if an OSA-device is set online, even though the OSA-adapter is already exclusively used by another host. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/s390/net/qeth_main.c28
-rw-r--r--drivers/s390/net/qeth_mpc.h1
2 files changed, 20 insertions, 9 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 45a8b9f78b16..617fbfd767fa 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -1541,16 +1541,21 @@ qeth_idx_write_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob)
1541 card = CARD_FROM_CDEV(channel->ccwdev); 1541 card = CARD_FROM_CDEV(channel->ccwdev);
1542 1542
1543 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) { 1543 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
1544 PRINT_ERR("IDX_ACTIVATE on write channel device %s: negative " 1544 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
1545 "reply\n", CARD_WDEV_ID(card)); 1545 PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
1546 "adapter exclusively used by another host\n",
1547 CARD_WDEV_ID(card));
1548 else
1549 PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
1550 "negative reply\n", CARD_WDEV_ID(card));
1546 goto out; 1551 goto out;
1547 } 1552 }
1548 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); 1553 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
1549 if ((temp & ~0x0100) != qeth_peer_func_level(card->info.func_level)) { 1554 if ((temp & ~0x0100) != qeth_peer_func_level(card->info.func_level)) {
1550 PRINT_WARN("IDX_ACTIVATE on write channel device %s: " 1555 PRINT_WARN("IDX_ACTIVATE on write channel device %s: "
1551 "function level mismatch " 1556 "function level mismatch "
1552 "(sent: 0x%x, received: 0x%x)\n", 1557 "(sent: 0x%x, received: 0x%x)\n",
1553 CARD_WDEV_ID(card), card->info.func_level, temp); 1558 CARD_WDEV_ID(card), card->info.func_level, temp);
1554 goto out; 1559 goto out;
1555 } 1560 }
1556 channel->state = CH_STATE_UP; 1561 channel->state = CH_STATE_UP;
@@ -1596,8 +1601,13 @@ qeth_idx_read_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob)
1596 goto out; 1601 goto out;
1597 } 1602 }
1598 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) { 1603 if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
1599 PRINT_ERR("IDX_ACTIVATE on read channel device %s: negative " 1604 if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
1600 "reply\n", CARD_RDEV_ID(card)); 1605 PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
1606 "adapter exclusively used by another host\n",
1607 CARD_RDEV_ID(card));
1608 else
1609 PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
1610 "negative reply\n", CARD_RDEV_ID(card));
1601 goto out; 1611 goto out;
1602 } 1612 }
1603 1613
@@ -1612,8 +1622,8 @@ qeth_idx_read_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob)
1612 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); 1622 memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
1613 if (temp != qeth_peer_func_level(card->info.func_level)) { 1623 if (temp != qeth_peer_func_level(card->info.func_level)) {
1614 PRINT_WARN("IDX_ACTIVATE on read channel device %s: function " 1624 PRINT_WARN("IDX_ACTIVATE on read channel device %s: function "
1615 "level mismatch (sent: 0x%x, received: 0x%x)\n", 1625 "level mismatch (sent: 0x%x, received: 0x%x)\n",
1616 CARD_RDEV_ID(card), card->info.func_level, temp); 1626 CARD_RDEV_ID(card), card->info.func_level, temp);
1617 goto out; 1627 goto out;
1618 } 1628 }
1619 memcpy(&card->token.issuer_rm_r, 1629 memcpy(&card->token.issuer_rm_r,
diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h
index 1d8083c91765..6de2da5ed5fd 100644
--- a/drivers/s390/net/qeth_mpc.h
+++ b/drivers/s390/net/qeth_mpc.h
@@ -565,6 +565,7 @@ extern unsigned char IDX_ACTIVATE_WRITE[];
565#define QETH_IDX_ACT_QDIO_DEV_REALADDR(buffer) (buffer+0x20) 565#define QETH_IDX_ACT_QDIO_DEV_REALADDR(buffer) (buffer+0x20)
566#define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08]&3)==2) 566#define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08]&3)==2)
567#define QETH_IDX_REPLY_LEVEL(buffer) (buffer+0x12) 567#define QETH_IDX_REPLY_LEVEL(buffer) (buffer+0x12)
568#define QETH_IDX_ACT_CAUSE_CODE(buffer) (buffer)[0x09]
568 569
569#define PDU_ENCAPSULATION(buffer) \ 570#define PDU_ENCAPSULATION(buffer) \
570 (buffer + *(buffer + (*(buffer+0x0b)) + \ 571 (buffer + *(buffer + (*(buffer+0x0b)) + \