NetBSD Problem Report #17742

Received: (qmail 27816 invoked by uid 605); 28 Jul 2002 14:59:16 -0000
Message-Id: <20020728145914.DE92B11122@narn.netbsd.org>
Date: Sun, 28 Jul 2002 07:59:14 -0700 (PDT)
From: wojtek@tensor.3miasto.net
Sender: gnats-bugs-owner@netbsd.org
Reply-To: wojtek@tensor.3miasto.net
To: gnats-bugs@gnats.netbsd.org
Subject: old IDE drives doesn't report multisector right
X-Send-Pr-Version: www-1.0

>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 15:00:00 +0000 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:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.