if (c->short_req) segments = 8; else { i2o_status_block *sb;  sb = c->status_block.virt;  segments = (sb->inbound_frame_size - sizeof(struct i2o_message) / 4 - 4) / 2; }  blk_queue_max_hw_segments(queue, segments);  osm_debug("max sectors = %d\n", I2O_MAX_SECTORS); osm_debug("phys segments = %d\n", I2O_MAX_SEGMENTS); osm_debug("hw segments = %d\n", segments); 
osm_debug("max sectors = %d\n", queue->max_phys_segments); osm_debug("phys segments = %d\n", queue->max_sectors); osm_debug("max hw segments = %d\n", queue->max_hw_segments); 
static int i2o_block_probe(struct device *dev){	struct i2o_device *i2o_dev = to_i2o_device(dev);	struct i2o_block_device *i2o_blk_dev;	struct i2o_controller *c = i2o_dev->iop;	struct gendisk *gd;	struct request_queue *queue;	static int unit = 0;	int rc;	u64 size;	u32 blocksize;	u32 flags, status;	int segments;	/* skip devices which are used by IOP */	if (i2o_dev->lct_data.user_tid != 0xfff) {		osm_debug("skipping used device %03x\n", i2o_dev->lct_data.tid);		return -ENODEV;	}	if (i2o_device_claim(i2o_dev)) {		osm_warn("Unable to claim device. Installation aborted\n");		rc = -EFAULT;		goto exit;	}	i2o_blk_dev = i2o_block_device_alloc();	if (IS_ERR(i2o_blk_dev)) {		osm_err("could not alloc a new I2O block device");		rc = PTR_ERR(i2o_blk_dev);		goto claim_release;	}	i2o_blk_dev->i2o_dev = i2o_dev;	dev_set_drvdata(dev, i2o_blk_dev);	/* setup gendisk */	gd = i2o_blk_dev->gd;	gd->first_minor = unit << 4;	sprintf(gd->disk_name, "i2o/hd%c", 'a' + unit);	sprintf(gd->devfs_name, "i2o/hd%c", 'a' + unit);	gd->driverfs_dev = &i2o_dev->device;	/* setup request queue */	queue = gd->queue;	queue->queuedata = i2o_blk_dev;	blk_queue_max_phys_segments(queue, I2O_MAX_SEGMENTS);	blk_queue_max_sectors(queue, I2O_MAX_SECTORS);	if (c->short_req)		segments = 8;	else {		i2o_status_block *sb;		sb = c->status_block.virt;		segments = (sb->inbound_frame_size -			    sizeof(struct i2o_message) / 4 - 4) / 2;	}	blk_queue_max_hw_segments(queue, segments);	osm_debug("max sectors = %d\n", I2O_MAX_SECTORS);	osm_debug("phys segments = %d\n", I2O_MAX_SEGMENTS);	osm_debug("hw segments = %d\n", segments);	/*	 *      Ask for the current media data. If that isn't supported	 *      then we ask for the device capacity data	 */	if (!i2o_parm_field_get(i2o_dev, 0x0004, 0, &size, 8))		if (!i2o_parm_field_get(i2o_dev, 0x0000, 4, &size, 8)) {			osm_warn("could not get size of %s\n", gd->disk_name);			size = 0;		}	if (!i2o_parm_field_get(i2o_dev, 0x0004, 1, &blocksize, 4))		if (!i2o_parm_field_get(i2o_dev, 0x0000, 3, &blocksize, 4)) {			osm_warn("unable to get blocksize of %s\n",				 gd->disk_name);			blocksize = 0;		}	if (!i2o_parm_field_get(i2o_dev, 0x0000, 2, &i2o_blk_dev->power, 2))		i2o_blk_dev->power = 0;	i2o_parm_field_get(i2o_dev, 0x0000, 5, &flags, 4);	i2o_parm_field_get(i2o_dev, 0x0000, 6, &status, 4);	set_capacity(gd, size >> 9);	i2o_event_register(i2o_dev, &i2o_block_driver, 0, 0xffffffff);	add_disk(gd);	unit++;	osm_info("device added (TID: %03x): %s\n", i2o_dev->lct_data.tid,		 i2o_blk_dev->gd->disk_name);	return 0;      claim_release:	i2o_device_claim_release(i2o_dev);      exit:	return rc;};
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f10378fff658f61307496e0ae00095041725cf07/i2o_block.c/buggy/drivers/message/i2o/i2o_block.c