Commit 62d3f4af authored by David S. Miller's avatar David S. Miller

Merge branch 's390-qeyj-next'

Julian Wiedmann says:

====================
s390/qeth: updates 2021-06-11

please apply the following patch series for qeth to netdev's net-next tree.

This enables TX NAPI for those devices that didn't use it previously, so
that we can eventually rip out the qdio layer's internal interrupt
machinery.

Other than that it's just the normal mix of minor improvements and
cleanups.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents e5b0a1b7 953fb4dc
......@@ -137,7 +137,6 @@ struct slibe {
* @user0: user defineable value
* @res4: reserved paramater
* @user1: user defineable value
* @user2: user defineable value
*/
struct qaob {
u64 res0[6];
......@@ -152,8 +151,7 @@ struct qaob {
u16 dcount[QDIO_MAX_ELEMENTS_PER_BUFFER];
u64 user0;
u64 res4[2];
u64 user1;
u64 user2;
u8 user1[16];
} __attribute__ ((packed, aligned(256)));
/**
......
......@@ -417,13 +417,17 @@ enum qeth_qdio_out_buffer_state {
QETH_QDIO_BUF_EMPTY,
/* Filled by driver; owned by hardware in order to be sent. */
QETH_QDIO_BUF_PRIMED,
/* Discovered by the TX completion code: */
QETH_QDIO_BUF_PENDING,
/* Finished by the TX completion code: */
QETH_QDIO_BUF_NEED_QAOB,
/* Received QAOB notification on CQ: */
QETH_QDIO_BUF_QAOB_OK,
QETH_QDIO_BUF_QAOB_ERROR,
};
enum qeth_qaob_state {
QETH_QAOB_ISSUED,
QETH_QAOB_PENDING,
QETH_QAOB_DONE,
};
struct qeth_qaob_priv1 {
unsigned int state;
u8 queue_no;
};
struct qeth_qdio_out_buffer {
......@@ -433,9 +437,8 @@ struct qeth_qdio_out_buffer {
unsigned int frames;
unsigned int bytes;
struct sk_buff_head skb_list;
int is_header[QDIO_MAX_ELEMENTS_PER_BUFFER];
DECLARE_BITMAP(from_kmem_cache, QDIO_MAX_ELEMENTS_PER_BUFFER);
struct qeth_qdio_out_q *q;
struct list_head list_entry;
struct qaob *aob;
};
......@@ -483,6 +486,7 @@ struct qeth_out_q_stats {
u64 stopped;
u64 doorbell;
u64 coal_frames;
u64 completion_irq;
u64 completion_yield;
u64 completion_timer;
......@@ -526,6 +530,7 @@ struct qeth_qdio_out_q {
unsigned int coalesce_usecs;
unsigned int max_coalesced_frames;
unsigned int rescan_usecs;
};
#define qeth_for_each_output_queue(card, q, i) \
......@@ -612,7 +617,6 @@ struct qeth_channel {
struct ccw_device *ccwdev;
struct qeth_cmd_buffer *active_cmd;
enum qeth_channel_states state;
atomic_t irq_pending;
};
struct qeth_reply {
......@@ -662,11 +666,6 @@ static inline struct ccw1 *__ccw_from_cmd(struct qeth_cmd_buffer *iob)
return (struct ccw1 *)(iob->data + ALIGN(iob->length, 8));
}
static inline bool qeth_trylock_channel(struct qeth_channel *channel)
{
return atomic_cmpxchg(&channel->irq_pending, 0, 1) == 0;
}
/**
* OSA card related definitions
*/
......@@ -886,13 +885,24 @@ static inline bool qeth_card_hw_is_reachable(struct qeth_card *card)
return card->state == CARD_STATE_SOFTSETUP;
}
static inline bool qeth_use_tx_irqs(struct qeth_card *card)
{
return !IS_IQD(card);
}
static inline void qeth_unlock_channel(struct qeth_card *card,
struct qeth_channel *channel)
{
atomic_set(&channel->irq_pending, 0);
xchg(&channel->active_cmd, NULL);
wake_up(&card->wait_q);
}
static inline bool qeth_trylock_channel(struct qeth_channel *channel,
struct qeth_cmd_buffer *cmd)
{
return cmpxchg(&channel->active_cmd, NULL, cmd) == NULL;
}
struct qeth_trap_id {
__u16 lparnr;
char vmname[8];
......
This diff is collapsed.
......@@ -41,6 +41,7 @@ static const struct qeth_stats txq_stats[] = {
QETH_TXQ_STAT("Queue stopped", stopped),
QETH_TXQ_STAT("Doorbell", doorbell),
QETH_TXQ_STAT("IRQ for frames", coal_frames),
QETH_TXQ_STAT("Completion IRQ", completion_irq),
QETH_TXQ_STAT("Completion yield", completion_yield),
QETH_TXQ_STAT("Completion timer", completion_timer),
};
......@@ -79,10 +80,8 @@ static void qeth_add_stat_strings(u8 **data, const char *prefix,
{
unsigned int i;
for (i = 0; i < size; i++) {
snprintf(*data, ETH_GSTRING_LEN, "%s%s", prefix, stats[i].name);
*data += ETH_GSTRING_LEN;
}
for (i = 0; i < size; i++)
ethtool_sprintf(data, "%s%s", prefix, stats[i].name);
}
static int qeth_get_sset_count(struct net_device *dev, int stringset)
......
......@@ -805,8 +805,6 @@ static int qeth_l2_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
if (!netif_device_present(dev))
return -ENODEV;
if (!(priv->brport_hw_features))
return -EOPNOTSUPP;
nlmsg_for_each_attr(attr, nlh, sizeof(struct ifinfomsg), rem1) {
if (nla_type(attr) == IFLA_PROTINFO) {
......@@ -832,6 +830,16 @@ static int qeth_l2_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
return 0;
if (!bp_tb[IFLA_BRPORT_LEARNING_SYNC])
return -EINVAL;
if (!(priv->brport_hw_features & BR_LEARNING_SYNC)) {
NL_SET_ERR_MSG_ATTR(extack, bp_tb[IFLA_BRPORT_LEARNING_SYNC],
"Operation not supported by HW");
return -EOPNOTSUPP;
}
if (!IS_ENABLED(CONFIG_NET_SWITCHDEV)) {
NL_SET_ERR_MSG_ATTR(extack, bp_tb[IFLA_BRPORT_LEARNING_SYNC],
"Requires NET_SWITCHDEV");
return -EOPNOTSUPP;
}
enable = !!nla_get_u8(bp_tb[IFLA_BRPORT_LEARNING_SYNC]);
if (enable == !!(priv->brport_features & BR_LEARNING_SYNC))
......
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