s390: network feature patches for net-next
Subsystems (5)
cover s390: network feature patches for net-next
Hi Dave,
I have updated the hw_features patch with feedback from Michal and respined the patch set.
shortlog:
Frank Blaschka (2)
qeth: convert to hw_features part 2
qeth: add OSA concurrent hardware trap
Sebastian Ott (1)
qeth: add owner to ccw driver
Heiko Carstens (2)
claw: remove unused return code handling
lcs: get rid of compile warning
Ursula Braun (3)
ctcm: get rid of compile warning
iucv: get rid of compile warningaf_iucv: get rid of compile warning
KOSAKI Motohiro (1)
convert old cpumask API into new one
Thanks,
Frank
PATCH 1/9 qeth: convert to hw_features part 2
From: Frank Blaschka <[email protected]>
Set rx csum default to hw checksumming again.
Remove sysfs interface for rx csum (checksumming) and TSO (large_send). With the new hw_features it does not work to keep the old sysfs interface in parallel. Convert options.checksum_type to new hw_features.
--- drivers/s390/net/qeth_core.h | 1 drivers/s390/net/qeth_core_main.c | 1 drivers/s390/net/qeth_core_mpc.h | 8 -- drivers/s390/net/qeth_l2_main.c | 5 - drivers/s390/net/qeth_l3.h | 2 drivers/s390/net/qeth_l3_main.c | 109 +++++++++++++++++--------------------- drivers/s390/net/qeth_l3_sys.c | 106 ------------------------------------ 7 files changed, 52 insertions(+), 180 deletions(-)
drivers/s390/net/qeth_core.h +0 -1
@@ -639,7 +639,6 @@ struct qeth_card_options {struct qeth_ipa_info adp;/*Adapter parameters*/ struct qeth_routing_info route6;struct qeth_ipa_info ipa6; -enum qeth_checksum_types checksum_type;int broadcast_mode;int macaddr_mode;int fake_broadcast;
drivers/s390/net/qeth_core_main.c +0 -1
@@ -1039,7 +1039,6 @@ static void qeth_set_intial_options(stru { card->options.route4.type =NO_ROUTER ; card->options.route6.type =NO_ROUTER ; - card->options.checksum_type =QETH_CHECKSUM_DEFAULT ; card->options.broadcast_mode =QETH_TR_BROADCAST_ALLRINGS ; card->options.macaddr_mode =QETH_TR_MACADDR_NONCANONICAL ; card->options.fake_broadcast =0 ;
drivers/s390/net/qeth_core_mpc.h +0 -8
@@ -80,14 +80,6 @@ enum qeth_tr_broadcast_modes { QETH_TR_BROADCAST_LOCAL = 1, }; -/* these values match CHECKSUM_* in include/linux/skbuff.h */ -enum qeth_checksum_types { -SW_CHECKSUMMING =0 ,/* TODO: set to bit flag used in IPA Command */ -HW_CHECKSUMMING =1 , -NO_CHECKSUMMING =2 , -}; -#define QETH_CHECKSUM_DEFAULT SW_CHECKSUMMING -/* * Routing stuff */
drivers/s390/net/qeth_l2_main.c +1 -4
@@ -420,10 +420,7 @@ static int qeth_l2_process_inbound_buffecase QETH_HEADER_TYPE_LAYER2 : skb->pkt_type =PACKET_HOST ; skb->protocol =eth_type_trans (skb, skb->dev); -if (card->options.checksum_type ==NO_CHECKSUMMING ) - skb->ip_summed =CHECKSUM_UNNECESSARY ; -else - skb->ip_summed =CHECKSUM_NONE ; + skb->ip_summed =CHECKSUM_NONE ;if (skb->protocol ==htons (ETH_P_802_2 )) *((__u32 *)skb->cb) = ++card->seqno.pkt_seqno; len = skb->len;
drivers/s390/net/qeth_l3.h +0 -2
@@ -62,8 +62,6 @@ void qeth_l3_del_vipa(struct qeth_card *int qeth_l3_add_rxip (struct qeth_card *,enum qeth_prot_versions ,const u8 *);void qeth_l3_del_rxip (struct qeth_card *card,enum qeth_prot_versions ,const u8 *); -int qeth_l3_set_large_send (struct qeth_card *,enum qeth_large_send_types ); -int qeth_l3_set_rx_csum (struct qeth_card *,enum qeth_checksum_types );int qeth_l3_is_addr_covered_by_ipato (struct qeth_card *,struct qeth_ipaddr *);#endif /* __QETH_L3_H__ */
drivers/s390/net/qeth_l3_main.c +51 -58
181 lines not on this page · raw message
drivers/s390/net/qeth_l3_sys.c +0 -106
131 lines not on this page · raw message
Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
2011/5/12 <[email protected]>:
Quoted 6 lines
From: Frank Blaschka <[email protected]>
Set rx csum default to hw checksumming again.
Remove sysfs interface for rx csum (checksumming) and TSO (large_send). With the newhw_featuresit does not work to keep the old sysfs interface in parallel. Convert options.checksum_type to newhw_features.
[...]
Quoted 2 lines
+ /* hw may have changed during offline or recovery */
+ if (!qeth_is_supported(card,IPA_INBOUND_CHECKSUM)) {
[...]
This check should go to ndo_fix_features callback. If it fails then just return features &~NETIF_F_RXCSUM from there ...
Quoted 6 lines
+update_feature:
+rtnl_lock();
+card->dev->hw_features&= ~NETIF_F_RXCSUM;
+card->dev->features&= ~NETIF_F_RXCSUM;
+netdev_update_features(card->dev);
+rtnl_unlock();
... and then this should be just:rtnl_lock();netdev_update_features(card->dev);rtnl_unlock();
BTW, How is the recovery process protected from interface removal if it's not run under rtnl_lock?
Best Regards,
Michał Mirosław
Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
Quoted 22 lines · Michał Mirosław
2011/5/12 <[email protected]>:
Quoted 6 lines
From: Frank Blaschka <[email protected]>
Set rx csum default to hw checksumming again.
Remove sysfs interface for rx csum (checksumming) and TSO (large_send). With the newhw_featuresit does not work to keep the old sysfs interface in parallel. Convert options.checksum_type to newhw_features.[...]
Quoted 2 lines
+ /* hw may have changed during offline or recovery */
+ if (!qeth_is_supported(card,IPA_INBOUND_CHECKSUM)) {[...]
This check should go to
ndo_fix_featurescallback. If it fails then just return features &~NETIF_F_RXCSUM from there ...Quoted 6 lines
+update_feature:
+rtnl_lock();
+card->dev->hw_features&= ~NETIF_F_RXCSUM;
+card->dev->features&= ~NETIF_F_RXCSUM;
+netdev_update_features(card->dev);
+rtnl_unlock();
Quoted 5 lines
... and then this should be just:
rtnl_lock();netdev_update_features(card->dev);rtnl_unlock();
This code is part of the recovery, assuming the recovery detects the hw has lost it's rx csum capability I still don't understand how ndo_fix_features come into play?
Quoted 3 lines
BTW, How is the recovery process protected from interface removal if it's not run under
rtnl_lock?
The s/390 devices have a two stage device concept. For each netdevice there is a corresponding ccw_group device. Removing the netdevice is controlled by the ccw_group device. The recovery process is synchronized with the ccw_group device.
Quoted 6 lines
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
W dniu 12 maja 2011 09:21 użytkownik Frank Blaschka
Quoted 21 lines · <[email protected]> napisał:
Quoted 20 lines · Michał Mirosław
2011/5/12 <[email protected]>:
Quoted 4 lines
Set rx csum default to hw checksumming again.
Remove sysfs interface for rx csum (checksumming) and TSO (large_send). With the newhw_featuresit does not work to keep the old sysfs interface in parallel. Convert options.checksum_type to newhw_features.[...]
Quoted 2 lines
+ /* hw may have changed during offline or recovery */
+ if (!qeth_is_supported(card,IPA_INBOUND_CHECKSUM)) {[...]
This check should go to
ndo_fix_featurescallback. If it fails then just return features &~NETIF_F_RXCSUM from there ...Quoted 6 lines
+update_feature:
+rtnl_lock();
+card->dev->hw_features&= ~NETIF_F_RXCSUM;
+card->dev->features&= ~NETIF_F_RXCSUM;
+netdev_update_features(card->dev);
+rtnl_unlock();
Quoted 8 lines
Quoted 5 lines
... and then this should be just:
rtnl_lock();netdev_update_features(card->dev);rtnl_unlock();This code is part of the recovery, assuming the recovery detects the hw has lost it's rx csum capability I still don't understand how
ndo_fix_featurescome into play?
ndo_fix_features is always called before ndo_set_features to alter features that are to be enabled. So in this case, it should check if checksumming is available and remove NETIF_F_RXCSUM from the set if it isn't. The resulting set (after further cleanup by core code) is passed to ndo_set_features if the features had changed. hw_features only control what can be requested by user.
I assume that if the device can loose the checksumming capability during runtime, it can also regain it. Above solution will automatically reenable checksumming if its requested and the capability comes back.
Best Regards,
Michał Mirosław
Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
Quoted 16 lines · Michał Mirosław
W dniu 12 maja 2011 09:21 użytkownik Frank Blaschka
Quoted 14 lines · <[email protected]> napisał:
Quoted 13 lines · Michał Mirosław
2011/5/12 <[email protected]>:
Quoted 4 lines
Set rx csum default to hw checksumming again.
Remove sysfs interface for rx csum (checksumming) and TSO (large_send). With the newhw_featuresit does not work to keep the old sysfs interface in parallel. Convert options.checksum_type to newhw_features.[...]
Quoted 2 lines
+ /* hw may have changed during offline or recovery */
+ if (!qeth_is_supported(card,IPA_INBOUND_CHECKSUM)) {[...]
This check should go to
ndo_fix_featurescallback. If it fails then just return features &~NETIF_F_RXCSUM from there ...
Ok so all I have to do to complete this is to remove
card->dev->hw_features &= ~NETIF_F_RXCSUM;
from here (ndo_fix_feature has already the check)?
Since we might be in recovery it is smarter to keep the support check here so we do not have to use try and error approach to see if capabilities have changed. Do you aggree?
Quoted 34 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
+update_feature:
+rtnl_lock();
+card->dev->hw_features&= ~NETIF_F_RXCSUM;
+card->dev->features&= ~NETIF_F_RXCSUM;
+netdev_update_features(card->dev);
+rtnl_unlock();Quoted 8 lines
Quoted 5 lines
... and then this should be just:
rtnl_lock();netdev_update_features(card->dev);rtnl_unlock();This code is part of the recovery, assuming the recovery detects the hw has lost it's rx csum capability I still don't understand how
ndo_fix_featurescome into play?
ndo_fix_featuresis always called beforendo_set_featuresto alter features that are to be enabled. So in this case, it should check if checksumming is available and removeNETIF_F_RXCSUMfrom the set if it isn't. The resulting set (after further cleanup by core code) is passed tondo_set_featuresif the features had changed.hw_featuresonly control what can be requested by user.I assume that if the device can loose the checksumming capability during runtime, it can also regain it. Above solution will automatically reenable checksumming if its requested and the capability comes back.
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
W dniu 12 maja 2011 13:10 użytkownik Frank Blaschka
Quoted 17 lines · <[email protected]> napisał:
Quoted 16 lines · Michał Mirosław
W dniu 12 maja 2011 09:21 użytkownik Frank Blaschka
Quoted 14 lines · <[email protected]> napisał:
Quoted 13 lines · Michał Mirosław
2011/5/12 <[email protected]>:
Quoted 4 lines
Set rx csum default to hw checksumming again.
Remove sysfs interface for rx csum (checksumming) and TSO (large_send). With the newhw_featuresit does not work to keep the old sysfs interface in parallel. Convert options.checksum_type to newhw_features.[...]
Quoted 2 lines
+ /* hw may have changed during offline or recovery */
+ if (!qeth_is_supported(card,IPA_INBOUND_CHECKSUM)) {[...]
This check should go to
ndo_fix_featurescallback. If it fails then just return features &~NETIF_F_RXCSUM from there ...
Quoted 7 lines
Ok so all I have to do to complete this is to remove
card->dev->hw_features&= ~NETIF_F_RXCSUM; from here (ndo_fix_featurehas already the check)?Since we might be in recovery it is smarter to keep the support check here so we do not have to use try and error approach to see if capabilities have changed. Do you aggree?
The key is that the driver should call netdev_update_features() whenever some conditions affecting available features might have changed. If you can keep the checks contained inside ndo_fix_features callback, you can avoid caring about the offloads in the recovery process.
There's also the question what happens when packets are queued while there's ongoing recovery? Simplest way would be to drop them all until recovery completes.
Best Regards,
Michał Mirosław
Re: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
Quoted 27 lines · Michał Mirosław
W dniu 12 maja 2011 13:10 użytkownik Frank Blaschka
Quoted 17 lines · <[email protected]> napisał:
Quoted 16 lines · Michał Mirosław
W dniu 12 maja 2011 09:21 użytkownik Frank Blaschka
Quoted 14 lines · <[email protected]> napisał:
Quoted 13 lines · Michał Mirosław
2011/5/12 <[email protected]>:
Quoted 4 lines
Set rx csum default to hw checksumming again.
Remove sysfs interface for rx csum (checksumming) and TSO (large_send). With the newhw_featuresit does not work to keep the old sysfs interface in parallel. Convert options.checksum_type to newhw_features.[...]
Quoted 2 lines
+ /* hw may have changed during offline or recovery */
+ if (!qeth_is_supported(card,IPA_INBOUND_CHECKSUM)) {[...]
This check should go to
ndo_fix_featurescallback. If it fails then just return features &~NETIF_F_RXCSUM from there ...Quoted 7 lines
Ok so all I have to do to complete this is to remove
card->dev->hw_features&= ~NETIF_F_RXCSUM; from here (ndo_fix_featurehas already the check)?Since we might be in recovery it is smarter to keep the support check here so we do not have to use try and error approach to see if capabilities have changed. Do you aggree?
Quoted 5 lines
The key is that the driver should call
netdev_update_features()whenever some conditions affecting available features might have changed. If you can keep the checks contained insidendo_fix_featurescallback, you can avoid caring about the offloads in the recovery process.
Ok, we have this now.
Quoted 4 lines
There's also the question what happens when packets are queued while there's ongoing recovery? Simplest way would be to drop them all until recovery completes.
Since this is RX processing there is nothing queued during recovery. But you are right for tx csum or TSO we have to think about this. For now I would like to complete this patch.
Quoted 7 lines
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
David Miller
maintainerRe: [patch 1/9] [PATCH] qeth: convert to hw_features part 2
From: Frank Blaschka <[email protected]>
Date: Thu, 12 May 2011 13:59:59 +0200
Quoted 3 lines
Since this is RX processing there is nothing queued during recovery. But you are right for tx csum or TSO we have to think about this. For now I would like to complete this patch.
Can you guys resolve this quickly so that I can apply this patch series?
PATCH 2/9 qeth: add OSA concurrent hardware trap
In reply to [email protected]From: Frank Blaschka <[email protected]>
This patch improves FFDC (first failure data capture) by requesting a hardware trace in case the device driver, the hardware or a user detects an error.
---
drivers/s390/net/qeth_core.h | 18 ++++ drivers/s390/net/qeth_core_main.c | 148 ++++++++++++++++++++++++++++++++++++++ drivers/s390/net/qeth_core_mpc.h | 9 ++ drivers/s390/net/qeth_core_sys.c | 61 +++++++++++++++ drivers/s390/net/qeth_l2_main.c | 16 ++++ drivers/s390/net/qeth_l3_main.c | 53 ++++--------- 6 files changed, 268 insertions(+), 37 deletions(-)
drivers/s390/net/qeth_core.h +18 -0
@@ -631,6 +631,8 @@ struct qeth_card_info {__u32 csum_mask;__u32 tx_csum_mask;enum qeth_ipa_promisc_modes promisc_mode; +__u32 diagass_support; +__u32 hwtrap; };struct qeth_card_options {
@@ -752,6 +754,14 @@ struct qeth_card_list_struct {rwlock_t rwlock; }; +struct qeth_trap_id { +__u16 lparnr; +char vmname[8 ]; +__u8 chpid; +__u8 ssid; +__u16 devno; +} __packed; +/*some helper functions*/ #define QETH_CARD_IFNAME (card) (((card)->dev)? (card)->dev->name : "")
@@ -786,6 +796,12 @@ static inline void qeth_put_buffer_pool_list_add_tail (&entry->list, &card->qdio.in_buf_pool.entry_list); } +static inline int qeth_is_diagass_supported (struct qeth_card *card, +enum qeth_diags_cmds cmd) +{ +return card->info.diagass_support & (__u32 )cmd; +} +extern struct ccwgroup_driver qeth_l2_ccwgroup_driver;extern struct ccwgroup_driver qeth_l3_ccwgroup_driver;const char *qeth_get_cardname_short (struct qeth_card *);
@@ -871,6 +887,8 @@ void qeth_dbf_longtext(debug_info_t *id,int qeth_core_ethtool_get_settings (struct net_device *,struct ethtool_cmd *);int qeth_set_access_ctrl_online (struct qeth_card *card);int qeth_hdr_chk_and_bounce (struct sk_buff *,int ); +int qeth_hw_trap (struct qeth_card *,enum qeth_diags_trap_action ); +int qeth_query_ipassists (struct qeth_card *,enum qeth_prot_versions prot);/* exports for OSN */ int qeth_osn_assist (struct net_device *,void *,int );
drivers/s390/net/qeth_core_main.c +148 -0
172 lines not on this page · raw message
drivers/s390/net/qeth_core_mpc.h +8 -1
@@ -448,6 +448,12 @@ enum qeth_diags_trace_cmds { QETH_DIAGS_CMD_TRACE_QUERY = 0x0010, }; +enum qeth_diags_trap_action { +QETH_DIAGS_TRAP_ARM =0x01 , +QETH_DIAGS_TRAP_DISARM =0x02 , +QETH_DIAGS_TRAP_CAPTURE =0x04 , +}; +struct qeth_ipacmd_diagass {__u32 host_tod2; __u32:32;
@@ -457,7 +463,8 @@ struct qeth_ipacmd_diagass {__u8 type;__u8 action;__u16 options; - __u32:32 ; +__u32 ext; +__u8 cdata[64 ]; } __attribute__ ((packed));/* Header for each IPA command */
drivers/s390/net/qeth_core_sys.c +61 -0
73 lines not on this page · raw message
drivers/s390/net/qeth_l2_main.c +16 -0
@@ -876,6 +876,7 @@ static int qeth_l2_probe_device(struct cINIT_LIST_HEAD (&card->vid_list);INIT_LIST_HEAD (&card->mc_list); card->options.layer2 =1 ; + card->info.hwtrap =0 ; card->discipline.start_poll = qeth_qdio_start_poll; card->discipline.input_handler = (qdio_handler_t *) qeth_qdio_input_handler;
@@ -994,6 +995,13 @@ static int __qeth_l2_set_online(struct cif (card->info.type !=QETH_CARD_TYPE_OSN )qeth_l2_send_setmac (card, &card->dev->dev_addr[0 ]); +if (qeth_is_diagass_supported (card,QETH_DIAGS_CMD_TRAP )) { +if (card->info.hwtrap && +qeth_hw_trap (card,QETH_DIAGS_TRAP_ARM )) + card->info.hwtrap =0 ; + }else + card->info.hwtrap =0 ; + card->state =CARD_STATE_HARDSETUP ;memset (&card->rx,0 ,sizeof (struct qeth_rx ));qeth_print_status_message (card);
@@ -1092,6 +1100,10 @@ static int __qeth_l2_set_offline(structif (card->dev &&netif_carrier_ok (card->dev))netif_carrier_off (card->dev); recover_flag = card->state; +if ((!recovery_mode && card->info.hwtrap) || card->info.hwtrap ==2 ) { +qeth_hw_trap (card,QETH_DIAGS_TRAP_DISARM ); + card->info.hwtrap =1 ; + }qeth_l2_stop_card (card, recovery_mode); rc =ccw_device_set_offline (CARD_DDEV (card)); rc2 =ccw_device_set_offline (CARD_WDEV (card));
@@ -1157,6 +1169,8 @@ static void __exit qeth_l2_exit(void)static void qeth_l2_shutdown (struct ccwgroup_device *gdev) {struct qeth_card *card =dev_get_drvdata (&gdev->dev); +if ((gdev->state ==CCWGROUP_ONLINE ) && card->info.hwtrap) +qeth_hw_trap (card,QETH_DIAGS_TRAP_DISARM );qeth_qdio_clear_card (card,0 );qeth_clear_qdio_buffers (card); }
@@ -1172,6 +1186,8 @@ static int qeth_l2_pm_suspend(struct ccwif (gdev->state ==CCWGROUP_OFFLINE )return 0 ;if (card->state ==CARD_STATE_UP ) { +if (card->info.hwtrap) +qeth_hw_trap (card,QETH_DIAGS_TRAP_DISARM );__qeth_l2_set_offline (card->gdev,1 ); }else __qeth_l2_set_offline (card->gdev,0 );
drivers/s390/net/qeth_l3_main.c +17 -36
100 lines not on this page · raw message
PATCH 3/9 qeth: add owner to ccw driver
In reply to [email protected]From: Sebastian Ott <[email protected]>
Fill in the owner of qeth's ccw device driver.
---
drivers/s390/net/qeth_core_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/s390/net/qeth_core_main.c +1 -0
@@ -4041,6 +4041,7 @@ MODULE_DEVICE_TABLE(ccw, qeth_ids);static struct ccw_driver qeth_ccw_driver = { .driver = { + .owner =THIS_MODULE , .name ="qeth" , }, .ids = qeth_ids,
PATCH 4/9 claw: remove unused return code handling
In reply to [email protected]From: Heiko Carstens <[email protected]>
Remove unused return code handling. The claw driver is mostly dead, so just make sure it keeps compiling without warnings.
---
drivers/s390/net/claw.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-)
drivers/s390/net/claw.c +3 -19
@@ -845,12 +845,10 @@ claw_irq_tasklet ( unsigned long data ) {struct chbk * p_ch;struct net_device *dev; -struct claw_privbk * privptr; p_ch = (struct chbk *) data; dev = (struct net_device *)p_ch->ndev;CLAW_DBF_TEXT (4 , trace,"IRQtask" ); - privptr = (struct claw_privbk *)dev->ml_priv;unpack_read (dev);clear_bit (CLAW_BH_ACTIVE , (void *)&p_ch->flag_a);CLAW_DBF_TEXT (4 , trace,"TskletXt" );
@@ -1026,7 +1024,6 @@ claw_write_next ( struct chbk * p_ch )struct net_device *dev;struct claw_privbk *privptr=NULL ;struct sk_buff *pk_skb; -int rc;CLAW_DBF_TEXT (4 , trace,"claw_wrt" );if (p_ch->claw_state ==CLAW_STOP )
@@ -1038,7 +1035,7 @@ claw_write_next ( struct chbk * p_ch ) !skb_queue_empty(&p_ch->collect_queue)) { pk_skb =claw_pack_skb (privptr);while (pk_skb !=NULL ) { - rc =claw_hw_tx ( pk_skb, dev,1 ); +claw_hw_tx (pk_skb, dev,1 );if (privptr->write_free_count >0 ) { pk_skb =claw_pack_skb (privptr); }else
@@ -1322,15 +1319,12 @@ claw_hw_tx(struct sk_buff *skb, struct nunsigned char *pDataAddress;struct endccw *pEnd;struct ccw1 tempCCW; -struct chbk *p_ch;struct claw_env *p_env; -int lock;struct clawph *pk_head;struct chbk *ch;CLAW_DBF_TEXT (4 , trace,"hw_tx" ); privptr = (struct claw_privbk *)(dev->ml_priv); - p_ch = (struct chbk *)&privptr->channel[WRITE_CHANNEL ]; p_env =privptr->p_env;claw_free_wrt_buf (dev);/* Clean up free chain if posible */ /* scan the write queue to free any completed write packets */
@@ -1511,12 +1505,6 @@ claw_hw_tx(struct sk_buff *skb, struct n }/* endif (p_first_ccw!=NULL) */ dev_kfree_skb_any (skb); -if (linkid==0 ) { - lock=LOCK_NO ; - } -else { - lock=LOCK_YES ; - }claw_strt_out_IO (dev );/* if write free count is zero , set NOBUFFER */ if (privptr->write_free_count==0 ) {
@@ -2821,15 +2809,11 @@ claw_free_wrt_buf( struct net_device *de {struct claw_privbk *privptr = (struct claw_privbk *)dev->ml_priv; -struct ccwbk *p_first_ccw; -struct ccwbk *p_last_ccw;struct ccwbk *p_this_ccw;struct ccwbk *p_next_ccw;CLAW_DBF_TEXT (4 , trace,"freewrtb" );/* scan the write queue to free any completed write packets */ - p_first_ccw=NULL ; - p_last_ccw=NULL ; p_this_ccw=privptr->p_write_active_first;while ( (p_this_ccw!=NULL ) && (p_this_ccw->header.flag!=CLAW_PENDING )) {
@@ -3072,7 +3056,7 @@ claw_shutdown_device(struct ccwgroup_dev {struct claw_privbk *priv;struct net_device *ndev; -int ret; +int ret =0 ;CLAW_DBF_TEXT_ (2 , setup,"%s" ,dev_name (&cgdev->dev)); priv =dev_get_drvdata (&cgdev->dev);
@@ -3095,7 +3079,7 @@ claw_shutdown_device(struct ccwgroup_dev }ccw_device_set_offline (cgdev->cdev[1 ]);ccw_device_set_offline (cgdev->cdev[0 ]); -return 0 ; +return ret; } static void
PATCH 5/9 lcs: get rid of compile warning
In reply to [email protected]From: Heiko Carstens <[email protected]>
-Wunused-but-set-variable generates a compile warning for lcs' tasklet function. Invoked functions contain already error handling; thus additional return code checking is not needed here.
---
drivers/s390/net/lcs.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/s390/net/lcs.c +3 -7
@@ -1483,7 +1483,6 @@ lcs_tasklet(unsigned long data)struct lcs_channel *channel;struct lcs_buffer *iob;int buf_idx; -int rc; channel = (struct lcs_channel *) data;LCS_DBF_TEXT_ (5 , trace,"tlet%s" ,dev_name (&channel->ccwdev->dev));
@@ -1500,14 +1499,11 @@ lcs_tasklet(unsigned long data) channel->buf_idx = buf_idx;if (channel->state ==LCS_CH_STATE_STOPPED ) -// FIXME: what if rc != 0 ?? - rc =lcs_start_channel (channel); +lcs_start_channel (channel);spin_lock_irqsave (get_ccwdev_lock (channel->ccwdev), flags);if (channel->state ==LCS_CH_STATE_SUSPENDED && - channel->iob[channel->io_idx].state ==LCS_BUF_STATE_READY ) { -// FIXME: what if rc != 0 ?? - rc =__lcs_resume_channel (channel); - } + channel->iob[channel->io_idx].state ==LCS_BUF_STATE_READY ) +__lcs_resume_channel (channel);spin_unlock_irqrestore (get_ccwdev_lock (channel->ccwdev), flags);/* Something happened on the channel. Wake up waiters. */
PATCH 6/9 ctcm: get rid of compile warning
In reply to [email protected]From: Ursula Braun <[email protected]>
-Wunused-but-set-variable generates compile warnings. The affected variables are removed.
---
drivers/s390/net/ctcm_main.c | 2 -- drivers/s390/net/ctcm_mpc.c | 13 ++++--------- 2 files changed, 4 insertions(+), 11 deletions(-)
drivers/s390/net/ctcm_main.c +0 -2
@@ -672,7 +672,6 @@ static int ctcmpc_transmit_skb(struct chint ccw_idx;unsigned long hi;unsigned long saveflags =0 ;/* avoids compiler warning */ -__u16 block_len; CTCM_PR_DEBUG("Enter %s: %s, cp=%i ch=0x%p id=%s state=%s\n", __func__, dev->name, smp_processor_id(), ch,
@@ -719,7 +718,6 @@ static int ctcmpc_transmit_skb(struct ch*/ atomic_inc (&skb->users); - block_len = skb->len +TH_HEADER_LENGTH +PDU_HEADER_LENGTH ;/* * IDAL support in CTCM is broken, so we have to * care about skb's above 2G ourselves.
drivers/s390/net/ctcm_mpc.c +4 -9
@@ -653,7 +653,6 @@ static void ctcmpc_send_sweep_resp(strucstruct net_device *dev = rch->netdev;struct ctcm_priv *priv = dev->ml_priv;struct mpc_group *grp = priv->mpcg; -int rc =0 ;struct th_sweep *header;struct sk_buff *sweep_skb;struct channel *ch = priv->channel[CTCM_WRITE ];
@@ -665,16 +664,14 @@ static void ctcmpc_send_sweep_resp(strucCTCM_DBF_TEXT_ (MPC_ERROR ,CTC_DBF_ERROR ,"%s(%s): sweep_skb allocation ERROR\n" ,CTCM_FUNTAIL , rch->id); - rc = -ENOMEM ; - goto done; + goto done; } header =kmalloc (sizeof (struct th_sweep ),gfp_type ());if (!header) {dev_kfree_skb_any (sweep_skb); - rc = -ENOMEM ; - goto done; + goto done; } header->th.th_seg =0x00 ;
@@ -1370,8 +1367,7 @@ static void mpc_action_go_inop(fsm_instastruct net_device *dev = arg;struct ctcm_priv *priv;struct mpc_group *grp; -int rc =0 ; -struct channel *wch, *rch; +struct channel *wch;BUG_ON (dev ==NULL );CTCM_PR_DEBUG ("Enter %s: %s\n" , __func__, dev->name);
@@ -1396,7 +1392,6 @@ static void mpc_action_go_inop(fsm_instafsm_deltimer (&priv->restart_timer); wch = priv->channel[CTCM_WRITE ]; - rch = priv->channel[CTCM_READ ];switch (grp->saved_state) {case MPCG_STATE_RESET :
@@ -1435,7 +1430,7 @@ static void mpc_action_go_inop(fsm_instaif (grp->send_qllc_disc ==1 ) { grp->send_qllc_disc =0 ; - rc =mpc_send_qllc_discontact (dev); +mpc_send_qllc_discontact (dev); }/* DO NOT issue DEV_EVENT_STOP directly out of this code */
PATCH 7/9 iucv: get rid of compile warning
In reply to [email protected]From: Ursula Braun <[email protected]>
-Wunused-but-set-variable generates a compile warning. The affected variable is removed.
---
net/iucv/iucv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/iucv/iucv.c +2 -2
@@ -828,14 +828,14 @@ EXPORT_SYMBOL(iucv_unregister);static int iucv_reboot_event (struct notifier_block *this,unsigned long event,void *ptr) { -int i, rc; +int i;get_online_cpus ();on_each_cpu (iucv_block_cpu,NULL ,1 );preempt_disable ();for (i =0 ; i < iucv_max_pathid; i++) {if (iucv_path_table[i]) - rc =iucv_sever_pathid (i,NULL ); +iucv_sever_pathid (i,NULL ); }preempt_enable ();put_online_cpus ();
PATCH 8/9 af_iucv: get rid of compile warning
In reply to [email protected]From: Ursula Braun <[email protected]>
-Wunused-but-set-variable generates compile warnings. The affected variables are removed.
---
net/iucv/af_iucv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
net/iucv/af_iucv.c +2 -7
@@ -190,7 +190,6 @@ static int afiucv_pm_freeze(struct devic*/ static int afiucv_pm_restore_thaw (struct device *dev) { -struct iucv_sock *iucv;struct sock *sk;struct hlist_node *node;
@@ -199,7 +198,6 @@ static int afiucv_pm_restore_thaw(struct#endif read_lock (&iucv_sk_list.lock);sk_for_each (sk, node, &iucv_sk_list.head) { - iucv =iucv_sk (sk);switch (sk->sk_state) {case IUCV_CONNECTED : sk->sk_err =EPIPE ;
@@ -381,7 +379,6 @@ static void iucv_sock_close(struct sock {unsigned char user_data[16 ];struct iucv_sock *iucv =iucv_sk (sk); -int err;unsigned long timeo;iucv_sock_clear_timer (sk);
@@ -394,8 +391,6 @@ static void iucv_sock_close(struct sockcase IUCV_CONNECTED :case IUCV_DISCONN : - err =0 ; - sk->sk_state =IUCV_CLOSING ; sk->sk_state_change (sk);
@@ -404,7 +399,7 @@ static void iucv_sock_close(struct sock timeo = sk->sk_lingertime; else timeo =IUCV_DISCONN_TIMEOUT ; - err =iucv_sock_wait (sk, +iucv_sock_wait (sk,iucv_sock_in_state (sk,IUCV_CLOSED ,0 ), timeo); }
@@ -417,7 +412,7 @@ static void iucv_sock_close(struct socklow_nmcpy (user_data, iucv->src_name);high_nmcpy (user_data, iucv->dst_name);ASCEBC (user_data,sizeof (user_data)); - err =iucv_path_sever (iucv->path, user_data); +iucv_path_sever (iucv->path, user_data);iucv_path_free (iucv->path); iucv->path =NULL ; }
PATCH 9/9 convert old cpumask API into new one
In reply to [email protected]From: KOSAKI Motohiro <[email protected]>
Adapt new API.
---
net/iucv/iucv.c | 73 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 36 deletions(-)
net/iucv/iucv.c +37 -36
@@ -128,8 +128,8 @@ struct iucv_irq_list { };static struct iucv_irq_data *iucv_irq_data[NR_CPUS ]; -static cpumask_t iucv_buffer_cpumask =CPU_MASK_NONE ; -static cpumask_t iucv_irq_cpumask =CPU_MASK_NONE ; +static cpumask_t iucv_buffer_cpumask = {CPU_BITS_NONE }; +static cpumask_t iucv_irq_cpumask = {CPU_BITS_NONE };/* * Queue of interrupt buffers lock for delivery via the tasklet
@@ -406,7 +406,7 @@ static void iucv_allow_cpu(void *data) parm->set_mask.ipmask =0xf8 ;iucv_call_b2f0 (IUCV_SETCONTROLMASK , parm);/* Set indication that iucv interrupts are allowed for this cpu. */ -cpu_set (cpu, iucv_irq_cpumask); +cpumask_set_cpu (cpu, &iucv_irq_cpumask); }/**
@@ -426,7 +426,7 @@ static void iucv_block_cpu(void *data)iucv_call_b2f0 (IUCV_SETMASK , parm);/* Clear indication that iucv interrupts are allowed for this cpu. */ -cpu_clear (cpu, iucv_irq_cpumask); +cpumask_clear_cpu (cpu, &iucv_irq_cpumask); }/**
@@ -451,7 +451,7 @@ static void iucv_block_cpu_almost(void *iucv_call_b2f0 (IUCV_SETCONTROLMASK , parm);/* Clear indication that iucv interrupts are allowed for this cpu. */ -cpu_clear (cpu, iucv_irq_cpumask); +cpumask_clear_cpu (cpu, &iucv_irq_cpumask); }/**
@@ -466,7 +466,7 @@ static void iucv_declare_cpu(void *data)union iucv_param *parm;int rc; -if (cpu_isset (cpu, iucv_buffer_cpumask)) +if (cpumask_test_cpu (cpu, &iucv_buffer_cpumask))return ;/* Declare interrupt buffer. */
@@ -499,9 +499,9 @@ static void iucv_declare_cpu(void *data) }/* Set indication that an iucv buffer exists for this cpu. */ -cpu_set (cpu, iucv_buffer_cpumask); +cpumask_set_cpu (cpu, &iucv_buffer_cpumask); -if (iucv_nonsmp_handler ==0 ||cpus_empty (iucv_irq_cpumask)) +if (iucv_nonsmp_handler ==0 ||cpumask_empty (&iucv_irq_cpumask))/* Enable iucv interrupts on this cpu. */ iucv_allow_cpu (NULL );else
@@ -520,7 +520,7 @@ static void iucv_retrieve_cpu(void *dataint cpu =smp_processor_id ();union iucv_param *parm; -if (!cpu_isset (cpu, iucv_buffer_cpumask)) +if (!cpumask_test_cpu (cpu, &iucv_buffer_cpumask))return ;/* Block iucv interrupts. */
@@ -531,7 +531,7 @@ static void iucv_retrieve_cpu(void *dataiucv_call_b2f0 (IUCV_RETRIEVE_BUFFER , parm);/* Clear indication that an iucv buffer exists for this cpu. */ -cpu_clear (cpu, iucv_buffer_cpumask); +cpumask_clear_cpu (cpu, &iucv_buffer_cpumask); }/**
@@ -546,8 +546,8 @@ static void iucv_setmask_mp(void)get_online_cpus ();for_each_online_cpu (cpu)/* Enable all cpus with a declared buffer. */ -if (cpu_isset (cpu, iucv_buffer_cpumask) && - !cpu_isset (cpu, iucv_irq_cpumask)) +if (cpumask_test_cpu (cpu, &iucv_buffer_cpumask) && + !cpumask_test_cpu (cpu, &iucv_irq_cpumask))smp_call_function_single (cpu, iucv_allow_cpu,NULL ,1 );put_online_cpus ();
@@ -564,9 +564,9 @@ static void iucv_setmask_up(void)int cpu;/* Disable all cpu but the first in cpu_irq_cpumask. */ - cpumask = iucv_irq_cpumask; -cpu_clear (first_cpu (iucv_irq_cpumask), cpumask); -for_each_cpu_mask_nr (cpu, cpumask) +cpumask_copy (&cpumask, &iucv_irq_cpumask); +cpumask_clear_cpu (cpumask_first (&iucv_irq_cpumask), &cpumask); +for_each_cpu (cpu, &cpumask)smp_call_function_single (cpu, iucv_block_cpu,NULL ,1 ); }
@@ -593,7 +593,7 @@ static int iucv_enable(void) rc = -EIO ;for_each_online_cpu (cpu)smp_call_function_single (cpu, iucv_declare_cpu,NULL ,1 ); -if (cpus_empty (iucv_buffer_cpumask)) +if (cpumask_empty (&iucv_buffer_cpumask))/* No cpu could declare an iucv buffer. */ goto out;put_online_cpus ();
@@ -675,15 +675,16 @@ static int __cpuinit iucv_cpu_notify(strcase CPU_DOWN_PREPARE_FROZEN :if (!iucv_path_table)break ; - cpumask = iucv_buffer_cpumask; -cpu_clear (cpu, cpumask); -if (cpus_empty (cpumask)) +cpumask_copy (&cpumask, &iucv_buffer_cpumask); +cpumask_clear_cpu (cpu, &cpumask); +if (cpumask_empty (&cpumask))/* Can't offline last IUCV enabled cpu. */ return notifier_from_errno (-EINVAL );smp_call_function_single (cpu, iucv_retrieve_cpu,NULL ,1 ); -if (cpus_empty (iucv_irq_cpumask)) -smp_call_function_single (first_cpu (iucv_buffer_cpumask), - iucv_allow_cpu,NULL ,1 ); +if (cpumask_empty (&iucv_irq_cpumask)) +smp_call_function_single ( +cpumask_first (&iucv_buffer_cpumask), + iucv_allow_cpu,NULL ,1 );break ; }return NOTIFY_OK ;
@@ -866,7 +867,7 @@ int iucv_path_accept(struct iucv_path *pint rc;local_bh_disable (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -915,7 +916,7 @@ int iucv_path_connect(struct iucv_path *spin_lock_bh (&iucv_table_lock);iucv_cleanup_queue (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -975,7 +976,7 @@ int iucv_path_quiesce(struct iucv_path *int rc;local_bh_disable (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1007,7 +1008,7 @@ int iucv_path_resume(struct iucv_path *pint rc;local_bh_disable (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1036,7 +1037,7 @@ int iucv_path_sever(struct iucv_path *paint rc;preempt_disable (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1070,7 +1071,7 @@ int iucv_message_purge(struct iucv_pathint rc;local_bh_disable (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1162,7 +1163,7 @@ int __iucv_message_receive(struct iucv_pif (msg->flags &IUCV_IPRMDATA )return iucv_message_receive_iprmdata (path, msg, flags, buffer, size, residual); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1235,7 +1236,7 @@ int iucv_message_reject(struct iucv_pathint rc;local_bh_disable (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1274,7 +1275,7 @@ int iucv_message_reply(struct iucv_pathint rc;local_bh_disable (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1324,7 +1325,7 @@ int __iucv_message_send(struct iucv_pathunion iucv_param *parm;int rc; -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1411,7 +1412,7 @@ int iucv_message_send2way(struct iucv_paint rc;local_bh_disable (); -if (cpus_empty (iucv_buffer_cpumask)) { +if (cpumask_empty (&iucv_buffer_cpumask)) { rc = -EIO ; goto out; }
@@ -1888,7 +1889,7 @@ static int iucv_pm_freeze(struct deviceprintk (KERN_WARNING "iucv_pm_freeze\n" );#endif if (iucv_pm_state !=IUCV_PM_FREEZING ) { -for_each_cpu_mask_nr (cpu, iucv_irq_cpumask) +for_each_cpu (cpu, &iucv_irq_cpumask)smp_call_function_single (cpu, iucv_block_cpu_almost,NULL ,1 );cancel_work_sync (&iucv_work);
@@ -1928,7 +1929,7 @@ static int iucv_pm_thaw(struct device *dif (rc) goto out; } -if (cpus_empty (iucv_irq_cpumask)) { +if (cpumask_empty (&iucv_irq_cpumask)) {if (iucv_nonsmp_handler)/* enable interrupts on one cpu */ iucv_allow_cpu (NULL );
@@ -1961,7 +1962,7 @@ static int iucv_pm_restore(struct devicepr_warning ("Suspending Linux did not completely close all IUCV " "connections\n" ); iucv_pm_state =IUCV_PM_RESTORING ; -if (cpus_empty (iucv_irq_cpumask)) { +if (cpumask_empty (&iucv_irq_cpumask)) { rc =iucv_query_maxconn (); rc =iucv_enable ();if (rc)