.. | .. |
---|
504 | 504 | LCS_DBF_TEXT(4,trace,"clearch"); |
---|
505 | 505 | LCS_DBF_TEXT_(4, trace, "%s", dev_name(&channel->ccwdev->dev)); |
---|
506 | 506 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); |
---|
507 | | - rc = ccw_device_clear(channel->ccwdev, (addr_t) channel); |
---|
| 507 | + rc = ccw_device_clear(channel->ccwdev, 0); |
---|
508 | 508 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); |
---|
509 | 509 | if (rc) { |
---|
510 | 510 | LCS_DBF_TEXT_(4, trace, "ecsc%s", |
---|
.. | .. |
---|
532 | 532 | LCS_DBF_TEXT_(4, trace, "%s", dev_name(&channel->ccwdev->dev)); |
---|
533 | 533 | channel->state = LCS_CH_STATE_INIT; |
---|
534 | 534 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); |
---|
535 | | - rc = ccw_device_halt(channel->ccwdev, (addr_t) channel); |
---|
| 535 | + rc = ccw_device_halt(channel->ccwdev, 0); |
---|
536 | 536 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); |
---|
537 | 537 | if (rc) { |
---|
538 | 538 | LCS_DBF_TEXT_(4, trace, "ehsc%s", |
---|
.. | .. |
---|
1427 | 1427 | channel->state = LCS_CH_STATE_SUSPENDED; |
---|
1428 | 1428 | if (irb->scsw.cmd.fctl & SCSW_FCTL_HALT_FUNC) { |
---|
1429 | 1429 | if (irb->scsw.cmd.cc != 0) { |
---|
1430 | | - ccw_device_halt(channel->ccwdev, (addr_t) channel); |
---|
| 1430 | + ccw_device_halt(channel->ccwdev, 0); |
---|
1431 | 1431 | return; |
---|
1432 | 1432 | } |
---|
1433 | 1433 | /* The channel has been stopped by halt_IO. */ |
---|
.. | .. |
---|
1518 | 1518 | /** |
---|
1519 | 1519 | * Packet transmit function called by network stack |
---|
1520 | 1520 | */ |
---|
1521 | | -static int |
---|
1522 | | -__lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb, |
---|
1523 | | - struct net_device *dev) |
---|
| 1521 | +static netdev_tx_t __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb, |
---|
| 1522 | + struct net_device *dev) |
---|
1524 | 1523 | { |
---|
1525 | 1524 | struct lcs_header *header; |
---|
1526 | 1525 | int rc = NETDEV_TX_OK; |
---|
.. | .. |
---|
1581 | 1580 | return rc; |
---|
1582 | 1581 | } |
---|
1583 | 1582 | |
---|
1584 | | -static int |
---|
1585 | | -lcs_start_xmit(struct sk_buff *skb, struct net_device *dev) |
---|
| 1583 | +static netdev_tx_t lcs_start_xmit(struct sk_buff *skb, struct net_device *dev) |
---|
1586 | 1584 | { |
---|
1587 | 1585 | struct lcs_card *card; |
---|
1588 | 1586 | int rc; |
---|
.. | .. |
---|
1735 | 1733 | lcs_schedule_recovery(card); |
---|
1736 | 1734 | break; |
---|
1737 | 1735 | case LCS_CMD_STOPLAN: |
---|
1738 | | - pr_warn("Stoplan for %s initiated by LGW\n", |
---|
1739 | | - card->dev->name); |
---|
1740 | | - if (card->dev) |
---|
| 1736 | + if (card->dev) { |
---|
| 1737 | + pr_warn("Stoplan for %s initiated by LGW\n", |
---|
| 1738 | + card->dev->name); |
---|
1741 | 1739 | netif_carrier_off(card->dev); |
---|
| 1740 | + } |
---|
1742 | 1741 | break; |
---|
1743 | 1742 | default: |
---|
1744 | 1743 | LCS_DBF_TEXT(5, trace, "noLGWcmd"); |
---|
.. | .. |
---|
2296 | 2295 | put_device(&ccwgdev->dev); |
---|
2297 | 2296 | } |
---|
2298 | 2297 | |
---|
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 | | - |
---|
2353 | 2298 | static struct ccw_device_id lcs_ids[] = { |
---|
2354 | 2299 | {CCW_DEVICE(0x3088, 0x08), .driver_info = lcs_channel_type_parallel}, |
---|
2355 | 2300 | {CCW_DEVICE(0x3088, 0x1f), .driver_info = lcs_channel_type_2216}, |
---|
.. | .. |
---|
2382 | 2327 | .remove = lcs_remove_device, |
---|
2383 | 2328 | .set_online = lcs_new_device, |
---|
2384 | 2329 | .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, |
---|
2390 | 2330 | }; |
---|
2391 | 2331 | |
---|
2392 | 2332 | static ssize_t group_store(struct device_driver *ddrv, const char *buf, |
---|