Subject: kern/17742: old IDE drives doesn't report multisector right
To: None <gnats-bugs@gnats.netbsd.org>
From: None <wojtek@tensor.3miasto.net>
List: netbsd-bugs
Date: 07/28/2002 07:59:14
>Number:         17742
>Category:       kern
>Synopsis:       old IDE drives doesn't report multisector right
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 28 08:00:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Wojciech Puchar
>Release:        1.5.3
>Organization:
TENSOR ap
>Environment:
NetBSD pisil.3miasto.net 1.5.3 NetBSD 1.5.3 (router.pisil) #0: Sun Jul 28 15:26:03 CEST 2002     wojtek@chylonia.3miasto.net:/home/wojtek/kernel/router.pisil i386

>Description:
Some old (40-80MB) drives does not report their capabilities right.
Esp. they report they can multisector read/writes but they can't
>How-To-Repeat:
simply try to use such ide drives
like Conner Peripherals 40MB - CP3046
you won't be able to use them
>Fix:
--- wd.c.orig   Sun May  6 22:48:42 2001
+++ wd.c        Sun Jul 28 15:11:14 2002
@@ -301,6 +301,16 @@
                wd->sc_multi = 1;
        }
 
+
+       /*some old 40-80MB drives reports huge multisector availability like 64
+         while not supporting it at all. This rough guess should catch them all*/
+         
+        if((wd->sc_capacity/wd->sc_multi)<5000) {
+               printf("%s: drive reports too large multisector count %d - ignoring!\n",
+               wd->sc_dev.dv_xname,wd->sc_multi);
+               wd->sc_multi=1;
+        }
+        
        printf("%s: drive supports %d-sector pio transfers,",
            wd->sc_dev.dv_xname, wd->sc_multi);
 

>Release-Note:
>Audit-Trail:
>Unformatted: