Commit Graph

398 Commits

Author SHA1 Message Date
pk be1188e00d Provide locking required by the interrupt handlers running at IPL_SERIAL. 2003-01-28 12:35:31 +00:00
bouyer 4bce909c04 bzero the part of the buffer used to pad the packet to
ETHER_MIN_LEN - ETHER_CRC_LEN.
2003-01-20 14:59:27 +00:00
wiz 7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
thorpej 9c1214153c Use aprint_normal() for cfprint routines. 2003-01-01 02:20:47 +00:00
kristerw 069c964473 Do not try to return a value from void functions. 2002-12-29 14:38:11 +00:00
mrg 603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
jdolecek 405d32e2db g/c local offsetof(), it's defined in libkern.h 2002-10-26 13:24:55 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
martin 57801e8fb7 Pass a struct cons_channel * to cc_iclose, not a struct kbd_softc *.
This argument has been previously unused, thus undetected due to void*
typing. Mmm, copy & paste. Note that sparc got it right though.

Many thanks to Valeriy E. Ushakov <uwe@netbsd.org> for debugging support.
2002-10-10 00:22:19 +00:00
jdolecek 02629619d4 fix typo - si_vme, not si_vmw 2002-10-08 21:29:46 +00:00
thorpej 4bf871a755 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:02:08 +00:00
thorpej 82af7d52d4 Use CFATTACH_DECL(). 2002-10-01 05:32:42 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
itojun 8dd04cdcd7 correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls.  from openbsd
2002-08-03 00:12:48 +00:00
hannken ab45bd509d Fix a bug from last commit: Look for more work AFTER the current buf
is removed from the queue.
2002-07-24 19:49:28 +00:00
hannken 9c4c15c084 Convert to new device buffer queue interface.
Approved by: Nathan J. Williams <nathanw@netbsd.org>
2002-07-23 20:49:54 +00:00
thorpej 2b20452bf1 Statements must follow labels. 2002-05-30 22:19:11 +00:00
atatat 31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
thorpej e38a2e561a machine/fbio.h -> dev/sun/fbio.h 2001-09-19 18:10:32 +00:00
tsutsui fa5d9f83c2 bcopy() -> memcpy(), bzero() -> memset() 2001-09-05 14:03:48 +00:00
tsutsui 714fc1c519 - bcopy() -> memcpy(), strcpy()
- bcmp() -> (static inline) ether_cmp()
- 6 -> ETHER_ADDR_LEN
2001-09-05 13:55:27 +00:00
tsutsui eabd6921ca Remove register prefixes. 2001-09-05 13:27:53 +00:00
wiz 1e378c4c12 precede, not preceed. 2001-08-20 12:00:46 +00:00
jdolecek 74954dadf9 use unsigned variable types as appropriate 2001-08-05 18:07:51 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
wiz cc0b68092e Correct various misspellings of 'transfer' and inflected forms. 2001-07-08 18:06:42 +00:00
thorpej eadf88cc61 (locally defined) HZ -> hz 2001-06-05 05:20:20 +00:00
lukem d84d2c6c85 add missing #include "opt_kgdb.h" 2001-05-30 15:24:23 +00:00
mrg 67afbd6270 use _KERNEL_OPT 2001-05-30 11:57:16 +00:00
chs a83346f337 don't abuse cf_unit. 2001-05-28 20:52:34 +00:00
chs 7520514a5e don't abuse cf_unit. 2001-05-27 06:30:27 +00:00
chs d8e8c90c8a don't abuse cf_unit. 2001-05-27 06:19:39 +00:00
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