Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!umn.edu!noc.msc.net!uc.msc.edu!uh.msc.edu!jpt From: jpt@uh.msc.edu (Joseph Thomas) Subject: Re: 386BSD: Problem in wd.c (?) - fixed (config is broken) Message-ID: <1992Dec12.051145.5919@uc.msc.edu> Sender: netnews@uc.msc.edu (UC Network News) Organization: Minnesota Supercomputer Center, Minneapolis, MN References: <1992Dec11.175951.54@uc.msc.edu> <terry.724107128@uivlsisd.csl.uiuc.edu> Date: Sat, 12 Dec 1992 05:11:45 GMT Lines: 57 Well - the problem is partially solved. Turns out that config writes the wrong thing to ioconf.c. I now have 2 controller (both MFM) with two drives on the first and one drive on the second. [I'm need to make a data cable long enough to reach the 2nd/4th drive. The driver will send commands to access the disk but obviously no data transfer can occur - thus access hangs. [ie. dd hits the drive but never really reads anything]] My config file [relevent part] looks like: controller isa0 controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr disk wd0 at wdc0 drive 0 disk wd1 at wdc0 drive 1 controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr disk fd0 at fdc0 drive 0 disk fd1 at fdc1 drive 1 controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr disk wd2 at wdc1 drive 0 disk wd3 at wdc1 drive 1 (NOTE: I changed the 'controller wd?' to 'controller wdc?' to make things less confusing.) Congif generates a ioconf.c which contains the following for bio (block I/O) devices: struct isa_device isa_devtab_bio[] = { /* driver iobase irq drq maddr, msize, intr, unit */ { &wdcdriver, IO_WD1, IRQ14, -1, C 0x00000, 0, V(wdc0), 0}, { &fdcdriver, IO_FD1, IRQ6, 2, C 0x00000, 0, V(fdc0), 0}, { &wdcdriver, IO_WD2, IRQ15, -1, C 0x00000, 0, V(wdc1), 1}, 0 }; Note that the unit number for the wdc1 is 1!!! This causes wd.c to fill the internal disk struct for drive 1 (wd1 on wdc0) with the information about wdc1. Very wrong!!! What i seems to be doing is generating an entry for each controller name and NOT for each drive name. Changing ioconf.c to the below fixes all (including the problem of not knowing the size of the swap partition.) struct isa_device isa_devtab_bio[] = { /* driver iobase irq drq maddr, msize, intr, unit */ { &wdcdriver, IO_WD1, IRQ14, -1, C 0x00000, 0, V(wdc0), 0}, { &wdcdriver, IO_WD1, IRQ14, -1, C 0x00000, 0, V(wdc0), 1}, { &fdcdriver, IO_FD1, IRQ6, 2, C 0x00000, 0, V(fdc0), 0}, { &wdcdriver, IO_WD2, IRQ15, -1, C 0x00000, 0, V(wdc1), 2}, { &wdcdriver, IO_WD2, IRQ15, -1, C 0x00000, 0, V(wdc1), 3}, 0 }; Looks like I need to delve into config. Oh well Thanks to those people who replyed.