aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/scsi/zfcp_aux.c12
-rw-r--r--drivers/s390/scsi/zfcp_cfdc.c17
-rw-r--r--drivers/s390/scsi/zfcp_def.h2
3 files changed, 3 insertions, 28 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index f0f49feaa34f..d7d3148d15e2 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -181,7 +181,6 @@ static int __init zfcp_module_init(void)
181 181
182 zfcp_data.work_queue = create_singlethread_workqueue("zfcp_wq"); 182 zfcp_data.work_queue = create_singlethread_workqueue("zfcp_wq");
183 183
184 INIT_LIST_HEAD(&zfcp_data.adapter_list_head);
185 sema_init(&zfcp_data.config_sema, 1); 184 sema_init(&zfcp_data.config_sema, 1);
186 rwlock_init(&zfcp_data.config_lock); 185 rwlock_init(&zfcp_data.config_lock);
187 186
@@ -527,11 +526,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
527 &zfcp_sysfs_adapter_attrs)) 526 &zfcp_sysfs_adapter_attrs))
528 goto sysfs_failed; 527 goto sysfs_failed;
529 528
530 write_lock_irq(&zfcp_data.config_lock);
531 atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status); 529 atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status);
532 list_add_tail(&adapter->list, &zfcp_data.adapter_list_head);
533 write_unlock_irq(&zfcp_data.config_lock);
534
535 zfcp_fc_nameserver_init(adapter); 530 zfcp_fc_nameserver_init(adapter);
536 531
537 if (!zfcp_adapter_scsi_register(adapter)) 532 if (!zfcp_adapter_scsi_register(adapter))
@@ -574,14 +569,7 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter)
574 return; 569 return;
575 570
576 zfcp_adapter_debug_unregister(adapter); 571 zfcp_adapter_debug_unregister(adapter);
577
578 /* remove specified adapter data structure from list */
579 write_lock_irq(&zfcp_data.config_lock);
580 list_del(&adapter->list);
581 write_unlock_irq(&zfcp_data.config_lock);
582
583 zfcp_qdio_free(adapter); 572 zfcp_qdio_free(adapter);
584
585 zfcp_free_low_mem_buffers(adapter); 573 zfcp_free_low_mem_buffers(adapter);
586 kfree(adapter->req_list); 574 kfree(adapter->req_list);
587 kfree(adapter->fc_stats); 575 kfree(adapter->fc_stats);
diff --git a/drivers/s390/scsi/zfcp_cfdc.c b/drivers/s390/scsi/zfcp_cfdc.c
index f1a7518e67ed..10cbfd172a28 100644
--- a/drivers/s390/scsi/zfcp_cfdc.c
+++ b/drivers/s390/scsi/zfcp_cfdc.c
@@ -85,20 +85,9 @@ static int zfcp_cfdc_copy_to_user(void __user *user_buffer,
85 85
86static struct zfcp_adapter *zfcp_cfdc_get_adapter(u32 devno) 86static struct zfcp_adapter *zfcp_cfdc_get_adapter(u32 devno)
87{ 87{
88 struct zfcp_adapter *adapter = NULL, *cur_adapter; 88 char busid[9];
89 struct ccw_dev_id dev_id; 89 snprintf(busid, sizeof(busid), "0.0.%04x", devno);
90 90 return zfcp_get_adapter_by_busid(busid);
91 read_lock_irq(&zfcp_data.config_lock);
92 list_for_each_entry(cur_adapter, &zfcp_data.adapter_list_head, list) {
93 ccw_device_get_id(cur_adapter->ccw_device, &dev_id);
94 if (dev_id.devno == devno) {
95 adapter = cur_adapter;
96 zfcp_adapter_get(adapter);
97 break;
98 }
99 }
100 read_unlock_irq(&zfcp_data.config_lock);
101 return adapter;
102} 91}
103 92
104static int zfcp_cfdc_set_fsf(struct zfcp_fsf_cfdc *fsf_cfdc, int command) 93static int zfcp_cfdc_set_fsf(struct zfcp_fsf_cfdc *fsf_cfdc, int command)
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index e19e46ae4a68..b95e73ee0d6f 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -451,7 +451,6 @@ struct zfcp_latencies {
451}; 451};
452 452
453struct zfcp_adapter { 453struct zfcp_adapter {
454 struct list_head list; /* list of adapters */
455 atomic_t refcount; /* reference count */ 454 atomic_t refcount; /* reference count */
456 wait_queue_head_t remove_wq; /* can be used to wait for 455 wait_queue_head_t remove_wq; /* can be used to wait for
457 refcount drop to zero */ 456 refcount drop to zero */
@@ -593,7 +592,6 @@ struct zfcp_fsf_req {
593struct zfcp_data { 592struct zfcp_data {
594 struct scsi_host_template scsi_host_template; 593 struct scsi_host_template scsi_host_template;
595 struct scsi_transport_template *scsi_transport_template; 594 struct scsi_transport_template *scsi_transport_template;
596 struct list_head adapter_list_head; /* head of adapter list */
597 rwlock_t config_lock; /* serialises changes 595 rwlock_t config_lock; /* serialises changes
598 to adapter/port/unit 596 to adapter/port/unit
599 lists */ 597 lists */