s390: qeth fixes 2.6.28-rc1
Subsystems (4)
cover s390: qeth fixes 2.6.28-rc1
Hi Jeff,
here are a couple of qeth bug fixes for 2.6.28-rc1
shortlog:
Ursula Braun (2)
qeth: remove non-recover-thread checkings
qeth: avoid skb_under_panic for malformatted inbound data
Frank Blaschka (2)
qeth: fix offset error in non prealloc header path
qeth: remove unnecessary support ckeck in sysfs route6
Thanks,
Frank
PATCH 1/4 qeth: remove non-recover-thread checkings
From: Ursula Braun <[email protected]>
IP-threads have been removed from the qeth driver. Only the recover-thread is left over. This makes checkings for non-recover threads superfluous.
---
drivers/s390/net/qeth_l2_main.c | 14 +------------- drivers/s390/net/qeth_l3_main.c | 13 +------------ 2 files changed, 2 insertions(+), 25 deletions(-)
drivers/s390/net/qeth_l2_main.c +1 -13
@@ -373,8 +373,6 @@ static int qeth_l2_stop_card(struct qethQETH_DBF_HEX (SETUP ,2 , &card,sizeof (void *));qeth_set_allowed_threads (card,0 ,1 ); -if (qeth_wait_for_threads (card, ~QETH_RECOVER_THREAD )) -return -ERESTARTSYS ;if (card->read.state ==CH_STATE_UP && card->write.state ==CH_STATE_UP && (card->state ==CARD_STATE_UP )) {
@@ -975,12 +973,6 @@ static int __qeth_l2_set_online(struct cQETH_DBF_HEX (SETUP ,2 , &card,sizeof (void *));qeth_set_allowed_threads (card,QETH_RECOVER_THREAD ,1 ); -if (qeth_wait_for_threads (card, ~QETH_RECOVER_THREAD )) { -PRINT_WARN ("set_online of card %s interrupted by user!\n" , -CARD_BUS_ID (card)); -return -ERESTARTSYS ; - } - recover_flag = card->state; rc =ccw_device_set_online (CARD_RDEV (card));if (rc) {
@@ -1091,11 +1083,7 @@ static int __qeth_l2_set_offline(structif (card->dev &&netif_carrier_ok (card->dev))netif_carrier_off (card->dev); recover_flag = card->state; -if (qeth_l2_stop_card (card, recovery_mode) == -ERESTARTSYS ) { -PRINT_WARN ("Stopping card %s interrupted by user!\n" , -CARD_BUS_ID (card)); -return -ERESTARTSYS ; - } +qeth_l2_stop_card (card, recovery_mode); rc =ccw_device_set_offline (CARD_DDEV (card)); rc2 =ccw_device_set_offline (CARD_WDEV (card)); rc3 =ccw_device_set_offline (CARD_RDEV (card));
drivers/s390/net/qeth_l3_main.c +1 -12
@@ -2064,8 +2064,6 @@ static int qeth_l3_stop_card(struct qethQETH_DBF_HEX (SETUP ,2 , &card,sizeof (void *));qeth_set_allowed_threads (card,0 ,1 ); -if (qeth_wait_for_threads (card, ~QETH_RECOVER_THREAD )) -return -ERESTARTSYS ;if (card->read.state ==CH_STATE_UP && card->write.state ==CH_STATE_UP && (card->state ==CARD_STATE_UP )) {
@@ -3049,11 +3047,6 @@ static int __qeth_l3_set_online(struct cQETH_DBF_HEX (SETUP ,2 , &card,sizeof (void *));qeth_set_allowed_threads (card,QETH_RECOVER_THREAD ,1 ); -if (qeth_wait_for_threads (card, ~QETH_RECOVER_THREAD )) { -PRINT_WARN ("set_online of card %s interrupted by user!\n" , -CARD_BUS_ID (card)); -return -ERESTARTSYS ; - } recover_flag = card->state; rc =ccw_device_set_online (CARD_RDEV (card));
@@ -3170,11 +3163,7 @@ static int __qeth_l3_set_offline(structif (card->dev &&netif_carrier_ok (card->dev))netif_carrier_off (card->dev); recover_flag = card->state; -if (qeth_l3_stop_card (card, recovery_mode) == -ERESTARTSYS ) { -PRINT_WARN ("Stopping card %s interrupted by user!\n" , -CARD_BUS_ID (card)); -return -ERESTARTSYS ; - } +qeth_l3_stop_card (card, recovery_mode); rc =ccw_device_set_offline (CARD_DDEV (card)); rc2 =ccw_device_set_offline (CARD_WDEV (card)); rc3 =ccw_device_set_offline (CARD_RDEV (card));
Re: [patch 1/4] qeth: remove non-recover-thread checkings
Quoted 6 lines · [email protected] wrote:
From: Ursula Braun <[email protected]>
IP-threads have been removed from the qeth driver. Only the recover-thread is left over. This makes checkings for non-recover threads superfluous.
Quoted 7 lines
Signed-off-by Ursula Braun <[email protected]>Signed-off-by Frank Blaschka <[email protected]>---
drivers/s390/net/qeth_l2_main.c | 14 +------------- drivers/s390/net/qeth_l3_main.c | 13 +------------ 2 files changed, 2 insertions(+), 25 deletions(-)
applied 1-4
PATCH 2/4 qeth: fix offset error in non prealloc header path
In reply to [email protected]From: Frank Blaschka <[email protected]>
For the non preallocated qeth header code path we should not change the header length.
---
drivers/s390/net/qeth_core_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/s390/net/qeth_core_main.c +2 -1
@@ -3025,7 +3025,7 @@ static inline void __qeth_fill_buffer(st struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill, int offset) { - int length = skb->len - offset; + int length = skb->len;int length_here;int element;char *data;
@@ -3037,6 +3037,7 @@ static inline void __qeth_fill_buffer(stif (offset >=0 ) { data = skb->data + offset; + length -= offset; first_lap =0 ; }
PATCH 3/4 qeth: remove unnecessary support ckeck in sysfs route6
In reply to [email protected]From: Frank Blaschka <[email protected]>
Removing this check improves usability because you do not have to set the device online to initially set ipv6 routing option.
---
drivers/s390/net/qeth_l3_sys.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/s390/net/qeth_l3_sys.c +0 -7
@@ -121,9 +121,6 @@ static ssize_t qeth_l3_dev_route6_show(sif (!card)return -EINVAL ; -if (!qeth_is_supported (card,IPA_IPV6 )) -return sprintf (buf,"%s\n" ,"n/a" ); -return qeth_l3_dev_route_show (card, &card->options.route6, buf); }
@@ -135,10 +132,6 @@ static ssize_t qeth_l3_dev_route6_store(if (!card)return -EINVAL ; -if (!qeth_is_supported (card,IPA_IPV6 )) { -return -EOPNOTSUPP ; - } -return qeth_l3_dev_route_store (card, &card->options.route6,QETH_PROT_IPV6 , buf, count); }
PATCH 4/4 qeth: avoid skb_under_panic for malformatted inbound data
In reply to [email protected]From: Ursula Braun <[email protected]>
To make the qeth driver more robust in case of malformatted inbound packets due to hardware problems, an additional check for OSN-card-type is added for OSN-type packets.
---
drivers/s390/net/qeth_l2_main.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
drivers/s390/net/qeth_l2_main.c +8 -5
@@ -449,12 +449,15 @@ static void qeth_l2_process_inbound_buffnetif_rx (skb);break ;case QETH_HEADER_TYPE_OSN : -skb_push (skb,sizeof (struct qeth_hdr )); -skb_copy_to_linear_data (skb, hdr, +if (card->info.type ==QETH_CARD_TYPE_OSN ) { +skb_push (skb,sizeof (struct qeth_hdr )); +skb_copy_to_linear_data (skb, hdr,sizeof (struct qeth_hdr )); - len = skb->len; - card->osn_info.data_cb (skb); -break ; + len = skb->len; + card->osn_info.data_cb (skb); +break ; + } +/* else unknown */ default :dev_kfree_skb_any (skb);QETH_DBF_TEXT (TRACE ,3 ,"inbunkno" );