s390/net: updates 2020-10-01
Subsystems (4)
cover s390/net: updates 2020-10-01
Hi Dave & Jakub,
please apply the following patch series to netdev's net-next tree.
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!)
Thanks,
Julian
Julian Wiedmann (6):
s390/qeth: keep track of wanted TX queues s390/qeth: de-magic the QIB parm area
s390/qeth: allow configuration of TX queues for OSA devices s390/qeth: constify the disciplines
s390/qeth: use netdev_name()
s390/qeth: static checker cleanups
Vasily Gorbik (1):
s390/ctcm: remove orphaned function declarations
drivers/s390/net/ctcm_fsms.h | 1 - drivers/s390/net/ctcm_mpc.h | 1 - drivers/s390/net/qeth_core.h | 54 ++++++++-- drivers/s390/net/qeth_core_main.c | 163 ++++++++++++++---------------- drivers/s390/net/qeth_core_sys.c | 6 +- drivers/s390/net/qeth_ethtool.c | 16 ++- drivers/s390/net/qeth_l2_main.c | 28 ++--- drivers/s390/net/qeth_l3_main.c | 85 +++++++++------- drivers/s390/net/qeth_l3_sys.c | 8 +- 9 files changed, 202 insertions(+), 160 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/7 s390/qeth: keep track of wanted TX queues
When re-initializing a device, we can hit a situation where qeth_osa_set_output_queues() detects that it supports more or less HW TX queues than before. Right now we adjust dev->real_num_tx_queues from right there, but
1. it's getting more & more complicated to cover all cases, and
2. we can't re-enable the actually expected number of TX queues later because we lost the needed information.
So keep track of the wanted TX queues (on initial setup, and whenever its changed via .set_channels), and later use that information when re-enabling the netdevice.
--- drivers/s390/net/qeth_core.h | 11 ++++- drivers/s390/net/qeth_core_main.c | 70 +++++++++++++------------------ drivers/s390/net/qeth_ethtool.c | 8 +++- drivers/s390/net/qeth_l2_main.c | 14 ++++--- drivers/s390/net/qeth_l3_main.c | 12 ++++-- 5 files changed, 61 insertions(+), 54 deletions(-)
drivers/s390/net/qeth_core.h +9 -2
@@ -538,7 +538,7 @@ struct qeth_qdio_info {int in_buf_size;/* output */ -int no_out_queues; +unsigned int no_out_queues;struct qeth_qdio_out_q *out_qs[QETH_MAX_OUT_QUEUES ];struct qdio_outbuf_state *out_bufstates;
@@ -788,6 +788,7 @@ struct qeth_switch_info {struct qeth_priv {unsigned int rx_copybreak; +unsigned int tx_wanted_queues;u32 brport_hw_features;u32 brport_features; };
@@ -873,6 +874,13 @@ struct qeth_trap_id {/*some helper functions*/ #define QETH_CARD_IFNAME (card) (((card)->dev)? (card)->dev->name : "") +static inline unsigned int qeth_tx_actual_queues (struct qeth_card *card) +{ +struct qeth_priv *priv =netdev_priv (card->dev); + +return min (priv->tx_wanted_queues, card->qdio.no_out_queues); +} +static inline u16 qeth_iqd_translate_txq (struct net_device *dev,u16 txq) {if (txq ==QETH_IQD_MCAST_TXQ )
@@ -1087,7 +1095,6 @@ void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...);int qeth_configure_cq (struct qeth_card *,enum qeth_cq );int qeth_hw_trap (struct qeth_card *,enum qeth_diags_trap_action );int qeth_setassparms_cb (struct qeth_card *,struct qeth_reply *,unsigned long ); -int qeth_setup_netdev (struct qeth_card *card);int qeth_set_features (struct net_device *,netdev_features_t );void qeth_enable_hw_features (struct net_device *dev);netdev_features_t qeth_fix_features (struct net_device *,netdev_features_t );
drivers/s390/net/qeth_core_main.c +29 -41
126 lines not on this page · raw message
drivers/s390/net/qeth_ethtool.c +7 -1
@@ -211,7 +211,9 @@ static void qeth_get_channels(struct net_device *dev,static int qeth_set_channels (struct net_device *dev,struct ethtool_channels *channels) { +struct qeth_priv *priv =netdev_priv (dev);struct qeth_card *card = dev->ml_priv; +int rc;if (channels->rx_count ==0 || channels->tx_count ==0 )return -EINVAL ;
@@ -234,7 +236,11 @@ static int qeth_set_channels(struct net_device *dev,return -EOPNOTSUPP ; } -return qeth_set_real_num_tx_queues (card, channels->tx_count); + rc =qeth_set_real_num_tx_queues (card, channels->tx_count); +if (!rc) + priv->tx_wanted_queues = channels->tx_count; + +return rc; } static int qeth_get_ts_info(struct net_device *dev,
drivers/s390/net/qeth_l2_main.c +8 -6
@@ -894,18 +894,12 @@ static const struct net_device_ops qeth_osn_netdev_ops = {static int qeth_l2_setup_netdev (struct qeth_card *card) { -int rc; -if (IS_OSN (card)) { card->dev->netdev_ops = &qeth_osn_netdev_ops; card->dev->flags |=IFF_NOARP ; goto add_napi; } - rc =qeth_setup_netdev (card); -if (rc) -return rc; - card->dev->needed_headroom =sizeof (struct qeth_hdr ); card->dev->netdev_ops = &qeth_l2_netdev_ops; card->dev->priv_flags |=IFF_UNICAST_FLT ;
@@ -2274,6 +2268,13 @@ static int qeth_l2_set_online(struct qeth_card *card, bool carrier_ok)netif_carrier_on (dev); }else {rtnl_lock (); + rc =qeth_set_real_num_tx_queues (card, +qeth_tx_actual_queues (card)); +if (rc) { +rtnl_unlock (); + goto err_set_queues; + } +if (carrier_ok)netif_carrier_on (dev);else
@@ -2291,6 +2292,7 @@ static int qeth_l2_set_online(struct qeth_card *card, bool carrier_ok) }return 0 ; +err_set_queues: err_setup:qeth_set_allowed_threads (card,0 ,1 ); card->state =CARD_STATE_DOWN ;
drivers/s390/net/qeth_l3_main.c +8 -4
@@ -1875,10 +1875,6 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)unsigned int headroom;int rc; - rc =qeth_setup_netdev (card); -if (rc) -return rc; -if (IS_OSD (card) ||IS_OSX (card)) { card->dev->netdev_ops = &qeth_l3_osa_netdev_ops;
@@ -2022,6 +2018,13 @@ static int qeth_l3_set_online(struct qeth_card *card, bool carrier_ok)netif_carrier_on (dev); }else {rtnl_lock (); + rc =qeth_set_real_num_tx_queues (card, +qeth_tx_actual_queues (card)); +if (rc) { +rtnl_unlock (); + goto err_set_queues; + } +if (carrier_ok)netif_carrier_on (dev);else
@@ -2038,6 +2041,7 @@ static int qeth_l3_set_online(struct qeth_card *card, bool carrier_ok) }return 0 ; +err_set_queues: err_setup:qeth_set_allowed_threads (card,0 ,1 ); card->state =CARD_STATE_DOWN ;
Signature · 1 line
2.17.1
PATCH 2/7 s390/qeth: de-magic the QIB parm area
In reply to Julian WiedmannUse a proper struct, and only program the QIB extensions for devices where they are supported.
--- drivers/s390/net/qeth_core.h | 11 ++++++ drivers/s390/net/qeth_core_main.c | 65 ++++++++++++++----------------- 2 files changed, 41 insertions(+), 35 deletions(-)
drivers/s390/net/qeth_core.h +11 -0
@@ -278,6 +278,17 @@ struct qeth_hdr { } hdr; } __attribute__ ((packed)); +struct qeth_qib_parms { +char pcit_magic[4 ]; +u32 pcit_a; +u32 pcit_b; +u32 pcit_c; +char blkt_magic[4 ]; +u32 blkt_total; +u32 blkt_inter_packet; +u32 blkt_inter_packet_jumbo; +}; +/*TCP Segmentation Offload header*/ struct qeth_hdr_ext_tso {__u16 hdr_tot_len;
drivers/s390/net/qeth_core_main.c +30 -35
97 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 3/7 s390/qeth: allow configuration of TX queues for OSA devices
In reply to Julian WiedmannFor OSA devices that are _not_ configured in prio-queue mode, give users the option of selecting the number of active TX queues.
This requires setting up the HW queues with a reasonable default QoS value in the QIB's PQUE parm area.
As with the other device types, we bring up the device with a minimal number of TX queues for compatibility reasons.
--- drivers/s390/net/qeth_core.h | 18 +++++++++++++++++ drivers/s390/net/qeth_core_main.c | 32 ++++++++++++++++++++----------- drivers/s390/net/qeth_core_sys.c | 4 +++- drivers/s390/net/qeth_ethtool.c | 8 ++++---- drivers/s390/net/qeth_l2_main.c | 5 +++-- drivers/s390/net/qeth_l3_main.c | 6 ++++-- 6 files changed, 53 insertions(+), 20 deletions(-)
drivers/s390/net/qeth_core.h +18 -0
@@ -278,6 +278,10 @@ struct qeth_hdr { } hdr; } __attribute__ ((packed)); +#define QETH_QIB_PQUE_ORDER_RR 0 +#define QETH_QIB_PQUE_UNITS_SBAL 2 +#define QETH_QIB_PQUE_PRIO_DEFAULT 4 +struct qeth_qib_parms {char pcit_magic[4 ];u32 pcit_a;
@@ -287,6 +291,11 @@ struct qeth_qib_parms {u32 blkt_total;u32 blkt_inter_packet;u32 blkt_inter_packet_jumbo; +char pque_magic[4 ]; +u8 pque_order; +u8 pque_units; +u16 reserved; +u32 pque_priority[4 ]; };/*TCP Segmentation Offload header*/
@@ -492,6 +501,7 @@ struct qeth_qdio_out_q {struct qdio_outbuf_state *bufstates;/* convenience pointer */ struct qeth_out_q_stats stats;spinlock_t lock; +unsigned int priority;u8 next_buf_to_fill;u8 max_elements;u8 queue_no;
@@ -885,10 +895,18 @@ struct qeth_trap_id {/*some helper functions*/ #define QETH_CARD_IFNAME (card) (((card)->dev)? (card)->dev->name : "") +static inline bool qeth_uses_tx_prio_queueing (struct qeth_card *card) +{ +return card->qdio.do_prio_queueing !=QETH_NO_PRIO_QUEUEING ; +} +static inline unsigned int qeth_tx_actual_queues (struct qeth_card *card) {struct qeth_priv *priv =netdev_priv (card->dev); +if (qeth_uses_tx_prio_queueing (card)) +return min (card->dev->num_tx_queues, card->qdio.no_out_queues); +return min (priv->tx_wanted_queues, card->qdio.no_out_queues); }
drivers/s390/net/qeth_core_main.c +21 -11
@@ -2683,6 +2683,7 @@ static int qeth_alloc_qdio_queues(struct qeth_card *card)timer_setup (&queue->timer, qeth_tx_completion_timer,0 ); queue->coalesce_usecs =QETH_TX_COALESCE_USECS ; queue->max_coalesced_frames =QETH_TX_MAX_COALESCED_FRAMES ; + queue->priority =QETH_QIB_PQUE_PRIO_DEFAULT ;/* give outbound qeth_qdio_buffers their qdio_buffers */ for (j =0 ; j <QDIO_MAX_BUFFERS_PER_Q ; ++j) {
@@ -2746,6 +2747,9 @@ static void qeth_free_qdio_queues(struct qeth_card *card)static void qeth_fill_qib_parms (struct qeth_card *card,struct qeth_qib_parms *parms) { +struct qeth_qdio_out_q *queue; +unsigned int i; + parms->pcit_magic[0 ] ='P' ; parms->pcit_magic[1 ] ='C' ; parms->pcit_magic[2 ] ='I' ;
@@ -2763,6 +2767,21 @@ static void qeth_fill_qib_parms(struct qeth_card *card, parms->blkt_total = card->info.blkt.time_total; parms->blkt_inter_packet = card->info.blkt.inter_packet; parms->blkt_inter_packet_jumbo = card->info.blkt.inter_packet_jumbo; + +/* Prio-queueing implicitly uses the default priorities: */ +if (qeth_uses_tx_prio_queueing (card) || card->qdio.no_out_queues ==1 ) +return ; + + parms->pque_magic[0 ] ='P' ; + parms->pque_magic[1 ] ='Q' ; + parms->pque_magic[2 ] ='U' ; + parms->pque_magic[3 ] ='E' ; +ASCEBC (parms->pque_magic,sizeof (parms->pque_magic)); + parms->pque_order =QETH_QIB_PQUE_ORDER_RR ; + parms->pque_units =QETH_QIB_PQUE_UNITS_SBAL ; + +qeth_for_each_output_queue (card, queue, i) + parms->pque_priority[i] = queue->priority; }static int qeth_qdio_activate (struct qeth_card *card)
@@ -5298,19 +5317,9 @@ static int qeth_set_online(struct qeth_card *card)qeth_print_status_message (card); -if (card->dev->reg_state !=NETREG_REGISTERED ) { -struct qeth_priv *priv =netdev_priv (card->dev); - -if (IS_IQD (card)) - priv->tx_wanted_queues =QETH_IQD_MIN_TXQ ; -else if (IS_VM_NIC (card)) - priv->tx_wanted_queues =1 ; -else - priv->tx_wanted_queues = card->dev->num_tx_queues; - +if (card->dev->reg_state !=NETREG_REGISTERED )/* no need for locking / error handling at this early stage: */ qeth_set_real_num_tx_queues (card,qeth_tx_actual_queues (card)); - } rc = card->discipline->set_online (card, carrier_ok);if (rc)
@@ -6236,6 +6245,7 @@ static struct net_device *qeth_alloc_netdev(struct qeth_card *card) priv =netdev_priv (dev); priv->rx_copybreak =QETH_RX_COPYBREAK ; + priv->tx_wanted_queues =IS_IQD (card) ?QETH_IQD_MIN_TXQ :1 ; dev->ml_priv = card; dev->watchdog_timeo =QETH_TX_TIMEOUT ;
drivers/s390/net/qeth_core_sys.c +3 -1
@@ -164,9 +164,11 @@ static ssize_t qeth_dev_prioqing_show(struct device *dev,return sprintf (buf,"%s\n" ,"by skb-priority" );case QETH_PRIO_Q_ING_VLAN :return sprintf (buf,"%s\n" ,"by VLAN headers" ); -default : +case QETH_PRIO_Q_ING_FIXED :return sprintf (buf,"always queue %i\n" , card->qdio.default_out_queue); +default : +return sprintf (buf,"disabled\n" ); } }
drivers/s390/net/qeth_ethtool.c +4 -4
@@ -220,6 +220,10 @@ static int qeth_set_channels(struct net_device *dev,if (channels->tx_count > card->qdio.no_out_queues)return -EINVAL ; +/* Prio-queueing needs all TX queues: */ +if (qeth_uses_tx_prio_queueing (card)) +return -EPERM ; +if (IS_IQD (card)) {if (channels->tx_count <QETH_IQD_MIN_TXQ )return -EINVAL ;
@@ -230,10 +234,6 @@ static int qeth_set_channels(struct net_device *dev,if (netif_running (dev) && channels->tx_count < dev->real_num_tx_queues)return -EPERM ; - }else { -/* OSA still uses the legacy prio-queue mechanism: */ -if (!IS_VM_NIC (card)) -return -EOPNOTSUPP ; } rc =qeth_set_real_num_tx_queues (card, channels->tx_count);
drivers/s390/net/qeth_l2_main.c +3 -2
@@ -571,9 +571,10 @@ static u16 qeth_l2_select_queue(struct net_device *dev, struct sk_buff *skb,return qeth_iqd_select_queue (dev, skb,qeth_get_ether_cast_type (skb), sb_dev); +if (qeth_uses_tx_prio_queueing (card)) +return qeth_get_priority_queue (card, skb); -return IS_VM_NIC (card) ?netdev_pick_tx (dev, skb, sb_dev) : -qeth_get_priority_queue (card, skb); +return netdev_pick_tx (dev, skb, sb_dev); }static void qeth_l2_set_rx_mode (struct net_device *dev)
drivers/s390/net/qeth_l3_main.c +4 -2
@@ -1831,8 +1831,10 @@ static u16 qeth_l3_osa_select_queue(struct net_device *dev, struct sk_buff *skb, {struct qeth_card *card = dev->ml_priv; -return IS_VM_NIC (card) ?netdev_pick_tx (dev, skb, sb_dev) : -qeth_get_priority_queue (card, skb); +if (qeth_uses_tx_prio_queueing (card)) +return qeth_get_priority_queue (card, skb); + +return netdev_pick_tx (dev, skb, sb_dev); }static const struct net_device_ops qeth_l3_netdev_ops = {
Signature · 1 line
2.17.1
PATCH 4/7 s390/qeth: constify the disciplines
In reply to Julian WiedmannThe discipline struct is a fixed group of function pointers. So declare the L2 and L3 disciplines as constant.
--- drivers/s390/net/qeth_core.h | 6 +++--- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/s390/net/qeth_core.h +3 -3
@@ -858,7 +858,7 @@ struct qeth_card {struct qeth_qdio_info qdio;int read_or_write_problem;struct qeth_osn_info osn_info; -struct qeth_discipline *discipline; +const struct qeth_discipline *discipline;atomic_t force_alloc_skb;struct service_level qeth_service_level;struct qdio_ssqd_desc ssqd;
@@ -1051,8 +1051,8 @@ static inline int qeth_send_simple_setassparms_v6(struct qeth_card *card,int qeth_get_priority_queue (struct qeth_card *card,struct sk_buff *skb); -extern struct qeth_discipline qeth_l2_discipline; -extern struct qeth_discipline qeth_l3_discipline; +extern const struct qeth_discipline qeth_l2_discipline; +extern const struct qeth_discipline qeth_l3_discipline;extern const struct ethtool_ops qeth_ethtool_ops;extern const struct ethtool_ops qeth_osn_ethtool_ops;extern const struct attribute_group *qeth_generic_attr_groups[];
drivers/s390/net/qeth_l2_main.c +1 -1
@@ -2340,7 +2340,7 @@ static int qeth_l2_control_event(struct qeth_card *card, } } -struct qeth_discipline qeth_l2_discipline = { +const struct qeth_discipline qeth_l2_discipline = { .devtype = &qeth_l2_devtype, .setup = qeth_l2_probe_device, .remove = qeth_l2_remove_device,
drivers/s390/net/qeth_l3_main.c +1 -1
@@ -2073,7 +2073,7 @@ static int qeth_l3_control_event(struct qeth_card *card,return 1 ; } -struct qeth_discipline qeth_l3_discipline = { +const struct qeth_discipline qeth_l3_discipline = { .devtype = &qeth_l3_devtype, .setup = qeth_l3_probe_device, .remove = qeth_l3_remove_device,
Signature · 1 line
2.17.1
PATCH 5/7 s390/qeth: use netdev_name()
In reply to Julian WiedmannReplace our custom version of netdev_name().
Once we started to allocate the netdev at probe time with commit d3d1b205e89f ("s390/qeth: allocate netdevice early"), this stopped working as intended anyway.
--- drivers/s390/net/qeth_core.h | 3 -- drivers/s390/net/qeth_core_main.c | 6 ++-- drivers/s390/net/qeth_core_sys.c | 2 +- drivers/s390/net/qeth_l2_main.c | 2 +- drivers/s390/net/qeth_l3_main.c | 58 ++++++++++++++++--------------- 5 files changed, 35 insertions(+), 36 deletions(-)
drivers/s390/net/qeth_core.h +0 -3
@@ -892,9 +892,6 @@ struct qeth_trap_id {__u16 devno; } __packed; -/*some helper functions*/ -#define QETH_CARD_IFNAME (card) (((card)->dev)? (card)->dev->name : "") -static inline bool qeth_uses_tx_prio_queueing (struct qeth_card *card) {return card->qdio.do_prio_queueing !=QETH_NO_PRIO_QUEUEING ;
drivers/s390/net/qeth_core_main.c +3 -3
@@ -915,12 +915,12 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card,if (cmd->hdr.return_code ==IPA_RC_VEPA_TO_VEB_TRANSITION ) {dev_err (&card->gdev->dev,"Interface %s is down because the adjacent port is no longer in reflective relay mode\n" , -QETH_CARD_IFNAME (card)); +netdev_name (card->dev));schedule_work (&card->close_dev_work); }else {dev_warn (&card->gdev->dev,"The link for interface %s on CHPID 0x%X failed\n" , -QETH_CARD_IFNAME (card), card->info.chpid); +netdev_name (card->dev), card->info.chpid);qeth_issue_ipa_msg (cmd, cmd->hdr.return_code, card);netif_carrier_off (card->dev); }
@@ -928,7 +928,7 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card,case IPA_CMD_STARTLAN :dev_info (&card->gdev->dev,"The link for %s on CHPID 0x%X has been restored\n" , -QETH_CARD_IFNAME (card), card->info.chpid); +netdev_name (card->dev), card->info.chpid);if (card->info.hwtrap) card->info.hwtrap =2 ;qeth_schedule_recovery (card);
drivers/s390/net/qeth_core_sys.c +1 -1
@@ -52,7 +52,7 @@ static ssize_t qeth_dev_if_name_show(struct device *dev, {struct qeth_card *card =dev_get_drvdata (dev); -return sprintf (buf,"%s\n" ,QETH_CARD_IFNAME (card)); +return sprintf (buf,"%s\n" ,netdev_name (card->dev)); } static DEVICE_ATTR(if_name, 0444, qeth_dev_if_name_show, NULL);
drivers/s390/net/qeth_l2_main.c +1 -1
@@ -1372,7 +1372,7 @@ static void qeth_addr_change_event_worker(struct work_struct *work)dev_info (&data->card->gdev->dev,"Address change notification stopped on %s (%s)\n" , - data->card->dev->name, +netdev_name (card->dev), (data->ac_event.lost_event_mask ==0x01 ) ?"Overflow" : (data->ac_event.lost_event_mask == 0x02)
drivers/s390/net/qeth_l3_main.c +30 -28
154 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 6/7 s390/qeth: static checker cleanups
In reply to Julian Wiedmann- Add/delete some blanks, white spaces and braces.
- Fix misindentations.
- Adjust a deprecated header include, and htons() conversion.
- Remove extra 'return' statements.
--- drivers/s390/net/qeth_core.h | 7 ++++--- drivers/s390/net/qeth_core_main.c | 18 +++++++++--------- drivers/s390/net/qeth_l2_main.c | 5 ++--- drivers/s390/net/qeth_l3_main.c | 7 +++---- drivers/s390/net/qeth_l3_sys.c | 8 ++++---- 5 files changed, 22 insertions(+), 23 deletions(-)
drivers/s390/net/qeth_core.h +4 -3
@@ -177,8 +177,8 @@ struct qeth_vnicc_info {/** * some more defs */ -#define QETH_TX_TIMEOUT 100 * HZ -#define QETH_RCD_TIMEOUT 60 * HZ +#define QETH_TX_TIMEOUT (100 * HZ) +#define QETH_RCD_TIMEOUT (60 * HZ)#define QETH_RECLAIM_WORK_TIME HZ#define QETH_MAX_PORTNO 15
@@ -1069,7 +1069,8 @@ extern struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS];struct net_device *qeth_clone_netdev (struct net_device *orig);struct qeth_card *qeth_get_card_by_busid (char *bus_id); -void qeth_set_allowed_threads (struct qeth_card *,unsigned long ,int ); +void qeth_set_allowed_threads (struct qeth_card *card,unsigned long threads, +int clear_start_mask);int qeth_threads_running (struct qeth_card *,unsigned long );int qeth_set_offline (struct qeth_card *card,bool resetting);
drivers/s390/net/qeth_core_main.c +9 -9
@@ -17,6 +17,7 @@#include <linux/errno.h> #include <linux/kernel.h> #include <linux/log2.h> +#include <linux/io.h> #include <linux/ip.h> #include <linux/tcp.h> #include <linux/mii.h>
@@ -35,7 +36,6 @@#include <asm/ebcdic.h> #include <asm/chpid.h> -#include <asm/io.h> #include <asm/sysinfo.h> #include <asm/diag.h> #include <asm/cio.h>
@@ -209,9 +209,8 @@ static void qeth_clear_working_pool_list(struct qeth_card *card)QETH_CARD_TEXT (card,5 ,"clwrklst" );list_for_each_entry_safe (pool_entry, tmp, - &card->qdio.in_buf_pool.entry_list, list){ -list_del (&pool_entry->list); - } + &card->qdio.in_buf_pool.entry_list, list) +list_del (&pool_entry->list);for (i =0 ; i <ARRAY_SIZE (queue->bufs); i++) queue->bufs[i].pool_entry =NULL ;
@@ -481,6 +480,7 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx, atomic_read(&c->state) == QETH_QDIO_BUF_HANDLED_DELAYED) {struct qeth_qdio_out_buffer *f = c; +QETH_CARD_TEXT (f->q->card,5 ,"fp" );QETH_CARD_TEXT_ (f->q->card,5 ,"%lx" , (long ) f);/* release here to avoid interleaving between
@@ -507,7 +507,6 @@ static void qeth_cleanup_handled_pending(struct qeth_qdio_out_q *q, int bidx, } } -static void qeth_qdio_handle_aob (struct qeth_card *card,unsigned long phys_aob_addr) {
@@ -884,6 +883,7 @@ static void qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, int rc, {const char *ipa_name;int com = cmd->hdr.command; + ipa_name =qeth_get_ipa_cmd_name (com);if (rc)
@@ -1253,7 +1253,7 @@ static int qeth_get_problem(struct qeth_card *card, struct ccw_device *cdev,return 0 ; }QETH_CARD_TEXT (card,2 ,"DGENCHK" ); -return -EIO ; +return -EIO ; }return 0 ; }
@@ -1600,7 +1600,7 @@ static void qeth_start_kernel_thread(struct work_struct *work)struct task_struct *ts; struct qeth_card *card = container_of(work, struct qeth_card, kernel_thread_starter); -QETH_CARD_TEXT (card ,2 ,"strthrd" ); +QETH_CARD_TEXT (card,2 ,"strthrd" );if (card->read.state !=CH_STATE_UP && card->write.state !=CH_STATE_UP )
@@ -3416,7 +3416,6 @@ static void qeth_get_trap_id(struct qeth_card *card, struct qeth_trap_id *tid)memcpy (tid->vmname, info322->vm[0 ].name,sizeof (tid->vmname)); }free_page (info); -return ; } static int qeth_hw_trap_cb(struct qeth_card *card,
@@ -4998,7 +4997,6 @@ static void qeth_determine_capabilities(struct qeth_card *card) card->options.cq =QETH_CQ_NOTAVAILABLE ; } - out_offline:if (ddev_offline ==1 )qeth_stop_channel (channel);
@@ -6050,6 +6048,7 @@ EXPORT_SYMBOL_GPL(qeth_send_simple_setassparms_prot);static void qeth_unregister_dbf_views (void ) {int x; +for (x =0 ; x <QETH_DBF_INFOS ; x++) {debug_unregister (qeth_dbf[x].id); qeth_dbf[x].id =NULL ;
@@ -6413,6 +6412,7 @@ static int qeth_core_set_offline(struct ccwgroup_device *gdev)static void qeth_core_shutdown (struct ccwgroup_device *gdev) {struct qeth_card *card =dev_get_drvdata (&gdev->dev); +qeth_set_allowed_threads (card,0 ,1 );if ((gdev->state ==CCWGROUP_ONLINE ) && card->info.hwtrap)qeth_hw_trap (card,QETH_DIAGS_TRAP_DISARM );
drivers/s390/net/qeth_l2_main.c +2 -3
@@ -183,7 +183,7 @@ static void qeth_l2_fill_header(struct qeth_qdio_out_q *queue,/* VSWITCH relies on the VLAN * information to be present in * the QDIO header */ -if (veth->h_vlan_proto ==__constant_htons (ETH_P_8021Q )) { +if (veth->h_vlan_proto ==htons (ETH_P_8021Q )) { hdr->hdr.l2.flags[2 ] |=QETH_LAYER2_FLAG_VLAN ; hdr->hdr.l2.vlan_id =ntohs (veth->h_vlan_TCI); }
@@ -877,7 +877,7 @@ static const struct net_device_ops qeth_l2_netdev_ops = { .ndo_set_mac_address = qeth_l2_set_mac_address, .ndo_vlan_rx_add_vid = qeth_l2_vlan_rx_add_vid, .ndo_vlan_rx_kill_vid = qeth_l2_vlan_rx_kill_vid, - .ndo_tx_timeout = qeth_tx_timeout, + .ndo_tx_timeout = qeth_tx_timeout, .ndo_fix_features = qeth_fix_features, .ndo_set_features = qeth_set_features, .ndo_bridge_getlink = qeth_l2_bridge_getlink,
@@ -1125,7 +1125,6 @@ void qeth_osn_deregister(struct net_device *dev)QETH_CARD_TEXT (card,2 ,"osndereg" ); card->osn_info.assist_cb =NULL ; card->osn_info.data_cb = NULL; - return; }EXPORT_SYMBOL (qeth_osn_deregister);#endif
drivers/s390/net/qeth_l3_main.c +3 -4
@@ -97,7 +97,7 @@ static bool qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card,return false;qeth_l3_convert_addr_to_bits ((u8 *) &addr->u, addr_bits, - (addr->proto ==QETH_PROT_IPV4 )?4 :16 ); + (addr->proto ==QETH_PROT_IPV4 ) ?4 :16 );list_for_each_entry (ipatoe, &card->ipato.entries, entry) {if (addr->proto != ipatoe->proto)continue ;
@@ -540,7 +540,7 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card,if (ipatoe->proto != new->proto)continue ;if (!memcmp (ipatoe->addr, new->addr, - (ipatoe->proto ==QETH_PROT_IPV4 )?4 :16 ) && + (ipatoe->proto ==QETH_PROT_IPV4 ) ?4 :16 ) && (ipatoe->mask_bits == new->mask_bits)) { rc = -EEXIST ;break ;
@@ -572,7 +572,7 @@ int qeth_l3_del_ipato_entry(struct qeth_card *card,if (ipatoe->proto != proto)continue ;if (!memcmp (ipatoe->addr, addr, - (proto ==QETH_PROT_IPV4 )?4 :16 ) && + (proto ==QETH_PROT_IPV4 ) ?4 :16 ) && (ipatoe->mask_bits == mask_bits)) {list_del (&ipatoe->entry);qeth_l3_update_ipato (card);
@@ -2139,7 +2139,6 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev)static int qeth_l3_ip_event (struct notifier_block *this,unsigned long event,void *ptr) { -struct in_ifaddr *ifa = (struct in_ifaddr *)ptr;struct net_device *dev = ifa->ifa_dev->dev;struct qeth_ipaddr addr;
drivers/s390/net/qeth_l3_sys.c +4 -4
@@ -285,7 +285,7 @@ static ssize_t qeth_l3_dev_ipato_enable_show(struct device *dev, {struct qeth_card *card =dev_get_drvdata (dev); -return sprintf (buf,"%i\n" , card->ipato.enabled?1 :0 ); +return sprintf (buf,"%u\n" , card->ipato.enabled ?1 :0 ); } static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev,
@@ -330,7 +330,7 @@ static ssize_t qeth_l3_dev_ipato_invert4_show(struct device *dev, {struct qeth_card *card =dev_get_drvdata (dev); -return sprintf (buf,"%i\n" , card->ipato.invert4?1 :0 ); +return sprintf (buf,"%u\n" , card->ipato.invert4 ?1 :0 ); } static ssize_t qeth_l3_dev_ipato_invert4_store(struct device *dev,
@@ -450,7 +450,7 @@ static ssize_t qeth_l3_dev_ipato_add_store(const char *buf, size_t count,return -ENOMEM ; ipatoe->proto = proto; -memcpy (ipatoe->addr, addr, (proto ==QETH_PROT_IPV4 )?4 :16 ); +memcpy (ipatoe->addr, addr, (proto ==QETH_PROT_IPV4 ) ?4 :16 ); ipatoe->mask_bits = mask_bits; rc =qeth_l3_add_ipato_entry (card, ipatoe);
@@ -501,7 +501,7 @@ static ssize_t qeth_l3_dev_ipato_invert6_show(struct device *dev, {struct qeth_card *card =dev_get_drvdata (dev); -return sprintf (buf,"%i\n" , card->ipato.invert6?1 :0 ); +return sprintf (buf,"%u\n" , card->ipato.invert6 ?1 :0 ); } static ssize_t qeth_l3_dev_ipato_invert6_store(struct device *dev,
Signature · 1 line
2.17.1
PATCH 7/7 s390/ctcm: remove orphaned function declarations
In reply to Julian WiedmannFrom: Vasily Gorbik <[email protected]>
drivers/s390/net/ctcm_fsms.h: fsm_action_nop - only declaration left after commit 04885948b101 ("ctc: removal of the old ctc driver")
drivers/s390/net/ctcm_mpc.h: ctcmpc_open - only declaration left after commit 293d984f0e36 ("ctcm: infrastructure for replaced ctc driver")
--- drivers/s390/net/ctcm_fsms.h | 1 - drivers/s390/net/ctcm_mpc.h | 1 - 2 files changed, 2 deletions(-)
drivers/s390/net/ctcm_fsms.h +0 -1
@@ -159,7 +159,6 @@ extern const char *ctc_ch_state_names[];void ctcm_ccw_check_rc (struct channel *ch,int rc,char *msg);void ctcm_purge_skb_queue (struct sk_buff_head *q); -void fsm_action_nop (fsm_instance *fi,int event,void *arg);/* * ----- non-static actions for ctcm channel statemachine -----
drivers/s390/net/ctcm_mpc.h +0 -1
@@ -228,7 +228,6 @@ static inline void ctcmpc_dump32(char *buf, int len)ctcmpc_dumpit (buf,32 ); } -int ctcmpc_open (struct net_device *);void ctcm_ccw_check_rc (struct channel *,int ,char *);void mpc_group_ready (unsigned long adev);void mpc_channel_action (struct channel *ch,int direction,int action);
Signature · 1 line
2.17.1
David Miller
maintainerFrom: Julian Wiedmann <[email protected]>
Date: Thu, 1 Oct 2020 19:11:29 +0200
Quoted 8 lines
please apply the following patch series to netdev's net-next tree.
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!)
Series applied, thanks.