diff options
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ccw.c | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 5dcac24a7a1b..0f79f3af4f54 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -604,7 +604,6 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter) | |||
604 | 604 | ||
605 | cancel_work_sync(&adapter->stat_work); | 605 | cancel_work_sync(&adapter->stat_work); |
606 | zfcp_fc_wka_ports_force_offline(adapter->gs); | 606 | zfcp_fc_wka_ports_force_offline(adapter->gs); |
607 | zfcp_adapter_scsi_unregister(adapter); | ||
608 | sysfs_remove_group(&adapter->ccw_device->dev.kobj, | 607 | sysfs_remove_group(&adapter->ccw_device->dev.kobj, |
609 | &zfcp_sysfs_adapter_attrs); | 608 | &zfcp_sysfs_adapter_attrs); |
610 | dev_set_drvdata(&adapter->ccw_device->dev, NULL); | 609 | dev_set_drvdata(&adapter->ccw_device->dev, NULL); |
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 9fe32f7ec8d2..e08339428ecf 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c | |||
@@ -107,6 +107,10 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device) | |||
107 | cancel_work_sync(&adapter->scan_work); | 107 | cancel_work_sync(&adapter->scan_work); |
108 | 108 | ||
109 | mutex_lock(&zfcp_data.config_mutex); | 109 | mutex_lock(&zfcp_data.config_mutex); |
110 | |||
111 | /* this also removes the scsi devices, so call it first */ | ||
112 | zfcp_adapter_scsi_unregister(adapter); | ||
113 | |||
110 | write_lock_irq(&zfcp_data.config_lock); | 114 | write_lock_irq(&zfcp_data.config_lock); |
111 | list_for_each_entry_safe(port, p, &adapter->port_list_head, list) { | 115 | list_for_each_entry_safe(port, p, &adapter->port_list_head, list) { |
112 | list_for_each_entry_safe(unit, u, &port->unit_list_head, list) { | 116 | list_for_each_entry_safe(unit, u, &port->unit_list_head, list) { |
@@ -121,11 +125,8 @@ static void zfcp_ccw_remove(struct ccw_device *ccw_device) | |||
121 | write_unlock_irq(&zfcp_data.config_lock); | 125 | write_unlock_irq(&zfcp_data.config_lock); |
122 | 126 | ||
123 | list_for_each_entry_safe(port, p, &port_remove_lh, list) { | 127 | list_for_each_entry_safe(port, p, &port_remove_lh, list) { |
124 | list_for_each_entry_safe(unit, u, &unit_remove_lh, list) { | 128 | list_for_each_entry_safe(unit, u, &unit_remove_lh, list) |
125 | if (unit->device) | ||
126 | scsi_remove_device(unit->device); | ||
127 | zfcp_unit_dequeue(unit); | 129 | zfcp_unit_dequeue(unit); |
128 | } | ||
129 | zfcp_port_dequeue(port); | 130 | zfcp_port_dequeue(port); |
130 | } | 131 | } |
131 | wait_event(adapter->remove_wq, atomic_read(&adapter->refcount) == 0); | 132 | wait_event(adapter->remove_wq, atomic_read(&adapter->refcount) == 0); |