spin_unlock(&list_lock); 
up_read(&list_rwsem); dbg("inserted=%d, extracted=%d, extracting=%d", inserted, extracted, atomic_read(&extracting)); 
check_slots(void){	struct slot *slot;	struct list_head *tmp;	int extracted;	int inserted;	spin_lock(&list_lock);	if(!slots) {		spin_unlock(&list_lock);		err("no slots registered, shutting down");		return -1;	}	extracted = inserted = 0;	list_for_each(tmp, &slot_list) {		slot = list_entry(tmp, struct slot, slot_list);		dbg("%s - looking at slot %s",		    __FUNCTION__, slot->hotplug_slot->name);		if(cpci_check_and_clear_ins(slot)) {			u16 hs_csr;			/* Some broken hardware (e.g. PLX 9054AB) asserts ENUM# twice... */			if(slot->dev) {				warn("slot %s already inserted", slot->hotplug_slot->name);				inserted++;				continue;			}			/* Process insertion */			dbg("%s - slot %s inserted",			    __FUNCTION__, slot->hotplug_slot->name);			/* GSM, debug */			hs_csr = cpci_get_hs_csr(slot);			dbg("%s - slot %s HS_CSR (1) = %04x",			    __FUNCTION__, slot->hotplug_slot->name, hs_csr);			/* Configure device */			dbg("%s - configuring slot %s",			    __FUNCTION__, slot->hotplug_slot->name);			if(cpci_configure_slot(slot)) {				err("%s - could not configure slot %s",				    __FUNCTION__, slot->hotplug_slot->name);				continue;			}			dbg("%s - finished configuring slot %s",			    __FUNCTION__, slot->hotplug_slot->name);			/* GSM, debug */			hs_csr = cpci_get_hs_csr(slot);			dbg("%s - slot %s HS_CSR (2) = %04x",			    __FUNCTION__, slot->hotplug_slot->name, hs_csr);			if(update_latch_status(slot->hotplug_slot, 1)) {				warn("failure to update latch file");			}			if(update_adapter_status(slot->hotplug_slot, 1)) {				warn("failure to update adapter file");			}			cpci_led_off(slot);			/* GSM, debug */			hs_csr = cpci_get_hs_csr(slot);			dbg("%s - slot %s HS_CSR (3) = %04x",			    __FUNCTION__, slot->hotplug_slot->name, hs_csr);			inserted++;		} else if(cpci_check_ext(slot)) {			u16 hs_csr;			/* Process extraction request */			dbg("%s - slot %s extracted",			    __FUNCTION__, slot->hotplug_slot->name);			/* GSM, debug */			hs_csr = cpci_get_hs_csr(slot);			dbg("%s - slot %s HS_CSR = %04x",			    __FUNCTION__, slot->hotplug_slot->name, hs_csr);			if(!slot->extracting) {				if(update_latch_status(slot->hotplug_slot, 0)) {					warn("failure to update latch file");				}				slot->extracting = 1;			}			extracted++;		}	}	spin_unlock(&list_lock);	if(inserted || extracted) {		return extracted;	}	else {		err("cannot find ENUM# source, shutting down");		return -1;	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/43b7d7cfb157b5c8c5cc0933f4e96fd81adc81ca/cpci_hotplug_core.c/buggy/drivers/pci/hotplug/cpci_hotplug_core.c