(PCI_PRODUCT(pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_SUBSYS_ID_REG)) & (1 << (14 + channel))) == 0)
(PCI_PRODUCT(pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_SUBSYS_ID_REG)) & (1 << (14 + channel))) == 0) { WDCDEBUG_PRINT(("%s(%s:%d:%d): 80-wire " "cable not detected\n", drvp->drive_name, sc->sc_wdcdev.sc_dev.dv_xname, channel, drive), DEBUG_PROBE);
serverworks_setup_channel(chp)	struct channel_softc *chp;{	struct ata_drive_datas *drvp;	struct pciide_channel *cp = (struct pciide_channel*)chp;	struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;	int channel = chp->channel;	int drive, unit;	u_int32_t pio_time, dma_time, pio_mode, udma_mode;	u_int32_t idedma_ctl;	static const u_int8_t pio_modes[5] = {0x5d, 0x47, 0x34, 0x22, 0x20};	static const u_int8_t dma_modes[3] = {0x77, 0x21, 0x20};	/* setup DMA if needed */	pciide_channel_dma_setup(cp);	pio_time = pci_conf_read(sc->sc_pc, sc->sc_tag, 0x40);	dma_time = pci_conf_read(sc->sc_pc, sc->sc_tag, 0x44);	pio_mode = pci_conf_read(sc->sc_pc, sc->sc_tag, 0x48);	udma_mode = pci_conf_read(sc->sc_pc, sc->sc_tag, 0x54);	pio_time &= ~(0xffff << (16 * channel));	dma_time &= ~(0xffff << (16 * channel));	pio_mode &= ~(0xff << (8 * channel + 16));	udma_mode &= ~(0xff << (8 * channel + 16));	udma_mode &= ~(3 << (2 * channel));	idedma_ctl = 0;	/* Per drive settings */	for (drive = 0; drive < 2; drive++) {		drvp = &chp->ch_drive[drive];		/* If no drive, skip */		if ((drvp->drive_flags & DRIVE) == 0)			continue;		unit = drive + 2 * channel;		/* add timing values, setup DMA if needed */		pio_time |= pio_modes[drvp->PIO_mode] << (8 * (unit^1));		pio_mode |= drvp->PIO_mode << (4 * unit + 16);		if ((chp->wdc->cap & WDC_CAPABILITY_UDMA) &&		    (drvp->drive_flags & DRIVE_UDMA)) {			/* use Ultra/DMA, check for 80-pin cable */			if (drvp->UDMA_mode > 2 &&			    (PCI_PRODUCT(pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_SUBSYS_ID_REG)) & (1 << (14 + channel))) == 0)				drvp->UDMA_mode = 2;			dma_time |= dma_modes[drvp->DMA_mode] << (8 * (unit^1));			udma_mode |= drvp->UDMA_mode << (4 * unit + 16);			udma_mode |= 1 << unit;			idedma_ctl |= IDEDMA_CTL_DRV_DMA(drive);		} else if ((chp->wdc->cap & WDC_CAPABILITY_DMA) &&		    (drvp->drive_flags & DRIVE_DMA)) {			/* use Multiword DMA */			drvp->drive_flags &= ~DRIVE_UDMA;			dma_time |= dma_modes[drvp->DMA_mode] << (8 * (unit^1));			idedma_ctl |= IDEDMA_CTL_DRV_DMA(drive);		} else {			/* PIO only */			drvp->drive_flags &= ~(DRIVE_UDMA | DRIVE_DMA);		}	}	pci_conf_write(sc->sc_pc, sc->sc_tag, 0x40, pio_time);	pci_conf_write(sc->sc_pc, sc->sc_tag, 0x44, dma_time);	if (sc->sc_pp->ide_product != PCI_PRODUCT_RCC_OSB4_IDE)		pci_conf_write(sc->sc_pc, sc->sc_tag, 0x48, pio_mode);	pci_conf_write(sc->sc_pc, sc->sc_tag, 0x54, udma_mode);	if (idedma_ctl != 0) {		/* Add software bits in status register */		bus_space_write_1(sc->sc_dma_iot, sc->sc_dma_ioh,		    IDEDMA_CTL(channel), idedma_ctl);	}	pciide_print_modes(cp);}