Commit Graph

797 Commits

Author SHA1 Message Date
jdolecek 7cea8a1389 cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
  the owner of descriptor, according to appropriate sematics
  of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
  these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
  properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
  in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
  pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
2003-09-21 19:16:48 +00:00
mycroft d40837608f 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
   (it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
   *_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
   drives more quickly.
2003-09-19 21:35:56 +00:00
agc aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
is 2ae40f99a0 pass source file name to gpsa, so that gspa could (in theory) embed the
used filename in the output.
2003-07-16 20:07:12 +00:00
is 02963a4af5 Update comments. 2003-07-16 19:58:59 +00:00
lukem e551149641 rcsid 2003-07-14 23:40:33 +00:00
aymeric 66cce85a22 get rid of printf() warnings in the FDDEBUG case by using the right format
specifiers
2003-07-14 15:57:39 +00:00
aymeric f8f792fd37 The second argument to amidisplaycc_setnamedfont() really should be a const.
Make it so.
2003-07-14 15:56:39 +00:00
drochner 1a03e79900 don't #include <sys/dkstat.h> where it is (appearently) unused 2003-06-18 08:58:34 +00:00
kristerw 840aee882a Use __asm instead of asm, to keep lint happy. 2003-05-31 03:05:45 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
is dc7d5edb51 fix fatal typo 2003-04-18 09:23:17 +00:00
is 4549723d92 iszthreepa() takes a physical address, not a virtual address.
This fixes PR 19175, reported and heavily debugged by Pawel Chwalowski.
2003-04-18 09:18:19 +00:00
thorpej 0871fe346f Use PAGE_SIZE rather than NBPG. 2003-04-09 01:54:42 +00:00
wiz 68caa698b2 Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
2003-04-06 18:20:07 +00:00
thorpej 8818afa48e Use PAGE_SIZE rather than NBPG. 2003-04-01 21:26:26 +00:00
jandberg ba34244e76 make sure cursor is cleared from old location before drawing in the next 2003-02-10 20:09:43 +00:00
perry 1f4ad37fe3 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-05 00:02:24 +00:00
wiz 9115df8c49 success, not sucess. Noted by mjl. 2003-01-28 22:35:02 +00:00
bouyer 099e41a34e Pass proper len to word_zero().
Bump totlen in the last wantsbyte case, so that it's always even.
Both pointed out by Gunther Nikl.
2003-01-21 20:39:29 +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
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
lonewolf 628ec7a152 Compiles and works (tested on my A1200) again
XXX scsipi mid layer spews out a few "generic HBA error"s during device probe (no slave device on bus), I don't know how to fix this
XXX This whole thing should die now that we have wdc_amiga
2003-01-17 04:20:38 +00:00
wiz c6f1277bfa synchronous, not syncronous. 2003-01-06 13:10:25 +00:00
wiz 7e681f7063 interrupt with two rs. 2003-01-06 13:04:54 +00:00
thorpej 5001cdaf1f Use aprint_normal() for cfprint routines. 2003-01-01 00:25:01 +00:00
thorpej 703e7687a9 Use aprint_normal() in cfprint routines. 2003-01-01 00:16:46 +00:00
christos 729ccbc9cd si_ -> sel_ 2002-11-26 19:49:00 +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 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
jdolecek fc6049b9b7 replace the somewhat strange poll routine with standard nopoll() (a.k.a
seltrue())
2002-10-10 22:33:15 +00:00
kent f6f836bbe6 Sync with the recent ac97 changes.
- AC97_CODEC_DOES_VRA -> AC97_EXT_AUDIO_VRA
 - Use ac97_codec_if::get_extcaps()
 - Remove VRA/VRM enabling code
2002-10-08 18:01:42 +00:00
thorpej c5e91d447d Use CFATTACH_DECL(). 2002-10-02 04:55:47 +00:00
aymeric f835a6ae04 . treat a stream of framing errors as a single break
. trigger ddb upon receiving a break if we are the console
2002-10-01 12:17:09 +00:00
thorpej 9a711d6985 Declare all cfattach structures const. 2002-09-27 20:29:02 +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
aymeric 84ccd9ee4b call grfcc_probe() and viewprobe(), even when we are not the console.
This fixes a panic when using a serial console and wsconscfg.
(The monitors list wouldn't be initialized in grfabs.c)
2002-09-02 11:09:48 +00:00
hannken bf7cb35ffa Convert to new device buffer queue interface.
Approved by: Ignatios Souvatzis <is@netbsd.org>
2002-08-07 07:29:13 +00:00
itojun 05d221783a integer overflow. reported by silvio@qualys.com 2002-08-06 22:44:38 +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
junyoung 3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00
thorpej 2335982213 Remove unnecessary assignments (for which the operation may be
undefined).
2002-05-30 20:28:27 +00:00
thorpej 8f0c98bbe2 Statements must follow labels. 2002-05-30 20:03:27 +00:00
thorpej 763a08c0dc Put the __unused__ attribute one some unused kbd maps. 2002-05-30 20:02:24 +00:00
thorpej 9ba5027914 Nuke a trigraph. 2002-05-30 19:52:52 +00:00
jdolecek a14bf4ee89 update comments 2002-05-26 12:53:22 +00:00
jdolecek 2f8917ee1b regen (RCS Id fix) 2002-05-26 12:52:27 +00:00
jdolecek 64efb25dc0 remove space in generated NetBSD RCS Id 2002-05-26 12:51:55 +00:00
jdolecek b69489fb3b pregenerate grf_ultms.c, so that gspa isn't needed during kernel build 2002-05-26 12:47:41 +00:00
matt 109792dc5c Eliminate commons. (including a few unused or mismatched ones). 2002-05-14 00:08:21 +00:00
aymeric 90d26c8828 o replace definitions by declarations in header files
o put definitions where due
o cleanup some types  (u_int -> vaddr_t's for example)
o minor other cleanup
2002-04-25 09:20:25 +00:00
heinz 9f8fa51b2d Removed the files after renaming to kf_iso8859_1_* (in agreement with
is@netbsd.org).
2002-04-19 16:38:13 +00:00
heinz 89a0c77ff9 Add East European (iso8859-2) console fonts 2002-04-17 00:52:13 +00:00
heinz 77a6abbbed Renamed kf_8x8.c and kf_8x11.c to kf_iso8859_1_8x8.c and kf_iso8859_1_8x11.c 2002-04-17 00:51:05 +00:00
christos db95aa87ec fix compilo in debugging code. Reported by: Klaus Heinz 2002-03-27 16:39:51 +00:00
martin 0bc69b6498 Now that we have all the pieces of the puzzle available start to unriddle
and move them in their proper places.

Move the BRI registry from layer 2 (duh!) to layer 4, so active cards
(which don't have layer 3 or layer 2 in their driver). Remove all remaining
hard coded controller and driver types. Remove any arbitrary hard coded
limits, at least those that show up in the internal API.

This fixes PR 15950.
2002-03-24 20:35:43 +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
jandberg 225d8bccbe Fixed cc_load_mode restart copper after setting the new list
when called with null argument. This is needed for the screen
blank to actually take effect.
2002-03-13 20:33:35 +00:00
ad b89e39b91a Reorganise the wsfont stuff slightly so that multiple display adapters
with different bit/byte order requirements can co-exist happily.
2002-03-13 15:05:13 +00:00
mhitch d65798ca1d Add media support (such as it is), manual is all you get. 2002-03-06 22:07:39 +00:00
mhitch d616d3990b Enable transmit error and EPH interrupt, and reset NIC on EPH interrupt.
Fixes a source of lost interrupts.
2002-03-03 18:21:37 +00:00
mhitch 9de3e943c6 Make reset actually do something and enable the use of the watchdog timer.
Losing interrupts no longer will hang the network.
2002-03-02 21:08:04 +00:00
is 3763cdd026 remove unused prototype (a duplicate with a typing error) 2002-02-24 15:20:05 +00:00
veego f12a3476e0 Add a missing ) from an 6 year old cleanup commit (rev 1.10):
s/sizeof(struct mfcp_softc,/sizeof(struct mfcp_softc),/
Noticed by Nagilum on irc.
2002-02-17 19:26:37 +00:00
aymeric 1ea4df81a8 add __KERNEL_RCSID as suggested by Luke Mewburn 2002-01-28 09:56:43 +00:00
aymeric 1ebbe6900f make sure we have CLOCAL set and HUPCL unset when the serial port is used as
a console.
2002-01-27 19:25:35 +00:00
is 4205fc1471 Attach multifunction GVP boards. 2002-01-27 14:52:51 +00:00
is 5fea84442f remove double { 2002-01-27 14:51:10 +00:00
is 637649fac0 Register a shutdown handler that switches off interupts. 2002-01-27 14:39:28 +00:00
is 2f444c68be Add some video modes which are displayable on my LCD. 2002-01-27 14:32:21 +00:00
aymeric 9382c87338 - ANSIfy
- remove some trailing spaces/tabs
- minor style nits
2002-01-26 13:40:52 +00:00
is 5e5bb729dc First draft of a Toccata driver. 2002-01-21 22:13:25 +00:00
jdolecek ff8305bbac Switch to MI dev/md_root.c for archs which don't have any special
memory disk hooks (i.e. everything except atari).
2002-01-21 21:56:57 +00:00
jandberg 389100f5d8 Amiga wsdisplay updates.
conf/GENERIC:
conf/files.amiga:
 - Bring in wsfont definitions.

dev/grfabs_reg.h:
 - Add macros for decomposing palette entries.

dev/amidisplaycc.c:
 - Support for fonts, either wsfonts compiled into kernel
   or runtime-loadable by ioctl. Font width still limited to 8,
   height may vary.
 - Limited support for mapped displays. No way to adjust display
   mode. Palette setting works.
 - Prettier default palette (white on black).
 - Probes correctly as WSDISPLAY_TYPE_AMIGACC.
 - Support for screen blanking.
2002-01-13 23:24:22 +00:00
jandberg 75e5cd6d4f wskbd updates.
kbd.c: Now identifies itself as WSKBD_TYPE_AMIGA.
 wskbdmap_amiga.c: Updated de/dk/sv/no keymaps.
2002-01-13 22:47:43 +00:00
aymeric a2cea87aee defopt SERCONSOLE 2001-11-05 21:29:43 +00:00
is 9bf40ca410 Make the Cyberstorm PPC/ Cyberstorm Mk. 3 driver drive the LED.
Actually, this is added to the siop2_script; should we ever support another
siopng board that does connect something else to GPREG bit 4, we'll have
to move this to C code and make it optional.
OTOH, by then we'll have switched to the MI driver by then.
2001-10-08 21:18:58 +00:00
augustss 1339e88a86 Add a new optional method, dev_ioctl, to the audio hardware driver interface.
It is called when an unrecognized ioctl() is performed on a device,
thus allowing ioctl()s that frob the hardware driver (like loading
microcode).
2001-10-03 00:04:47 +00:00
thorpej e38a2e561a machine/fbio.h -> dev/sun/fbio.h 2001-09-19 18:10:32 +00:00
wiz 456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
chris 0e7661f023 Update pmap_update to now take the updated pmap as an argument.
This will allow improvements to the pmaps so that they can more easily defer expensive operations, eg tlb/cache flush, til the last possible moment.

Currently this is a no-op on most platforms, so they should see no difference.

Reviewed by Jason.
2001-09-10 21:19:08 +00:00
is bd5a12de41 Driver for the ALiENDESiGN Repulse board.
- only 8/16 bit precision supported
- no support for the Repulse special S/P-DIF I/O yet
- I think ac97.c needs some work.
2001-08-25 21:15:44 +00:00
wiz c52d355d71 "wierd" is weird. 2001-08-20 12:20:01 +00:00
is de14426106 Ansification by Petri Koistinen 2001-08-17 19:56:51 +00:00
jdolecek 74954dadf9 use unsigned variable types as appropriate 2001-08-05 18:07:51 +00:00
wiz 30b2bf87ed Various typos in comments (neccessary, sceme, choise, ...). 2001-07-26 15:05:07 +00:00
wiz a9356936b4 seperate -> separate 2001-07-22 13:33:58 +00:00
jdolecek 89238be159 Adapt to lance_init() change 2001-06-20 10:10:12 +00:00
wiz 3f9984fc90 `existent', not `existant' 2001-06-19 13:42:07 +00:00
wiz c03a48d64f withough -> without 2001-06-13 10:45:57 +00:00
wiz 2a8c778f1b retrieve, not retreive 2001-06-12 14:59:27 +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
is 09a3dd5f0c defopt LEV6_DEFER. 2001-05-08 06:09:29 +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
is f7455bf6e8 Be more specific than "some isic board". 2001-04-26 05:58:41 +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
thorpej 1c3a62e066 Sprinkle pmap_update() calls after calls to:
- pmap_enter()
- pmap_remove()
- pmap_protect()
- pmap_kenter_pa()
- pmap_kremove()
as described in pmap(9).

These calls are relatively conservative.  It may be possible to
optimize these a little more.
2001-04-24 04:30:50 +00:00