rem: TRACE("em_attach failed\n");
add: DEVICE_DEBUGOUT("em_attach failed");
context: ipro1000_open(const char *name, uint32 flags, void** cookie){	ipro1000_device *device;	char *deviceName;	int dev_id;	int mask;		TRACE("ipro1000_open()\n");	for (dev_id = 0; (deviceName = gDevNameList[dev_id]) != NULL; dev_id++) {		if (!strcmp(name, deviceName))			break;	}			if (deviceName == NULL) {		ERROR("invalid device name");		return B_ERROR;	}		// allow only one concurrent access	mask = 1 << dev_id;	if (atomic_or(&gOpenMask, mask) & mask)		return B_BUSY;			*cookie = device = (ipro1000_device *)malloc(sizeof(ipro1000_device));	if (!device) {		atomic_and(&gOpenMask, ~(1 << dev_id));		return B_NO_MEMORY;	}		memset(device, 0, sizeof(*device));	device->devId = dev_id;	device->pciInfo = gDevList[dev_id];	device->nonblocking = (flags & O_NONBLOCK) ? true : false;	device->closed = false;		device->pciBus 	= device->pciInfo->bus;	device->pciDev	= device->pciInfo->device;	device->pciFunc	= device->pciInfo->function;	device->adapter = 0;	device->maxframesize = 1514; // XXX is MAXIMUM_ETHERNET_FRAME_SIZE = 1518 too much?		ipro1000_read_settings(device);	if (em_attach(device) != 0) {		TRACE("em_attach failed\n");		goto err;	}		return B_OK;err:	free(device);	atomic_and(&gOpenMask, ~(1 << dev_id));	return B_ERROR;}