pr_debug("%s: SysTab set.\n", c->name); 
osm_debug("%s: SysTab set.\n", c->name); 
static int i2o_iop_systab_set(struct i2o_controller *c){	struct i2o_message __iomem *msg;	u32 m;	i2o_status_block *sb = c->status_block.virt;	struct device *dev = &c->pdev->dev;	struct resource *root;	int rc;	if (sb->current_mem_size < sb->desired_mem_size) {		struct resource *res = &c->mem_resource;		res->name = c->pdev->bus->name;		res->flags = IORESOURCE_MEM;		res->start = 0;		res->end = 0;		printk(KERN_INFO "%s: requires private memory resources.\n",		       c->name);		root = pci_find_parent_resource(c->pdev, res);		if (root == NULL)			printk(KERN_WARNING "%s: Can't find parent resource!\n",			       c->name);		if (root && allocate_resource(root, res, sb->desired_mem_size, sb->desired_mem_size, sb->desired_mem_size, 1 << 20,	/* Unspecified, so use 1Mb and play safe */					      NULL, NULL) >= 0) {			c->mem_alloc = 1;			sb->current_mem_size = 1 + res->end - res->start;			sb->current_mem_base = res->start;			printk(KERN_INFO "%s: allocated %ld bytes of PCI memory"			       " at 0x%08lX.\n", c->name,			       1 + res->end - res->start, res->start);		}	}	if (sb->current_io_size < sb->desired_io_size) {		struct resource *res = &c->io_resource;		res->name = c->pdev->bus->name;		res->flags = IORESOURCE_IO;		res->start = 0;		res->end = 0;		printk(KERN_INFO "%s: requires private memory resources.\n",		       c->name);		root = pci_find_parent_resource(c->pdev, res);		if (root == NULL)			printk(KERN_WARNING "%s: Can't find parent resource!\n",			       c->name);		if (root && allocate_resource(root, res, sb->desired_io_size, sb->desired_io_size, sb->desired_io_size, 1 << 20,	/* Unspecified, so use 1Mb and play safe */					      NULL, NULL) >= 0) {			c->io_alloc = 1;			sb->current_io_size = 1 + res->end - res->start;			sb->current_mem_base = res->start;			printk(KERN_INFO "%s: allocated %ld bytes of PCI I/O at"			       " 0x%08lX.\n", c->name,			       1 + res->end - res->start, res->start);		}	}	m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET);	if (m == I2O_QUEUE_EMPTY)		return -ETIMEDOUT;	i2o_systab.phys = dma_map_single(dev, i2o_systab.virt, i2o_systab.len,					 PCI_DMA_TODEVICE);	if (!i2o_systab.phys) {		i2o_msg_nop(c, m);		return -ENOMEM;	}	writel(I2O_MESSAGE_SIZE(12) | SGL_OFFSET_6, &msg->u.head[0]);	writel(I2O_CMD_SYS_TAB_SET << 24 | HOST_TID << 12 | ADAPTER_TID,	       &msg->u.head[1]);	/*	 * Provide three SGL-elements:	 * System table (SysTab), Private memory space declaration and	 * Private i/o space declaration	 *	 * FIXME: is this still true?	 * Nasty one here. We can't use dma_alloc_coherent to send the	 * same table to everyone. We have to go remap it for them all	 */	writel(c->unit + 2, &msg->body[0]);	writel(0, &msg->body[1]);	writel(0x54000000 | i2o_systab.len, &msg->body[2]);	writel(i2o_systab.phys, &msg->body[3]);	writel(0x54000000 | sb->current_mem_size, &msg->body[4]);	writel(sb->current_mem_base, &msg->body[5]);	writel(0xd4000000 | sb->current_io_size, &msg->body[6]);	writel(sb->current_io_base, &msg->body[6]);	rc = i2o_msg_post_wait(c, m, 120);	dma_unmap_single(dev, i2o_systab.phys, i2o_systab.len,			 PCI_DMA_TODEVICE);	if (rc < 0)		printk(KERN_ERR "%s: Unable to set SysTab (status=%#x).\n",		       c->name, -rc);	else		pr_debug("%s: SysTab set.\n", c->name);	i2o_status_get(c);	// Entered READY state	return rc;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f33213ecf49c98da4e85121b592c3bea8057c2e6/iop.c/buggy/drivers/message/i2o/iop.c