Subject: Re: WDM_PIOMULTI fails on my drive (atari + MI wdc)
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: tech-kern
Date: 04/24/1998 22:32:03
On Fri 24 Apr 1998, Manuel Bouyer wrote:
> On Apr 24, Leo Weppelman wrote
> > On the atari, I use the MI wdc driver. In combination with my Quantum
> > Fireball, I get a failure in multi-sector mode.
> > 
> > >From my dmesg:
> > 
> >   wd0 at wdc0 drive 0: <QUANTUM FIREBALL1080A>
> >   wd0: 1039MB, 2112 cyl, 16 head, 63 sec, 512 bytes/sec
> >   wd0: using 16-sector 16-bit pio transfers, chs addressing
> >   wd0: wdccontrol: setmulti failed (2) - fallback to single sector mode
> >   root on wd0a dumps on wd0b
> > 
> > As can be seen, the Fireball announces that it supports multi-sector mode.
> > This fails on the first read attemp though.
> 
> And I'm pretty sure it works in this mode on PCs. I have a
> wdc0 at isa0 port 0x1f0-0x1f7 irq 14
> wd0 at wdc0 drive 0: <QUANTUM FIREBALL_TM2550A>
> wd0: 2445MB, 4969 cyl, 16 head, 63 sec, 512 bytes/sec
> wd0: using 16-sector 16-bit pio transfers, lba addressing
> 
> Here which works fine.  Maybe the problem comes from the CHS vs LBA mode ?

Although you have a slightly different drive, I'm pretty sure the multi
sector mode on the drive works on PCs. I expected more questions about this
drive on current-users when it didn't ;-) I think CHS mode is just the
default. I didn't see any atari-driver options to change it. I'm not sure
what the results are when I change it over in NetBSD.

[ patch causing a fallback to PIOSINGLE ]

> Perhaps you could print the error code too (wdc->sc_error). This would
> help understand why the mode was rejected. Maybe you could also print the
> d_link->sc_params.wdp_maxmulti parameter in wdattach().

The error code is 4, wdp_maxmulti is 128.

> You patch make sense. Maybe it is possible to try some other multi
> mode before falling back to single. The modes accepted by the drive are
> in the capabilitie struct, I think, but I don't have my ATA spec here so
> I can't develop this point now. I don't think it is worth doing a lot
> of work on this now, as I am rewriting this driver. One of the motivation
> for this work is better errors handling :)

If you want to test the recovery of this error, I'm your man ;-)

Leo.