home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10123 < prev    next >
Encoding:
Text File  |  1992-12-12  |  2.6 KB  |  69 lines

  1. Newsgroups: comp.unix.bsd
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!noc.msc.net!uc.msc.edu!uh.msc.edu!jpt
  3. From: jpt@uh.msc.edu (Joseph Thomas)
  4. Subject: Re: 386BSD: Problem in wd.c (?) - fixed (config is broken)
  5. Message-ID: <1992Dec12.051145.5919@uc.msc.edu>
  6. Sender: netnews@uc.msc.edu (UC Network News)
  7. Organization: Minnesota Supercomputer Center, Minneapolis, MN
  8. References: <1992Dec11.175951.54@uc.msc.edu> <terry.724107128@uivlsisd.csl.uiuc.edu>
  9. Date: Sat, 12 Dec 1992 05:11:45 GMT
  10. Lines: 57
  11.  
  12.  
  13.     Well - the problem is partially solved. Turns out that config writes
  14. the wrong thing to ioconf.c. I now have 2 controller (both MFM) with two
  15. drives on the first and one drive on the second. [I'm need to make a data
  16. cable long enough to reach the 2nd/4th drive. The driver will send commands
  17. to access the disk but obviously no data transfer can occur - thus access
  18. hangs. [ie. dd hits the drive but never really reads anything]]
  19.  
  20.     My config file [relevent part] looks like:
  21.  
  22.     controller    isa0
  23.     controller    wdc0    at isa? port "IO_WD1" bio irq 14 vector wdintr
  24.     disk        wd0    at wdc0 drive 0
  25.     disk        wd1    at wdc0 drive 1
  26.     controller    fdc0    at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
  27.     disk        fd0    at fdc0 drive 0
  28.     disk        fd1    at fdc1 drive 1
  29.     controller    wdc1    at isa? port "IO_WD2" bio irq 15 vector wdintr
  30.     disk        wd2    at wdc1 drive 0
  31.     disk        wd3    at wdc1 drive 1
  32.  
  33. (NOTE: I changed the 'controller wd?' to 'controller wdc?' to make things
  34. less confusing.)
  35.  
  36.     Congif generates a ioconf.c which contains the following for bio
  37. (block I/O) devices:
  38.  
  39.  
  40. struct isa_device isa_devtab_bio[] = {
  41. /* driver    iobase   irq   drq    maddr,        msize, intr,   unit */
  42. { &wdcdriver,    IO_WD1,    IRQ14,    -1,    C 0x00000,    0, V(wdc0), 0},
  43. { &fdcdriver,    IO_FD1,     IRQ6,     2,    C 0x00000,    0, V(fdc0), 0},
  44. { &wdcdriver,    IO_WD2,    IRQ15,    -1,    C 0x00000,    0, V(wdc1), 1},
  45. 0
  46. };
  47.  
  48. Note that the unit number for the wdc1 is 1!!! This causes wd.c to fill
  49. the internal disk struct for drive 1 (wd1 on wdc0) with the information 
  50. about wdc1. Very wrong!!! What i seems to be doing is generating an entry
  51. for each controller name and NOT for each drive name. Changing ioconf.c
  52. to the below fixes all (including the problem of not knowing the size
  53. of the swap partition.)
  54.  
  55. struct isa_device isa_devtab_bio[] = {
  56. /* driver    iobase   irq   drq    maddr,        msize, intr,   unit */
  57. { &wdcdriver,    IO_WD1,    IRQ14,    -1,    C 0x00000,    0, V(wdc0), 0},
  58. { &wdcdriver,    IO_WD1,    IRQ14,    -1,    C 0x00000,    0, V(wdc0), 1},
  59. { &fdcdriver,    IO_FD1,     IRQ6,     2,    C 0x00000,    0, V(fdc0), 0},
  60. { &wdcdriver,    IO_WD2,    IRQ15,    -1,    C 0x00000,    0, V(wdc1), 2},
  61. { &wdcdriver,    IO_WD2,    IRQ15,    -1,    C 0x00000,    0, V(wdc1), 3},
  62. 0
  63. };
  64.  
  65.  
  66. Looks like I need to delve into config. Oh well Thanks to those people who
  67. replyed.
  68.  
  69.