Commit 239ff408 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller

qeth: move OSA portname into deprecated status

An OSA-Express port name was required to identify a shared OSA port.
All operating system instances that shared the port had to use the
same port name. This requirement no longer applies.
Signed-off-by: default avatarUrsula Braun <ursula.braun@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 248046ba
...@@ -663,9 +663,7 @@ struct qeth_card_info { ...@@ -663,9 +663,7 @@ struct qeth_card_info {
char mcl_level[QETH_MCL_LENGTH + 1]; char mcl_level[QETH_MCL_LENGTH + 1];
int guestlan; int guestlan;
int mac_bits; int mac_bits;
int portname_required;
int portno; int portno;
char portname[9];
enum qeth_card_types type; enum qeth_card_types type;
enum qeth_link_types link_type; enum qeth_link_types link_type;
int is_multicast_different; int is_multicast_different;
......
...@@ -1982,14 +1982,6 @@ static void qeth_idx_read_cb(struct qeth_channel *channel, ...@@ -1982,14 +1982,6 @@ static void qeth_idx_read_cb(struct qeth_channel *channel,
goto out; goto out;
} }
/**
* * temporary fix for microcode bug
* * to revert it,replace OR by AND
* */
if ((!QETH_IDX_NO_PORTNAME_REQUIRED(iob->data)) ||
(card->info.type == QETH_CARD_TYPE_OSD))
card->info.portname_required = 1;
memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2); memcpy(&temp, QETH_IDX_ACT_FUNC_LEVEL(iob->data), 2);
if (temp != qeth_peer_func_level(card->info.func_level)) { if (temp != qeth_peer_func_level(card->info.func_level)) {
QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel: function " QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel: function "
...@@ -2360,8 +2352,6 @@ static int qeth_ulp_enable(struct qeth_card *card) ...@@ -2360,8 +2352,6 @@ static int qeth_ulp_enable(struct qeth_card *card)
&card->token.cm_connection_r, QETH_MPC_TOKEN_LENGTH); &card->token.cm_connection_r, QETH_MPC_TOKEN_LENGTH);
memcpy(QETH_ULP_ENABLE_FILTER_TOKEN(iob->data), memcpy(QETH_ULP_ENABLE_FILTER_TOKEN(iob->data),
&card->token.ulp_filter_w, QETH_MPC_TOKEN_LENGTH); &card->token.ulp_filter_w, QETH_MPC_TOKEN_LENGTH);
memcpy(QETH_ULP_ENABLE_PORTNAME_AND_LL(iob->data),
card->info.portname, 9);
rc = qeth_send_control_data(card, ULP_ENABLE_SIZE, iob, rc = qeth_send_control_data(card, ULP_ENABLE_SIZE, iob,
qeth_ulp_enable_cb, NULL); qeth_ulp_enable_cb, NULL);
return rc; return rc;
...@@ -2680,48 +2670,6 @@ static int qeth_mpc_initialize(struct qeth_card *card) ...@@ -2680,48 +2670,6 @@ static int qeth_mpc_initialize(struct qeth_card *card)
return rc; return rc;
} }
static void qeth_print_status_with_portname(struct qeth_card *card)
{
char dbf_text[15];
int i;
sprintf(dbf_text, "%s", card->info.portname + 1);
for (i = 0; i < 8; i++)
dbf_text[i] =
(char) _ebcasc[(__u8) dbf_text[i]];
dbf_text[8] = 0;
dev_info(&card->gdev->dev, "Device is a%s card%s%s%s\n"
"with link type %s (portname: %s)\n",
qeth_get_cardname(card),
(card->info.mcl_level[0]) ? " (level: " : "",
(card->info.mcl_level[0]) ? card->info.mcl_level : "",
(card->info.mcl_level[0]) ? ")" : "",
qeth_get_cardname_short(card),
dbf_text);
}
static void qeth_print_status_no_portname(struct qeth_card *card)
{
if (card->info.portname[0])
dev_info(&card->gdev->dev, "Device is a%s "
"card%s%s%s\nwith link type %s "
"(no portname needed by interface).\n",
qeth_get_cardname(card),
(card->info.mcl_level[0]) ? " (level: " : "",
(card->info.mcl_level[0]) ? card->info.mcl_level : "",
(card->info.mcl_level[0]) ? ")" : "",
qeth_get_cardname_short(card));
else
dev_info(&card->gdev->dev, "Device is a%s "
"card%s%s%s\nwith link type %s.\n",
qeth_get_cardname(card),
(card->info.mcl_level[0]) ? " (level: " : "",
(card->info.mcl_level[0]) ? card->info.mcl_level : "",
(card->info.mcl_level[0]) ? ")" : "",
qeth_get_cardname_short(card));
}
void qeth_print_status_message(struct qeth_card *card) void qeth_print_status_message(struct qeth_card *card)
{ {
switch (card->info.type) { switch (card->info.type) {
...@@ -2758,10 +2706,13 @@ void qeth_print_status_message(struct qeth_card *card) ...@@ -2758,10 +2706,13 @@ void qeth_print_status_message(struct qeth_card *card)
default: default:
memset(&card->info.mcl_level[0], 0, QETH_MCL_LENGTH + 1); memset(&card->info.mcl_level[0], 0, QETH_MCL_LENGTH + 1);
} }
if (card->info.portname_required) dev_info(&card->gdev->dev,
qeth_print_status_with_portname(card); "Device is a%s card%s%s%s\nwith link type %s.\n",
else qeth_get_cardname(card),
qeth_print_status_no_portname(card); (card->info.mcl_level[0]) ? " (level: " : "",
(card->info.mcl_level[0]) ? card->info.mcl_level : "",
(card->info.mcl_level[0]) ? ")" : "",
qeth_get_cardname_short(card));
} }
EXPORT_SYMBOL_GPL(qeth_print_status_message); EXPORT_SYMBOL_GPL(qeth_print_status_message);
......
...@@ -153,52 +153,17 @@ static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store); ...@@ -153,52 +153,17 @@ static DEVICE_ATTR(portno, 0644, qeth_dev_portno_show, qeth_dev_portno_store);
static ssize_t qeth_dev_portname_show(struct device *dev, static ssize_t qeth_dev_portname_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct qeth_card *card = dev_get_drvdata(dev); return sprintf(buf, "no portname required\n");
char portname[9] = {0, };
if (!card)
return -EINVAL;
if (card->info.portname_required) {
memcpy(portname, card->info.portname + 1, 8);
EBCASC(portname, 8);
return sprintf(buf, "%s\n", portname);
} else
return sprintf(buf, "no portname required\n");
} }
static ssize_t qeth_dev_portname_store(struct device *dev, static ssize_t qeth_dev_portname_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count) struct device_attribute *attr, const char *buf, size_t count)
{ {
struct qeth_card *card = dev_get_drvdata(dev); struct qeth_card *card = dev_get_drvdata(dev);
char *tmp;
int i, rc = 0;
if (!card)
return -EINVAL;
mutex_lock(&card->conf_mutex);
if ((card->state != CARD_STATE_DOWN) &&
(card->state != CARD_STATE_RECOVER)) {
rc = -EPERM;
goto out;
}
tmp = strsep((char **) &buf, "\n"); dev_warn_once(&card->gdev->dev,
if ((strlen(tmp) > 8) || (strlen(tmp) == 0)) { "portname is deprecated and is ignored\n");
rc = -EINVAL; return count;
goto out;
}
card->info.portname[0] = strlen(tmp);
/* for beauty reasons */
for (i = 1; i < 9; i++)
card->info.portname[i] = ' ';
strcpy(card->info.portname + 1, tmp);
ASCEBC(card->info.portname + 1, 8);
out:
mutex_unlock(&card->conf_mutex);
return rc ? rc : count;
} }
static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show, static DEVICE_ATTR(portname, 0644, qeth_dev_portname_show,
......
Markdown is supported
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