Commit Graph

182 Commits

Author SHA1 Message Date
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
bouyer 937a7a3ed9 Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge
2001-04-25 17:53:04 +00:00
enami 2ceebb6c0e Remove unnecessary test of tp->t_linesw against NULL; they are results
of confusion while correcting compilation error after t_line is
replaced with t_linesw.
2001-03-31 00:35:21 +00:00
tsutsui 1bbd89c7a7 white space nits. 2001-02-17 18:02:40 +00:00
simonb dde480911e Fix up line discipline change fallout. 2000-11-03 15:01:10 +00:00
eeh 8c3f6a0d10 Adapt to new line discipline scheme. 2000-11-02 00:37:56 +00:00
mhitch f9521e4c70 Set the boundary to NBPG for bus_dmamap_create(). The IOASIC DMA segment
can not cross a page boundary.  This fixes a problem when a dump(8) buffer
just crossed a page boundary and bus_dmamap_load() would coalesce the
the overlap onto the first segment.  The NEXTPTR value would get set to
-1 when starting the DMA transfer and the residual data for unaligned
transfers would be copied to physical address 0x1ffffffc.  On the R3000,
this would result in corrupted data, and on the R4000 would usually result
in a hard system hang.
2000-09-28 03:27:29 +00:00
nisimura 4f051180a0 - Use PMAD-BA name for device match logic. It's not a real TURBOchannel
device and the id string is not found in option ROM string, but
  ULTRIX/OSF1 call it so anyway.
- Squash IOASIC DMA buffer allocation into device attach() sequence.
2000-07-11 04:10:25 +00:00
nisimura 4250cdde36 - Take care of dm_segs[].dm_len value whenever the offset is adjusted.
Known not working well for 4MAX+ this moment.
- White spacing.
2000-06-07 10:09:19 +00:00
nisimura 72f372eca2 Add a missing parenthesis and correct the function return value declaration. 2000-06-06 00:27:58 +00:00
nisimura 4371d91433 Have MI ncr53c9x_attach() the 2nd and 3rd arguments for scsipi_adater
and scsipi_device respectively, with size reduction of ncr53c9x_softc.
Specifying NULL instructs the driver to use default adapter and default
device codes. Every target port has ncr53c9x_attach(sc, NULL, NULL) anyway.
2000-06-05 07:59:50 +00:00
cgd cffb580806 Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
2000-06-04 19:14:14 +00:00
nisimura de01642cac Use bus_dma(9) to instruct IOASIC DMA to load transferring addresses,
eliminating MIPS cache machinary exposure here.
2000-06-03 07:55:17 +00:00
nisimura 220005d941 Eliminate unused sc_cookie field of struct ioasic_softc. 2000-03-15 03:07:44 +00:00
thorpej a183d34f04 - Implement cnbell() -- ring the console bell. The cn_bell entrypoint
is optional.
- Add cn_bell to statically allocated consdevs as appropriate.
2000-03-06 21:36:05 +00:00
mhitch e65044e30d Get rid of hook for dk_establish() - pmax will now use device_register(). 2000-03-06 03:08:32 +00:00
nisimura f58f6334cb Cosmetic cleanups to hide local objects. 2000-03-04 08:25:24 +00:00
mhitch 8bf4d36694 Fix boot device detection. Device probes are not done when adapters are
configured, but after all adapters have been configured.  When multiple
adapters are present, only the last configured adapter could be matched
to the boot device slot.  The adapter attach routines now check if that
adapter slot matches the boot device slot and saves the softc pointer
for that controller.  Then when the disks are configured, dk_establish()
matches the appropriate controller.  Also change the rz boot device test
to include a check for the adapter so that it works when booting from a
disk on adapters other than the first one.
2000-03-04 05:42:55 +00:00
nisimura 6f5dadba1c Cleanup warning comment which is now irrelevant. Reorder codes. 2000-02-29 09:03:30 +00:00
nisimura d93aaefb84 - Have SYS_DEV_xxx device cookie symbols to select and install proper
interrupt handlers into intrtab[] array, rather than the idea of devices
  in 'psuedo' TURBOchannel slots.
- Nuke symbols for psuedo TC slots.
- Abandon never/unlikely used intr_disestablish()s.
2000-02-29 07:20:21 +00:00
mhitch 19c22771f3 Check and clear the appropriate IOASIC SCSI interrupt bits when in polled
I/O mode.  Kernel dumps will now work with the IOASIC SCSI devices.
2000-02-28 18:51:25 +00:00
nisimura e6635ea8bd Introduce MI SCSI codes; for DECstation 5000s only this moment. 2000-02-19 09:48:46 +00:00
nisimura 43917001c7 - Add missing "opt_ddb.h" to dc.c and dtop.c (oh, boy)
- Nuke irrelevant "dcvar.h" and "tc.h" inclusion from dc.c
- Put '#if NRASTERCONSOLE > 0' around scc_lk201_cnattach().
2000-02-09 08:29:40 +00:00
nisimura c6641d91a8 Merge IOASIC register definitions. 2000-02-03 08:13:44 +00:00
nisimura f3837e8a9d Not to use (cfdata->cf_unit > 0) conditional in device match() routine. 2000-02-03 05:22:47 +00:00
nisimura 3aaeaf7331 - Massive change of console initialization. Have each model its own
consinit().
- Fix fbconnect() and relatives; 'struct fbinfo' is initialized only once,
  making sure no extraneous console resolution message is emitted.
2000-02-03 04:09:01 +00:00
simonb 251eb03a2b Only prototype and include code for scc_kbd_init() and scc_mouse_init()
if NRASTERCONSOLE > 0.  Fixes problem reported on port-pmax by Anders
Andersson.
2000-01-18 12:19:49 +00:00
simonb bdf420bdbf Redo interrupt establishment, based in part on work on the
[nisimura-pmax-wscons] branch and suggestions from Toru Nisimura:
 - Remove bogus tc_slot_info[] name for interrupt handling array
   and replace with simplified struct intrhand  intrtab[] array.
 - Add intr_establish() and intr_disestablish() function pointers
   to struct platform and initialise this in each model-specific
   initialisation, and remove global tc_enable_interrupt function
   pointer.
 - Remove model-specific function declarations from ibus/ibusvar.h.
This is functionally identical to the current scheme, and doesn't
yet try to commonise interrupt establishment by bus type as the
[nisimura-pmax-wscons] branch does.

Also, move cpuspeed variable from autoconf.c to machdep.c
2000-01-14 13:45:21 +00:00
simonb ede7778a1c Remove unneeded include files (up to 16 in two files!). 2000-01-10 03:24:31 +00:00
simonb 6713f95947 Add trailing quote to RCS ID. 2000-01-10 01:57:41 +00:00
ad 0ab584940f RCS ID police. 2000-01-09 23:12:30 +00:00
ad ef9dba7791 - Protect against multiple includes.
- Spacing.
2000-01-09 23:10:45 +00:00
simonb 24ddcc3162 Use the badaddr() prototype in mips/include/cpu.h by including
<machine/cpu.h> in mips/include/mips_param.h.  Remove duplicate
badaddr() prototypes from some pmax header files.
2000-01-09 13:24:14 +00:00
simonb 636b65bec8 The clean-up continues:
- Make local-only function and variables static.
 - Move function prototypes and extern variable declarations to
   header files.
 - Delete unused variables.
There's still a handful of extern declaraions that should be fixed up.
2000-01-09 03:55:28 +00:00
simonb ee075b7de7 Function prototype cleanup. 2000-01-08 01:02:35 +00:00
simonb 576e373b42 Start of the "The Big Cleanup" - remove "ifdef alpha". This has
diverged enough from the alpha scc.c that keeping any pretence of
portability is not worth it.
2000-01-07 14:12:51 +00:00
simonb b1ab053e2c Ick - include pmioctl.h to get the pmEventQueue typedef needed for
qvssvar.h (needed for the mouseInit() prototype).  This _will_ be
cleaned up soon!
2000-01-04 23:15:03 +00:00
simonb 49ee67c77e Include qvssvar.h to get mouseInput() prototype. 1999-12-30 01:01:48 +00:00
ad 977ce29db3 Rectify the jumbled naming scheme of routines in lk201.c. Function names
are now lower case and prefixed by 'lk_'. XXX lk_mouseinit() is bogus. It
belongs somewhere else.
1999-12-23 15:34:17 +00:00
simonb c2f5cc273c Don't use our own defines for SCCDEV or RCONSDEV - pull in
<pmax/pmax/cons.h> for these values.
1999-12-08 01:29:11 +00:00
simonb f3e001c3ac Fix typo in 3max+ scc1 device declaration - console output on a serial
console 3max+ works again.
1999-12-06 11:52:36 +00:00
nisimura 06276dc255 Fix wrong figures in comments. 1999-12-01 08:55:09 +00:00
nisimura f0771e6b9b Arrange comment descriptions for internals of TC DECstations. 1999-12-01 08:41:41 +00:00
nisimura 6aa5cbc76c Replace old asic.c with one imported from a development branch. 1999-12-01 08:39:20 +00:00
ad 0daccde651 - When kbdMapChar() was modified to support returning multi-character
mappings, it broke Ctrl-Space; fix that.
- Clean up lk201.c a little.
1999-11-29 15:02:38 +00:00
nisimura 8bcd9ac481 Consistent panic messages when erroneous kernel configurations are found. 1999-11-17 03:42:20 +00:00
nisimura 5948b59226 Fix a typo in PX TC device identification case analysis. 1999-11-16 02:39:03 +00:00
nisimura 0310fa6595 Very large scale change to sweep obstracles to remove 3MAX IOASIC disguise.
- Rework ibus device configuration and interrupt handler assignment.
- Remove TC device exposure in 'mainbus.c'
- Squash 'ibus_{3100,5100}.c' into a file; it can not cope with 3max.
- 'struct confargs' -> 'struct mainbus_attach_args'
Now about to remove tc_slot_info[] and tc_enable_interrupt inherited from
4.4BSD.
1999-11-15 09:50:17 +00:00
nisimura 7fbac8b3cc - Remove defunct codes and arrange consistency between pmax and alpha.
- Reduce 'ioasic_base' expose.
1999-10-01 09:19:42 +00:00
nisimura de20527da0 Forgot to commit an important change for bus_space/bus_dma. 1999-09-28 08:05:42 +00:00