s390: qeth fixes 2.6.29
Subsystems (4)
cover s390: qeth fixes 2.6.29
Hi Jeff,
here are some qeth fixes for 2.6.29
shortlog:
Klaus Wacker (2)
qeth: HiperSockets mcl string conversion (pre z9 mach)
qeth: No large send using EDDP for HiperSockets.
Ursula Braun (2)
qeth: exploit source MAC address for inbound layer3 packets
qeth: avoid crash in case of layer mismatch for VSWITCH
Frank Blaschka (1)
qeth: do not spin for SETIP ip assist command
Heiko Carstens (1)
qeth: get rid of extra argument after printk to dev_* conversion
Thanks,
Frank
PATCH 1/6 HiperSockets mcl string conversion (pre z9 mach)
From: Klaus-Dieter Wacker <[email protected]>
The pre z9 machines provide an mcl string in EBCDIC format, z9 or later provide string in ASCII format.
---
drivers/s390/net/qeth_core_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/s390/net/qeth_core_main.c +2 -1
@@ -2250,7 +2250,8 @@ void qeth_print_status_message(struct qe }/* fallthrough */ case QETH_CARD_TYPE_IQD : -if (card->info.guestlan) { +if ((card->info.guestlan) || + (card->info.mcl_level[0 ] &0x80 )) { card->info.mcl_level[0 ] = (char ) _ebcasc[(__u8 ) card->info.mcl_level[0 ]]; card->info.mcl_level[1] = (char) _ebcasc[(__u8)
Re: [patch 1/6] HiperSockets mcl string conversion (pre z9 mach)
From: [email protected]
Date: Fri, 02 Jan 2009 16:01:40 +0100
Quoted 5 lines
The pre z9 machines provide an mcl string in EBCDIC format, z9 or later provide string in ASCII format.
Signed-off-by Klaus-Dieter Wacker <[email protected]>Signed-off-by Frank Blaschka <[email protected]>
Applied.
PATCH 2/6 qeth: exploit source MAC address for inbound layer3 packets
In reply to [email protected]From: Ursula Braun <[email protected]>
OSA-devices operating in layer3 mode offer adding of the source MAC address to the QDIO header of inbound packets. The qeth driver can exploit this functionality to replace FAKELL-entries in the ethernet header of received packets.
---
drivers/s390/net/qeth_core.h | 1 - drivers/s390/net/qeth_core_main.c | 1 - drivers/s390/net/qeth_l3_main.c | 16 +++++++++------- 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/s390/net/qeth_core.h +0 -1
@@ -643,7 +643,6 @@ struct qeth_card_options {int macaddr_mode;int fake_broadcast;int add_hhlen; -int fake_ll;int layer2;enum qeth_large_send_types large_send;int performance_stats;
drivers/s390/net/qeth_core_main.c +0 -1
@@ -1072,7 +1072,6 @@ static void qeth_set_intial_options(stru card->options.macaddr_mode =QETH_TR_MACADDR_NONCANONICAL ; card->options.fake_broadcast =0 ; card->options.add_hhlen =DEFAULT_ADD_HHLEN ; - card->options.fake_ll =0 ; card->options.performance_stats =0 ; card->options.rx_sg_cb =QETH_RX_SG_CB ; }
drivers/s390/net/qeth_l3_main.c +9 -7
@@ -1207,12 +1207,9 @@ static int qeth_l3_start_ipa_source_mac(QETH_DBF_TEXT (TRACE ,3 ,"stsrcmac" ); -if (!card->options.fake_ll) -return -EOPNOTSUPP ; -if (!qeth_is_supported (card,IPA_SOURCE_MAC )) {dev_info (&card->gdev->dev, -"Inbound source address not supported on %s\n" , +"Inbound source MAC-address not supported on %s\n" ,QETH_CARD_IFNAME (card));return -EOPNOTSUPP ; }
@@ -1221,7 +1218,7 @@ static int qeth_l3_start_ipa_source_mac( IPA_CMD_ASS_START, 0);if (rc)dev_warn (&card->gdev->dev, -"Starting proxy ARP support for %s failed\n" , +"Starting source MAC-address support for %s failed\n" ,QETH_CARD_IFNAME (card));return rc; }
@@ -1921,8 +1918,13 @@ static inline __u16 qeth_l3_rebuild_skb(memcpy (tg_addr, card->dev->dev_addr, card->dev->addr_len); } - card->dev->header_ops->create (skb, card->dev, prot, tg_addr, -"FAKELL" , card->dev->addr_len); +if (hdr->hdr.l3.ext_flags &QETH_HDR_EXT_SRC_MAC_ADDR ) + card->dev->header_ops->create (skb, card->dev, prot, + tg_addr, &hdr->hdr.l3.dest_addr[2 ], + card->dev->addr_len); +else + card->dev->header_ops->create (skb, card->dev, prot, + tg_addr,"FAKELL" , card->dev->addr_len); }#ifdef CONFIG_TR
Re: [patch 2/6] qeth: exploit source MAC address for inbound layer3 packets
From: [email protected]
Date: Fri, 02 Jan 2009 16:01:41 +0100
Quoted 7 lines
OSA-devices operating in layer3 mode offer adding of the source MAC address to the QDIO header of inbound packets. The qeth driver can exploit this functionality to replace FAKELL-entries in the ethernet header of received packets.
Signed-off-by Ursula Braun <[email protected]>Signed-off-by Frank Blaschka <[email protected]>
Applied.
PATCH 3/6 qeth: avoid crash in case of layer mismatch for VSWITCH
In reply to [email protected]From: Ursula Braun <[email protected]>
For z/VM GuestLAN or VSWITCH devices the transport layer is configured in z/VM. The layer2 attribute of a participating Linux device has to match the z/VM definition. In case of a mismatch Linux currently crashes in qeth recovery due to a reference to the not yet existing net_device.
Solution: add a check for existence of net_device and add a message pointing to the mismatch of layer definitions in Linux and z/VM.
---
drivers/s390/net/qeth_core_main.c | 4 ++++ drivers/s390/net/qeth_l2_main.c | 8 +++++--- drivers/s390/net/qeth_l3_main.c | 8 +++++--- 3 files changed, 14 insertions(+), 6 deletions(-)
drivers/s390/net/qeth_core_main.c +4 -0
@@ -572,6 +572,10 @@ static void qeth_send_control_data_cb(st card =CARD_FROM_CDEV (channel->ccwdev);if (qeth_check_idx_response (iob->data)) {qeth_clear_ipacmd_list (card); +if (((iob->data[2 ] &0xc0 ) ==0xc0 ) && iob->data[4 ] ==0xf6 ) +dev_err (&card->gdev->dev, +"The qeth device is not configured " +"for the OSI layer required by z/VM\n" );qeth_schedule_recovery (card); goto out; }
drivers/s390/net/qeth_l2_main.c +5 -3
@@ -1126,9 +1126,11 @@ static int qeth_l2_recover(void *ptr)dev_info (&card->gdev->dev,"Device successfully recovered!\n" ); else { -rtnl_lock (); -dev_close (card->dev); -rtnl_unlock (); +if (card->dev) { +rtnl_lock (); +dev_close (card->dev); +rtnl_unlock (); + }dev_warn (&card->gdev->dev,"The qeth device driver " "failed to recover an error on the device\n" ); }
drivers/s390/net/qeth_l3_main.c +5 -3
@@ -2082,9 +2082,11 @@ static int qeth_l3_stop_card(struct qethif (recovery_mode)qeth_l3_stop (card->dev);else { -rtnl_lock (); -dev_close (card->dev); -rtnl_unlock (); +if (card->dev) { +rtnl_lock (); +dev_close (card->dev); +rtnl_unlock (); + } }if (!card->use_hard_stop) { rc =qeth_send_stoplan (card);
Re: [patch 3/6] qeth: avoid crash in case of layer mismatch for VSWITCH
From: [email protected]
Date: Fri, 02 Jan 2009 16:01:42 +0100
Quoted 10 lines
For z/VM GuestLAN or VSWITCH devices the transport layer is configured in z/VM. The layer2 attribute of a participating Linux device has to match the z/VM definition. In case of a mismatch Linux currently crashes in qeth recovery due to a reference to the not yet existing
net_device.
Solution: add a check for existence ofnet_deviceand add a message pointing to the mismatch of layer definitions in Linux and z/VM.Signed-off-by Ursula Braun <[email protected]>Signed-off-by Frank Blaschka <[email protected]>
Applied.
PATCH 4/6 qeth: do not spin for SETIP ip assist command
In reply to [email protected]From: Frank Blaschka <[email protected]>
The ip assist hw command for setting an IP address last unacceptable long so we can not spin while we waiting for the irq. Since we can ensure process context for all occurrences of this command we can use wait.
---
drivers/s390/net/qeth_core_main.c | 40 +++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-)
drivers/s390/net/qeth_core_main.c +29 -11
@@ -1685,6 +1685,7 @@ int qeth_send_control_data(struct qeth_cunsigned long flags;struct qeth_reply *reply =NULL ;unsigned long timeout; +struct qeth_ipa_cmd *cmd;QETH_DBF_TEXT (TRACE ,2 ,"sendctl" );
@@ -1731,17 +1732,34 @@ int qeth_send_control_data(struct qeth_cwake_up (&card->wait_q);return rc; } -while (!atomic_read (&reply->received)) { -if (time_after (jiffies, timeout)) { -spin_lock_irqsave (&reply->card->lock, flags); -list_del_init (&reply->list); -spin_unlock_irqrestore (&reply->card->lock, flags); - reply->rc = -ETIME ; -atomic_inc (&reply->received); -wake_up (&reply->wait_q); - } -cpu_relax (); - }; + +/* we have only one long running ipassist, since we can ensure +process context of this command we can sleep */ + cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE ); +if ((cmd->hdr.command ==IPA_CMD_SETIP ) && + (cmd->hdr.prot_version ==QETH_PROT_IPV4 )) { +if (!wait_event_timeout (reply->wait_q, +atomic_read (&reply->received), timeout)) + goto time_err; + }else { +while (!atomic_read (&reply->received)) { +if (time_after (jiffies, timeout)) + goto time_err; +cpu_relax (); + }; + } + + rc = reply->rc; +qeth_put_reply (reply); +return rc; + +time_err: +spin_lock_irqsave (&reply->card->lock, flags); +list_del_init (&reply->list); +spin_unlock_irqrestore (&reply->card->lock, flags); + reply->rc = -ETIME ; +atomic_inc (&reply->received); +wake_up (&reply->wait_q); rc = reply->rc;qeth_put_reply (reply);return rc;
Re: [patch 4/6] qeth: do not spin for SETIP ip assist command
From: [email protected]
Date: Fri, 02 Jan 2009 16:01:43 +0100
Quoted 6 lines
The ip assist hw command for setting an IP address last unacceptable long so we can not spin while we waiting for the irq. Since we can ensure process context for all occurrences of this command we can use wait.
Signed-off-by Frank Blaschka <[email protected]>
Applied.
PATCH 5/6 qeth: No large send using EDDP for HiperSockets.
In reply to [email protected]From: Klaus-Dieter Wacker <[email protected]>
The device driver qeth dos not support large send using EDDP for HiperSockets.
---
drivers/s390/net/qeth_core_main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/s390/net/qeth_core_main.c +8 -1
@@ -287,8 +287,15 @@ int qeth_set_large_send(struct qeth_card card->options.large_send = type;switch (card->options.large_send) {case QETH_LARGE_SEND_EDDP : - card->dev->features |=NETIF_F_TSO |NETIF_F_SG | +if (card->info.type !=QETH_CARD_TYPE_IQD ) { + card->dev->features |=NETIF_F_TSO |NETIF_F_SG |NETIF_F_HW_CSUM ; + }else { + card->dev->features &= ~(NETIF_F_TSO |NETIF_F_SG | +NETIF_F_HW_CSUM ); + card->options.large_send =QETH_LARGE_SEND_NO ; + rc = -EOPNOTSUPP ; + }break ;case QETH_LARGE_SEND_TSO :if (qeth_is_supported (card,IPA_OUTBOUND_TSO )) {
Re: [patch 5/6] qeth: No large send using EDDP for HiperSockets.
From: [email protected]
Date: Fri, 02 Jan 2009 16:01:44 +0100
Quoted 5 lines
The device driver qeth dos not support large send using EDDP for HiperSockets.
Signed-off-by Klaus-Dieter Wacker <[email protected]>Signed-off-by Frank Blaschka <[email protected]>
Applied.
PATCH 6/6 qeth: get rid of extra argument after printk to dev_* conversion
In reply to [email protected]From: Heiko Carstens <[email protected]>
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_setadapter_parms':drivers/s390/net/qeth_l3_main.c:1049: warning: too many arguments for format
---
drivers/s390/net/qeth_l3_main.c +1 -1
@@ -1047,7 +1047,7 @@ rc =qeth_setadpparms_change_macaddr (card);if (rc)dev_warn (&card->gdev->dev,"Reading the adapter MAC" -" address failed\n" , rc); +" address failed\n" ); } if ((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
David Miller
maintainerRe: [patch 6/6] qeth: get rid of extra argument after printk to dev_* conversion
From: [email protected]
Date: Fri, 02 Jan 2009 16:01:45 +0100
Quoted 5 lines
drivers/s390/net/qeth_l3_main.c: In function 'qeth_l3_setadapter_parms':drivers/s390/net/qeth_l3_main.c:1049: warning: too many arguments for formatSigned-off-by Heiko Carstens <[email protected]>Signed-off-by Frank Blaschka <[email protected]>
Also applied, thanks.