rwlock_init(&adapter->fsf_req_list_lock); 
spin_lock_init(&adapter->fsf_req_list_lock); 
zfcp_adapter_enqueue(struct ccw_device *ccw_device){	int retval = 0;	struct zfcp_adapter *adapter;	/*	 * Note: It is safe to release the list_lock, as any list changes 	 * are protected by the config_sema, which must be held to get here	 */	/* try to allocate new adapter data structure (zeroed) */	adapter = kmalloc(sizeof (struct zfcp_adapter), GFP_KERNEL);	if (!adapter) {		ZFCP_LOG_INFO("error: allocation of base adapter "			      "structure failed\n");		goto out;	}	memset(adapter, 0, sizeof (struct zfcp_adapter));	ccw_device->handler = NULL;	/* save ccw_device pointer */	adapter->ccw_device = ccw_device;	retval = zfcp_qdio_allocate_queues(adapter);	if (retval)		goto queues_alloc_failed;	retval = zfcp_qdio_allocate(adapter);	if (retval)		goto qdio_allocate_failed;	retval = zfcp_allocate_low_mem_buffers(adapter);	if (retval) {		ZFCP_LOG_INFO("error: pool allocation failed\n");		goto failed_low_mem_buffers;	}	/* initialise reference count stuff */	atomic_set(&adapter->refcount, 0);	init_waitqueue_head(&adapter->remove_wq);	/* initialise list of ports */	INIT_LIST_HEAD(&adapter->port_list_head);	/* initialise list of ports to be removed */	INIT_LIST_HEAD(&adapter->port_remove_lh);	/* initialize list of fsf requests */	rwlock_init(&adapter->fsf_req_list_lock);	INIT_LIST_HEAD(&adapter->fsf_req_list_head);	/* initialize abort lock */	rwlock_init(&adapter->abort_lock);	/* initialise some erp stuff */	init_waitqueue_head(&adapter->erp_thread_wqh);	init_waitqueue_head(&adapter->erp_done_wqh);	/* initialize lock of associated request queue */	rwlock_init(&adapter->request_queue.queue_lock);	/* intitialise SCSI ER timer */	init_timer(&adapter->scsi_er_timer);	/* set FC service class used per default */	adapter->fc_service_class = ZFCP_FC_SERVICE_CLASS_DEFAULT;	sprintf(adapter->name, "%s", zfcp_get_busid_by_adapter(adapter));	ASCEBC(adapter->name, strlen(adapter->name));	/* mark adapter unusable as long as sysfs registration is not complete */	atomic_set_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status);	adapter->ccw_device = ccw_device;	dev_set_drvdata(&ccw_device->dev, adapter);	if (zfcp_sysfs_adapter_create_files(&ccw_device->dev))		goto sysfs_failed;	adapter->generic_services.parent = &adapter->ccw_device->dev;	adapter->generic_services.release = zfcp_dummy_release;	snprintf(adapter->generic_services.bus_id, BUS_ID_SIZE,		 "generic_services");	if (device_register(&adapter->generic_services))		goto generic_services_failed;	/* put allocated adapter at list tail */	write_lock_irq(&zfcp_data.config_lock);	atomic_clear_mask(ZFCP_STATUS_COMMON_REMOVE, &adapter->status);	list_add_tail(&adapter->list, &zfcp_data.adapter_list_head);	write_unlock_irq(&zfcp_data.config_lock);	zfcp_data.adapters++;	goto out; generic_services_failed:	zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); sysfs_failed:	dev_set_drvdata(&ccw_device->dev, NULL); failed_low_mem_buffers:	zfcp_free_low_mem_buffers(adapter);	if (qdio_free(ccw_device) != 0)		ZFCP_LOG_NORMAL("bug: qdio_free for adapter %s failed\n",				zfcp_get_busid_by_adapter(adapter)); qdio_allocate_failed:	zfcp_qdio_free_queues(adapter); queues_alloc_failed:	kfree(adapter);	adapter = NULL; out:	return adapter;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/1db2c9c0931a53fe013db55fd2ff58859db31e8d/zfcp_aux.c/buggy/drivers/s390/scsi/zfcp_aux.c