October 18, 1998 WDC 9

### NAME

wdc - machine-independent IDE/ATAPI driver

### SYNOPSIS

```int` wdcprobe(```struct channel_softc * chp`)
```void` wdcattach(```struct channel_softc * chp`)

### DESCRIPTION

The wdc driver provides the machine independent core functions for driving IDE devices. IDE devices-specific drivers apibus.html">atapibus(4) (wd(4) or SEE ALSO wdc(4), bus_space(9)

### CODE REFERENCES

The wdc core functions are implemented in ```sys/dev/ic/wdc.c`. Low-level ATA and ATAPI support is provided by ```sys/dev/ata_wdc.c` and ```sys/dev/scsipi/atapi_wdc.c` respectively.

An example of a simple bus front-end can be found in ```sys/dev/isapnp/wdc_isapnp.c`. A more complex one, with multiple channels and bus-master DMA support is ```sys/dev/pci/pciide.c`. ```sys/arch/atari/dev/wdc_mb.c` makes use of hardware locking, and also provides an example of bus-front end for a big-endian system, which needs byte-swapping bus_space functions.