home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / bsd / 10106 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  3.4 KB

  1. Path: sparky!uunet!olivea!spool.mu.edu!umn.edu!noc.msc.net!uc.msc.edu!uh.msc.edu!jpt
  2. From: jpt@uh.msc.edu (Joseph Thomas)
  3. Newsgroups: comp.unix.bsd
  4. Subject: 386BSD: Problem in wd.c (?) - affects swap, non-atatched drive(s)
  5. Message-ID: <1992Dec11.175951.54@uc.msc.edu>
  6. Date: 11 Dec 92 17:59:51 GMT
  7. Sender: netnews@uc.msc.edu (UC Network News)
  8. Organization: Minnesota Supercomputer Center, Minneapolis, MN
  9. Lines: 70
  10.  
  11.  
  12.     Okay - here's a problems I haven't seen talked about and it's
  13. not in the FAQ. Before I go chase it down and come up with some (possibly
  14. unique to my system) fix, has anyone else run across this ??? Thanks.
  15.  
  16.  
  17.     I'm running a 386/40C with a generic MFM controller and two
  18. disks attached. I configured the kernel to support swap on wd1 but,
  19. when swapon is called, I get an error of (something like)
  20.  
  21.     "swapon add device: failed: device not configured"
  22.  
  23. I checked the files and yes, the swap partition was configured into
  24. the table ( $SYS/compile/$NAME/swap386bsd.c ). I didn't go any further
  25. on this until I tried adding a second (MFM) controller last night.
  26. I couldn't get the kernel to boot and after some effort, found that
  27. the two problems seem to be related. [BTW: Controller one is set for primary
  28. address, IRQ14, controller two is set for secondary address, IRQ 15.
  29. Machine runs DOS and kernel finds controllers...]
  30.  
  31.  
  32.     When 386bsd boots, it would find and report both controllers,
  33. but would then hang. By inserting printf's, I came up with the following:
  34.  
  35.     In wd.c, there is a call to wdgetctlr() which then attempts
  36. to issue a "Get Parameters" command (#8 ??). On my controllers, this
  37. returns an error status of "Command Aborted" (#4). This leaves the
  38. kernel not knowing anything about the drives at this point.
  39.  
  40. Implications:
  41.  
  42.     When going through the configuration steps (is isa_config(),
  43. swap_conf(), etc.), the kernel does not know the name or geometry
  44. of the drive. isa_config() can print out the controller information
  45. (eg. wd0 at 0x3f0 IRQ 15 on isa) but not the drive information
  46. (eg. <MAXTOR-XT1290>). Later, when swap is configured, swap_conf()
  47. looks through the swdevt[] to add up all the sizes of available
  48. devices. (This is done for interleaving when all devices are turned
  49. on. Normally, only the "root" swap partition is marked available.
  50. Later, swapon() will mark the space for its argument as available.)
  51. Point is - swap_conf() needs to know the size of this partition/device
  52. up front and it doesn't. The size of wd1b remains as zero.
  53.  
  54.     As for the second controller, the kernel can talk to and issue
  55. commands, but appears to hang sometime after issuing wdgetctlr() commands
  56. for the two drives it thinks might be attached there. [Strange - I haven'd
  57. config'd any drives to that controller, but then I couldn't find where the
  58. drive tables were setup anyways...] 
  59.  
  60.     The chain of events seems to be something like:
  61.  
  62.         wdprobe() for controller 0
  63.         wdattach() controller 0
  64.         wdgetctlr() looks for drive 0 on controller 0 - fails
  65.         wdgetctlr() look for drive 1 on controller 0 - fails
  66.     (someone) readdisklabel() for drive 0, controller 0
  67.     (someone) readdisklabel() for drive 1, controller 0
  68.         wdprobe() for controller 1
  69.         wdattach() controller 1
  70.         wdgetctlr() looks for drive 0 on controller 1 - fails
  71.         wdgetcltr() looks for drive 1 on controller 1 - fails
  72.  
  73.         MACHINE HUNG
  74.  
  75.  
  76. Anyone have any ideas??? Thought it was worth asking before I really
  77. dig into this (not that I've had time before now - but things look good
  78. for the next week or two).
  79.  
  80. Thanks again.
  81.