aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-03-23 11:24:57 -0400
committerDavid S. Miller <davem@davemloft.net>2018-03-23 11:31:58 -0400
commit03fe2debbb2771fb90881e4ce8109b09cf772a5c (patch)
treefbaf8738296b2e9dcba81c6daef2d515b6c4948c /drivers/s390
parent6686c459e1449a3ee5f3fd313b0a559ace7a700e (diff)
parentf36b7534b83357cf52e747905de6d65b4f7c2512 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Fun set of conflict resolutions here... For the mac80211 stuff, these were fortunately just parallel adds. Trivially resolved. In drivers/net/phy/phy.c we had a bug fix in 'net' that moved the function phy_disable_interrupts() earlier in the file, whilst in 'net-next' the phy_error() call from this function was removed. In net/ipv4/xfrm4_policy.c, David Ahern's changes to remove the 'rt_table_id' member of rtable collided with a bug fix in 'net' that added a new struct member "rt_mtu_locked" which needs to be copied over here. The mlxsw driver conflict consisted of net-next separating the span code and definitions into separate files, whilst a 'net' bug fix made some changes to that moved code. The mlx5 infiniband conflict resolution was quite non-trivial, the RDMA tree's merge commit was used as a guide here, and here are their notes: ==================== Due to bug fixes found by the syzkaller bot and taken into the for-rc branch after development for the 4.17 merge window had already started being taken into the for-next branch, there were fairly non-trivial merge issues that would need to be resolved between the for-rc branch and the for-next branch. This merge resolves those conflicts and provides a unified base upon which ongoing development for 4.17 can be based. Conflicts: drivers/infiniband/hw/mlx5/main.c - Commit 42cea83f9524 (IB/mlx5: Fix cleanup order on unload) added to for-rc and commit b5ca15ad7e61 (IB/mlx5: Add proper representors support) add as part of the devel cycle both needed to modify the init/de-init functions used by mlx5. To support the new representors, the new functions added by the cleanup patch needed to be made non-static, and the init/de-init list added by the representors patch needed to be modified to match the init/de-init list changes made by the cleanup patch. Updates: drivers/infiniband/hw/mlx5/mlx5_ib.h - Update function prototypes added by representors patch to reflect new function names as changed by cleanup patch drivers/infiniband/hw/mlx5/ib_rep.c - Update init/de-init stage list to match new order from cleanup patch ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd.c21
-rw-r--r--drivers/s390/cio/device_fsm.c7
-rw-r--r--drivers/s390/cio/device_ops.c72
-rw-r--r--drivers/s390/cio/io_sch.h1
-rw-r--r--drivers/s390/net/qeth_core_main.c21
-rw-r--r--drivers/s390/net/qeth_l2_main.c2
-rw-r--r--drivers/s390/net/qeth_l3_main.c2
7 files changed, 62 insertions, 64 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index a7c15f0085e2..ecef8e73d40b 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -2581,8 +2581,6 @@ int dasd_cancel_req(struct dasd_ccw_req *cqr)
2581 case DASD_CQR_QUEUED: 2581 case DASD_CQR_QUEUED:
2582 /* request was not started - just set to cleared */ 2582 /* request was not started - just set to cleared */
2583 cqr->status = DASD_CQR_CLEARED; 2583 cqr->status = DASD_CQR_CLEARED;
2584 if (cqr->callback_data == DASD_SLEEPON_START_TAG)
2585 cqr->callback_data = DASD_SLEEPON_END_TAG;
2586 break; 2584 break;
2587 case DASD_CQR_IN_IO: 2585 case DASD_CQR_IN_IO:
2588 /* request in IO - terminate IO and release again */ 2586 /* request in IO - terminate IO and release again */
@@ -3902,9 +3900,12 @@ static int dasd_generic_requeue_all_requests(struct dasd_device *device)
3902 wait_event(dasd_flush_wq, 3900 wait_event(dasd_flush_wq,
3903 (cqr->status != DASD_CQR_CLEAR_PENDING)); 3901 (cqr->status != DASD_CQR_CLEAR_PENDING));
3904 3902
3905 /* mark sleepon requests as ended */ 3903 /*
3906 if (cqr->callback_data == DASD_SLEEPON_START_TAG) 3904 * requeue requests to blocklayer will only work
3907 cqr->callback_data = DASD_SLEEPON_END_TAG; 3905 * for block device requests
3906 */
3907 if (_dasd_requeue_request(cqr))
3908 continue;
3908 3909
3909 /* remove requests from device and block queue */ 3910 /* remove requests from device and block queue */
3910 list_del_init(&cqr->devlist); 3911 list_del_init(&cqr->devlist);
@@ -3917,13 +3918,6 @@ static int dasd_generic_requeue_all_requests(struct dasd_device *device)
3917 cqr = refers; 3918 cqr = refers;
3918 } 3919 }
3919 3920
3920 /*
3921 * requeue requests to blocklayer will only work
3922 * for block device requests
3923 */
3924 if (_dasd_requeue_request(cqr))
3925 continue;
3926
3927 if (cqr->block) 3921 if (cqr->block)
3928 list_del_init(&cqr->blocklist); 3922 list_del_init(&cqr->blocklist);
3929 cqr->block->base->discipline->free_cp( 3923 cqr->block->base->discipline->free_cp(
@@ -3940,8 +3934,7 @@ static int dasd_generic_requeue_all_requests(struct dasd_device *device)
3940 list_splice_tail(&requeue_queue, &device->ccw_queue); 3934 list_splice_tail(&requeue_queue, &device->ccw_queue);
3941 spin_unlock_irq(get_ccwdev_lock(device->cdev)); 3935 spin_unlock_irq(get_ccwdev_lock(device->cdev));
3942 } 3936 }
3943 /* wake up generic waitqueue for eventually ended sleepon requests */ 3937 dasd_schedule_device_bh(device);
3944 wake_up(&generic_waitq);
3945 return rc; 3938 return rc;
3946} 3939}
3947 3940
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index 1319122e9d12..9169af7dbb43 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -795,6 +795,7 @@ ccw_device_online_timeout(struct ccw_device *cdev, enum dev_event dev_event)
795 795
796 ccw_device_set_timeout(cdev, 0); 796 ccw_device_set_timeout(cdev, 0);
797 cdev->private->iretry = 255; 797 cdev->private->iretry = 255;
798 cdev->private->async_kill_io_rc = -ETIMEDOUT;
798 ret = ccw_device_cancel_halt_clear(cdev); 799 ret = ccw_device_cancel_halt_clear(cdev);
799 if (ret == -EBUSY) { 800 if (ret == -EBUSY) {
800 ccw_device_set_timeout(cdev, 3*HZ); 801 ccw_device_set_timeout(cdev, 3*HZ);
@@ -871,7 +872,7 @@ ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event)
871 /* OK, i/o is dead now. Call interrupt handler. */ 872 /* OK, i/o is dead now. Call interrupt handler. */
872 if (cdev->handler) 873 if (cdev->handler)
873 cdev->handler(cdev, cdev->private->intparm, 874 cdev->handler(cdev, cdev->private->intparm,
874 ERR_PTR(-EIO)); 875 ERR_PTR(cdev->private->async_kill_io_rc));
875} 876}
876 877
877static void 878static void
@@ -888,14 +889,16 @@ ccw_device_killing_timeout(struct ccw_device *cdev, enum dev_event dev_event)
888 ccw_device_online_verify(cdev, 0); 889 ccw_device_online_verify(cdev, 0);
889 if (cdev->handler) 890 if (cdev->handler)
890 cdev->handler(cdev, cdev->private->intparm, 891 cdev->handler(cdev, cdev->private->intparm,
891 ERR_PTR(-EIO)); 892 ERR_PTR(cdev->private->async_kill_io_rc));
892} 893}
893 894
894void ccw_device_kill_io(struct ccw_device *cdev) 895void ccw_device_kill_io(struct ccw_device *cdev)
895{ 896{
896 int ret; 897 int ret;
897 898
899 ccw_device_set_timeout(cdev, 0);
898 cdev->private->iretry = 255; 900 cdev->private->iretry = 255;
901 cdev->private->async_kill_io_rc = -EIO;
899 ret = ccw_device_cancel_halt_clear(cdev); 902 ret = ccw_device_cancel_halt_clear(cdev);
900 if (ret == -EBUSY) { 903 if (ret == -EBUSY) {
901 ccw_device_set_timeout(cdev, 3*HZ); 904 ccw_device_set_timeout(cdev, 3*HZ);
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c
index 1caf6a398760..75ce12a24dc2 100644
--- a/drivers/s390/cio/device_ops.c
+++ b/drivers/s390/cio/device_ops.c
@@ -159,7 +159,7 @@ int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm)
159} 159}
160 160
161/** 161/**
162 * ccw_device_start_key() - start a s390 channel program with key 162 * ccw_device_start_timeout_key() - start a s390 channel program with timeout and key
163 * @cdev: target ccw device 163 * @cdev: target ccw device
164 * @cpa: logical start address of channel program 164 * @cpa: logical start address of channel program
165 * @intparm: user specific interruption parameter; will be presented back to 165 * @intparm: user specific interruption parameter; will be presented back to
@@ -170,10 +170,15 @@ int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm)
170 * @key: storage key to be used for the I/O 170 * @key: storage key to be used for the I/O
171 * @flags: additional flags; defines the action to be performed for I/O 171 * @flags: additional flags; defines the action to be performed for I/O
172 * processing. 172 * processing.
173 * @expires: timeout value in jiffies
173 * 174 *
174 * Start a S/390 channel program. When the interrupt arrives, the 175 * Start a S/390 channel program. When the interrupt arrives, the
175 * IRQ handler is called, either immediately, delayed (dev-end missing, 176 * IRQ handler is called, either immediately, delayed (dev-end missing,
176 * or sense required) or never (no IRQ handler registered). 177 * or sense required) or never (no IRQ handler registered).
178 * This function notifies the device driver if the channel program has not
179 * completed during the time specified by @expires. If a timeout occurs, the
180 * channel program is terminated via xsch, hsch or csch, and the device's
181 * interrupt handler will be called with an irb containing ERR_PTR(-%ETIMEDOUT).
177 * Returns: 182 * Returns:
178 * %0, if the operation was successful; 183 * %0, if the operation was successful;
179 * -%EBUSY, if the device is busy, or status pending; 184 * -%EBUSY, if the device is busy, or status pending;
@@ -182,9 +187,9 @@ int ccw_device_clear(struct ccw_device *cdev, unsigned long intparm)
182 * Context: 187 * Context:
183 * Interrupts disabled, ccw device lock held 188 * Interrupts disabled, ccw device lock held
184 */ 189 */
185int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa, 190int ccw_device_start_timeout_key(struct ccw_device *cdev, struct ccw1 *cpa,
186 unsigned long intparm, __u8 lpm, __u8 key, 191 unsigned long intparm, __u8 lpm, __u8 key,
187 unsigned long flags) 192 unsigned long flags, int expires)
188{ 193{
189 struct subchannel *sch; 194 struct subchannel *sch;
190 int ret; 195 int ret;
@@ -224,6 +229,8 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
224 switch (ret) { 229 switch (ret) {
225 case 0: 230 case 0:
226 cdev->private->intparm = intparm; 231 cdev->private->intparm = intparm;
232 if (expires)
233 ccw_device_set_timeout(cdev, expires);
227 break; 234 break;
228 case -EACCES: 235 case -EACCES:
229 case -ENODEV: 236 case -ENODEV:
@@ -234,7 +241,7 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
234} 241}
235 242
236/** 243/**
237 * ccw_device_start_timeout_key() - start a s390 channel program with timeout and key 244 * ccw_device_start_key() - start a s390 channel program with key
238 * @cdev: target ccw device 245 * @cdev: target ccw device
239 * @cpa: logical start address of channel program 246 * @cpa: logical start address of channel program
240 * @intparm: user specific interruption parameter; will be presented back to 247 * @intparm: user specific interruption parameter; will be presented back to
@@ -245,15 +252,10 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
245 * @key: storage key to be used for the I/O 252 * @key: storage key to be used for the I/O
246 * @flags: additional flags; defines the action to be performed for I/O 253 * @flags: additional flags; defines the action to be performed for I/O
247 * processing. 254 * processing.
248 * @expires: timeout value in jiffies
249 * 255 *
250 * Start a S/390 channel program. When the interrupt arrives, the 256 * Start a S/390 channel program. When the interrupt arrives, the
251 * IRQ handler is called, either immediately, delayed (dev-end missing, 257 * IRQ handler is called, either immediately, delayed (dev-end missing,
252 * or sense required) or never (no IRQ handler registered). 258 * or sense required) or never (no IRQ handler registered).
253 * This function notifies the device driver if the channel program has not
254 * completed during the time specified by @expires. If a timeout occurs, the
255 * channel program is terminated via xsch, hsch or csch, and the device's
256 * interrupt handler will be called with an irb containing ERR_PTR(-%ETIMEDOUT).
257 * Returns: 259 * Returns:
258 * %0, if the operation was successful; 260 * %0, if the operation was successful;
259 * -%EBUSY, if the device is busy, or status pending; 261 * -%EBUSY, if the device is busy, or status pending;
@@ -262,19 +264,12 @@ int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
262 * Context: 264 * Context:
263 * Interrupts disabled, ccw device lock held 265 * Interrupts disabled, ccw device lock held
264 */ 266 */
265int ccw_device_start_timeout_key(struct ccw_device *cdev, struct ccw1 *cpa, 267int ccw_device_start_key(struct ccw_device *cdev, struct ccw1 *cpa,
266 unsigned long intparm, __u8 lpm, __u8 key, 268 unsigned long intparm, __u8 lpm, __u8 key,
267 unsigned long flags, int expires) 269 unsigned long flags)
268{ 270{
269 int ret; 271 return ccw_device_start_timeout_key(cdev, cpa, intparm, lpm, key,
270 272 flags, 0);
271 if (!cdev)
272 return -ENODEV;
273 ccw_device_set_timeout(cdev, expires);
274 ret = ccw_device_start_key(cdev, cpa, intparm, lpm, key, flags);
275 if (ret != 0)
276 ccw_device_set_timeout(cdev, 0);
277 return ret;
278} 273}
279 274
280/** 275/**
@@ -489,18 +484,20 @@ void ccw_device_get_id(struct ccw_device *cdev, struct ccw_dev_id *dev_id)
489EXPORT_SYMBOL(ccw_device_get_id); 484EXPORT_SYMBOL(ccw_device_get_id);
490 485
491/** 486/**
492 * ccw_device_tm_start_key() - perform start function 487 * ccw_device_tm_start_timeout_key() - perform start function
493 * @cdev: ccw device on which to perform the start function 488 * @cdev: ccw device on which to perform the start function
494 * @tcw: transport-command word to be started 489 * @tcw: transport-command word to be started
495 * @intparm: user defined parameter to be passed to the interrupt handler 490 * @intparm: user defined parameter to be passed to the interrupt handler
496 * @lpm: mask of paths to use 491 * @lpm: mask of paths to use
497 * @key: storage key to use for storage access 492 * @key: storage key to use for storage access
493 * @expires: time span in jiffies after which to abort request
498 * 494 *
499 * Start the tcw on the given ccw device. Return zero on success, non-zero 495 * Start the tcw on the given ccw device. Return zero on success, non-zero
500 * otherwise. 496 * otherwise.
501 */ 497 */
502int ccw_device_tm_start_key(struct ccw_device *cdev, struct tcw *tcw, 498int ccw_device_tm_start_timeout_key(struct ccw_device *cdev, struct tcw *tcw,
503 unsigned long intparm, u8 lpm, u8 key) 499 unsigned long intparm, u8 lpm, u8 key,
500 int expires)
504{ 501{
505 struct subchannel *sch; 502 struct subchannel *sch;
506 int rc; 503 int rc;
@@ -527,37 +524,32 @@ int ccw_device_tm_start_key(struct ccw_device *cdev, struct tcw *tcw,
527 return -EACCES; 524 return -EACCES;
528 } 525 }
529 rc = cio_tm_start_key(sch, tcw, lpm, key); 526 rc = cio_tm_start_key(sch, tcw, lpm, key);
530 if (rc == 0) 527 if (rc == 0) {
531 cdev->private->intparm = intparm; 528 cdev->private->intparm = intparm;
529 if (expires)
530 ccw_device_set_timeout(cdev, expires);
531 }
532 return rc; 532 return rc;
533} 533}
534EXPORT_SYMBOL(ccw_device_tm_start_key); 534EXPORT_SYMBOL(ccw_device_tm_start_timeout_key);
535 535
536/** 536/**
537 * ccw_device_tm_start_timeout_key() - perform start function 537 * ccw_device_tm_start_key() - perform start function
538 * @cdev: ccw device on which to perform the start function 538 * @cdev: ccw device on which to perform the start function
539 * @tcw: transport-command word to be started 539 * @tcw: transport-command word to be started
540 * @intparm: user defined parameter to be passed to the interrupt handler 540 * @intparm: user defined parameter to be passed to the interrupt handler
541 * @lpm: mask of paths to use 541 * @lpm: mask of paths to use
542 * @key: storage key to use for storage access 542 * @key: storage key to use for storage access
543 * @expires: time span in jiffies after which to abort request
544 * 543 *
545 * Start the tcw on the given ccw device. Return zero on success, non-zero 544 * Start the tcw on the given ccw device. Return zero on success, non-zero
546 * otherwise. 545 * otherwise.
547 */ 546 */
548int ccw_device_tm_start_timeout_key(struct ccw_device *cdev, struct tcw *tcw, 547int ccw_device_tm_start_key(struct ccw_device *cdev, struct tcw *tcw,
549 unsigned long intparm, u8 lpm, u8 key, 548 unsigned long intparm, u8 lpm, u8 key)
550 int expires)
551{ 549{
552 int ret; 550 return ccw_device_tm_start_timeout_key(cdev, tcw, intparm, lpm, key, 0);
553
554 ccw_device_set_timeout(cdev, expires);
555 ret = ccw_device_tm_start_key(cdev, tcw, intparm, lpm, key);
556 if (ret != 0)
557 ccw_device_set_timeout(cdev, 0);
558 return ret;
559} 551}
560EXPORT_SYMBOL(ccw_device_tm_start_timeout_key); 552EXPORT_SYMBOL(ccw_device_tm_start_key);
561 553
562/** 554/**
563 * ccw_device_tm_start() - perform start function 555 * ccw_device_tm_start() - perform start function
diff --git a/drivers/s390/cio/io_sch.h b/drivers/s390/cio/io_sch.h
index af571d8d6925..90e4e3a7841b 100644
--- a/drivers/s390/cio/io_sch.h
+++ b/drivers/s390/cio/io_sch.h
@@ -157,6 +157,7 @@ struct ccw_device_private {
157 unsigned long intparm; /* user interruption parameter */ 157 unsigned long intparm; /* user interruption parameter */
158 struct qdio_irq *qdio_data; 158 struct qdio_irq *qdio_data;
159 struct irb irb; /* device status */ 159 struct irb irb; /* device status */
160 int async_kill_io_rc;
160 struct senseid senseid; /* SenseID info */ 161 struct senseid senseid; /* SenseID info */
161 struct pgid pgid[8]; /* path group IDs per chpid*/ 162 struct pgid pgid[8]; /* path group IDs per chpid*/
162 struct ccw1 iccws[2]; /* ccws for SNID/SID/SPGID commands */ 163 struct ccw1 iccws[2]; /* ccws for SNID/SID/SPGID commands */
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 8c97ce2516bb..19203340f879 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -527,8 +527,7 @@ static inline int qeth_is_cq(struct qeth_card *card, unsigned int queue)
527 queue == card->qdio.no_in_queues - 1; 527 queue == card->qdio.no_in_queues - 1;
528} 528}
529 529
530 530static int __qeth_issue_next_read(struct qeth_card *card)
531static int qeth_issue_next_read(struct qeth_card *card)
532{ 531{
533 int rc; 532 int rc;
534 struct qeth_cmd_buffer *iob; 533 struct qeth_cmd_buffer *iob;
@@ -559,6 +558,17 @@ static int qeth_issue_next_read(struct qeth_card *card)
559 return rc; 558 return rc;
560} 559}
561 560
561static int qeth_issue_next_read(struct qeth_card *card)
562{
563 int ret;
564
565 spin_lock_irq(get_ccwdev_lock(CARD_RDEV(card)));
566 ret = __qeth_issue_next_read(card);
567 spin_unlock_irq(get_ccwdev_lock(CARD_RDEV(card)));
568
569 return ret;
570}
571
562static struct qeth_reply *qeth_alloc_reply(struct qeth_card *card) 572static struct qeth_reply *qeth_alloc_reply(struct qeth_card *card)
563{ 573{
564 struct qeth_reply *reply; 574 struct qeth_reply *reply;
@@ -957,7 +967,7 @@ void qeth_clear_thread_running_bit(struct qeth_card *card, unsigned long thread)
957 spin_lock_irqsave(&card->thread_mask_lock, flags); 967 spin_lock_irqsave(&card->thread_mask_lock, flags);
958 card->thread_running_mask &= ~thread; 968 card->thread_running_mask &= ~thread;
959 spin_unlock_irqrestore(&card->thread_mask_lock, flags); 969 spin_unlock_irqrestore(&card->thread_mask_lock, flags);
960 wake_up(&card->wait_q); 970 wake_up_all(&card->wait_q);
961} 971}
962EXPORT_SYMBOL_GPL(qeth_clear_thread_running_bit); 972EXPORT_SYMBOL_GPL(qeth_clear_thread_running_bit);
963 973
@@ -1161,6 +1171,7 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
1161 } 1171 }
1162 rc = qeth_get_problem(cdev, irb); 1172 rc = qeth_get_problem(cdev, irb);
1163 if (rc) { 1173 if (rc) {
1174 card->read_or_write_problem = 1;
1164 qeth_clear_ipacmd_list(card); 1175 qeth_clear_ipacmd_list(card);
1165 qeth_schedule_recovery(card); 1176 qeth_schedule_recovery(card);
1166 goto out; 1177 goto out;
@@ -1179,7 +1190,7 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
1179 return; 1190 return;
1180 if (channel == &card->read && 1191 if (channel == &card->read &&
1181 channel->state == CH_STATE_UP) 1192 channel->state == CH_STATE_UP)
1182 qeth_issue_next_read(card); 1193 __qeth_issue_next_read(card);
1183 1194
1184 iob = channel->iob; 1195 iob = channel->iob;
1185 index = channel->buf_no; 1196 index = channel->buf_no;
@@ -5083,8 +5094,6 @@ static void qeth_core_free_card(struct qeth_card *card)
5083 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); 5094 QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
5084 qeth_clean_channel(&card->read); 5095 qeth_clean_channel(&card->read);
5085 qeth_clean_channel(&card->write); 5096 qeth_clean_channel(&card->write);
5086 if (card->dev)
5087 free_netdev(card->dev);
5088 qeth_free_qdio_buffers(card); 5097 qeth_free_qdio_buffers(card);
5089 unregister_service_level(&card->qeth_service_level); 5098 unregister_service_level(&card->qeth_service_level);
5090 kfree(card); 5099 kfree(card);
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 8f5babdccb42..50a313806dde 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -913,8 +913,8 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev)
913 qeth_l2_set_offline(cgdev); 913 qeth_l2_set_offline(cgdev);
914 914
915 if (card->dev) { 915 if (card->dev) {
916 netif_napi_del(&card->napi);
917 unregister_netdev(card->dev); 916 unregister_netdev(card->dev);
917 free_netdev(card->dev);
918 card->dev = NULL; 918 card->dev = NULL;
919 } 919 }
920 return; 920 return;
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index ef3f548b7d35..c1a16a74aa83 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2713,8 +2713,8 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev)
2713 qeth_l3_set_offline(cgdev); 2713 qeth_l3_set_offline(cgdev);
2714 2714
2715 if (card->dev) { 2715 if (card->dev) {
2716 netif_napi_del(&card->napi);
2717 unregister_netdev(card->dev); 2716 unregister_netdev(card->dev);
2717 free_netdev(card->dev);
2718 card->dev = NULL; 2718 card->dev = NULL;
2719 } 2719 }
2720 2720