Skip to content

Commit 7b419e6

Browse files
committed
Merge branch 's390-net-next'
Julian Wiedmann says: =================== s390/net: updates 2020-10-01 Patches 1-3 enable qeth to also support the .set_channels() ethtool callback for OSA devices. This completes support for the full range of device types. The other patches are just the usual mix of cleanups. (Even one for ctcm!) =================== Signed-off-by: David S. Miller <[email protected]>
2 parents 14c914f + 5506745 commit 7b419e6

File tree

9 files changed

+202
-160
lines changed

9 files changed

+202
-160
lines changed

drivers/s390/net/ctcm_fsms.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ extern const char *ctc_ch_state_names[];
159159

160160
void ctcm_ccw_check_rc(struct channel *ch, int rc, char *msg);
161161
void ctcm_purge_skb_queue(struct sk_buff_head *q);
162-
void fsm_action_nop(fsm_instance *fi, int event, void *arg);
163162

164163
/*
165164
* ----- non-static actions for ctcm channel statemachine -----

drivers/s390/net/ctcm_mpc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ static inline void ctcmpc_dump32(char *buf, int len)
228228
ctcmpc_dumpit(buf, 32);
229229
}
230230

231-
int ctcmpc_open(struct net_device *);
232231
void ctcm_ccw_check_rc(struct channel *, int, char *);
233232
void mpc_group_ready(unsigned long adev);
234233
void mpc_channel_action(struct channel *ch, int direction, int action);

drivers/s390/net/qeth_core.h

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ struct qeth_vnicc_info {
177177
/**
178178
* some more defs
179179
*/
180-
#define QETH_TX_TIMEOUT 100 * HZ
181-
#define QETH_RCD_TIMEOUT 60 * HZ
180+
#define QETH_TX_TIMEOUT (100 * HZ)
181+
#define QETH_RCD_TIMEOUT (60 * HZ)
182182
#define QETH_RECLAIM_WORK_TIME HZ
183183
#define QETH_MAX_PORTNO 15
184184

@@ -278,6 +278,26 @@ struct qeth_hdr {
278278
} hdr;
279279
} __attribute__ ((packed));
280280

281+
#define QETH_QIB_PQUE_ORDER_RR 0
282+
#define QETH_QIB_PQUE_UNITS_SBAL 2
283+
#define QETH_QIB_PQUE_PRIO_DEFAULT 4
284+
285+
struct qeth_qib_parms {
286+
char pcit_magic[4];
287+
u32 pcit_a;
288+
u32 pcit_b;
289+
u32 pcit_c;
290+
char blkt_magic[4];
291+
u32 blkt_total;
292+
u32 blkt_inter_packet;
293+
u32 blkt_inter_packet_jumbo;
294+
char pque_magic[4];
295+
u8 pque_order;
296+
u8 pque_units;
297+
u16 reserved;
298+
u32 pque_priority[4];
299+
};
300+
281301
/*TCP Segmentation Offload header*/
282302
struct qeth_hdr_ext_tso {
283303
__u16 hdr_tot_len;
@@ -481,6 +501,7 @@ struct qeth_qdio_out_q {
481501
struct qdio_outbuf_state *bufstates; /* convenience pointer */
482502
struct qeth_out_q_stats stats;
483503
spinlock_t lock;
504+
unsigned int priority;
484505
u8 next_buf_to_fill;
485506
u8 max_elements;
486507
u8 queue_no;
@@ -538,7 +559,7 @@ struct qeth_qdio_info {
538559
int in_buf_size;
539560

540561
/* output */
541-
int no_out_queues;
562+
unsigned int no_out_queues;
542563
struct qeth_qdio_out_q *out_qs[QETH_MAX_OUT_QUEUES];
543564
struct qdio_outbuf_state *out_bufstates;
544565

@@ -788,6 +809,7 @@ struct qeth_switch_info {
788809

789810
struct qeth_priv {
790811
unsigned int rx_copybreak;
812+
unsigned int tx_wanted_queues;
791813
u32 brport_hw_features;
792814
u32 brport_features;
793815
};
@@ -836,7 +858,7 @@ struct qeth_card {
836858
struct qeth_qdio_info qdio;
837859
int read_or_write_problem;
838860
struct qeth_osn_info osn_info;
839-
struct qeth_discipline *discipline;
861+
const struct qeth_discipline *discipline;
840862
atomic_t force_alloc_skb;
841863
struct service_level qeth_service_level;
842864
struct qdio_ssqd_desc ssqd;
@@ -870,8 +892,20 @@ struct qeth_trap_id {
870892
__u16 devno;
871893
} __packed;
872894

873-
/*some helper functions*/
874-
#define QETH_CARD_IFNAME(card) (((card)->dev)? (card)->dev->name : "")
895+
static inline bool qeth_uses_tx_prio_queueing(struct qeth_card *card)
896+
{
897+
return card->qdio.do_prio_queueing != QETH_NO_PRIO_QUEUEING;
898+
}
899+
900+
static inline unsigned int qeth_tx_actual_queues(struct qeth_card *card)
901+
{
902+
struct qeth_priv *priv = netdev_priv(card->dev);
903+
904+
if (qeth_uses_tx_prio_queueing(card))
905+
return min(card->dev->num_tx_queues, card->qdio.no_out_queues);
906+
907+
return min(priv->tx_wanted_queues, card->qdio.no_out_queues);
908+
}
875909

876910
static inline u16 qeth_iqd_translate_txq(struct net_device *dev, u16 txq)
877911
{
@@ -1014,8 +1048,8 @@ static inline int qeth_send_simple_setassparms_v6(struct qeth_card *card,
10141048

10151049
int qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb);
10161050

1017-
extern struct qeth_discipline qeth_l2_discipline;
1018-
extern struct qeth_discipline qeth_l3_discipline;
1051+
extern const struct qeth_discipline qeth_l2_discipline;
1052+
extern const struct qeth_discipline qeth_l3_discipline;
10191053
extern const struct ethtool_ops qeth_ethtool_ops;
10201054
extern const struct ethtool_ops qeth_osn_ethtool_ops;
10211055
extern const struct attribute_group *qeth_generic_attr_groups[];
@@ -1035,7 +1069,8 @@ extern struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS];
10351069

10361070
struct net_device *qeth_clone_netdev(struct net_device *orig);
10371071
struct qeth_card *qeth_get_card_by_busid(char *bus_id);
1038-
void qeth_set_allowed_threads(struct qeth_card *, unsigned long , int);
1072+
void qeth_set_allowed_threads(struct qeth_card *card, unsigned long threads,
1073+
int clear_start_mask);
10391074
int qeth_threads_running(struct qeth_card *, unsigned long);
10401075
int qeth_set_offline(struct qeth_card *card, bool resetting);
10411076

@@ -1087,7 +1122,6 @@ void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...);
10871122
int qeth_configure_cq(struct qeth_card *, enum qeth_cq);
10881123
int qeth_hw_trap(struct qeth_card *, enum qeth_diags_trap_action);
10891124
int qeth_setassparms_cb(struct qeth_card *, struct qeth_reply *, unsigned long);
1090-
int qeth_setup_netdev(struct qeth_card *card);
10911125
int qeth_set_features(struct net_device *, netdev_features_t);
10921126
void qeth_enable_hw_features(struct net_device *dev);
10931127
netdev_features_t qeth_fix_features(struct net_device *, netdev_features_t);

0 commit comments

Comments
 (0)