[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I force PIO mode 3?



i am not sure if the same information (flags settings) applies to your cdrom
but check out  man 4 wd


On Fri, Sep 01, 2000 at 01:48:57AM -0500, Michael H Buselli wrote:
> Hello,
> 
> I'm having a problem accessing my IDE CD-ROM.  The problem seems to be
> that for some reason the driver is trying to use PIO mode 0 for its
> first attempt at the drive, and that doesn't work.  Eventually (anywhere
> between 2 minutes and 45 minutes), the driver downgrades to PIO mode 3
> and the CD-ROM works fine until the next reboot.
> 
> I would like to know how to force PIO mode 3 on the first attempt.  Just
> in case it helps, here's my dmesg output with my comments in there
> between the square brackets ([[ ]]).  The kernel was recompiled to help
> with the CD-ROM issue, but it didn't really improve it.  I'm using 2.7
> base, not current, so please let me know if updating myself to current
> would help (it's a lot of trouble for me).  My first IDE bus has only
> one hard drive, and my second IDE bus has only this CD-ROM.
> 
> --
> OpenBSD 2.7 (INDIA) #0: Mon Jan  1 23:55:00 CST 1996
>     secant@india:/usr/src/sys/arch/i386/compile/INDIA
> cpu0: F00F bug workaround installed
> cpu0: Intel Pentium (P54C) ("GenuineIntel" 586-class) 166 MHz
> cpu0: FPU,V86,DE,PSE,TSC,MSR,MCE,CX8
> real mem  = 66699264 (65136K)
> avail mem = 58200064 (56836K)
> using 839 buffers containing 3436544 bytes (3356K) of memory
> mainbus0 (root)
> bios0 at mainbus0: AT/286+(00) BIOS, date 07/15/95
> apm0 at bios0: Power Management spec V1.2
> apm0: AC on, battery charge unknown
> pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> pchb0 at pci0 dev 0 function 0 "Intel 82439HX (Triton II) TXC Host" rev 0x01
> pcib0 at pci0 dev 7 function 0 "Intel 82371SB (Triton II) PCI-ISA" rev 0x00
> pciide0 at pci0 dev 7 function 1 "Intel 82371SB (Triton II) IDE" rev 0x00: DMA,
> channel 0 wired to compatibility, channel 1 wired to compatibility
> wd0 at pciide0 channel 0 drive 0: <Maxtor 51536U3>
> wd0: can use 32-bit, PIO mode 4, DMA mode 2
> wd0: 16-sector PIO, LBA, 14655MB, 16383 cyl, 16 head, 63 sec, 30015216 sectors
> pciide0: channel 0 interrupting at irq 14
> wd0(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> 
> 	[[ Now the kernel gets around to finding the CD. ]]
> 
> atapiscsi0 at pciide0 channel 1
> scsibus0 at atapiscsi0: 2 targets
> 
> 	[[ Below are some messages that may be related. ]]
> 
> pciide0:1:0: IDENTIFY timed out
> pciide0:1:0: Post IDENTIFY timed out
> pciide0:1:0: Post IDENTIFY timed out
> pciide0:1:0: Post IDENTIFY timed out
> probe(atapiscsi0:0:0): Check Condition on opcode 0
>     SENSE KEY: Aborted Command
> cd0 at scsibus0 targ 0 lun 0: <GoldStar, CD-ROM GCD-R580B, 1.00> SCSI0 5/cdrom r
> emovable
> cd0: can use 32-bit, PIO mode 3, DMA mode 1
> 
> 	[[ The last two lines above look good.  PIO mode 3 works. ]]
> 
> pciide0: channel 1 interrupting at irq 15
> cd0(pciide0:1:0): using PIO mode 0, DMA mode 1 (using DMA data transfers)
> 
> 	[[ It switched to PIO mode 0 somewhere.  This won't work. ]]
> 
> dc0 at pci0 dev 9 function 0 "Lite-On PNIC" rev 0x20: irq 10 address 00:a0:cc:26
> :f6:37
> ukphy0 at dc0 phy 1: Generic IEEE 802.3u media interface
> ukphy0: OUI 0x00c0b4, model 0x0000, rev. 8
> "S3 Trio32/64" rev 0x40 at pci0 dev 10 function 0 not configured
> isa0 at pcib0
> isadma0 at isa0
> : timeout in getresult
> : timeout in getresult
> : timeout in getresult
> 
> 	[[ I suspect the last three lines are also related to the CD. ]]
> 
> pcppi0 at isa0 port 0x61
> midi0 at pcppi0: <PC speaker>
> sysbeep0 at pcppi0
> lpt0 at isa0 port 0x378/4 irq 7
> npx0 at isa0 port 0xf0/16: using exception 16
> pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
> pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
> vt0 at isa0 port 0x60/16 irq 1: vga 80 col, color, 8 scr, mf2-kbd
> fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
> fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
> isapnp0 at isa0 port 0x279: read port 0x203
> "33.6Modem, ROK4120, , " at isapnp0 port 0x3e8/8 irq 5 not configured
> biomask c040 netmask c440 ttymask c4c2
> pctr: 586-class performance counters and user-level cycle counter enabled
> dkcsum: wd0 matched BIOS disk 80
> root on wd0a
> rootdev=0x0 rrootdev=0x300 rawdev=0x302
> 
> 	[[ System is up now.  If I access the CD now, I must wait and ]]
> 	[[ eventually I am treated to this addition to my dmesg. ]]
> 
> cd0(pciide0:1:0): timeout
>         type: atapi
>         c_bcount: 32
>         c_skip: 0
> pciide0:1:0: device timeout, c_bcount=32, c_skip=0
> cd0: transfer error, downgrading to PIO mode 3
> cd0(pciide0:1:0): using PIO mode 3
> cd0(atapiscsi0:0:0): Check Condition on opcode 43
>     SENSE KEY: Unit Attention
> 
> 	[[ And now the CD works until next reboot. ]]
> --
> 
> If this is just a matter of adding support in the kernel for my
> particular CD-ROM, then I'd love to use this as an excuse to learn how
> to hack device drivers.  I can't imagine that this is the case, though,
> because in OpenBSD 2.4 when this CD-ROM was acd0 it worked fine.
> 
> Thank you for any help you can give me.
> 
> T\_/T\_/T
> Michael Buselli [http://www.enteract.com/~cosine/] <cosine@computer.org>
> "Take that unix admin tool and strike me down with all of your hate, and
>  your journey towards the dark side will be complete."  --Carl Molyneaux