Patchwork [2/5] qeth: Increase default MTU for OSA devices

login
register
mail settings
Submitter frank.blaschka@de.ibm.com
Date June 24, 2013, 11:21 a.m.
Message ID <20130624112226.544988561@de.ibm.com>
Download mbox | patch
Permalink /patch/253796/
State Accepted
Delegated to: David Miller
Headers show

Comments

frank.blaschka@de.ibm.com - June 24, 2013, 11:21 a.m.
From: Stefan Raspl <raspl@linux.vnet.ibm.com>

Increase the default MTU for real OSA devices in layer 2 mode
to 1500 Bytes for increased compatibility.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
---
 drivers/s390/net/qeth_core_main.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2198,11 +2198,11 @@  static inline int qeth_get_initial_mtu_f
 		case QETH_LINK_TYPE_LANE_TR:
 			return 2000;
 		default:
-			return 1492;
+			return card->options.layer2 ? 1500 : 1492;
 		}
 	case QETH_CARD_TYPE_OSM:
 	case QETH_CARD_TYPE_OSX:
-		return 1492;
+		return card->options.layer2 ? 1500 : 1492;
 	default:
 		return 1500;
 	}
@@ -2275,9 +2275,10 @@  static int qeth_ulp_enable_cb(struct qet
 		card->info.max_mtu = mtu;
 		card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE;
 	} else {
-		card->info.initial_mtu = qeth_get_initial_mtu_for_card(card);
 		card->info.max_mtu = *(__u16 *)QETH_ULP_ENABLE_RESP_MAX_MTU(
 			iob->data);
+		card->info.initial_mtu = min(card->info.max_mtu,
+					qeth_get_initial_mtu_for_card(card));
 		card->qdio.in_buf_size = QETH_IN_BUF_SIZE_DEFAULT;
 	}