/* Called when the PCI registration layer (or the IDE initialization) finds a device matching our IDE device tables.  */
static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id)
/* Called when the PCI registration layer (or the IDE initialization) finds a device matching our IDE device tables.  */
static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
	struct ide_port_info d;
	u8 idx = id->driver_data;
	d = serverworks_chipsets[idx];
	if (idx == 1)
		d.host_flags |= IDE_HFLAG_CLEAR_SIMPLEX;
	else if (idx == 2 || idx == 3) {
		if ((PCI_FUNC(dev->devfn) & 1) == 0) {
			if (pci_resource_start(dev, 0) != 0x01f1)
				d.host_flags |= IDE_HFLAG_NON_BOOTABLE;
			d.host_flags |= IDE_HFLAG_SINGLE;
		} else
			d.host_flags &= ~IDE_HFLAG_SINGLE;
	}
	return ide_pci_init_one(dev, &d, NULL);
}