Subject: Re: msdos fs problems
To: None <tseeger@addcom.de>
From: John Kohl <jtk@kolvir.arlington.ma.us>
List: port-i386
Date: 03/05/2001 22:41:09
This sounds like a problem I had about 5 years ago with an IDE disk bought in
1991.  It couldn't handle 16-block transfers, so I had to hardwire the
kernel to use 8-block or fewer transfers in the ISA IDE driver.

Here's the diff I applied to the old wd.c driver.  (Not sure where it
belongs today, though, but somebody on this list might know?).

===================================================================
RCS file: wd.c,v
retrieving revision 1.1.1.30
retrieving revision 1.30
diff -c -r1.1.1.30 -r1.30
*** wd.c	1998/01/16 16:19:37	1.1.1.30
--- wd.c	1997/10/13 22:34:57	1.30
***************
*** 192,203 ****
  	    d_link->sc_params.wdp_sectors,
  	    DEV_BSIZE);
  
  	if ((d_link->sc_params.wdp_capabilities & WD_CAP_DMA) != 0 &&
  	    d_link->sc_mode == WDM_DMA) {
  		d_link->sc_mode = WDM_DMA;
  	} else if (d_link->sc_params.wdp_maxmulti > 1) {
  		d_link->sc_mode = WDM_PIOMULTI;
! 		d_link->sc_multiple = min(d_link->sc_params.wdp_maxmulti, 16);
  	} else {
  		d_link->sc_mode = WDM_PIOSINGLE;
  		d_link->sc_multiple = 1;
--- 192,209 ----
  	    d_link->sc_params.wdp_sectors,
  	    DEV_BSIZE);
  
+ #ifdef KOLVIR
+ #define MAXMULTI 8		/* buggy drive, argh. */
+ #else
+ #define MAXMULTI 16
+ #endif
  	if ((d_link->sc_params.wdp_capabilities & WD_CAP_DMA) != 0 &&
  	    d_link->sc_mode == WDM_DMA) {
  		d_link->sc_mode = WDM_DMA;
  	} else if (d_link->sc_params.wdp_maxmulti > 1) {
  		d_link->sc_mode = WDM_PIOMULTI;
! 		d_link->sc_multiple = min(d_link->sc_params.wdp_maxmulti,
! 					  MAXMULTI);
  	} else {
  		d_link->sc_mode = WDM_PIOSINGLE;
  		d_link->sc_multiple = 1;