aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/netiucv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net/netiucv.c')
-rw-r--r--drivers/s390/net/netiucv.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index fdb02d043d3e..52574ce797b2 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -1452,7 +1452,7 @@ static int netiucv_change_mtu(struct net_device * dev, int new_mtu)
1452static ssize_t user_show(struct device *dev, struct device_attribute *attr, 1452static ssize_t user_show(struct device *dev, struct device_attribute *attr,
1453 char *buf) 1453 char *buf)
1454{ 1454{
1455 struct netiucv_priv *priv = dev->driver_data; 1455 struct netiucv_priv *priv = dev_get_drvdata(dev);
1456 1456
1457 IUCV_DBF_TEXT(trace, 5, __func__); 1457 IUCV_DBF_TEXT(trace, 5, __func__);
1458 return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid)); 1458 return sprintf(buf, "%s\n", netiucv_printname(priv->conn->userid));
@@ -1461,7 +1461,7 @@ static ssize_t user_show(struct device *dev, struct device_attribute *attr,
1461static ssize_t user_write(struct device *dev, struct device_attribute *attr, 1461static ssize_t user_write(struct device *dev, struct device_attribute *attr,
1462 const char *buf, size_t count) 1462 const char *buf, size_t count)
1463{ 1463{
1464 struct netiucv_priv *priv = dev->driver_data; 1464 struct netiucv_priv *priv = dev_get_drvdata(dev);
1465 struct net_device *ndev = priv->conn->netdev; 1465 struct net_device *ndev = priv->conn->netdev;
1466 char *p; 1466 char *p;
1467 char *tmp; 1467 char *tmp;
@@ -1518,7 +1518,8 @@ static DEVICE_ATTR(user, 0644, user_show, user_write);
1518 1518
1519static ssize_t buffer_show (struct device *dev, struct device_attribute *attr, 1519static ssize_t buffer_show (struct device *dev, struct device_attribute *attr,
1520 char *buf) 1520 char *buf)
1521{ struct netiucv_priv *priv = dev->driver_data; 1521{
1522 struct netiucv_priv *priv = dev_get_drvdata(dev);
1522 1523
1523 IUCV_DBF_TEXT(trace, 5, __func__); 1524 IUCV_DBF_TEXT(trace, 5, __func__);
1524 return sprintf(buf, "%d\n", priv->conn->max_buffsize); 1525 return sprintf(buf, "%d\n", priv->conn->max_buffsize);
@@ -1527,7 +1528,7 @@ static ssize_t buffer_show (struct device *dev, struct device_attribute *attr,
1527static ssize_t buffer_write (struct device *dev, struct device_attribute *attr, 1528static ssize_t buffer_write (struct device *dev, struct device_attribute *attr,
1528 const char *buf, size_t count) 1529 const char *buf, size_t count)
1529{ 1530{
1530 struct netiucv_priv *priv = dev->driver_data; 1531 struct netiucv_priv *priv = dev_get_drvdata(dev);
1531 struct net_device *ndev = priv->conn->netdev; 1532 struct net_device *ndev = priv->conn->netdev;
1532 char *e; 1533 char *e;
1533 int bs1; 1534 int bs1;
@@ -1575,7 +1576,7 @@ static DEVICE_ATTR(buffer, 0644, buffer_show, buffer_write);
1575static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr, 1576static ssize_t dev_fsm_show (struct device *dev, struct device_attribute *attr,
1576 char *buf) 1577 char *buf)
1577{ 1578{
1578 struct netiucv_priv *priv = dev->driver_data; 1579 struct netiucv_priv *priv = dev_get_drvdata(dev);
1579 1580
1580 IUCV_DBF_TEXT(trace, 5, __func__); 1581 IUCV_DBF_TEXT(trace, 5, __func__);
1581 return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm)); 1582 return sprintf(buf, "%s\n", fsm_getstate_str(priv->fsm));
@@ -1586,7 +1587,7 @@ static DEVICE_ATTR(device_fsm_state, 0444, dev_fsm_show, NULL);
1586static ssize_t conn_fsm_show (struct device *dev, 1587static ssize_t conn_fsm_show (struct device *dev,
1587 struct device_attribute *attr, char *buf) 1588 struct device_attribute *attr, char *buf)
1588{ 1589{
1589 struct netiucv_priv *priv = dev->driver_data; 1590 struct netiucv_priv *priv = dev_get_drvdata(dev);
1590 1591
1591 IUCV_DBF_TEXT(trace, 5, __func__); 1592 IUCV_DBF_TEXT(trace, 5, __func__);
1592 return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm)); 1593 return sprintf(buf, "%s\n", fsm_getstate_str(priv->conn->fsm));
@@ -1597,7 +1598,7 @@ static DEVICE_ATTR(connection_fsm_state, 0444, conn_fsm_show, NULL);
1597static ssize_t maxmulti_show (struct device *dev, 1598static ssize_t maxmulti_show (struct device *dev,
1598 struct device_attribute *attr, char *buf) 1599 struct device_attribute *attr, char *buf)
1599{ 1600{
1600 struct netiucv_priv *priv = dev->driver_data; 1601 struct netiucv_priv *priv = dev_get_drvdata(dev);
1601 1602
1602 IUCV_DBF_TEXT(trace, 5, __func__); 1603 IUCV_DBF_TEXT(trace, 5, __func__);
1603 return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti); 1604 return sprintf(buf, "%ld\n", priv->conn->prof.maxmulti);
@@ -1607,7 +1608,7 @@ static ssize_t maxmulti_write (struct device *dev,
1607 struct device_attribute *attr, 1608 struct device_attribute *attr,
1608 const char *buf, size_t count) 1609 const char *buf, size_t count)
1609{ 1610{
1610 struct netiucv_priv *priv = dev->driver_data; 1611 struct netiucv_priv *priv = dev_get_drvdata(dev);
1611 1612
1612 IUCV_DBF_TEXT(trace, 4, __func__); 1613 IUCV_DBF_TEXT(trace, 4, __func__);
1613 priv->conn->prof.maxmulti = 0; 1614 priv->conn->prof.maxmulti = 0;
@@ -1619,7 +1620,7 @@ static DEVICE_ATTR(max_tx_buffer_used, 0644, maxmulti_show, maxmulti_write);
1619static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr, 1620static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr,
1620 char *buf) 1621 char *buf)
1621{ 1622{
1622 struct netiucv_priv *priv = dev->driver_data; 1623 struct netiucv_priv *priv = dev_get_drvdata(dev);
1623 1624
1624 IUCV_DBF_TEXT(trace, 5, __func__); 1625 IUCV_DBF_TEXT(trace, 5, __func__);
1625 return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue); 1626 return sprintf(buf, "%ld\n", priv->conn->prof.maxcqueue);
@@ -1628,7 +1629,7 @@ static ssize_t maxcq_show (struct device *dev, struct device_attribute *attr,
1628static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr, 1629static ssize_t maxcq_write (struct device *dev, struct device_attribute *attr,
1629 const char *buf, size_t count) 1630 const char *buf, size_t count)
1630{ 1631{
1631 struct netiucv_priv *priv = dev->driver_data; 1632 struct netiucv_priv *priv = dev_get_drvdata(dev);
1632 1633
1633 IUCV_DBF_TEXT(trace, 4, __func__); 1634 IUCV_DBF_TEXT(trace, 4, __func__);
1634 priv->conn->prof.maxcqueue = 0; 1635 priv->conn->prof.maxcqueue = 0;
@@ -1640,7 +1641,7 @@ static DEVICE_ATTR(max_chained_skbs, 0644, maxcq_show, maxcq_write);
1640static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr, 1641static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr,
1641 char *buf) 1642 char *buf)
1642{ 1643{
1643 struct netiucv_priv *priv = dev->driver_data; 1644 struct netiucv_priv *priv = dev_get_drvdata(dev);
1644 1645
1645 IUCV_DBF_TEXT(trace, 5, __func__); 1646 IUCV_DBF_TEXT(trace, 5, __func__);
1646 return sprintf(buf, "%ld\n", priv->conn->prof.doios_single); 1647 return sprintf(buf, "%ld\n", priv->conn->prof.doios_single);
@@ -1649,7 +1650,7 @@ static ssize_t sdoio_show (struct device *dev, struct device_attribute *attr,
1649static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr, 1650static ssize_t sdoio_write (struct device *dev, struct device_attribute *attr,
1650 const char *buf, size_t count) 1651 const char *buf, size_t count)
1651{ 1652{
1652 struct netiucv_priv *priv = dev->driver_data; 1653 struct netiucv_priv *priv = dev_get_drvdata(dev);
1653 1654
1654 IUCV_DBF_TEXT(trace, 4, __func__); 1655 IUCV_DBF_TEXT(trace, 4, __func__);
1655 priv->conn->prof.doios_single = 0; 1656 priv->conn->prof.doios_single = 0;
@@ -1661,7 +1662,7 @@ static DEVICE_ATTR(tx_single_write_ops, 0644, sdoio_show, sdoio_write);
1661static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr, 1662static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr,
1662 char *buf) 1663 char *buf)
1663{ 1664{
1664 struct netiucv_priv *priv = dev->driver_data; 1665 struct netiucv_priv *priv = dev_get_drvdata(dev);
1665 1666
1666 IUCV_DBF_TEXT(trace, 5, __func__); 1667 IUCV_DBF_TEXT(trace, 5, __func__);
1667 return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi); 1668 return sprintf(buf, "%ld\n", priv->conn->prof.doios_multi);
@@ -1670,7 +1671,7 @@ static ssize_t mdoio_show (struct device *dev, struct device_attribute *attr,
1670static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr, 1671static ssize_t mdoio_write (struct device *dev, struct device_attribute *attr,
1671 const char *buf, size_t count) 1672 const char *buf, size_t count)
1672{ 1673{
1673 struct netiucv_priv *priv = dev->driver_data; 1674 struct netiucv_priv *priv = dev_get_drvdata(dev);
1674 1675
1675 IUCV_DBF_TEXT(trace, 5, __func__); 1676 IUCV_DBF_TEXT(trace, 5, __func__);
1676 priv->conn->prof.doios_multi = 0; 1677 priv->conn->prof.doios_multi = 0;
@@ -1682,7 +1683,7 @@ static DEVICE_ATTR(tx_multi_write_ops, 0644, mdoio_show, mdoio_write);
1682static ssize_t txlen_show (struct device *dev, struct device_attribute *attr, 1683static ssize_t txlen_show (struct device *dev, struct device_attribute *attr,
1683 char *buf) 1684 char *buf)
1684{ 1685{
1685 struct netiucv_priv *priv = dev->driver_data; 1686 struct netiucv_priv *priv = dev_get_drvdata(dev);
1686 1687
1687 IUCV_DBF_TEXT(trace, 5, __func__); 1688 IUCV_DBF_TEXT(trace, 5, __func__);
1688 return sprintf(buf, "%ld\n", priv->conn->prof.txlen); 1689 return sprintf(buf, "%ld\n", priv->conn->prof.txlen);
@@ -1691,7 +1692,7 @@ static ssize_t txlen_show (struct device *dev, struct device_attribute *attr,
1691static ssize_t txlen_write (struct device *dev, struct device_attribute *attr, 1692static ssize_t txlen_write (struct device *dev, struct device_attribute *attr,
1692 const char *buf, size_t count) 1693 const char *buf, size_t count)
1693{ 1694{
1694 struct netiucv_priv *priv = dev->driver_data; 1695 struct netiucv_priv *priv = dev_get_drvdata(dev);
1695 1696
1696 IUCV_DBF_TEXT(trace, 4, __func__); 1697 IUCV_DBF_TEXT(trace, 4, __func__);
1697 priv->conn->prof.txlen = 0; 1698 priv->conn->prof.txlen = 0;
@@ -1703,7 +1704,7 @@ static DEVICE_ATTR(netto_bytes, 0644, txlen_show, txlen_write);
1703static ssize_t txtime_show (struct device *dev, struct device_attribute *attr, 1704static ssize_t txtime_show (struct device *dev, struct device_attribute *attr,
1704 char *buf) 1705 char *buf)
1705{ 1706{
1706 struct netiucv_priv *priv = dev->driver_data; 1707 struct netiucv_priv *priv = dev_get_drvdata(dev);
1707 1708
1708 IUCV_DBF_TEXT(trace, 5, __func__); 1709 IUCV_DBF_TEXT(trace, 5, __func__);
1709 return sprintf(buf, "%ld\n", priv->conn->prof.tx_time); 1710 return sprintf(buf, "%ld\n", priv->conn->prof.tx_time);
@@ -1712,7 +1713,7 @@ static ssize_t txtime_show (struct device *dev, struct device_attribute *attr,
1712static ssize_t txtime_write (struct device *dev, struct device_attribute *attr, 1713static ssize_t txtime_write (struct device *dev, struct device_attribute *attr,
1713 const char *buf, size_t count) 1714 const char *buf, size_t count)
1714{ 1715{
1715 struct netiucv_priv *priv = dev->driver_data; 1716 struct netiucv_priv *priv = dev_get_drvdata(dev);
1716 1717
1717 IUCV_DBF_TEXT(trace, 4, __func__); 1718 IUCV_DBF_TEXT(trace, 4, __func__);
1718 priv->conn->prof.tx_time = 0; 1719 priv->conn->prof.tx_time = 0;
@@ -1724,7 +1725,7 @@ static DEVICE_ATTR(max_tx_io_time, 0644, txtime_show, txtime_write);
1724static ssize_t txpend_show (struct device *dev, struct device_attribute *attr, 1725static ssize_t txpend_show (struct device *dev, struct device_attribute *attr,
1725 char *buf) 1726 char *buf)
1726{ 1727{
1727 struct netiucv_priv *priv = dev->driver_data; 1728 struct netiucv_priv *priv = dev_get_drvdata(dev);
1728 1729
1729 IUCV_DBF_TEXT(trace, 5, __func__); 1730 IUCV_DBF_TEXT(trace, 5, __func__);
1730 return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending); 1731 return sprintf(buf, "%ld\n", priv->conn->prof.tx_pending);
@@ -1733,7 +1734,7 @@ static ssize_t txpend_show (struct device *dev, struct device_attribute *attr,
1733static ssize_t txpend_write (struct device *dev, struct device_attribute *attr, 1734static ssize_t txpend_write (struct device *dev, struct device_attribute *attr,
1734 const char *buf, size_t count) 1735 const char *buf, size_t count)
1735{ 1736{
1736 struct netiucv_priv *priv = dev->driver_data; 1737 struct netiucv_priv *priv = dev_get_drvdata(dev);
1737 1738
1738 IUCV_DBF_TEXT(trace, 4, __func__); 1739 IUCV_DBF_TEXT(trace, 4, __func__);
1739 priv->conn->prof.tx_pending = 0; 1740 priv->conn->prof.tx_pending = 0;
@@ -1745,7 +1746,7 @@ static DEVICE_ATTR(tx_pending, 0644, txpend_show, txpend_write);
1745static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr, 1746static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr,
1746 char *buf) 1747 char *buf)
1747{ 1748{
1748 struct netiucv_priv *priv = dev->driver_data; 1749 struct netiucv_priv *priv = dev_get_drvdata(dev);
1749 1750
1750 IUCV_DBF_TEXT(trace, 5, __func__); 1751 IUCV_DBF_TEXT(trace, 5, __func__);
1751 return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending); 1752 return sprintf(buf, "%ld\n", priv->conn->prof.tx_max_pending);
@@ -1754,7 +1755,7 @@ static ssize_t txmpnd_show (struct device *dev, struct device_attribute *attr,
1754static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr, 1755static ssize_t txmpnd_write (struct device *dev, struct device_attribute *attr,
1755 const char *buf, size_t count) 1756 const char *buf, size_t count)
1756{ 1757{
1757 struct netiucv_priv *priv = dev->driver_data; 1758 struct netiucv_priv *priv = dev_get_drvdata(dev);
1758 1759
1759 IUCV_DBF_TEXT(trace, 4, __func__); 1760 IUCV_DBF_TEXT(trace, 4, __func__);
1760 priv->conn->prof.tx_max_pending = 0; 1761 priv->conn->prof.tx_max_pending = 0;
@@ -1845,7 +1846,7 @@ static int netiucv_register_device(struct net_device *ndev)
1845 if (ret) 1846 if (ret)
1846 goto out_unreg; 1847 goto out_unreg;
1847 priv->dev = dev; 1848 priv->dev = dev;
1848 dev->driver_data = priv; 1849 dev_set_drvdata(dev, priv);
1849 return 0; 1850 return 0;
1850 1851
1851out_unreg: 1852out_unreg: