Date: Sat, 15 Jun 2002 13:14:52 +0200 From: "Jose M. Alcaide" <jose@we.lc.ehu.es> To: hardware@FreeBSD.org Subject: ATAPI CDROM does not work in DMA mode, but it works with NetBSD Message-ID: <20020615131452.A267@v-ger.we.lc.ehu.es>
next in thread | raw e-mail | index | archive | help
[I am sorry for the long message.] The machine is a Dell Inspiron 3700. FreeBSD was *never* able to put its ATAPI CD-ROM in DMA mode, including 4.6-RELEASE and 5.0-CURRENT. However, the CD-ROM does work fine with DMA using NetBSD 1.5.2. Here are the most relevant boot messages: -------------------------------------------------------------------------- atapci0: <Intel PIIX4 ATA33 controller> port 0x860-0x86f at device 7.1 on pci0 [...] ata1: iobase=0x0170 altiobase=0x0376 bmaddr=0x0868 ata1: mask=03 ostat0=50 ostat2=00 ata1-master: ATAPI 14 eb ata1-slave: ATAPI 7f 7f ata1: mask=03 stat0=00 stat1=00 ata1: devices=04 ata1: at 0x170 irq 15 on atapci0 [...] ata1-master: piomode=4 dmamode=2 udmamode=-1 dmaflag=1 ata1-master: success setting PIO4 on generic chip acd0: <TOSHIBA CD-ROM XM-1902B/1A15> CDROM drive at ata1 as master -------------------------------------------------------------------------- Here is the atacontrol output: -------------------------------------------------------------------------- # atacontrol info 1 Master: acd0 <TOSHIBA CD-ROM XM-1902B/1A15> ATA/ATAPI rev 0 Slave: no device present # atacontrol cap 1 0 ATA channel 1, Master, device acd0: ATA/ATAPI revision 0 device model TOSHIBA CD-ROM XM-1902B firmware revision 1A15 cylinders 0 heads 0 sectors/track 0 lba supported lba48 not supported dma supported overlap not supported Feature Support Enable Value Vendor write cache no no read ahead no no dma queued no no 0/00 SMART no no microcode download no no security no no power management no no advanced power management no no 0/00 automatic acoustic management no no 0/00 0/00 -------------------------------------------------------------------------- And I am not a fool ;-) : -------------------------------------------------------------------------- # sysctl hw.ata hw.ata.ata_dma: 1 hw.ata.wc: 1 hw.ata.tags: 0 hw.ata.atapi_dma: 1 -------------------------------------------------------------------------- I can force WDMA2 mode using atacontrol, but then the data transfers with the CD-ROM do not work, and after some resets of the ATA channel it falls back to PIO4. Given that the CD-ROM works in DMA mode with NetBSD (and I tested it, achieving a noticeably higher data throughput and slower CPU consumption compared with those obtained using FreeBSD), I guess that this CD-ROM is not one of those ATAPI devices with broken DMA support. After reading /sys/dev/ata/atapi-all.c and ata-dma.c, I deduced that the following condition (in atapi_attach()) is true: atadev->param->drq_type == ATAPI_DRQT_INTR which prevents setting the CD-ROM in DMA mode. Of course, I removed that test and then the CD-ROM was put in WDMA2 mode, but it did not worked anyway. I wonder why NetBSD does not bother about drq_type being ATAPI_DRQT_INTR. Cheers, JMA -- ****** Jose M. Alcaide // jose@we.lc.ehu.es // jmas@FreeBSD.org ****** ** "Beware of Programmers who carry screwdrivers" -- Leonard Brandwein ** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020615131452.A267>