Commit 6e55cab9 authored by Ursula Braun's avatar Ursula Braun Committed by Jeff Garzik
Browse files

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: default avatarUrsula Braun <braunu@de.ibm.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 6d4f3d18
...@@ -1541,8 +1541,13 @@ qeth_idx_write_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob) ...@@ -1541,8 +1541,13 @@ qeth_idx_write_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob)
card = CARD_FROM_CDEV(channel->ccwdev); card = CARD_FROM_CDEV(channel->ccwdev);
if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) { if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
PRINT_ERR("IDX_ACTIVATE on write channel device %s: negative " if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
"reply\n", CARD_WDEV_ID(card)); PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
"adapter exclusively used by another host\n",
CARD_WDEV_ID(card));
else
PRINT_ERR("IDX_ACTIVATE on write channel device %s: "
"negative reply\n", CARD_WDEV_ID(card));
goto out; goto out;
} }
memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
...@@ -1596,8 +1601,13 @@ qeth_idx_read_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob) ...@@ -1596,8 +1601,13 @@ qeth_idx_read_cb(struct qeth_channel *channel, struct qeth_cmd_buffer *iob)
goto out; goto out;
} }
if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) { if (!(QETH_IS_IDX_ACT_POS_REPLY(iob->data))) {
PRINT_ERR("IDX_ACTIVATE on read channel device %s: negative " if (QETH_IDX_ACT_CAUSE_CODE(iob->data) == 0x19)
"reply\n", CARD_RDEV_ID(card)); PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
"adapter exclusively used by another host\n",
CARD_RDEV_ID(card));
else
PRINT_ERR("IDX_ACTIVATE on read channel device %s: "
"negative reply\n", CARD_RDEV_ID(card));
goto out; goto out;
} }
......
...@@ -565,6 +565,7 @@ extern unsigned char IDX_ACTIVATE_WRITE[]; ...@@ -565,6 +565,7 @@ extern unsigned char IDX_ACTIVATE_WRITE[];
#define QETH_IDX_ACT_QDIO_DEV_REALADDR(buffer) (buffer+0x20) #define QETH_IDX_ACT_QDIO_DEV_REALADDR(buffer) (buffer+0x20)
#define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08]&3)==2) #define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08]&3)==2)
#define QETH_IDX_REPLY_LEVEL(buffer) (buffer+0x12) #define QETH_IDX_REPLY_LEVEL(buffer) (buffer+0x12)
#define QETH_IDX_ACT_CAUSE_CODE(buffer) (buffer)[0x09]
#define PDU_ENCAPSULATION(buffer) \ #define PDU_ENCAPSULATION(buffer) \
(buffer + *(buffer + (*(buffer+0x0b)) + \ (buffer + *(buffer + (*(buffer+0x0b)) + \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment