Subject: Re: NetBSD-1.5.2: DVD-ROM Read Error
To: Daniel Gerber <daniel.gerber@mw.iap.unibe.ch>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: netbsd-help
Date: 10/15/2001 19:43:29
On Mon, Oct 15, 2001 at 09:55:48AM +0200, Daniel Gerber wrote:
> I installed NetBSD on a new machine I built featuring a
>   <TOSHIBA DVD-ROM SD-M1612>
> 
> It is basically recognized, but whenever I read large amounts of data
> (e.g. pkgssrc, syssrc) the drive hangs periodically and produces the
> following read error:
> 
> 
>  pciide0:1:0: lost interrupt
>         type: atapi tc_bcount: 2048 tc_skip: 0
>  pciide0:1:0: bus-master DMA error: missing interrupt, status=0x21
>  cd0: transfer error, downgrading to Ultra-DMA mode 1
>  cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 1 (using DMA data transfers)
>  wdc_atapi_intr: bad data phase DATAOUT
>  cd0: transfer error, downgrading to DMA mode 2
>  cd0(pciide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
>  pciide0:1:0: lost interrupt
>         type: atapi tc_bcount: 2048 tc_skip: 0
>  pciide0:1:0: bus-master DMA error: missing interrupt, status=0x21
>  cd0: transfer error, downgrading to PIO mode 4
>  cd0(pciide0:1:0): using PIO mode 4
>  wdc_atapi_intr: bad data phase DATAOUT
> 
> 
> This happens with the generic kernel as well with the system specific
> that I have compiled myself. Reading about Ultra-DMA problems I disabled

Once it has downgraded to PIO mode 4, does it work or not ?
Also, what IDE controller do you have ?


> DMA in BIOS for the DVD (Secnd Master), but it still gets detected as
> Ultra-DMA 2 capable at bootup.

NetBSD doesn't use the BIOS, but what the hardware should be able to do.
You need to compile a kernel with flags on cd* to force a PIO/DMA mode.
See the wd and cd man pages for details.

> 
> Might this be a hardware incompatibility? I thought DVDs were generic ATAPI
> devices and thus supported.

Well, I have one which is:
pciide0 at pci0 dev 31 function 1: Intel 82801AA IDE Controller (ICH) (rev. 0x02
)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <Maxtor 90845U2>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 8063 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 16514064 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4 (Ultra/66)
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 4 (Ultra/66) (using DMA data 
transfers)
pciide0: secondary channel wired to compatibility mode
atapibus0 at pciide0 channel 1: 2 targets
cd0 at atapibus0 drive 0: <_NEC DV-5700B, , 1.91> type 5 cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)

--
Manuel Bouyer <bouyer@antioche.eu.org>
--