aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_aux.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 616c60ffcf2c..3ac27ee47396 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -97,9 +97,7 @@ static void __init zfcp_init_device_configure(char *busid, u64 wwpn, u64 lun)
97 ccw_device_set_online(adapter->ccw_device); 97 ccw_device_set_online(adapter->ccw_device);
98 98
99 zfcp_erp_wait(adapter); 99 zfcp_erp_wait(adapter);
100 wait_event(adapter->erp_done_wqh, 100 flush_work(&unit->scsi_work);
101 !(atomic_read(&unit->status) &
102 ZFCP_STATUS_UNIT_SCSI_WORK_PENDING));
103 101
104 down(&zfcp_data.config_sema); 102 down(&zfcp_data.config_sema);
105 zfcp_unit_put(unit); 103 zfcp_unit_put(unit);
@@ -279,6 +277,7 @@ struct zfcp_unit *zfcp_unit_enqueue(struct zfcp_port *port, u64 fcp_lun)
279 277
280 atomic_set(&unit->refcount, 0); 278 atomic_set(&unit->refcount, 0);
281 init_waitqueue_head(&unit->remove_wq); 279 init_waitqueue_head(&unit->remove_wq);
280 INIT_WORK(&unit->scsi_work, zfcp_scsi_scan);
282 281
283 unit->port = port; 282 unit->port = port;
284 unit->fcp_lun = fcp_lun; 283 unit->fcp_lun = fcp_lun;
@@ -525,6 +524,8 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
525 524
526 atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); 525 atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status);
527 526
527 zfcp_fc_nameserver_init(adapter);
528
528 if (!zfcp_adapter_scsi_register(adapter)) 529 if (!zfcp_adapter_scsi_register(adapter))
529 return 0; 530 return 0;
530 531
@@ -553,7 +554,6 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter)
553 554
554 cancel_work_sync(&adapter->scan_work); 555 cancel_work_sync(&adapter->scan_work);
555 cancel_work_sync(&adapter->stat_work); 556 cancel_work_sync(&adapter->stat_work);
556 cancel_delayed_work_sync(&adapter->nsp.work);
557 zfcp_adapter_scsi_unregister(adapter); 557 zfcp_adapter_scsi_unregister(adapter);
558 sysfs_remove_group(&adapter->ccw_device->dev.kobj, 558 sysfs_remove_group(&adapter->ccw_device->dev.kobj,
559 &zfcp_sysfs_adapter_attrs); 559 &zfcp_sysfs_adapter_attrs);
@@ -671,8 +671,7 @@ void zfcp_port_dequeue(struct zfcp_port *port)
671 list_del(&port->list); 671 list_del(&port->list);
672 write_unlock_irq(&zfcp_data.config_lock); 672 write_unlock_irq(&zfcp_data.config_lock);
673 if (port->rport) 673 if (port->rport)
674 fc_remote_port_delete(port->rport); 674 port->rport->dd_data = NULL;
675 port->rport = NULL;
676 zfcp_adapter_put(port->adapter); 675 zfcp_adapter_put(port->adapter);
677 sysfs_remove_group(&port->sysfs_device.kobj, &zfcp_sysfs_port_attrs); 676 sysfs_remove_group(&port->sysfs_device.kobj, &zfcp_sysfs_port_attrs);
678 device_unregister(&port->sysfs_device); 677 device_unregister(&port->sysfs_device);