From a4c48a2691189cec0359ac13b41726d3005ef2f5 Mon Sep 17 00:00:00 2001 From: Ursula Braun Date: Wed, 2 May 2007 15:17:11 +0200 Subject: s390: qeth driver connection hang Frank Pavlic Connection hangs when using EDDP mode because sk_protocol is NULL when skb has been copied via skb_copy. This results in dropping packets. Also keep MAC address after recovery of Virtual NICs so that traffic can flow again and duplicate statements in qeth_dev_set_route_store removed. Signed-off-by: Ursula Braun Signed-off-by: Frank Pavlic Signed-off-by: Jeff Garzik --- drivers/s390/net/qeth_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/s390/net/qeth_main.c') diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 6fd8870551d3..032483513027 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -4490,7 +4490,8 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb) qeth_fill_header(card, hdr, new_skb, ipv, cast_type); } if (large_send == QETH_LARGE_SEND_EDDP) { - ctx = qeth_eddp_create_context(card, new_skb, hdr); + ctx = qeth_eddp_create_context(card, new_skb, hdr, + skb->sk->sk_protocol); if (ctx == NULL) { __qeth_free_new_skb(skb, new_skb); PRINT_WARN("could not create eddp context\n"); @@ -6651,7 +6652,7 @@ qeth_setadpparms_change_macaddr_cb(struct qeth_card *card, QETH_DBF_TEXT(trace,4,"chgmaccb"); cmd = (struct qeth_ipa_cmd *) data; - if (!card->options.layer2 || card->info.guestlan || + if (!card->options.layer2 || !(card->info.mac_bits & QETH_LAYER2_MAC_READ)) { memcpy(card->dev->dev_addr, &cmd->data.setadapterparms.data.change_addr.addr, -- cgit v1.2.2 From 1f8bdae9ef8e1ed2b208cdbaadb91061ede30212 Mon Sep 17 00:00:00 2001 From: Ursula Braun Date: Wed, 2 May 2007 15:18:07 +0200 Subject: s390: free skbs in finite amount of time in qeth Free sent skbs in some finite amount of time. Affected are asynchronous queue of Hipersockets devices and the output queues of all eth-devices respectively. Signed-off-by: Ursula Braun Signed-off-by: Frank Pavlic Signed-off-by: Jeff Garzik --- drivers/s390/net/qeth_main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'drivers/s390/net/qeth_main.c') diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 032483513027..134f08c200d2 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -2816,6 +2816,7 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, struct qeth_qdio_out_buffer *buf; int rc; int i; + unsigned int qdio_flags; QETH_DBF_TEXT(trace, 6, "flushbuf"); @@ -2859,13 +2860,13 @@ qeth_flush_buffers(struct qeth_qdio_out_q *queue, int under_int, queue->card->perf_stats.outbound_do_qdio_start_time = qeth_get_micros(); } + qdio_flags = QDIO_FLAG_SYNC_OUTPUT; if (under_int) - rc = do_QDIO(CARD_DDEV(queue->card), - QDIO_FLAG_SYNC_OUTPUT | QDIO_FLAG_UNDER_INTERRUPT, - queue->queue_no, index, count, NULL); - else - rc = do_QDIO(CARD_DDEV(queue->card), QDIO_FLAG_SYNC_OUTPUT, - queue->queue_no, index, count, NULL); + qdio_flags |= QDIO_FLAG_UNDER_INTERRUPT; + if (atomic_read(&queue->set_pci_flags_count)) + qdio_flags |= QDIO_FLAG_PCI_OUT; + rc = do_QDIO(CARD_DDEV(queue->card), qdio_flags, + queue->queue_no, index, count, NULL); if (queue->card->options.performance_stats) queue->card->perf_stats.outbound_do_qdio_time += qeth_get_micros() - @@ -8498,6 +8499,7 @@ __qeth_reboot_event_card(struct device *dev, void *data) card = (struct qeth_card *) dev->driver_data; qeth_clear_ip_list(card, 0, 0); qeth_qdio_clear_card(card, 0); + qeth_clear_qdio_buffers(card); return 0; } -- cgit v1.2.2 From 7dd976fcfd89080915e217dd494be0c6c475835c Mon Sep 17 00:00:00 2001 From: Peter Tiedemann Date: Wed, 2 May 2007 15:19:35 +0200 Subject: s390: qeth driver hardware specs adaptions s390: qeth driver hardware specs adaptions - according to the latest OSA hardware specification incorporate actual IPA command and return codes into qeth. - whitespaces removed from qeth_mpc.h Signed-off-by: Peter Tiedemann Signed-off-by: Frank Pavlic Signed-off-by: Jeff Garzik --- drivers/s390/net/qeth_main.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'drivers/s390/net/qeth_main.c') diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 134f08c200d2..29d176036e5c 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -1682,6 +1682,21 @@ qeth_put_reply(struct qeth_reply *reply) kfree(reply); } +static void +qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, struct qeth_card *card) +{ + int rc; + int com; + char * ipa_name; + + com = cmd->hdr.command; + rc = cmd->hdr.return_code; + ipa_name = qeth_get_ipa_cmd_name(com); + + PRINT_ERR("%s(x%X) for %s returned x%X \"%s\"\n", ipa_name, com, + QETH_CARD_IFNAME(card), rc, qeth_get_ipa_msg(rc)); +} + static struct qeth_ipa_cmd * qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) { @@ -1690,8 +1705,11 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) QETH_DBF_TEXT(trace,5,"chkipad"); if (IS_IPA(iob->data)){ cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data); - if (IS_IPA_REPLY(cmd)) + if (IS_IPA_REPLY(cmd)) { + if (cmd->hdr.return_code) + qeth_issue_ipa_msg(cmd, card); return cmd; + } else { switch (cmd->hdr.command) { case IPA_CMD_STOPLAN: @@ -5950,9 +5968,6 @@ qeth_layer2_send_setmac_cb(struct qeth_card *card, cmd = (struct qeth_ipa_cmd *) data; if (cmd->hdr.return_code) { QETH_DBF_TEXT_(trace, 2, "L2er%x", cmd->hdr.return_code); - PRINT_WARN("Error in registering MAC address on " \ - "device %s: x%x\n", CARD_BUS_ID(card), - cmd->hdr.return_code); card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; cmd->hdr.return_code = -EIO; } else { @@ -5987,9 +6002,6 @@ qeth_layer2_send_delmac_cb(struct qeth_card *card, QETH_DBF_TEXT(trace, 2, "L2Dmaccb"); cmd = (struct qeth_ipa_cmd *) data; if (cmd->hdr.return_code) { - PRINT_WARN("Error in deregistering MAC address on " \ - "device %s: x%x\n", CARD_BUS_ID(card), - cmd->hdr.return_code); QETH_DBF_TEXT_(trace, 2, "err%d", cmd->hdr.return_code); cmd->hdr.return_code = -EIO; return 0; -- cgit v1.2.2