qeth: postpone freeing of qdio memory
To guarantee that a qdio ccw_device no longer touches the qdio memory shared with Linux, the qdio ccw_device should be offline when freeing the qdio memory. Thus this patch postpones freeing of qdio memory. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
91a48a2e85
commit
22ae27906d
@@ -3447,6 +3447,7 @@ out_remove:
|
||||
ccw_device_set_offline(CARD_DDEV(card));
|
||||
ccw_device_set_offline(CARD_WDEV(card));
|
||||
ccw_device_set_offline(CARD_RDEV(card));
|
||||
qdio_free(CARD_DDEV(card));
|
||||
if (recover_flag == CARD_STATE_RECOVER)
|
||||
card->state = CARD_STATE_RECOVER;
|
||||
else
|
||||
@@ -3493,6 +3494,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
|
||||
rc = (rc2) ? rc2 : rc3;
|
||||
if (rc)
|
||||
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
|
||||
qdio_free(CARD_DDEV(card));
|
||||
if (recover_flag == CARD_STATE_UP)
|
||||
card->state = CARD_STATE_RECOVER;
|
||||
/* let user_space know that device is offline */
|
||||
@@ -3545,6 +3547,7 @@ static void qeth_l3_shutdown(struct ccwgroup_device *gdev)
|
||||
qeth_hw_trap(card, QETH_DIAGS_TRAP_DISARM);
|
||||
qeth_qdio_clear_card(card, 0);
|
||||
qeth_clear_qdio_buffers(card);
|
||||
qdio_free(CARD_DDEV(card));
|
||||
}
|
||||
|
||||
static int qeth_l3_pm_suspend(struct ccwgroup_device *gdev)
|
||||
|
Reference in New Issue
Block a user