Subject: double detecting of IBM microdrive?
To: None <netbsd-users@netbsd.org>
From: Steve Bellovin <smb@research.att.com>
List: netbsd-users
Date: 12/09/2004 12:33:19
I tried using a PCMCIA IBM Microdrive on a 2.0rc4 system.  It was 
detected twice:

  wdc2 at pcmcia1 function 0
  atabus2 at wdc2 channel 0
  wd1 at atabus2 drive 0: <IBM-DMDM-10340>
  wd1: drive supports 16-sector PIO transfers, LBA addressing
  wd1: 342 MB, 695 cyl, 16 head, 63 sec, 512 bytes/sect x 700560 sectors
  wd2 at atabus2 drive 1: <ST506>
  wd2: drive supports 1-sector PIO transfers, chs addressing
  wd2: 69632 KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x 139264 sectors

wd1 has the right size

Disklabel saw it twice, too:

  # disklabel wd1
  # /dev/rwd1d:
  type: ESDI
  disk: IBM-DMDM-10340  
  label: fictitious
  flags:
  bytes/sector: 512
  sectors/track: 63
  tracks/cylinder: 16
  sectors/cylinder: 1008
  cylinders: 695
  total sectors: 700560
  rpm: 3600
  interleave: 1
  trackskew: 0
  cylinderskew: 0
  headswitch: 0           # microseconds
  track-to-track seek: 0  # microseconds
  drivedata: 0 
  
  5 partitions:
  #        size    offset     fstype [fsize bsize cpg/sgs]
   d:    700560         0     unused      0     0        # (Cyl.      0 -    694)
   e:    699489        63      MSDOS                     # (Cyl.      0*-    693)
  disklabel: boot block size 0
  disklabel: super block size 0
  # disklabel wd2
  # /dev/rwd2d:
  type: ST506
  disk: ST506
  label: fictitious
  flags:
  bytes/sector: 512
  sectors/track: 17
  tracks/cylinder: 8
  sectors/cylinder: 136
  cylinders: 1024
  total sectors: 139264
  rpm: 3600
  interleave: 1
  trackskew: 0
  cylinderskew: 0
  headswitch: 0           # microseconds
  track-to-track seek: 0  # microseconds
  drivedata: 0 
  
  5 partitions:
  #        size    offset     fstype [fsize bsize cpg/sgs]
   d:    139264         0     unused      0     0        # (Cyl.      0 -   1023)
   e:    699489        63      MSDOS                     # (Cyl.      0*-   5143+)
  disklabel: boot block size 0
  disklabel: super block size 0
  disklabel: partition e: partition extends past end of unit

I mounted both of them, read-only; I saw the same thing.  I didn't try
reading anything more than the FAT, and I didn't dare try writing to it.

One caveat: I do have some fixes of my own devising in the wd driver, so
I'm not certain it's a NetBSD bug.  Has anyone else seen anything like that?