shost->max_cmd_len = 16; 
static int __devinit aac_probe_one(struct pci_dev *pdev,		const struct pci_device_id *id){	unsigned index = id->driver_data;	struct Scsi_Host *shost;	struct aac_dev *aac;	struct list_head *insert = &aac_devices;	int error = -ENODEV;	int unique_id = 0;	list_for_each_entry(aac, &aac_devices, entry) {		if (aac->id > unique_id)			break;		insert = &aac->entry;		unique_id++;	}	if (pci_enable_device(pdev))		goto out;	if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL) || 			pci_set_consistent_dma_mask(pdev, 0xFFFFFFFFULL))		goto out;	/*	 * If the quirk31 bit is set, the adapter needs adapter	 * to driver communication memory to be allocated below 2gig	 */	if (aac_drivers[index].quirks & AAC_QUIRK_31BIT) 		if (pci_set_dma_mask(pdev, 0x7FFFFFFFULL) ||				pci_set_consistent_dma_mask(pdev, 0x7FFFFFFFULL))			goto out;		pci_set_master(pdev);	shost = scsi_host_alloc(&aac_driver_template, sizeof(struct aac_dev));	if (!shost)		goto out_disable_pdev;	shost->irq = pdev->irq;	shost->base = pci_resource_start(pdev, 0);	shost->unique_id = unique_id;	aac = (struct aac_dev *)shost->hostdata;	aac->scsi_host_ptr = shost;		aac->pdev = pdev;	aac->name = aac_driver_template.name;	aac->id = shost->unique_id;	aac->cardtype =  index;	INIT_LIST_HEAD(&aac->entry);	aac->fibs = kmalloc(sizeof(struct fib) * (shost->can_queue + AAC_NUM_MGT_FIB), GFP_KERNEL);	if (!aac->fibs)		goto out_free_host;	spin_lock_init(&aac->fib_lock);	if ((*aac_drivers[index].init)(aac))		goto out_free_fibs;	/*	 * If we had set a smaller DMA mask earlier, set it to 4gig	 * now since the adapter can dma data to at least a 4gig	 * address space.	 */	if (aac_drivers[index].quirks & AAC_QUIRK_31BIT)		if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL))			goto out_free_fibs;	aac->maximum_num_channels = aac_drivers[index].channels;	aac_get_adapter_info(aac);	/* 	 * Lets override negotiations and drop the maximum SG limit to 34 	 */ 	if ((aac_drivers[index].quirks & AAC_QUIRK_34SG) && 			(aac->scsi_host_ptr->sg_tablesize > 34)) { 		aac->scsi_host_ptr->sg_tablesize = 34; 		aac->scsi_host_ptr->max_sectors 		  = (aac->scsi_host_ptr->sg_tablesize * 8) + 112; 	}	/*	 * Firware printf works only with older firmware.	 */	if (aac_drivers[index].quirks & AAC_QUIRK_34SG) 		aac->printf_enabled = 1;	else		aac->printf_enabled = 0;  	/*	 * max channel will be the physical channels plus 1 virtual channel	 * all containers are on the virtual channel 0	 * physical channels are address by their actual physical number+1	 */	if (aac->nondasd_support == 1)		shost->max_channel = aac->maximum_num_channels + 1;	else		shost->max_channel = 1;	aac_get_config_status(aac);	aac_get_containers(aac);	list_add(&aac->entry, insert);	shost->max_id = aac->maximum_num_containers;	if (shost->max_id < aac->maximum_num_physicals)		shost->max_id = aac->maximum_num_physicals;	if (shost->max_id < MAXIMUM_NUM_CONTAINERS)		shost->max_id = MAXIMUM_NUM_CONTAINERS;	else		shost->this_id = shost->max_id;	/*	 * dmb - we may need to move the setting of these parms somewhere else once	 * we get a fib that can report the actual numbers	 */	shost->max_lun = AAC_MAX_LUN;	pci_set_drvdata(pdev, shost);	error = scsi_add_host(shost, &pdev->dev);	if (error)		goto out_deinit;	scsi_scan_host(shost);	return 0; out_deinit:	kill_proc(aac->thread_pid, SIGKILL, 0);	wait_for_completion(&aac->aif_completion);	aac_send_shutdown(aac);	aac_adapter_disable_int(aac);	fib_map_free(aac);	pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);	kfree(aac->queues);	free_irq(pdev->irq, aac);	iounmap(aac->regs.sa); out_free_fibs:	kfree(aac->fibs);	kfree(aac->fsa_dev); out_free_host:	scsi_host_put(shost); out_disable_pdev:	pci_disable_device(pdev); out:	return error;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/7a8cf29d69e077dfe90e327859201fd9b75a47ce/linit.c/buggy/drivers/scsi/aacraid/linit.c