aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEinar Lueck <elelueck@de.ibm.com>2010-01-10 21:50:52 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-13 23:34:57 -0500
commita60389abaab92213c79790e074ff6bc36ac0ebe5 (patch)
treea0b7c47afad5ddd1d9b934876722697bb3f259c3 /drivers
parent84b66683dba002f4cce2aaf78bf45debfaf22795 (diff)
qeth: default BLKT values for new OSA/3 hardware
Set default BLKT values for new OSA/3 hardware. Signed-off-by: Einar Lueck <elelueck@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/net/qeth_core_main.c41
-rw-r--r--drivers/s390/net/qeth_core_sys.c6
2 files changed, 29 insertions, 18 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 2c8e9da8753f..fa8a519218ac 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1362,26 +1362,29 @@ static int qeth_read_conf_data(struct qeth_card *card, void **buffer,
1362 return ret; 1362 return ret;
1363} 1363}
1364 1364
1365static int qeth_get_unitaddr(struct qeth_card *card) 1365static void qeth_configure_unitaddr(struct qeth_card *card, char *prcd)
1366{ 1366{
1367 int length; 1367 QETH_DBF_TEXT(SETUP, 2, "cfgunit");
1368 char *prcd;
1369 int rc;
1370
1371 QETH_DBF_TEXT(SETUP, 2, "getunit");
1372 rc = qeth_read_conf_data(card, (void **) &prcd, &length);
1373 if (rc) {
1374 QETH_DBF_MESSAGE(2, "%s qeth_read_conf_data returned %i\n",
1375 dev_name(&card->gdev->dev), rc);
1376 return rc;
1377 }
1378 card->info.chpid = prcd[30]; 1368 card->info.chpid = prcd[30];
1379 card->info.unit_addr2 = prcd[31]; 1369 card->info.unit_addr2 = prcd[31];
1380 card->info.cula = prcd[63]; 1370 card->info.cula = prcd[63];
1381 card->info.guestlan = ((prcd[0x10] == _ascebc['V']) && 1371 card->info.guestlan = ((prcd[0x10] == _ascebc['V']) &&
1382 (prcd[0x11] == _ascebc['M'])); 1372 (prcd[0x11] == _ascebc['M']));
1383 kfree(prcd); 1373}
1384 return 0; 1374
1375static void qeth_configure_blkt_default(struct qeth_card *card, char *prcd)
1376{
1377 QETH_DBF_TEXT(SETUP, 2, "cfgblkt");
1378
1379 if (prcd[74] == 0xF0 && prcd[75] == 0xF0 && prcd[76] == 0xF5) {
1380 card->info.blkt.time_total = 250;
1381 card->info.blkt.inter_packet = 5;
1382 card->info.blkt.inter_packet_jumbo = 15;
1383 } else {
1384 card->info.blkt.time_total = 0;
1385 card->info.blkt.inter_packet = 0;
1386 card->info.blkt.inter_packet_jumbo = 0;
1387 }
1385} 1388}
1386 1389
1387static void qeth_init_tokens(struct qeth_card *card) 1390static void qeth_init_tokens(struct qeth_card *card)
@@ -4169,6 +4172,8 @@ void qeth_core_free_discipline(struct qeth_card *card)
4169static void qeth_determine_capabilities(struct qeth_card *card) 4172static void qeth_determine_capabilities(struct qeth_card *card)
4170{ 4173{
4171 int rc; 4174 int rc;
4175 int length;
4176 char *prcd;
4172 4177
4173 QETH_DBF_TEXT(SETUP, 2, "detcapab"); 4178 QETH_DBF_TEXT(SETUP, 2, "detcapab");
4174 rc = ccw_device_set_online(CARD_DDEV(card)); 4179 rc = ccw_device_set_online(CARD_DDEV(card));
@@ -4177,11 +4182,17 @@ static void qeth_determine_capabilities(struct qeth_card *card)
4177 goto out; 4182 goto out;
4178 } 4183 }
4179 4184
4180 rc = qeth_get_unitaddr(card); 4185
4186 rc = qeth_read_conf_data(card, (void **) &prcd, &length);
4181 if (rc) { 4187 if (rc) {
4188 QETH_DBF_MESSAGE(2, "%s qeth_read_conf_data returned %i\n",
4189 dev_name(&card->gdev->dev), rc);
4182 QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc); 4190 QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc);
4183 goto out_offline; 4191 goto out_offline;
4184 } 4192 }
4193 qeth_configure_unitaddr(card, prcd);
4194 qeth_configure_blkt_default(card, prcd);
4195 kfree(prcd);
4185 4196
4186 rc = qdio_get_ssqd_desc(CARD_DDEV(card), &card->ssqd); 4197 rc = qdio_get_ssqd_desc(CARD_DDEV(card), &card->ssqd);
4187 if (rc) 4198 if (rc)
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c
index ac2239a4f133..88ae4357136a 100644
--- a/drivers/s390/net/qeth_core_sys.c
+++ b/drivers/s390/net/qeth_core_sys.c
@@ -539,7 +539,7 @@ static ssize_t qeth_dev_blkt_total_store(struct device *dev,
539 struct qeth_card *card = dev_get_drvdata(dev); 539 struct qeth_card *card = dev_get_drvdata(dev);
540 540
541 return qeth_dev_blkt_store(card, buf, count, 541 return qeth_dev_blkt_store(card, buf, count,
542 &card->info.blkt.time_total, 1000); 542 &card->info.blkt.time_total, 5000);
543} 543}
544 544
545 545
@@ -561,7 +561,7 @@ static ssize_t qeth_dev_blkt_inter_store(struct device *dev,
561 struct qeth_card *card = dev_get_drvdata(dev); 561 struct qeth_card *card = dev_get_drvdata(dev);
562 562
563 return qeth_dev_blkt_store(card, buf, count, 563 return qeth_dev_blkt_store(card, buf, count,
564 &card->info.blkt.inter_packet, 100); 564 &card->info.blkt.inter_packet, 1000);
565} 565}
566 566
567static DEVICE_ATTR(inter, 0644, qeth_dev_blkt_inter_show, 567static DEVICE_ATTR(inter, 0644, qeth_dev_blkt_inter_show,
@@ -582,7 +582,7 @@ static ssize_t qeth_dev_blkt_inter_jumbo_store(struct device *dev,
582 struct qeth_card *card = dev_get_drvdata(dev); 582 struct qeth_card *card = dev_get_drvdata(dev);
583 583
584 return qeth_dev_blkt_store(card, buf, count, 584 return qeth_dev_blkt_store(card, buf, count,
585 &card->info.blkt.inter_packet_jumbo, 100); 585 &card->info.blkt.inter_packet_jumbo, 1000);
586} 586}
587 587
588static DEVICE_ATTR(inter_jumbo, 0644, qeth_dev_blkt_inter_jumbo_show, 588static DEVICE_ATTR(inter_jumbo, 0644, qeth_dev_blkt_inter_jumbo_show,