Commit 92d27209 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

s390/qeth: don't cache HW port number

The netdevice is always available now, so get the portno from there.
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d3d1b205
...@@ -658,7 +658,6 @@ struct qeth_card_info { ...@@ -658,7 +658,6 @@ 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 portno;
enum qeth_card_types type; enum qeth_card_types type;
enum qeth_link_types link_type; enum qeth_link_types link_type;
int initial_mtu; int initial_mtu;
......
...@@ -1920,7 +1920,7 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel, ...@@ -1920,7 +1920,7 @@ static int qeth_idx_activate_channel(struct qeth_channel *channel,
memcpy(QETH_TRANSPORT_HEADER_SEQ_NO(iob->data), memcpy(QETH_TRANSPORT_HEADER_SEQ_NO(iob->data),
&card->seqno.trans_hdr, QETH_SEQ_NO_LENGTH); &card->seqno.trans_hdr, QETH_SEQ_NO_LENGTH);
} }
tmp = ((__u8)card->info.portno) | 0x80; tmp = ((u8)card->dev->dev_port) | 0x80;
memcpy(QETH_IDX_ACT_PNO(iob->data), &tmp, 1); memcpy(QETH_IDX_ACT_PNO(iob->data), &tmp, 1);
memcpy(QETH_IDX_ACT_ISSUER_RM_TOKEN(iob->data), memcpy(QETH_IDX_ACT_ISSUER_RM_TOKEN(iob->data),
&card->token.issuer_rm_w, QETH_MPC_TOKEN_LENGTH); &card->token.issuer_rm_w, QETH_MPC_TOKEN_LENGTH);
...@@ -2389,8 +2389,7 @@ static int qeth_ulp_enable(struct qeth_card *card) ...@@ -2389,8 +2389,7 @@ static int qeth_ulp_enable(struct qeth_card *card)
iob = qeth_wait_for_buffer(&card->write); iob = qeth_wait_for_buffer(&card->write);
memcpy(iob->data, ULP_ENABLE, ULP_ENABLE_SIZE); memcpy(iob->data, ULP_ENABLE, ULP_ENABLE_SIZE);
*(QETH_ULP_ENABLE_LINKNUM(iob->data)) = *(QETH_ULP_ENABLE_LINKNUM(iob->data)) = (u8) card->dev->dev_port;
(__u8) card->info.portno;
if (card->options.layer2) if (card->options.layer2)
if (card->info.type == QETH_CARD_TYPE_OSN) if (card->info.type == QETH_CARD_TYPE_OSN)
prot_type = QETH_PROT_OSN2; prot_type = QETH_PROT_OSN2;
...@@ -2918,7 +2917,7 @@ static void qeth_fill_ipacmd_header(struct qeth_card *card, ...@@ -2918,7 +2917,7 @@ static void qeth_fill_ipacmd_header(struct qeth_card *card,
cmd->hdr.initiator = IPA_CMD_INITIATOR_HOST; cmd->hdr.initiator = IPA_CMD_INITIATOR_HOST;
/* cmd->hdr.seqno is set by qeth_send_control_data() */ /* cmd->hdr.seqno is set by qeth_send_control_data() */
cmd->hdr.adapter_type = qeth_get_ipa_adp_type(card->info.link_type); cmd->hdr.adapter_type = qeth_get_ipa_adp_type(card->info.link_type);
cmd->hdr.rel_adapter_no = (__u8) card->info.portno; cmd->hdr.rel_adapter_no = (u8) card->dev->dev_port;
if (card->options.layer2) if (card->options.layer2)
cmd->hdr.prim_version_no = 2; cmd->hdr.prim_version_no = 2;
else else
......
...@@ -112,7 +112,7 @@ static ssize_t qeth_dev_portno_show(struct device *dev, ...@@ -112,7 +112,7 @@ static ssize_t qeth_dev_portno_show(struct device *dev,
if (!card) if (!card)
return -EINVAL; return -EINVAL;
return sprintf(buf, "%i\n", card->info.portno); return sprintf(buf, "%i\n", card->dev->dev_port);
} }
static ssize_t qeth_dev_portno_store(struct device *dev, static ssize_t qeth_dev_portno_store(struct device *dev,
...@@ -143,7 +143,6 @@ static ssize_t qeth_dev_portno_store(struct device *dev, ...@@ -143,7 +143,6 @@ static ssize_t qeth_dev_portno_store(struct device *dev,
rc = -EINVAL; rc = -EINVAL;
goto out; goto out;
} }
card->info.portno = portno;
card->dev->dev_port = portno; card->dev->dev_port = portno;
out: out:
mutex_unlock(&card->conf_mutex); mutex_unlock(&card->conf_mutex);
......
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