Subject: kern/7218: wd driver doesn't find my SanDisk flash card any more
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tls@rek.tjls.com>
List: netbsd-bugs
Date: 03/23/1999 17:37:11
>Number:         7218
>Category:       kern
>Synopsis:       between 3/1 and 3/23, "wd" has broken for SanDisk IDE devices
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 23 14:50:01 1999
>Last-Modified:
>Originator:     tls@rek.tjls.com
>Organization:
	Very little.
>Release:        19990323
>Environment:
Flytech NetPC3 (VIA MVP3 chipset), SanDisk 40MB 2.5" IDE "disk", wdc and pciide controller drivers, wd target driver.

System: NetBSD rekusant.rivage.tjls.com 1.3K NetBSD 1.3K (REKUSANT) #9: Mon Mar 22 13:46:18 EST 1999 root@rekusant.rivage.tjls.com:/lfs/kobj/REKUSANT i386


>Description:

I run many systems from SanDisk IDE flash "disks".  An install kernel built
on 3/18 from sources possibly a few days older correctly probes and attaches
the SanDisk 40MB 2.5" IDE "disk" on pciide.  This machine has no other IDE
devices.

A GENERIC kernel built from 3/23 sources pauses for a long time afer attaching
the controller, and doesn't find the drive.  It then disables the controller
because there are "no disks".

The same thing happens if I switch from pciide to wdc.

The SanDisk drive is a very basic IDE device.  It does not support 
multi-sector transfers, DMA, or fast PIO modes (actually, SanDisk engineers 
say that it does, but doesn't respond to inquiry saying so).  It does support
LBA mode.

It works fine with the kernel I built on 3/18.  After updating my sources to
3/23 it does not work at all -- doesn't even probe.

It might be a reasonable assumption to think that other "simple" or very old
ST-506/IDE devices may also be broken now, but I don't have any others to
test with.

With the 1.4 release coming up, and IDE flash "disks" becoming increasingly
popular, fixing this should probably be a high priority.

Here is what the 3/18 kernel that it works with says at boot:

pciide0 at pci0 dev 7 function 1: VIA Technologies VT82C586A IDE Controller
pciide0: bus-master DMA support present
pciide0: primary channel configured to compatibility mode
wd0 at pciide0 channel 0 drive 0: <SunDisk SD25B-40>
wd0: drive supports 1-sector pio transfers, lba addressing
wd0: 38MB, 612 cyl, 4 head, 32 sec, 512 bytes/sect x 78336 sectors
wd0: 32-bits data port
pciide0: primary channel interrupting at irq 14
pciide0: secondary channel configured to compatibility mode
pciide0: disabling secondary channel (no drives)
wd0(pciide0:0:0): using PIO mode 0

The 3/23 kernel just doesn't find the drive, and disables both channels.

>How-To-Repeat:

Boot a 3/23 kernel on a machine with a SanDisk flash disk (probably any kind,
I used the 40MB 2.5" IDE "disk", but the CompactFlash or "PCMCIA card" disks
(when connected through an *IDE*, not a *PCMCIA*, adapter cable) will probably
fail, too, since they run the same firmware).

>Fix:

Unknown.
>Audit-Trail:
>Unformatted: