Subject: sandisk pcmcia compactflash adapter
To: None <port-i386@netbsd.org>
From: Aaron J. Grier <agrier@poofygoof.com>
List: port-i386
Date: 02/27/2001 00:05:16
vadem vg-365, sandisk pcmcia compactflash adapter, netbsd 1.5 GENERIC

[...]
pcic0 at isa0 port 0x3e0-0x3e1 iomem 0xd0000 0xdffff
pcic0: controller 0 (Intel 82365SL Revision 1) has sockets A and B
pcic0: controller 1 (Intel 82365SL Revision 1) has no sockets
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1
[...]
pcic0: controller 0 detecting irqs with mask 0xdeb8:...10...11
pcic0: using irq 10 for socket events
wdc2 at pcmcia0 function 0 port 0x400-0x40f
wd1 at wdc2 channel 0 drive 0: <S>
wd1: drive supports 1-sector pio transfers, lba addressing
wd1: 7808 KB, 0 cyl, 0 head, 0 sec, 512 bytes/sect x 15616 sectors
pcmcia0: card irq 11
kernel: integer divide fault trap, code=0
Stopped in swapper at readdisklabel+0xbb:	divl	0x38(%ecx),%eax
db> trace
readdisklabel[...]
wdgetdisklabel[...]
wdopen[...]
spec_open[...]
match_harddisk[...]
findroot[...]
cpu_findroot[...]
main[...]

The flash is sized correctly, but I'm guessing the 0 cyl/head/sec is
confusing disklabel.  perhaps some munging of i386/disksubr.c is in
order...  (lines 170 and 179 immediately look suspect, but I'm not sure
how to fix them.)  Maybe cook up some geometry in that case?

-- 
  Aaron J. Grier | "Not your ordinary poofy goof." | agrier@poofygoof.com
  "Being wet and standing in a salted bath while rinsing the inside of
   your hairdryer with a silver spoon is a very stupid thing to do."
      -- Dave Krooshof