Commit Graph

364 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
petrov 1c9cc1b092 use NCR_F_DMASELECT instead of ncr53c9x_dmaselect 2001-03-29 03:30:19 +00:00
thorpej b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
tsutsui ff3b4a0dab Switch to MI md_root.c. Tested on RAMDISK3X kernel. 2000-11-03 05:52:42 +00:00
eeh 8c3f6a0d10 Adapt to new line discipline scheme. 2000-11-02 00:37:56 +00:00
thorpej 7ca3fb9ef0 Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
nathanw 5127aa189d In fdioctl(), allocate fd_formb dynamically when needed, rather than on
the stack, and remove the no-longer-necessary PHOLD()/PRELE() calls
in fdformat().

(This eliminates 1/3 of the instances of PHOLD()/PRELE() in the kernel code.)

XXX We still have too many mostly-redundant floppy drivers.
2000-08-24 20:04:28 +00:00
mrg 9c11d316b4 remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-29 07:18:57 +00:00
mrg 2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
tsutsui fca0f6760b Fix printf message on attachment. 2000-06-10 04:15:59 +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
thorpej 21fc65e1a8 sleep() -> tsleep() 2000-05-27 04:52:27 +00:00
eeh 3cee90e0e1 Need to provide a consdev to the cons_attach_input call now. 2000-05-21 14:36:15 +00:00
thorpej 071aed40ac A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well.  This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
2000-05-19 18:54:22 +00:00
eeh 424619ca1a Fix the sparc64 console.
Unlike the other Sun machines, UltraSPARCs can have consoles run on different
chips than zs, so we need to support them.  So, here we go:

	Add a new PROM console driver with a major number and everything.
	This is the default driver if nothing else attaches.  It does not
	use the keyboard driver since the PROM translates keystrokes itself.
	(Unfortunately it also swallows L1-A).

	Have the keyboard driver take over the console when it attaches on a
	serial port.  When a serial port detects a keyboard and attaches the
	keyboard driver, it needs to provide a set of consdev vectors.  They
	keyboard driver will use those to send I/O to the keyboard and mouse.
2000-05-19 05:26:16 +00:00
thorpej 463931b3ba Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
2000-05-16 05:45:44 +00:00
thorpej 4044b5a41c Use separate callouts for motor-on and motor-off. Fixes a condition
where the floppy driver would wedge because a motor-on timeout would
be cancelled by another I/O operation cancelling a motor-off timeout.

From enami tsugutomo <enami@sm.sony.co.jp>.
2000-04-07 16:58:53 +00:00
tsutsui ef28a8deb8 Typo. (callout_rest -> callout_reset) 2000-04-01 14:41:13 +00:00
tsutsui 294b27df46 Fix typo. (s/sc_adapter/sc_link/) 2000-04-01 14:38:42 +00:00
tsutsui 8c8679f1ac Remove declaration of kd_rom_intr(). It is not needed on sun3. 2000-03-31 14:24:03 +00:00
tsutsui 49e70b6653 Add include <vm/vm.h> and <uvm/uvm_extern.h> for
declaration of uvm_swapin(), which is no longer in <sys/proc.h>.
2000-03-31 14:18:53 +00:00
tsutsui 9100212ef0 Add a "sc_rev" member to ncr5380_softc and handle CXD1180 quirk
in MI ncr5380sbc.
2000-03-25 15:27:54 +00:00
thorpej 7b918b4088 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:40:33 +00:00
pk f5839cdae8 Minimal changes to accomodate the console input channel attachment
changes in the keyboard driver (see /sys/dev/sun/kbd*)
2000-03-19 13:29:14 +00:00
mycroft 0af581a1a1 Add a ncr5380_attach() routine which does part of the initialization, attaches
the scsibus, and does the addref/delref dance.
2000-03-18 16:13:22 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +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
thorpej fe551f0e64 Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.
2000-02-07 20:16:47 +00:00
thorpej cb239424d0 Fix part of previous commit. 2000-01-28 18:27:41 +00:00
jdc adedf8475e BUFQ_* fixes. 2000-01-28 11:30:22 +00:00
thorpej dc59bc1db3 Update for sys/buf.h/disksort_*() changes. 2000-01-21 23:39:55 +00:00
jdolecek 9986dd3f7d Debugger()/cpu_Debugger() is always available and always defined/prototyped
in <sys/systm.h> for sun3/sun3x, even in non-DDB case
1999-11-22 18:34:00 +00:00
jdolecek 34eaf12c8f adapt to latest scsipi changes
XXX this is not tested, but should be okay
1999-11-03 14:16:33 +00:00
jdolecek 9c9df2bf71 adapt to latest scsipi changes
XXX this is not actually tested, but should be okay
1999-11-03 14:12:19 +00:00
jdolecek 12eea21c72 include opt_ddb.h so that symbol DDB gets defined appropriately and right
thing happens WRT Debugger()
call Debugger() only when DDB is defined
1999-10-17 09:40:49 +00:00
jdolecek ded7bf0c50 include opt_ddb.h, so that symbol DDB actually get's defined appropriately
kill local definition of Debugger() - <sys/systm.h> DTRT
don't assume Debugger() is always available and put the call inside #ifdef DDB

Second part of a fix to PR #8637 by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>.
1999-10-17 09:32:14 +00:00
jdolecek 492bb4b0a6 include opt_ddb.h, so that symbol DDB actually get's defined appropriately
si_intr(): consmetic change to the code calling Debugger()

First part of fix to PR #8637 by Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>.
1999-10-17 09:27:21 +00:00
thorpej 11cae42531 Centralize the declaration and clearing of `cold'. 1999-09-17 19:59:35 +00:00
chs dd6caaf3f9 fix typo in previous commit. fixes PR 7879. 1999-08-20 03:52:38 +00:00
thorpej eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
thorpej a79a728c6c Copy alignment fix from dev/ic/i82586.c (Um, this extra copy should die,
too, but at least it's not as bad as the podulebus ie driver).
1999-05-21 21:33:59 +00:00
thorpej f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
gwr 44844fc8f7 Fix warning 1999-05-08 18:46:17 +00:00
gwr 4fd30baf02 Better implementation of driver "match" function,
and warning/error cleanup.
1999-04-09 04:26:27 +00:00
gwr 4d67424412 Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
1999-04-08 04:46:41 +00:00
wrstuden 2adccc50fa Add pps support. Only enable pps if CLOCAL & !MDMBUF. 1999-03-27 01:21:36 +00:00
thorpej 587eda7c3f Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
1999-03-25 23:11:51 +00:00