--- ata-disk.c.orig Mon Aug 25 18:01:49 2003 +++ ata-disk.c Tue Sep 2 00:15:31 2003 @@ -55,6 +55,7 @@ /* prototypes */ static void ad_detach(struct ata_device *); +static void ad_reinit(struct ata_device *); static void ad_start(struct ata_device *); static void ad_done(struct ata_request *); static disk_open_t adopen; @@ -152,6 +153,7 @@ /* setup the function ptrs */ atadev->detach = ad_detach; + atadev->reinit = ad_reinit; atadev->start = ad_start; atadev->softc = adp; @@ -202,6 +204,19 @@ atadev->softc = NULL; atadev->flags = 0; free(adp, M_AD); +} + +static void +ad_reinit(struct ata_device *atadev) +{ + struct ad_softc *adp = atadev->softc; + + ata_controlcmd(atadev, ATA_SET_MULTI, 0, 0, (adp->max_iosize / DEV_BSIZE)); + + if (ata_dma && atadev->channel->dma) + atadev->setmode(atadev, ATA_DMA_MAX); + else + atadev->setmode(atadev, ATA_PIO_MAX); } static int