printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n"); 
dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); 
static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *ent){	static int printed_version;	struct ata_probe_ent *probe_ent = NULL;	unsigned long base;	int pci_dev_busy = 0;	void __iomem *mmio_base;	int rc;	if (!printed_version++)		printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");	rc = pci_enable_device(pdev);	if (rc)		return rc;	/*	 * Check if we have needed resource mapped.	 */	if (pci_resource_len(pdev, 0) == 0) {		rc = -ENODEV;		goto err_out;	}	rc = pci_request_regions(pdev, DRV_NAME);	if (rc) {		pci_dev_busy = 1;		goto err_out;	}	/*	 * Use 32 bit DMA mask, because 64 bit address support is poor.	 */	rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK);	if (rc)		goto err_out_regions;	rc = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);	if (rc)		goto err_out_regions;	probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL);	if (probe_ent == NULL) {		rc = -ENOMEM;		goto err_out_regions;	}	memset(probe_ent, 0, sizeof(*probe_ent));	probe_ent->dev = pci_dev_to_dev(pdev);	INIT_LIST_HEAD(&probe_ent->node);	mmio_base = pci_iomap(pdev, 0, 0);	if (mmio_base == NULL) {		rc = -ENOMEM;		goto err_out_free_ent;	}	base = (unsigned long) mmio_base;	/*	 * Due to a bug in the chip, the default cache line size can't be used	 */	pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x80);	probe_ent->sht = &vsc_sata_sht;	probe_ent->host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |				ATA_FLAG_MMIO | ATA_FLAG_SATA_RESET;	probe_ent->port_ops = &vsc_sata_ops;	probe_ent->n_ports = 4;	probe_ent->irq = pdev->irq;	probe_ent->irq_flags = SA_SHIRQ;	probe_ent->mmio_base = mmio_base;	/* We don't care much about the PIO/UDMA masks, but the core won't like us	 * if we don't fill these	 */	probe_ent->pio_mask = 0x1f;	probe_ent->mwdma_mask = 0x07;	probe_ent->udma_mask = 0x7f;	/* We have 4 ports per PCI function */	vsc_sata_setup_port(&probe_ent->port[0], base + 1 * VSC_SATA_PORT_OFFSET);	vsc_sata_setup_port(&probe_ent->port[1], base + 2 * VSC_SATA_PORT_OFFSET);	vsc_sata_setup_port(&probe_ent->port[2], base + 3 * VSC_SATA_PORT_OFFSET);	vsc_sata_setup_port(&probe_ent->port[3], base + 4 * VSC_SATA_PORT_OFFSET);	pci_set_master(pdev);	/*	 * Config offset 0x98 is "Extended Control and Status Register 0"	 * Default value is (1 << 28).  All bits except bit 28 are reserved in	 * DPA mode.  If bit 28 is set, LED 0 reflects all ports' activity.	 * If bit 28 is clear, each port has its own LED.	 */	pci_write_config_dword(pdev, 0x98, 0);	/* FIXME: check ata_device_add return value */	ata_device_add(probe_ent);	kfree(probe_ent);	return 0;err_out_free_ent:	kfree(probe_ent);err_out_regions:	pci_release_regions(pdev);err_out:	if (!pci_dev_busy)		pci_disable_device(pdev);	return rc;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/a9524a76f70f3343e4be27f95a7e92a8ba5f9009/sata_vsc.c/buggy/drivers/scsi/sata_vsc.c