if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) 
if (!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) 
static int __devinit cciss_init_one(struct pci_dev *pdev,	const struct pci_device_id *ent){	request_queue_t *q;	int i;	int j;	int rc;	printk(KERN_DEBUG "cciss: Device 0x%x has been found at"			" bus %d dev %d func %d\n",		pdev->device, pdev->bus->number, PCI_SLOT(pdev->devfn),			PCI_FUNC(pdev->devfn));	i = alloc_cciss_hba();	if(i < 0)		return (-1);	if (cciss_pci_init(hba[i], pdev) != 0)		goto clean1;	sprintf(hba[i]->devname, "cciss%d", i);	hba[i]->ctlr = i;	hba[i]->pdev = pdev;	/* configure PCI DMA stuff */	if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL))		printk("cciss: using DAC cycles\n");	else if (!pci_set_dma_mask(pdev, 0xffffffff))		printk("cciss: not using DAC cycles\n");	else {		printk("cciss: no suitable DMA available\n");		goto clean1;	}	/*	 * register with the major number, or get a dynamic major number	 * by passing 0 as argument.  This is done for greater than	 * 8 controller support.	 */	if (i < MAX_CTLR_ORIG)		hba[i]->major = MAJOR_NR + i;	rc = register_blkdev(hba[i]->major, hba[i]->devname);	if(rc == -EBUSY || rc == -EINVAL) {		printk(KERN_ERR			"cciss:  Unable to get major number %d for %s "			"on hba %d\n", hba[i]->major, hba[i]->devname, i);		goto clean1;	}	else {		if (i >= MAX_CTLR_ORIG)			hba[i]->major = rc;	}	/* make sure the board interrupts are off */	hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF);	if( request_irq(hba[i]->intr, do_cciss_intr, 		SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, 			hba[i]->devname, hba[i])) {		printk(KERN_ERR "cciss: Unable to get irq %d for %s\n",			hba[i]->intr, hba[i]->devname);		goto clean2;	}	hba[i]->cmd_pool_bits = kmalloc(((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long), GFP_KERNEL);	hba[i]->cmd_pool = (CommandList_struct *)pci_alloc_consistent(		hba[i]->pdev, NR_CMDS * sizeof(CommandList_struct), 		&(hba[i]->cmd_pool_dhandle));	hba[i]->errinfo_pool = (ErrorInfo_struct *)pci_alloc_consistent(		hba[i]->pdev, NR_CMDS * sizeof( ErrorInfo_struct), 		&(hba[i]->errinfo_pool_dhandle));	if((hba[i]->cmd_pool_bits == NULL) 		|| (hba[i]->cmd_pool == NULL)		|| (hba[i]->errinfo_pool == NULL)) {                printk( KERN_ERR "cciss: out of memory");		goto clean4;	}	spin_lock_init(&hba[i]->lock);	q = blk_init_queue(do_cciss_request, &hba[i]->lock);	if (!q)		goto clean4;	q->backing_dev_info.ra_pages = READ_AHEAD;	hba[i]->queue = q;	q->queuedata = hba[i];	/* Initialize the pdev driver private data. 		have it point to hba[i].  */	pci_set_drvdata(pdev, hba[i]);	/* command and error info recs zeroed out before 			they are used */        memset(hba[i]->cmd_pool_bits, 0, ((NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG)*sizeof(unsigned long));#ifdef CCISS_DEBUG		printk(KERN_DEBUG "Scanning for drives on controller cciss%d\n",i);#endif /* CCISS_DEBUG */	cciss_getgeometry(i);	cciss_scsi_setup(i);	/* Turn the interrupts on so we can service requests */	hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_ON);	cciss_procinit(i);	blk_queue_bounce_limit(q, hba[i]->pdev->dma_mask);	/* This is a hardware imposed limit. */	blk_queue_max_hw_segments(q, MAXSGENTRIES);	/* This is a limit in the driver and could be eliminated. */	blk_queue_max_phys_segments(q, MAXSGENTRIES);	blk_queue_max_sectors(q, 512);	for(j=0; j<NWD; j++) {		drive_info_struct *drv = &(hba[i]->drv[j]);		struct gendisk *disk = hba[i]->gendisk[j];		sprintf(disk->disk_name, "cciss/c%dd%d", i, j);		sprintf(disk->devfs_name, "cciss/host%d/target%d", i, j);		disk->major = hba[i]->major;		disk->first_minor = j << NWD_SHIFT;		disk->fops = &cciss_fops;		disk->queue = hba[i]->queue;		disk->private_data = drv;		/* we must register the controller even if no disks exist */		/* this is for the online array utilities */		if(!drv->heads && j)			continue;		blk_queue_hardsect_size(hba[i]->queue, drv->block_size);		set_capacity(disk, drv->nr_blocks);		add_disk(disk);	}	return(1);clean4:	if(hba[i]->cmd_pool_bits)               	kfree(hba[i]->cmd_pool_bits);	if(hba[i]->cmd_pool)		pci_free_consistent(hba[i]->pdev,			NR_CMDS * sizeof(CommandList_struct),			hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle);	if(hba[i]->errinfo_pool)		pci_free_consistent(hba[i]->pdev,			NR_CMDS * sizeof( ErrorInfo_struct),			hba[i]->errinfo_pool,			hba[i]->errinfo_pool_dhandle);	free_irq(hba[i]->intr, hba[i]);clean2:	unregister_blkdev(hba[i]->major, hba[i]->devname);clean1:	release_io_mem(hba[i]);	free_hba(i);	return(-1);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/eb0df9962d97f7156a0870aced9018bf5c8f54c1/cciss.c/clean/drivers/block/cciss.c