diff options
Diffstat (limited to 'drivers/s390/net/netiucv.c')
-rw-r--r-- | drivers/s390/net/netiucv.c | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index aec9e5d3cf4b..d52a99f9b702 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -1364,7 +1364,7 @@ static int netiucv_change_mtu(struct net_device * dev, int new_mtu) | |||
1364 | static ssize_t user_show(struct device *dev, struct device_attribute *attr, | 1364 | static ssize_t user_show(struct device *dev, struct device_attribute *attr, |
1365 | char *buf) | 1365 | char *buf) |
1366 | { | 1366 | { |
1367 | struct netiucv_priv *priv = dev->driver_data; | 1367 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1368 | 1368 | ||
1369 | IUCV_DBF_TEXT(trace, 5, __func__); | 1369 | IUCV_DBF_TEXT(trace, 5, __func__); |
1370 | return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); | 1370 | return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); |
@@ -1373,7 +1373,7 @@ static ssize_t user_show(struct device *dev, struct device_attribute *attr, | |||
1373 | static ssize_t user_write(struct device *dev, struct device_attribute *attr, | 1373 | static ssize_t user_write(struct device *dev, struct device_attribute *attr, |
1374 | const char *buf, size_t count) | 1374 | const char *buf, size_t count) |
1375 | { | 1375 | { |
1376 | struct netiucv_priv *priv = dev->driver_data; | 1376 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1377 | struct net_device *ndev = priv->conn->netdev; | 1377 | struct net_device *ndev = priv->conn->netdev; |
1378 | char *p; | 1378 | char *p; |
1379 | char *tmp; | 1379 | char *tmp; |
@@ -1430,7 +1430,8 @@ static DEVICE_ATTR(user, 0644, user_show, user_write); | |||
1430 | 1430 | ||
1431 | static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, | 1431 | static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, |
1432 | char *buf) | 1432 | char *buf) |
1433 | { struct netiucv_priv *priv = dev->driver_data; | 1433 | { |
1434 | struct netiucv_priv *priv = dev_get_drvdata(dev); | ||
1434 | 1435 | ||
1435 | IUCV_DBF_TEXT(trace, 5, __func__); | 1436 | IUCV_DBF_TEXT(trace, 5, __func__); |
1436 | return sprintf(buf, "%d\n", priv->conn->max_buffsize); | 1437 | return sprintf(buf, "%d\n", priv->conn->max_buffsize); |
@@ -1439,7 +1440,7 @@ static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, | |||
1439 | static ssize_t buffer_write (struct device *dev, struct device_attribute *attr, | 1440 | static ssize_t buffer_write (struct device *dev, struct device_attribute *attr, |
1440 | const char *buf, size_t count) | 1441 | const char *buf, size_t count) |
1441 | { | 1442 | { |
1442 | struct netiucv_priv *priv = dev->driver_data; | 1443 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1443 | struct net_device *ndev = priv->conn->netdev; | 1444 | struct net_device *ndev = priv->conn->netdev; |
1444 | char *e; | 1445 | char *e; |
1445 | int bs1; | 1446 | int bs1; |
@@ -1487,7 +1488,7 @@ static DEVICE_ATTR(buffer, 0644, buffer_show, buffer_write); | |||
1487 | static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr, | 1488 | static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr, |
1488 | char *buf) | 1489 | char *buf) |
1489 | { | 1490 | { |
1490 | struct netiucv_priv *priv = dev->driver_data; | 1491 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1491 | 1492 | ||
1492 | IUCV_DBF_TEXT(trace, 5, __func__); | 1493 | IUCV_DBF_TEXT(trace, 5, __func__); |
1493 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); | 1494 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); |
@@ -1498,7 +1499,7 @@ static DEVICE_ATTR(device_fsm_state, 0444, dev_fsm_show, NULL); | |||
1498 | static ssize_t conn_fsm_show (struct device *dev, | 1499 | static ssize_t conn_fsm_show (struct device *dev, |
1499 | struct device_attribute *attr, char *buf) | 1500 | struct device_attribute *attr, char *buf) |
1500 | { | 1501 | { |
1501 | struct netiucv_priv *priv = dev->driver_data; | 1502 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1502 | 1503 | ||
1503 | IUCV_DBF_TEXT(trace, 5, __func__); | 1504 | IUCV_DBF_TEXT(trace, 5, __func__); |
1504 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); | 1505 | return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); |
@@ -1509,7 +1510,7 @@ static DEVICE_ATTR(connection_fsm_state, 0444, conn_fsm_show, NULL); | |||
1509 | static ssize_t maxmulti_show (struct device *dev, | 1510 | static ssize_t maxmulti_show (struct device *dev, |
1510 | struct device_attribute *attr, char *buf) | 1511 | struct device_attribute *attr, char *buf) |
1511 | { | 1512 | { |
1512 | struct netiucv_priv *priv = dev->driver_data; | 1513 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1513 | 1514 | ||
1514 | IUCV_DBF_TEXT(trace, 5, __func__); | 1515 | IUCV_DBF_TEXT(trace, 5, __func__); |
1515 | return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); | 1516 | return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); |
@@ -1519,7 +1520,7 @@ static ssize_t maxmulti_write (struct device *dev, | |||
1519 | struct device_attribute *attr, | 1520 | struct device_attribute *attr, |
1520 | const char *buf, size_t count) | 1521 | const char *buf, size_t count) |
1521 | { | 1522 | { |
1522 | struct netiucv_priv *priv = dev->driver_data; | 1523 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1523 | 1524 | ||
1524 | IUCV_DBF_TEXT(trace, 4, __func__); | 1525 | IUCV_DBF_TEXT(trace, 4, __func__); |
1525 | priv->conn->prof.maxmulti = 0; | 1526 | priv->conn->prof.maxmulti = 0; |
@@ -1531,7 +1532,7 @@ static DEVICE_ATTR(max_tx_buffer_used, 0644, maxmulti_show, maxmulti_write); | |||
1531 | static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, | 1532 | static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, |
1532 | char *buf) | 1533 | char *buf) |
1533 | { | 1534 | { |
1534 | struct netiucv_priv *priv = dev->driver_data; | 1535 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1535 | 1536 | ||
1536 | IUCV_DBF_TEXT(trace, 5, __func__); | 1537 | IUCV_DBF_TEXT(trace, 5, __func__); |
1537 | return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); | 1538 | return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); |
@@ -1540,7 +1541,7 @@ static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, | |||
1540 | static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, | 1541 | static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, |
1541 | const char *buf, size_t count) | 1542 | const char *buf, size_t count) |
1542 | { | 1543 | { |
1543 | struct netiucv_priv *priv = dev->driver_data; | 1544 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1544 | 1545 | ||
1545 | IUCV_DBF_TEXT(trace, 4, __func__); | 1546 | IUCV_DBF_TEXT(trace, 4, __func__); |
1546 | priv->conn->prof.maxcqueue = 0; | 1547 | priv->conn->prof.maxcqueue = 0; |
@@ -1552,7 +1553,7 @@ static DEVICE_ATTR(max_chained_skbs, 0644, maxcq_show, maxcq_write); | |||
1552 | static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, | 1553 | static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, |
1553 | char *buf) | 1554 | char *buf) |
1554 | { | 1555 | { |
1555 | struct netiucv_priv *priv = dev->driver_data; | 1556 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1556 | 1557 | ||
1557 | IUCV_DBF_TEXT(trace, 5, __func__); | 1558 | IUCV_DBF_TEXT(trace, 5, __func__); |
1558 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); | 1559 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); |
@@ -1561,7 +1562,7 @@ static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, | |||
1561 | static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, | 1562 | static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, |
1562 | const char *buf, size_t count) | 1563 | const char *buf, size_t count) |
1563 | { | 1564 | { |
1564 | struct netiucv_priv *priv = dev->driver_data; | 1565 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1565 | 1566 | ||
1566 | IUCV_DBF_TEXT(trace, 4, __func__); | 1567 | IUCV_DBF_TEXT(trace, 4, __func__); |
1567 | priv->conn->prof.doios_single = 0; | 1568 | priv->conn->prof.doios_single = 0; |
@@ -1573,7 +1574,7 @@ static DEVICE_ATTR(tx_single_write_ops, 0644, sdoio_show, sdoio_write); | |||
1573 | static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, | 1574 | static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, |
1574 | char *buf) | 1575 | char *buf) |
1575 | { | 1576 | { |
1576 | struct netiucv_priv *priv = dev->driver_data; | 1577 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1577 | 1578 | ||
1578 | IUCV_DBF_TEXT(trace, 5, __func__); | 1579 | IUCV_DBF_TEXT(trace, 5, __func__); |
1579 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); | 1580 | return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); |
@@ -1582,7 +1583,7 @@ static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, | |||
1582 | static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, | 1583 | static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, |
1583 | const char *buf, size_t count) | 1584 | const char *buf, size_t count) |
1584 | { | 1585 | { |
1585 | struct netiucv_priv *priv = dev->driver_data; | 1586 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1586 | 1587 | ||
1587 | IUCV_DBF_TEXT(trace, 5, __func__); | 1588 | IUCV_DBF_TEXT(trace, 5, __func__); |
1588 | priv->conn->prof.doios_multi = 0; | 1589 | priv->conn->prof.doios_multi = 0; |
@@ -1594,7 +1595,7 @@ static DEVICE_ATTR(tx_multi_write_ops, 0644, mdoio_show, mdoio_write); | |||
1594 | static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, | 1595 | static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, |
1595 | char *buf) | 1596 | char *buf) |
1596 | { | 1597 | { |
1597 | struct netiucv_priv *priv = dev->driver_data; | 1598 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1598 | 1599 | ||
1599 | IUCV_DBF_TEXT(trace, 5, __func__); | 1600 | IUCV_DBF_TEXT(trace, 5, __func__); |
1600 | return sprintf(buf, "%ld\n", priv->conn->prof.txlen); | 1601 | return sprintf(buf, "%ld\n", priv->conn->prof.txlen); |
@@ -1603,7 +1604,7 @@ static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, | |||
1603 | static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, | 1604 | static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, |
1604 | const char *buf, size_t count) | 1605 | const char *buf, size_t count) |
1605 | { | 1606 | { |
1606 | struct netiucv_priv *priv = dev->driver_data; | 1607 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1607 | 1608 | ||
1608 | IUCV_DBF_TEXT(trace, 4, __func__); | 1609 | IUCV_DBF_TEXT(trace, 4, __func__); |
1609 | priv->conn->prof.txlen = 0; | 1610 | priv->conn->prof.txlen = 0; |
@@ -1615,7 +1616,7 @@ static DEVICE_ATTR(netto_bytes, 0644, txlen_show, txlen_write); | |||
1615 | static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, | 1616 | static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, |
1616 | char *buf) | 1617 | char *buf) |
1617 | { | 1618 | { |
1618 | struct netiucv_priv *priv = dev->driver_data; | 1619 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1619 | 1620 | ||
1620 | IUCV_DBF_TEXT(trace, 5, __func__); | 1621 | IUCV_DBF_TEXT(trace, 5, __func__); |
1621 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); | 1622 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); |
@@ -1624,7 +1625,7 @@ static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, | |||
1624 | static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, | 1625 | static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, |
1625 | const char *buf, size_t count) | 1626 | const char *buf, size_t count) |
1626 | { | 1627 | { |
1627 | struct netiucv_priv *priv = dev->driver_data; | 1628 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1628 | 1629 | ||
1629 | IUCV_DBF_TEXT(trace, 4, __func__); | 1630 | IUCV_DBF_TEXT(trace, 4, __func__); |
1630 | priv->conn->prof.tx_time = 0; | 1631 | priv->conn->prof.tx_time = 0; |
@@ -1636,7 +1637,7 @@ static DEVICE_ATTR(max_tx_io_time, 0644, txtime_show, txtime_write); | |||
1636 | static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, | 1637 | static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, |
1637 | char *buf) | 1638 | char *buf) |
1638 | { | 1639 | { |
1639 | struct netiucv_priv *priv = dev->driver_data; | 1640 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1640 | 1641 | ||
1641 | IUCV_DBF_TEXT(trace, 5, __func__); | 1642 | IUCV_DBF_TEXT(trace, 5, __func__); |
1642 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); | 1643 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); |
@@ -1645,7 +1646,7 @@ static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, | |||
1645 | static ssize_t txpend_write (struct device *dev, struct device_attribute *attr, | 1646 | static ssize_t txpend_write (struct device *dev, struct device_attribute *attr, |
1646 | const char *buf, size_t count) | 1647 | const char *buf, size_t count) |
1647 | { | 1648 | { |
1648 | struct netiucv_priv *priv = dev->driver_data; | 1649 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1649 | 1650 | ||
1650 | IUCV_DBF_TEXT(trace, 4, __func__); | 1651 | IUCV_DBF_TEXT(trace, 4, __func__); |
1651 | priv->conn->prof.tx_pending = 0; | 1652 | priv->conn->prof.tx_pending = 0; |
@@ -1657,7 +1658,7 @@ static DEVICE_ATTR(tx_pending, 0644, txpend_show, txpend_write); | |||
1657 | static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, | 1658 | static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, |
1658 | char *buf) | 1659 | char *buf) |
1659 | { | 1660 | { |
1660 | struct netiucv_priv *priv = dev->driver_data; | 1661 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1661 | 1662 | ||
1662 | IUCV_DBF_TEXT(trace, 5, __func__); | 1663 | IUCV_DBF_TEXT(trace, 5, __func__); |
1663 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); | 1664 | return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); |
@@ -1666,7 +1667,7 @@ static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, | |||
1666 | static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr, | 1667 | static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr, |
1667 | const char *buf, size_t count) | 1668 | const char *buf, size_t count) |
1668 | { | 1669 | { |
1669 | struct netiucv_priv *priv = dev->driver_data; | 1670 | struct netiucv_priv *priv = dev_get_drvdata(dev); |
1670 | 1671 | ||
1671 | IUCV_DBF_TEXT(trace, 4, __func__); | 1672 | IUCV_DBF_TEXT(trace, 4, __func__); |
1672 | priv->conn->prof.tx_max_pending = 0; | 1673 | priv->conn->prof.tx_max_pending = 0; |
@@ -1758,7 +1759,7 @@ static int netiucv_register_device(struct net_device *ndev) | |||
1758 | if (ret) | 1759 | if (ret) |
1759 | goto out_unreg; | 1760 | goto out_unreg; |
1760 | priv->dev = dev; | 1761 | priv->dev = dev; |
1761 | dev->driver_data = priv; | 1762 | dev_set_drvdata(dev, priv); |
1762 | return 0; | 1763 | return 0; |
1763 | 1764 | ||
1764 | out_unreg: | 1765 | out_unreg: |