Skip to content

Commit 2de4992

Browse files
committed
Merge branch 's390-next'
Julian Wiedmann says: ==================== s390/net: updates 2020-05-19 please apply the following patch series to netdev's net-next tree. s390 dropped its support for power management, this removes the relevant code from the s390 network drivers. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents fa14b9b + 97ccf6f commit 2de4992

6 files changed

Lines changed: 1 addition & 308 deletions

File tree

‎arch/s390/include/asm/ccwgroup.h‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ struct ccwgroup_device {
3636
* @set_online: function called when device is set online
3737
* @set_offline: function called when device is set offline
3838
* @shutdown: function called when device is shut down
39-
* @prepare: prepare for pm state transition
40-
* @complete: undo work done in @prepare
41-
* @freeze: callback for freezing during hibernation snapshotting
42-
* @thaw: undo work done in @freeze
43-
* @restore: callback for restoring after hibernation
4439
* @driver: embedded driver structure
4540
* @ccw_driver: supported ccw_driver (optional)
4641
*/
@@ -50,11 +45,6 @@ struct ccwgroup_driver {
5045
int (*set_online) (struct ccwgroup_device *);
5146
int (*set_offline) (struct ccwgroup_device *);
5247
void (*shutdown)(struct ccwgroup_device *);
53-
int (*prepare) (struct ccwgroup_device *);
54-
void (*complete) (struct ccwgroup_device *);
55-
int (*freeze)(struct ccwgroup_device *);
56-
int (*thaw) (struct ccwgroup_device *);
57-
int (*restore)(struct ccwgroup_device *);
5848

5949
struct device_driver driver;
6050
struct ccw_driver *ccw_driver;

‎drivers/s390/net/ctcm_main.c‎

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,43 +1698,6 @@ static void ctcm_remove_device(struct ccwgroup_device *cgdev)
16981698
put_device(&cgdev->dev);
16991699
}
17001700

1701-
static int ctcm_pm_suspend(struct ccwgroup_device *gdev)
1702-
{
1703-
struct ctcm_priv *priv = dev_get_drvdata(&gdev->dev);
1704-
1705-
if (gdev->state == CCWGROUP_OFFLINE)
1706-
return 0;
1707-
netif_device_detach(priv->channel[CTCM_READ]->netdev);
1708-
ctcm_close(priv->channel[CTCM_READ]->netdev);
1709-
if (!wait_event_timeout(priv->fsm->wait_q,
1710-
fsm_getstate(priv->fsm) == DEV_STATE_STOPPED, CTCM_TIME_5_SEC)) {
1711-
netif_device_attach(priv->channel[CTCM_READ]->netdev);
1712-
return -EBUSY;
1713-
}
1714-
ccw_device_set_offline(gdev->cdev[1]);
1715-
ccw_device_set_offline(gdev->cdev[0]);
1716-
return 0;
1717-
}
1718-
1719-
static int ctcm_pm_resume(struct ccwgroup_device *gdev)
1720-
{
1721-
struct ctcm_priv *priv = dev_get_drvdata(&gdev->dev);
1722-
int rc;
1723-
1724-
if (gdev->state == CCWGROUP_OFFLINE)
1725-
return 0;
1726-
rc = ccw_device_set_online(gdev->cdev[1]);
1727-
if (rc)
1728-
goto err_out;
1729-
rc = ccw_device_set_online(gdev->cdev[0]);
1730-
if (rc)
1731-
goto err_out;
1732-
ctcm_open(priv->channel[CTCM_READ]->netdev);
1733-
err_out:
1734-
netif_device_attach(priv->channel[CTCM_READ]->netdev);
1735-
return rc;
1736-
}
1737-
17381701
static struct ccw_device_id ctcm_ids[] = {
17391702
{CCW_DEVICE(0x3088, 0x08), .driver_info = ctcm_channel_type_parallel},
17401703
{CCW_DEVICE(0x3088, 0x1e), .driver_info = ctcm_channel_type_ficon},
@@ -1764,9 +1727,6 @@ static struct ccwgroup_driver ctcm_group_driver = {
17641727
.remove = ctcm_remove_device,
17651728
.set_online = ctcm_new_device,
17661729
.set_offline = ctcm_shutdown_device,
1767-
.freeze = ctcm_pm_suspend,
1768-
.thaw = ctcm_pm_resume,
1769-
.restore = ctcm_pm_resume,
17701730
};
17711731

17721732
static ssize_t group_store(struct device_driver *ddrv, const char *buf,

‎drivers/s390/net/lcs.c‎

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2296,60 +2296,6 @@ lcs_remove_device(struct ccwgroup_device *ccwgdev)
22962296
put_device(&ccwgdev->dev);
22972297
}
22982298

2299-
static int lcs_pm_suspend(struct lcs_card *card)
2300-
{
2301-
if (card->dev)
2302-
netif_device_detach(card->dev);
2303-
lcs_set_allowed_threads(card, 0);
2304-
lcs_wait_for_threads(card, 0xffffffff);
2305-
if (card->state != DEV_STATE_DOWN)
2306-
__lcs_shutdown_device(card->gdev, 1);
2307-
return 0;
2308-
}
2309-
2310-
static int lcs_pm_resume(struct lcs_card *card)
2311-
{
2312-
int rc = 0;
2313-
2314-
if (card->state == DEV_STATE_RECOVER)
2315-
rc = lcs_new_device(card->gdev);
2316-
if (card->dev)
2317-
netif_device_attach(card->dev);
2318-
if (rc) {
2319-
dev_warn(&card->gdev->dev, "The lcs device driver "
2320-
"failed to recover the device\n");
2321-
}
2322-
return rc;
2323-
}
2324-
2325-
static int lcs_prepare(struct ccwgroup_device *gdev)
2326-
{
2327-
return 0;
2328-
}
2329-
2330-
static void lcs_complete(struct ccwgroup_device *gdev)
2331-
{
2332-
return;
2333-
}
2334-
2335-
static int lcs_freeze(struct ccwgroup_device *gdev)
2336-
{
2337-
struct lcs_card *card = dev_get_drvdata(&gdev->dev);
2338-
return lcs_pm_suspend(card);
2339-
}
2340-
2341-
static int lcs_thaw(struct ccwgroup_device *gdev)
2342-
{
2343-
struct lcs_card *card = dev_get_drvdata(&gdev->dev);
2344-
return lcs_pm_resume(card);
2345-
}
2346-
2347-
static int lcs_restore(struct ccwgroup_device *gdev)
2348-
{
2349-
struct lcs_card *card = dev_get_drvdata(&gdev->dev);
2350-
return lcs_pm_resume(card);
2351-
}
2352-
23532299
static struct ccw_device_id lcs_ids[] = {
23542300
{CCW_DEVICE(0x3088, 0x08), .driver_info = lcs_channel_type_parallel},
23552301
{CCW_DEVICE(0x3088, 0x1f), .driver_info = lcs_channel_type_2216},
@@ -2382,11 +2328,6 @@ static struct ccwgroup_driver lcs_group_driver = {
23822328
.remove = lcs_remove_device,
23832329
.set_online = lcs_new_device,
23842330
.set_offline = lcs_shutdown_device,
2385-
.prepare = lcs_prepare,
2386-
.complete = lcs_complete,
2387-
.freeze = lcs_freeze,
2388-
.thaw = lcs_thaw,
2389-
.restore = lcs_restore,
23902331
};
23912332

23922333
static ssize_t group_store(struct device_driver *ddrv, const char *buf,

‎drivers/s390/net/netiucv.c‎

Lines changed: 1 addition & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -112,27 +112,10 @@ DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf);
112112
*/
113113
#define PRINTK_HEADER " iucv: " /* for debugging */
114114

115-
/* dummy device to make sure netiucv_pm functions are called */
116-
static struct device *netiucv_dev;
117-
118-
static int netiucv_pm_prepare(struct device *);
119-
static void netiucv_pm_complete(struct device *);
120-
static int netiucv_pm_freeze(struct device *);
121-
static int netiucv_pm_restore_thaw(struct device *);
122-
123-
static const struct dev_pm_ops netiucv_pm_ops = {
124-
.prepare = netiucv_pm_prepare,
125-
.complete = netiucv_pm_complete,
126-
.freeze = netiucv_pm_freeze,
127-
.thaw = netiucv_pm_restore_thaw,
128-
.restore = netiucv_pm_restore_thaw,
129-
};
130-
131115
static struct device_driver netiucv_driver = {
132116
.owner = THIS_MODULE,
133117
.name = "netiucv",
134118
.bus = &iucv_bus,
135-
.pm = &netiucv_pm_ops,
136119
};
137120

138121
static int netiucv_callback_connreq(struct iucv_path *, u8 *, u8 *);
@@ -213,7 +196,6 @@ struct netiucv_priv {
213196
fsm_instance *fsm;
214197
struct iucv_connection *conn;
215198
struct device *dev;
216-
int pm_state;
217199
};
218200

219201
/**
@@ -1275,72 +1257,6 @@ static int netiucv_close(struct net_device *dev)
12751257
return 0;
12761258
}
12771259

1278-
static int netiucv_pm_prepare(struct device *dev)
1279-
{
1280-
IUCV_DBF_TEXT(trace, 3, __func__);
1281-
return 0;
1282-
}
1283-
1284-
static void netiucv_pm_complete(struct device *dev)
1285-
{
1286-
IUCV_DBF_TEXT(trace, 3, __func__);
1287-
return;
1288-
}
1289-
1290-
/**
1291-
* netiucv_pm_freeze() - Freeze PM callback
1292-
* @dev: netiucv device
1293-
*
1294-
* close open netiucv interfaces
1295-
*/
1296-
static int netiucv_pm_freeze(struct device *dev)
1297-
{
1298-
struct netiucv_priv *priv = dev_get_drvdata(dev);
1299-
struct net_device *ndev = NULL;
1300-
int rc = 0;
1301-
1302-
IUCV_DBF_TEXT(trace, 3, __func__);
1303-
if (priv && priv->conn)
1304-
ndev = priv->conn->netdev;
1305-
if (!ndev)
1306-
goto out;
1307-
netif_device_detach(ndev);
1308-
priv->pm_state = fsm_getstate(priv->fsm);
1309-
rc = netiucv_close(ndev);
1310-
out:
1311-
return rc;
1312-
}
1313-
1314-
/**
1315-
* netiucv_pm_restore_thaw() - Thaw and restore PM callback
1316-
* @dev: netiucv device
1317-
*
1318-
* re-open netiucv interfaces closed during freeze
1319-
*/
1320-
static int netiucv_pm_restore_thaw(struct device *dev)
1321-
{
1322-
struct netiucv_priv *priv = dev_get_drvdata(dev);
1323-
struct net_device *ndev = NULL;
1324-
int rc = 0;
1325-
1326-
IUCV_DBF_TEXT(trace, 3, __func__);
1327-
if (priv && priv->conn)
1328-
ndev = priv->conn->netdev;
1329-
if (!ndev)
1330-
goto out;
1331-
switch (priv->pm_state) {
1332-
case DEV_STATE_RUNNING:
1333-
case DEV_STATE_STARTWAIT:
1334-
rc = netiucv_open(ndev);
1335-
break;
1336-
default:
1337-
break;
1338-
}
1339-
netif_device_attach(ndev);
1340-
out:
1341-
return rc;
1342-
}
1343-
13441260
/**
13451261
* Start transmission of a packet.
13461262
* Called from generic network device layer.
@@ -2156,7 +2072,6 @@ static void __exit netiucv_exit(void)
21562072
netiucv_unregister_device(dev);
21572073
}
21582074

2159-
device_unregister(netiucv_dev);
21602075
driver_unregister(&netiucv_driver);
21612076
iucv_unregister(&netiucv_handler, 1);
21622077
iucv_unregister_dbf_views();
@@ -2182,27 +2097,10 @@ static int __init netiucv_init(void)
21822097
IUCV_DBF_TEXT_(setup, 2, "ret %d from driver_register\n", rc);
21832098
goto out_iucv;
21842099
}
2185-
/* establish dummy device */
2186-
netiucv_dev = kzalloc(sizeof(struct device), GFP_KERNEL);
2187-
if (!netiucv_dev) {
2188-
rc = -ENOMEM;
2189-
goto out_driver;
2190-
}
2191-
dev_set_name(netiucv_dev, "netiucv");
2192-
netiucv_dev->bus = &iucv_bus;
2193-
netiucv_dev->parent = iucv_root;
2194-
netiucv_dev->release = (void (*)(struct device *))kfree;
2195-
netiucv_dev->driver = &netiucv_driver;
2196-
rc = device_register(netiucv_dev);
2197-
if (rc) {
2198-
put_device(netiucv_dev);
2199-
goto out_driver;
2200-
}
2100+
22012101
netiucv_banner();
22022102
return rc;
22032103

2204-
out_driver:
2205-
driver_unregister(&netiucv_driver);
22062104
out_iucv:
22072105
iucv_unregister(&netiucv_handler, 1);
22082106
out_dbf:

‎drivers/s390/net/qeth_core_main.c‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6434,32 +6434,6 @@ static void qeth_core_shutdown(struct ccwgroup_device *gdev)
64346434
qdio_free(CARD_DDEV(card));
64356435
}
64366436

6437-
static int qeth_suspend(struct ccwgroup_device *gdev)
6438-
{
6439-
struct qeth_card *card = dev_get_drvdata(&gdev->dev);
6440-
6441-
qeth_set_allowed_threads(card, 0, 1);
6442-
wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0);
6443-
if (gdev->state == CCWGROUP_OFFLINE)
6444-
return 0;
6445-
6446-
qeth_set_offline(card, false);
6447-
return 0;
6448-
}
6449-
6450-
static int qeth_resume(struct ccwgroup_device *gdev)
6451-
{
6452-
struct qeth_card *card = dev_get_drvdata(&gdev->dev);
6453-
int rc;
6454-
6455-
rc = qeth_set_online(card);
6456-
6457-
qeth_set_allowed_threads(card, 0xffffffff, 0);
6458-
if (rc)
6459-
dev_warn(&card->gdev->dev, "The qeth device driver failed to recover an error on the device\n");
6460-
return rc;
6461-
}
6462-
64636437
static ssize_t group_store(struct device_driver *ddrv, const char *buf,
64646438
size_t count)
64656439
{
@@ -6496,11 +6470,6 @@ static struct ccwgroup_driver qeth_core_ccwgroup_driver = {
64966470
.set_online = qeth_core_set_online,
64976471
.set_offline = qeth_core_set_offline,
64986472
.shutdown = qeth_core_shutdown,
6499-
.prepare = NULL,
6500-
.complete = NULL,
6501-
.freeze = qeth_suspend,
6502-
.thaw = qeth_resume,
6503-
.restore = qeth_resume,
65046473
};
65056474

65066475
struct qeth_card *qeth_get_card_by_busid(char *bus_id)

0 commit comments

Comments
 (0)