rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL); 
rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK); 
static int __devinit via_init_one (struct pci_dev *pdev, const struct pci_device_id *id){#ifdef CONFIG_MIDI_VIA82CXXX	u8 r42;#endif	int rc;	struct via_info *card;	static int printed_version;	DPRINTK ("ENTER\n");	if (printed_version++ == 0)		printk (KERN_INFO "Via 686a/8233/8235 audio driver " VIA_VERSION "\n");	rc = pci_enable_device (pdev);	if (rc)		goto err_out;	rc = pci_request_regions (pdev, "via82cxxx_audio");	if (rc)		goto err_out_disable;	rc = pci_set_dma_mask(pdev, 0xffffffffULL);	if (rc)		goto err_out_res;	rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL);	if (rc)		goto err_out_res;	card = kmalloc (sizeof (*card), GFP_KERNEL);	if (!card) {		printk (KERN_ERR PFX "out of memory, aborting\n");		rc = -ENOMEM;		goto err_out_res;	}	pci_set_drvdata (pdev, card);	memset (card, 0, sizeof (*card));	card->pdev = pdev;	card->baseaddr = pci_resource_start (pdev, 0);	card->card_num = via_num_cards++;	spin_lock_init (&card->lock);	spin_lock_init (&card->ac97_lock);	init_MUTEX (&card->syscall_sem);	init_MUTEX (&card->open_sem);	/* we must init these now, in case the intr handler needs them */	via_chan_init_defaults (card, &card->ch_out);	via_chan_init_defaults (card, &card->ch_in);	via_chan_init_defaults (card, &card->ch_fm);	/* if BAR 2 is present, chip is Rev H or later,	 * which means it has a few extra features */	if (pci_resource_start (pdev, 2) > 0)		card->rev_h = 1;			/* Overkill for now, but more flexible done right */		card->intmask = id->driver_data;	card->legacy = !card->intmask;	card->sixchannel = id->driver_data;		if(card->sixchannel)		printk(KERN_INFO PFX "Six channel audio available\n");	if (pdev->irq < 1) {		printk (KERN_ERR PFX "invalid PCI IRQ %d, aborting\n", pdev->irq);		rc = -ENODEV;		goto err_out_kfree;	}	if (!(pci_resource_flags (pdev, 0) & IORESOURCE_IO)) {		printk (KERN_ERR PFX "unable to locate I/O resources, aborting\n");		rc = -ENODEV;		goto err_out_kfree;	}	pci_set_master(pdev);		/*	 * init AC97 mixer and codec	 */	rc = via_ac97_init (card);	if (rc) {		printk (KERN_ERR PFX "AC97 init failed, aborting\n");		goto err_out_kfree;	}	/*	 * init DSP device	 */	rc = via_dsp_init (card);	if (rc) {		printk (KERN_ERR PFX "DSP device init failed, aborting\n");		goto err_out_have_mixer;	}	/*	 * init and turn on interrupts, as the last thing we do	 */	rc = via_interrupt_init (card);	if (rc) {		printk (KERN_ERR PFX "interrupt init failed, aborting\n");		goto err_out_have_dsp;	}	printk (KERN_INFO PFX "board #%d at 0x%04lX, IRQ %d\n",		card->card_num + 1, card->baseaddr, pdev->irq);#ifdef CONFIG_MIDI_VIA82CXXX	/* Disable by default */	card->midi_info.io_base = 0;	if(card->legacy)	{		pci_read_config_byte (pdev, 0x42, &r42);		/* Disable MIDI interrupt */		pci_write_config_byte (pdev, 0x42, r42 | VIA_CR42_MIDI_IRQMASK);		if (r42 & VIA_CR42_MIDI_ENABLE)		{			if (r42 & VIA_CR42_MIDI_PNP) /* Address selected by iobase 2 - not tested */				card->midi_info.io_base = pci_resource_start (pdev, 2);			else /* Address selected by byte 0x43 */			{				u8 r43;				pci_read_config_byte (pdev, 0x43, &r43);				card->midi_info.io_base = 0x300 + ((r43 & 0x0c) << 2);			}			card->midi_info.irq = -pdev->irq;			if (probe_uart401(& card->midi_info, THIS_MODULE))			{				card->midi_devc=midi_devs[card->midi_info.slots[4]]->devc;				pci_write_config_byte(pdev, 0x42, r42 & ~VIA_CR42_MIDI_IRQMASK);				printk("Enabled Via MIDI\n");			}		}	}#endif	DPRINTK ("EXIT, returning 0\n");	return 0;err_out_have_dsp:	via_dsp_cleanup (card);err_out_have_mixer:	via_ac97_cleanup (card);err_out_kfree:#ifndef VIA_NDEBUG	memset (card, 0xAB, sizeof (*card)); /* poison memory */#endif	kfree (card);err_out_res:	pci_release_regions (pdev);err_out_disable:	pci_disable_device (pdev);err_out:	pci_set_drvdata (pdev, NULL);	DPRINTK ("EXIT - returning %d\n", rc);	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3e90928d81449ee10a06bc306916503d5c284a25/via82cxxx_audio.c/buggy/sound/oss/via82cxxx_audio.c