Commit Graph

66358 Commits

Author SHA1 Message Date
martin 1390611ace Remove workarounds for bugs in the old compiler. 2003-09-19 16:35:31 +00:00
martin 29469edb22 Use -Os (now that it works) for install media. 2003-09-19 16:34:24 +00:00
fvdl 8f8298758f LONG_BIT should be 64. From Nicolas Joly. 2003-09-19 12:09:51 +00:00
agc 81976735fd If we're going to reference SA variables in this file, might as well
include the header file to define them. From Steve Woodford.
2003-09-19 11:42:20 +00:00
jonathan 5923dedaeb Fast-ipsec can call ip_output() with a null 'struct socket *so'
argument.  So check so is non-NULL before doing the pointer-chasing
dance to find the PCB. (Unless and until we rework fast-ipsec and
KAME, to pass a struct in_pcbhdr * instead of the struct socket *).
2003-09-19 00:27:56 +00:00
cl b826d7b216 add MD part of SA/pthread pagefault handling on powerpc 2003-09-19 00:16:34 +00:00
cl 4fb604b287 add MD part of SA/pthread pagefault handling on sh5 2003-09-18 22:40:04 +00:00
cl 0882aaed34 add MD part of SA/pthread pagefault handling on vax 2003-09-18 22:38:36 +00:00
cl 2c1366cfee add MD part of SA/pthread pagefault handling on arm 2003-09-18 22:37:38 +00:00
cl c32b8e7a57 add MD part of SA/pthread pagefault handling on alpha 2003-09-18 22:36:32 +00:00
skd 3736d609a5 Fix for ioapic irq routing. This fixes kern/22728.
Approved by fvdl.
2003-09-18 19:31:19 +00:00
ragge 3fc53f17c5 Remove ; after setrunqueue/remrunqueue macro. 2003-09-18 18:38:48 +00:00
lonewolf b06ea56eff Fix mistake in previous. 2003-09-18 15:01:33 +00:00
lonewolf ae33e68d84 Correct offsets for HPC_PBUS_CHx_{BP,DP} and add HPC_PBUS_DMACTL_* definitions. 2003-09-18 15:00:26 +00:00
pooka ec398e6f4d regen 2003-09-18 14:50:07 +00:00
pooka 3e2a629fec Add a good enuf emulation of the MAP_STACK flag to the mmap()
syscall.  This allows programs which use MAP_STACK to work instead
of failing in weird and wonderous ways.
2003-09-18 14:44:09 +00:00
drochner da03a1c8cf Fix a reversed logic in swap deallocation which could lead to
uvm_swap_free() being called with a zero slot; this might have been
the reason for crashes with sysvshm and heavy swapping.
(PR kern/22752 by Tom Spindler)
Confirmed by Chuck Silvers.
2003-09-18 13:48:05 +00:00
mycroft e80260e91f Whoops, make sure 6-byte commands work again. 2003-09-18 06:55:53 +00:00
skd f5c4ea935a Added kernel support for single stepping, adapted from FreeBSD.
Approved by christos.
2003-09-18 05:26:41 +00:00
mycroft f96fe2cc8a Don't print junk if an INQUIRY fails (usually with an ILLEGAL REQUEST due to
an unused LUN).  Also, if the qualifier says the LUN is non-existant, don't
try to attach a device here.
2003-09-18 05:06:53 +00:00
mycroft 9fa456e7b6 nluns should be 8, not 7. 2003-09-18 01:33:58 +00:00
mycroft 9dbb8c86d4 Merge the geometry and cache handling code for all direct access and optical
devices, as it's general to all SCSI MMC devices.  In the process, remove
PQUIRK_NO_FLEX_PAGE.
2003-09-18 00:06:31 +00:00
mycroft e873dbd7ad If READ CAPACITY fails, try a READ FORMAT CAPACITIES. Separate this into
another function, always doing a page 0 MODE SENSE to get the block
descriptor if we use READ CAPACITY, and use SMS_DBD on the page 4/5 MODE
SENSE.  This does one extra command in some cases, but it separates and
simplifies the code a little.

Why do we prefer READ CAPACITY over READ FORMAT CAPACITIES?  Two reasons:
1) It's much older and is much less likely to have had its command code
abused, and is thus "safer" to try first.  2) ALL of my USB flash readers
and pen drives screw up their capacity descriptors -- mostly off-by-one
errors in the size (they return the maximum LBA number instead, a la READ
CAPACITY, which has *never* been how READ FORMAT CAPACITIES was documented
in the MMC spec), and one returns the "no media" code on slots that have
media inserted (despite returning almost-correct data otherwise)!

F*** me with a chainsaw.
2003-09-17 23:33:43 +00:00
cl 3c10927ebe add MD part of SA/pthread pagefault handling on all m68k ports 2003-09-17 23:17:39 +00:00
mycroft b2d9db1002 Remove PQUIRK_BYTE5_ZERO. 2003-09-17 19:14:56 +00:00
bouyer 65b0588afd Add back support for the legacy VT8237 IDE controller.
This wasn't an error, on this chipset we have the SATA controller on function
0 of the IDE controller, not the pcib bridge.
Fix provided by Stephen Degler.
2003-09-17 16:55:20 +00:00
drochner 27c7714f95 syntax error in comment 2003-09-17 11:57:34 +00:00
drochner b2a29ce0a3 typo in comment 2003-09-17 11:56:19 +00:00
yamt 883426c958 don't call nfs_delayedtruncate() from nfs_getpages().
it causes simplelock deadlock.
2003-09-17 09:11:12 +00:00
yamt 1e8ae1ddf3 change nctime to timespec from time_t.
there can be too many activities in a second.
2003-09-17 09:10:00 +00:00
mycroft 4b716264f7 Shuttle products do not need PQUIRK_NOTUR any more. Also removing them for the
other two items, since they are presumed unnecessary.
2003-09-17 07:49:11 +00:00
enami 69615345e2 Fix a recently introduced bug which prevents csum totals being copied
when an old ffs filesytem is first mounted (as a result, df reports disk
full on old ffs filesystem or mfs created by old binary).  Problem first
noticed by onoe san.
2003-09-17 02:24:33 +00:00
agc 299e4a53ec Add COMPAT_16, pointed out by Bryan Vyhmeister. 2003-09-16 21:56:00 +00:00
martin 392a465bb8 Tell copyinstr about the real buffer size (not one byte to few). Add more
error checking. Noticed by Quentin Garnier.
2003-09-16 20:59:04 +00:00
cl 4ba5ca7f2f fix copy-paste oversight in MD part of SA/pthread pagefault handling 2003-09-16 19:02:51 +00:00
jdc 3fc943e207 Adapt to account for bridge_enqueue()'s extra parameter. 2003-09-16 17:39:12 +00:00
jdc 7454db32b4 Add filter/no filter flag parameter to bridge_enqueue(). 2003-09-16 17:38:24 +00:00
jdc 32263965e2 Add a flag parameter to bridge_enqueue() to tell it whether to run the
filter or not.  We only need to run the filter for bridge_forward() and
bridge_broadcast().  If we also run it for bridge_output(), we will run
the filter twice outbound per packet, so don't.

In bridge_ipf(), make sure we don't run m_cat() on a single mbuf chain
by checking to see (and remembering) if we need to m_split() the mbuf.
This fixes bridge + ipfilter on sparc.

Fixes PR kern/22063.
2003-09-16 17:37:27 +00:00
christos 59294d6a54 fix typo (ktr -> ksi) 2003-09-16 15:59:28 +00:00
drochner 3e287f891b Take into account the possibility that the ktrace flags can change
during a read(v)/write(v). If that happeded, we either passed a NULL
pointer or a pointer to something uninitialized as iov to ktrace,
or we got a memory leak. In read/write (w/o -v) we zero-initialize
the iov now to limit damage, in the -v calls the (dynamically allocated)
pointer is checked after the I/O.
2003-09-16 15:55:26 +00:00
cl 2532f4497c add MD part of SA/pthread pagefault handling on amd64 2003-09-16 15:49:06 +00:00
cl 52a920b5da add comments to the pagefault code 2003-09-16 15:28:45 +00:00
cl fe74654bab add MD part of SA/pthread pagefault handling on sparc64 2003-09-16 14:00:27 +00:00
cl 8c7a07f686 add MD part of SA/pthread pagefault handling on sparc 2003-09-16 13:59:59 +00:00
cl abc609d801 add MD part of SA/pthread pagefault handling on i386 2003-09-16 13:57:47 +00:00
cl d973127f38 Regen. 2003-09-16 13:49:23 +00:00
cl c08e54b26b fix SA/pthread pagefault failure:
- prevent BLOCKED upcalls on double page faults and during upcalls
- make libpthread handle blocked threads which hold locks
- prevent UNBLOCKED upcalls from overtaking their BLOCKED upcall
this adds a new syscall sa_unblockyield
see also http://mail-index.netbsd.org/tech-kern/2003/09/15/0020.html
2003-09-16 13:46:24 +00:00
christos 1b246f974c Welcome to 1.6ZC
- hope this sticks for a while since it is my initials
- cl, here is your chance to commit the SA pagefault stuff.
2003-09-16 12:08:23 +00:00
christos 1f73cefd27 - convert to circleq
- add simple lock for the list
- make get function remove the item from the list
- eliminate superfluous functions
thanks to enami and matt for the feedback.
2003-09-16 12:07:11 +00:00
christos 5501eeaa6b add siginfo lock and siginfo queue initialization. 2003-09-16 12:06:07 +00:00
christos 31663f15a1 add initialization of siginfo lock and queue.
Also initialize the lock for lwps, although it is not used for proc0 for
code consistency.
2003-09-16 12:05:49 +00:00
christos 3bb05d4a8c convert to use <queue.h> and add a lock for siginfo circleq.
XXX: could use STAILQ, but there is no way to remove an element without
rescanning the queue. We should really add a special iterator that can
do this.
2003-09-16 12:04:58 +00:00
onoe 1a258bf241 Add Sony PEGA-WL110 CF WLAN 2003-09-16 08:28:55 +00:00
onoe ac09f329a5 regen: Add Sony PEGA-WL110 CF WLAN 2003-09-16 08:27:33 +00:00
onoe 19cb1c084b Add Sony PEGA-WL110 CF WLAN 2003-09-16 08:26:37 +00:00
agc 341e8b0d1a Add a kernel configuration file for the Jornada 728. 2003-09-16 08:22:00 +00:00
agc 497a13cc5b Make the number of 4K DRAM pages into a CPP definition, so that it can be
set from a kernel configuration file. Proposed by Brett Lymn on port-hpcarm.
2003-09-16 08:18:22 +00:00
itojun a3931fc5ab exp is reserved name under posix 2003-09-16 00:31:55 +00:00
itojun ca549eaf98 exp is a reserved name under posix 2003-09-16 00:31:23 +00:00
itojun 94da0d16ac avoid overflow during multiply. David Laight 2003-09-15 23:38:20 +00:00
uwe d889e9a63d US keydesc corrections from Bryan Vyhmeister (bsd at hub3 dot net).
Tested by Julian Coleman <jdc@netbsd>.
2003-09-15 21:03:10 +00:00
bouyer e9a21b0707 Add support for Intel 82801EB Serial ATA. Not tested with a drive yet,
Matthias Scheler tested that the controller attaches properly.
2003-09-15 20:24:42 +00:00
bouyer 036c4d23c0 Add support for VIA 8237 Serial ATA. From Stephen Degler in kern/22727,
with some cleanup by me.
2003-09-15 20:15:44 +00:00
bouyer 9e1bd0b405 Regen: rename VT8237_RAID to VT8237_SATA 2003-09-15 19:51:09 +00:00
bouyer 4c46f960cc Rename VT8237_RAID to VT8237_SATA, as this is really what it is.
Suggested by Stephen Degler in kern/22727.
2003-09-15 19:50:45 +00:00
christos dd61a2eb87 catch up with latest sigctx changes; reported by John Heasley, thanks! 2003-09-15 18:35:02 +00:00
yamt 7bd2f524bc indent. 2003-09-15 15:08:09 +00:00
martin 361fe6808c Make a panic format 32bit safe. 2003-09-15 07:38:22 +00:00
simonb 9d585c89bb Use common mips generic software interrupt routines.
Changes from Izumi Tsutsui, tested by Havard Eidnes.
2003-09-15 06:39:20 +00:00
ichiro 22d06d95f5 fix typo
#if DEBUG -> #ifdef PCI_DEBUG
2003-09-15 05:11:31 +00:00
ichiro 4be788fe81 add address decode of "PCI Configuration type 1" 2003-09-15 05:07:29 +00:00
christos 048fedf253 include opt_compat_netbsd.h, otherwise we don't get the right signal
trampoline code in compat code.
2003-09-15 00:33:35 +00:00
christos bed9693362 include <sys/poll.h> 2003-09-15 00:22:20 +00:00
christos e8ae1a44db ksiginfo_t support. 2003-09-14 23:47:09 +00:00
christos cc39a7a050 remove variable name from prototype. 2003-09-14 23:45:53 +00:00
christos ccb1345dde provide some more ksiginfo info. 2003-09-14 23:45:16 +00:00
he ff39169476 Revert addition of rnd here; it's already present due to the inclusion
of the WALNUT config file, so causes a duplicate definition error here.
2003-09-14 21:49:58 +00:00
christos ab8558b680 - don't trash the linked list pointers in the ksiginfo_t reuse case
[thanks enami]
- fix uninitialized variable in the exit hook.
  [thanks yamt]
2003-09-14 17:39:03 +00:00
cl a82fc36e8b make compile: fix GCC3 check and add defflag PANICBUTTON 2003-09-14 17:13:36 +00:00
jmmv 99aaf4a240 Enable auvia_reset_codec's code and wait until the card is available.
Fixes 'invalid codec' problems (at least with AD1980).  Ok'ed by tsarna@.
2003-09-14 14:48:17 +00:00
junyoung cc5534f795 Remove duplicate lines. 2003-09-14 13:01:40 +00:00
junyoung 740c1aa81e Remove a duplicate $NetBSD$. 2003-09-14 12:59:33 +00:00
yamt 966ada0097 assert that uio passed to uiomove() has valid uio_iovcnt. 2003-09-14 11:12:14 +00:00
yamt 0a4f15d329 when allocating a new vnode,
increment numvnodes before releasing vnode_free_list_slock.
2003-09-14 11:09:48 +00:00
manu 9972873c7d Handle mouseup and mousdown events
Add three sysctl to choose wsdisplay unit and screen and wsmux that
ioframebuffer and iohidsystem will use.
2003-09-14 09:48:42 +00:00
itojun 782cbb14c5 2^n hash table is better in the kernel. advise by perry@netbsd 2003-09-14 07:30:32 +00:00
christos 32d14d8273 ZA -> ZB 2003-09-14 07:01:19 +00:00
christos 235d749e3b handle deferred signal delivery with siginfo. struct sigctx changed, so
bump to ZB.
2003-09-14 07:00:44 +00:00
christos 9970fc6a83 handle siginfo for deferred signals. Allocate a ksiginfo pool, and store
the information there.
TODO:
1. since timer stuff gets called from an interrupt context, we could
   preallocate ksiginfo_t's from the pool, so we don't need a kmem
   pool.
2. probably the sa signal delivery syscall can be changed to take
   a ksiginfo_t so we can use only one pool.
3. maybe when we add realtime signal support, add a resource limit
   on the number of ksiginfo_t's a process can allocate.
2003-09-14 06:59:13 +00:00
christos 24045725fc set the sigval in the setitimer case. 2003-09-14 06:56:22 +00:00
itojun d669285a77 use prime number to hash SPI 2003-09-14 03:11:31 +00:00
dyoung 6e8d0b71c8 Insert RCSIDs. 2003-09-14 01:14:54 +00:00
christos 35a41eaf06 enable SI_TIMER notification. 2003-09-13 22:39:18 +00:00
christos 86226ab757 fix for non-objdir build. reported by tron. 2003-09-13 22:25:47 +00:00
itojun 71c96a2bb4 correct ru_a/ru_b setup for 20bit case 2003-09-13 21:32:59 +00:00
christos 0c73068f06 regen 2003-09-13 18:44:49 +00:00
christos 2cfe0b047e add __HAVE_SIGINFO 2003-09-13 18:44:30 +00:00
erh 1f5fff1c1c PR# standards/16143: hide struct uio from userland behind a __UIO_EXPOSE
ifdef.  Define this when building ipf, since it shares code between the
kernel and userland and uses struct uio.
2003-09-13 16:59:29 +00:00
manu 755716d281 Darwin's I/O reverse the mouse's Y axis. 2003-09-13 16:35:47 +00:00
manu 08f5f5b835 Bugfix: notifications sent by iohidsystem kernel threads are to be
hnalded as mmessages coming from the kernel, since the threas has
no p->p_emuldata
2003-09-13 16:07:44 +00:00
jdolecek 88157947ee actually remove p_dupfd from struct proc (oops) 2003-09-13 15:55:29 +00:00
mycroft 10675507e9 Don't be silent if there is no media present. 2003-09-13 15:49:04 +00:00
christos 4148967f74 provide siginfo_t in for SIGCHLD 2003-09-13 15:32:40 +00:00
kleink ffc3f24ba3 Remove pointless inclusion of <sys/cdefs.h> (a pre-ANSI-KNF leftover). 2003-09-13 15:28:36 +00:00
kleink decf23e1e4 Per 1003.1-2001 XSI, make available ucontext_t (via <sys/ucontext.h>). 2003-09-13 14:45:44 +00:00
mycroft 953ba0b251 Make sure the "raw partition" can always be opened again. 2003-09-13 14:44:50 +00:00
chris 27dc577349 Tidy up a couple of bits to avoid duplication within the switch. 2003-09-13 14:31:34 +00:00
bouyer ff7554f54c make sure to not get flags which are for internal use only from the on-disk
superblock.
Proposed in http://mail-index.netbsd.org/tech-kern/2003/09/06/0005.html
2003-09-13 14:09:15 +00:00
kleink ec9e5f7276 Remove spurious whitespace. 2003-09-13 13:54:30 +00:00
bouyer 5e33ea894e Commit changes proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/06/0001.html
http://mail-index.netbsd.org/tech-kern/2003/09/06/0006.html
to avoid compat problems with old ffsv1 by reuse of the old FS_SWAPPED
value for FS_FLAGS_UPDATED, and use of new, larger fields:
- Don't use FS_FLAGS_UPDATED to see if we need to update new fields from
  old fields in ffsv1 case.
- when writing back the superblock, copy back the flags to the old location
  if only old flags are set (FS_FLAGS_UPDATED won't be set in this case)
  in ffsv1 case.
2003-09-13 13:47:04 +00:00
chris cfb7a98211 Add COMPAT_16 to most arm based kernels. Mainly in preperation for doing
SA_SIGINFO work.
2003-09-13 13:30:01 +00:00
simonb 90fc39f5b8 Make some variables unsigned since that's the type of parameter they're
passed as to other functions.
2003-09-13 12:31:35 +00:00
jdolecek a8cd2ca54c regen - fix description of one Intel PRO/100 VM variant, as reported
by Lars Heidieker on current-users@
2003-09-13 12:17:18 +00:00
simonb a4852d80fc Remove an unreachable return statement (and fix a whitespace nit). 2003-09-13 12:17:12 +00:00
jdolecek 3a6c7eacfc fix description of Intel PRO/100 VM Network Controller with 82562ET/EZ PHY
don't activate any quirks for VM_6 variant
problem reported by Lars Heidieker on current-users

also don't activate any quirks for VM_3 - VM_5 variants, neither
VE_2 - VE_4, in anticipation that the more modern variants don't need
the quirks
2003-09-13 12:13:29 +00:00
simonb f7e3330a08 Remove a variable that is assigned to but not used. 2003-09-13 11:12:06 +00:00
jdolecek 6dcd3a676c Bump version to 1.6ZA - struct proc and struct lwp changes
Deja vu ...
2003-09-13 08:55:09 +00:00
jdolecek a034152027 move dupfd from struct proc to struct lwp - it's per-LWP, not per-process; we
use curlwp where the lwp is not directly available, i.e. in device open
routines

briefly discussed on tech-kern
2003-09-13 08:32:10 +00:00
jdolecek ce8305a84c g/c #if 0'ed code 2003-09-13 08:22:51 +00:00
jdolecek 69150f5b25 ptyname[] must not be static, the contents are modified later in the routine 2003-09-13 08:15:25 +00:00
manu 11d6605f3f Sync between parent and child in iohdisystem thread so that the child has
time to get its parmeteres before the parent throw them away
2003-09-13 07:56:54 +00:00
jdolecek 5b8709f378 move l_ctxlink in struct definition to 'zero' region visually too, to
make it more clear that l_ctxlink _is_ zeroed
2003-09-13 07:56:03 +00:00
mycroft 09e452d82a Do the quirk initialization earlier. 2003-09-13 03:18:13 +00:00
mycroft 96b1a8d146 Arrange for the SCSI device to be target 0, and us to be the highest target
number.  This will make my life easier later...
2003-09-13 03:16:49 +00:00
christos 280bbfe466 Set si_code for T_PROTFLT|T_USER. Pointed out by enamicode. 2003-09-12 23:20:26 +00:00
mycroft ec14ab4b89 The Ricoh power hackery is not reliable -- many cards just do not have the
voltage sense wired.  So, disable it and force the card to 5V by default.
Also, recode the hack to use the "direct Vcc" feature of the chip, letting
it manage the voltage directly, as this is supported on both the 296 and
396.
2003-09-12 22:09:04 +00:00
mycroft 509e3d9fce Set SCSIPI_CHAN_NOSETTLE. 2003-09-12 19:02:30 +00:00
tsutsui 14b42ecf3b Use common mips generic software interrupt routines. 2003-09-12 17:55:40 +00:00
christos 51d8c27c8d pick up the right sigreturn symbol. we could have #define __HAVE_SIGINFO
instead too.
2003-09-12 16:51:04 +00:00
mycroft af0c320925 Some devices really want INQUIRY to be the first command they receive. Also,
the result of the extra TEST UNIT READY was being ignored anyway.  So, I wrote
it, I nuke it.
2003-09-12 16:39:25 +00:00
christos d91e004306 add missing path. 2003-09-12 16:29:09 +00:00
mycroft 8b05b0c1d3 In usbd_setup_pipe(), check the return value from usbd_clear_endpoint_stall(). 2003-09-12 16:22:57 +00:00
mycroft af7e1b8144 Tweak a debugging printf(). 2003-09-12 16:18:08 +00:00
tsutsui f9325594bb Remove a redundant function declaration. 2003-09-12 15:29:48 +00:00
chs c5e2454205 handle pmap_procwr() on kernel procs (MIPS1).
needed for new signal trampoline stuff.
2003-09-12 15:29:16 +00:00
tsutsui 3fad926516 Protect against multiple inclusion. 2003-09-12 15:03:24 +00:00
tsutsui 9dae7193b1 TAB/space cleanup. 2003-09-12 14:59:11 +00:00
mycroft 6c1f753c7c ZIP drives don't need PQUIRK_NOTUR -- tested on both a 100 (by me) and a 250
(by gendalia).  The 100 seems to have another problem that I'm looking into.
2003-09-12 14:52:38 +00:00
tron d08125d839 Wrap overlong lines, fix indentation. 2003-09-12 14:06:48 +00:00
christos e4ce502bf6 give this Makefile a chance to work, by eliminating unneeded complexity. 2003-09-12 13:05:28 +00:00
christos b3fcf8836e newed -DCOMPAT_IBCS2 now. 2003-09-12 13:01:57 +00:00
christos 1ccdaf7265 regen 2003-09-12 12:47:00 +00:00
christos bfff25cc7c Fixes for __sigreturn14 2003-09-12 12:46:47 +00:00
christos 75c419ccc0 include opt_compat_netbsd.h, sort includes. Thanks yamt. 2003-09-12 12:39:59 +00:00
itojun 8ee5969c3b change confusing filename 2003-09-12 11:21:36 +00:00
itojun eb305c3c3c merge netipsec/key* into netkey/key*. no need for both.
change confusing filename
2003-09-12 11:20:57 +00:00
itojun 72bcf50f26 no need for netipsec/key*, they are almost identical to netkey/key* 2003-09-12 11:09:32 +00:00
itojun 3df4458661 use ip_randomid 2003-09-12 11:09:31 +00:00
itojun aecd8615c5 no need for netipsec/key*, they are almost identical to netkey/key* 2003-09-12 11:09:30 +00:00
itojun 6b33d95e22 send icmp admin prohibit if socket policy mismatches. 2003-09-12 09:55:22 +00:00
itojun 9f2c0659cd remove extra blank line 2003-09-12 07:58:25 +00:00
itojun a84539ea9e make synchronization w/ PF tag support code easier 2003-09-12 07:53:29 +00:00
itojun 6371ddf557 make it possible to SADB_DUMP via sysctl. request by mrg 2003-09-12 07:38:10 +00:00
briggs 06ea4a681d Don't assume that we are the PCI host. Actually check, and make sure that
we set things up so that we can run either as a PCI host or as a PCI slave
(working within the PCI BARs that the system BIOS has configured for us).
2003-09-12 04:39:59 +00:00
christos d56d80d37d regen 2003-09-12 02:10:55 +00:00
christos 3178a811f8 catch up with sigreturn changes 2003-09-12 02:10:33 +00:00
christos 654fd674fb add the SYSV compat flags needed. 2003-09-12 02:08:35 +00:00
christos 9889f06536 make sigcontext visible all the time instead of including opt_*.h from a
large number of files.
2003-09-12 01:13:35 +00:00
itojun 49fa1efdc6 remove #define for bsdi 2003-09-12 00:27:59 +00:00
itojun 14756c7d6d kill unneeded variable 2003-09-12 00:10:25 +00:00
manu f816300903 (file missing from the previous commit, I copy/past the commit log)
Some initial support for IOHIDSystem. This gives us some pointer moves in X11
(not really related the the actual mouse movement, but this will come).

The darwin_iohidsystem_thread reads events from wscons, translates them
into IOHIDSystem events and wakes up the userland client with a notification.
To do this, I had to improve the void implementation of
io_connect_set_notification_port() to actually register something (I assumed
a single notification port, which makes some sense since only one process
seems to be able to open the driver)

Missing bits:
- we do not take event masks given by the process into account.
- the notification message has not been checked against Darwin
- events are badly translated
2003-09-11 23:18:10 +00:00
manu f9c483a301 Some initial support for IOHIDSystem. This gives us some pointer moves in X11
(not really related the the actual mouse movement, but this will come).

The darwin_iohidsystem_thread reads events from wscons, translates them
into IOHIDSystem events and wakes up the userland client with a notification.
To do this, I had to improve the void implementation of
io_connect_set_notification_port() to actually register something (I assumed
a single notification port, which makes some sense since only one process
seems to be able to open the driver)

Missing bits:
- we do not take event masks given by the process into account.
- the notification message has not been checked against Darwin
- events are badly translated
2003-09-11 23:16:18 +00:00
briggs 38da12464f We need a little more symtab space. 2003-09-11 22:52:38 +00:00
christos 2bf3634159 fix typo. 2003-09-11 20:48:35 +00:00
christos 7340db7385 Bring back sigcontext to userland by popular demand. 2003-09-11 20:22:30 +00:00
martin 346b195550 Backout previous, now that <sys/syscall.h> is fixed it's SYS___sigreturn14
again (until we convert to siginfo).
2003-09-11 19:36:29 +00:00
christos 99ee91793f make vm86 use __gregset_t 2003-09-11 19:17:07 +00:00
christos a6540cf740 XXX: vm86 for sigcontext comment is gone. 2003-09-11 19:16:05 +00:00
christos ab63d91442 old vm86 call with COMPAT_16 code. 2003-09-11 19:15:12 +00:00
scw 973e9cff89 Add definitions required for new in_cksum. 2003-09-11 18:58:44 +00:00
scw 877b3cbe5e Hand-optimised in_cksum/in4_cksum for ARM and XSCALE.
Contributed by Wasabi Systems, with input from Chris Gilbert,
Richard Earnshaw and David Laight.
2003-09-11 18:54:31 +00:00
martin 9e7359685b Fix copy & pasto (luckily, for most archs the structs had the same size,
so this went unnoticed for quite some time now). Noticed by Thomas Bieg.
2003-09-11 18:04:51 +00:00
christos 136f9cd821 PR/15397: Jason Thorpe: directory operations on pathnames that refer to
directories and have trailing slashes should succeed. Ok'd by kjk.
Fix provided by enami.
2003-09-11 17:33:42 +00:00
yamt ec0f99a001 acquire bqueue_slock around bremfree(). 2003-09-11 15:34:26 +00:00
christos 58707ea842 Protect ntp related ioctl properly. 2003-09-11 14:38:18 +00:00
christos 6b4bd0dc1b regen. 2003-09-11 14:00:21 +00:00
christos 71ee0b2991 - print comment in compat syscalls too.
- print ifdef's in the header files.
2003-09-11 13:59:49 +00:00
ichiro be42cc58d7 regen. 2003-09-11 11:34:46 +00:00
ichiro 7c4ee7e804 add product
Quatech Inc, PCMCIA Enhanced Parallel Port Card
2003-09-11 11:34:18 +00:00
kleink d440784b30 __{BEGIN,END}_DECLS-wrap prototypes. 2003-09-11 09:40:11 +00:00
jmmv 16091f0f1c After initialization of the AD1980 codec, swap master and surround volume
controls.  As it was before, the master volume control in all mixer programs
did nothing.  It seems that this codec is not correctly wired in (almost?)
all motherboards.

Patch by Quentin Garnier.  Fixes first part of PR kern/22548.
2003-09-11 09:21:29 +00:00
chs 0454ead77f the asm version of strlcpy() was buggy, just use the C version. 2003-09-11 05:04:33 +00:00
briggs ab0f909e6e s/SYS___sigreturn14/SYS_compat_16___sigreturn14/ 2003-09-11 03:57:29 +00:00
cl 96b4f15141 KNF and use f instead of s to temporarily save l_flag 2003-09-11 01:32:09 +00:00
itojun 5125995b51 record socket * associated with secpolicy 2003-09-10 22:29:27 +00:00
christos 2300d30c79 delete debug printf's. 2003-09-10 21:40:02 +00:00
christos 7b176f233f sort the opt_ includes. 2003-09-10 21:38:40 +00:00
mycroft dad4d4580d Update actlen even in the case where a TD returns an error -- this is critical
for the umass bulk-only STALL case.
2003-09-10 20:08:29 +00:00
christos 5dfabd4458 Add compat_16_machdep.c 2003-09-10 19:49:47 +00:00
christos 4d5acf4941 expose sendsig_sigcontext for compat_16 2003-09-10 19:49:22 +00:00
christos 6f6f525ca6 move compat_16 stuff into a separate file. 2003-09-10 19:48:48 +00:00
christos 9a680b9da0 regen 2003-09-10 19:47:49 +00:00
christos df9305fe0c sys__sigreturn14 -> compat_16_sys___sigreturn14 2003-09-10 19:47:40 +00:00
grant dc97144230 add gem and brgphy so we have ethernet on the PowerBook G4 DVI. 2003-09-10 18:06:26 +00:00
drochner 6fb02278a3 Fix the "COW" case if a process does a detach() between fork()
and exit(): we have to lookup the entry in the private copy
again, otherwise the wrong list is manipulated.
should fix a panic on postgres shutdown reported by Marc Recht

being here, improve sone debug messages
2003-09-10 17:01:04 +00:00
christos f7f3566b1e #ifdef struct sigframe_sigcontext and struct sigcontext, so that only code
that really needs them, get them.
XXX1: We need to fix the vm86 api.
XXX2: We need to fix the ibcs2 signal delivery mechanism.
2003-09-10 16:48:16 +00:00
christos 0b16bf9a36 make obsolete trampoline code COMPAT_16. Unfortunately sigreturn14 is used
by IBCS2; grr.
2003-09-10 16:46:59 +00:00
christos d0b2ede633 need opt_ibcs2.h 2003-09-10 16:46:15 +00:00
christos e09c2a122c don't abuse the native sigcode. 2003-09-10 16:44:56 +00:00
christos 61f50ff333 someone forgot to commit code. make this compile again. 2003-09-10 16:44:45 +00:00
christos cbd4e9f601 Regen 2003-09-10 16:44:12 +00:00
christos 883b4b0369 we don't need sigreturn and sigcode glue if we are not compat_16 anymore. 2003-09-10 16:43:34 +00:00
kleink 5c5edae988 sigaction1(): if SA_SIGINFO is set but not supported, fail early.
As discussed with Christos.
2003-09-10 16:41:26 +00:00
enami a396bb4713 Swap where the vm map's max and min offset are stored so that they can be
used during map traversal.
2003-09-10 13:38:20 +00:00
uwe f03574d68b G/c cs4231_round_buffersize and cs4231_round_blocksize. The round_*
mehtods are DMA-specific, so don't belong here in the first place.
SBus and EBus glue already changed to do the right thing.
2003-09-10 11:53:53 +00:00
uwe a0a4638c6f Get rid of the disgusting struct apc_dma *dma = NULL; hack now that we
have proper definitions for offsets of APM DMA registers.

NULL out round_buffersize and round_blocksize in audio_hw_if.  We
don't seem to have any special requirements and audio(9) already
provides enough rounding.
2003-09-10 11:45:45 +00:00
drochner 8bedb90edc in cpu_setmcontext(), check where we go, not where we are coming from,
and line-terminate a diagnostic message which was caused by that bug
2003-09-10 11:39:09 +00:00
uwe 725f80b71c Define APC DMA registers as offsets for bus space ops, so that we can
avoid linear mapping.  Actually, cs4231_sbus.c is already converted to
not use linear mapping of DMA registers, but it uses quick and
disgusting hack.
2003-09-10 11:37:13 +00:00
yamt f80b24474d g/c CHECK_COPYIN. 2003-09-10 11:09:11 +00:00
yamt 50401b2019 use curcpu() rather than curlwp->l_cpu. 2003-09-10 10:55:50 +00:00
uwe b3935a6934 Use EBDMA_BURST_SIZE_16. Introduce EBus specific round_blocksize to
make block size multiple of 16 words.  No point in using
round_buffersize that returns the argument unchanged, so just NULL it
in audio_hw_if.
2003-09-10 10:40:40 +00:00
itojun d963f70264 check before deref kfs_kt 2003-09-10 10:22:45 +00:00
dan d12b78f6df Make /kern/. have linkcount 2 in non-IPSEC case, 4 in IPSEC case.
Thanks to Valeriy E. Ushakov.
2003-09-10 09:59:47 +00:00
martin 313b12e0cc Remove rnd here and add a prominent note at the top of the file -
this config includes GENERIC32, only additional stuff goes in here.
2003-09-10 07:14:25 +00:00
augustss efbfbb9402 Regen. 2003-09-10 06:54:40 +00:00
augustss 83c306df7e Add a couple of devices. 2003-09-10 06:52:27 +00:00
mycroft 2b919cb36a Mostly stylistic change, making comments and printf()s similar between BBB
and CBI.
2003-09-10 06:38:28 +00:00
mycroft 78435d869d Copyright maintenance. 2003-09-10 05:42:18 +00:00
mycroft 5118c3e1e9 Set up the blank fields in the INQUIRY buffer *before* executing the command --
because we can't really rely on the "additional length" being correct (any
more?).  Fixes some problems with devices showing up as "<, , >".
2003-09-10 05:35:50 +00:00
mycroft ff7d94f5ec Er, missed one thing. 2003-09-10 05:30:15 +00:00
mycroft 9c39f1d6a5 Exorcise UMASS_QUIRK_FORCE_SHORT_INQUIRY. 2003-09-10 05:25:44 +00:00
briggs 7f9445d14a It is best to allow a little time for the reset to settle in before
we start polling the BMCR again.  Greg Woods noted on tech-net@
that the DP83840A manual states that there should be a 500us delay
between asserting software reset and attempting MII serial operations.

I've also noted that a DP83815 can get into a bad state on cable
removal and reinsertion if we do not delay here.

This may well address PR/16346, and I seem to recall occasional
reports of auto-negotiation and flaky kinds of errors that this
might also alleviate.
2003-09-10 05:25:22 +00:00
mycroft 2fe6c4d834 On a Bulk-In data stall, make sure we copy back the data received, per the
spec.  This is the real problem behind FORCE_SHORT_INQUIRY.
2003-09-10 05:20:21 +00:00
tls ab54d7e94f Add support for jumbo (9K) frames. Add support for larger receive
descriptor sizes if larger mbuf clusters are in use -- currently
commented out because, for some reason, transmit doesn't work at
all with large mbuf cluster sizes.

Note that using actual 9K frames is a _lot_ less efficient than
using frames that are a little smaller than 8K so that they fit
in one or two pages (instead of two or three) and avoid the extra
chained descriptor with only 1K of data in it, too.  TCP will
segment things just fine for an 8K total packet size, just as it
does for 1500-byte packets.

On my system, using "mtu 8000" with ifconfig, I get an almost 50%
performance boost for TCP (930Mbit/sec instead of 660Mbit/sec) over
1500-byte frames.  "mtu 9000" yields only 770Mbit/sec.
2003-09-10 04:02:17 +00:00
itojun 836dd0e3ef check if rootdev/rrootdev actually exists. 2003-09-10 03:56:33 +00:00
itojun e0517a16a6 fix permission of /kern/hostname to 0644 2003-09-10 03:42:07 +00:00
dan 843d91726f test against kt to get the right node of the given type, from enami@ 2003-09-10 03:31:29 +00:00
simonb 6ab489653d 8 spaces is evil, convert to tab. 2003-09-10 03:24:38 +00:00
mycroft 7bb5db4e3e The Sony camera reports itself as a "disk", not a "simplified direct access"
device -- ergo, it is "SCSI", not "RBC".
2003-09-10 03:13:53 +00:00
mycroft b8fd3dab7d cc -pipe -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Fix several problems with CCI handling, and enable it:
* We were never calling the callback function when we got a UFI CCI(!).
* We were passing a bogus residual count on non-UFI CCIs.
* After a REQUEST SENSE, the UFI CCI may include the ASC/ASCQ from the sense
  information -- don't consider this a failure.
In addition, remove a horrible hack that was causing us to drop sense
information on the floor and return empty INQUIRY responses, often in the case
where there is a UNIT ATTENTION pending during the INQUIRY.  (Some drives send
the data and then fail, some don't.)

This eliminates the need for quirks for the Y-E DATA FlashBuster.

These changes work on:

umass0: SAMSUNG SFD-321U [FW 0C], rev 1.10/2.10, addr 2
umass0: using UFI over CBI with CCI
sd0 at atapibus1 drive 0: <SMSC, USB FDC, 2.10> disk removable

umass0: TEAC TEAC FD-05PUB, rev 1.10/0.00, addr 2
umass0: using UFI over CBI with CCI
sd0 at atapibus0 drive 0: <TEAC, FD-05PUB, 1026> disk removable

umass0: Y-E DATA FlashBuster-U, rev 1.00/3.04, addr 2
umass0: using UFI over CBI with CCI
sd0 at atapibus0 drive 0: <Y-E DATA, USB-FDU, 3.04> disk removable
2003-09-10 02:49:18 +00:00
itojun 644a4857fb cut-and-paste error. Valeriy E. Ushakov 2003-09-10 01:46:27 +00:00
itojun 99bc41d6fd if IPsec inbound policy mismatches, respond to SYN with RST (instead of
just dropping it), allow client to react quickly.
2003-09-10 00:58:29 +00:00
dan 7e5137f372 Make vnode times on /kern/boottime be the boot time, not "now".
Handy because ls(1) helpfully converts the time to human-readable
format when printing, and because shell tools like "test -nt" and
"find -newer" can be used against it.

"Inspired" by a discussion about removing lockfiles older than the
last reboot, and Al Crooks' handy observation that a close
approximation can be found with /var/run/dmesg.boot

While here, notice that a lot of the kernfs structures and naming
changed suddenly, and though it seems a clear improvement, there was no
mention in commit logs.
2003-09-10 00:45:22 +00:00
itojun c1ae398301 correct hashed SPI lookup. reported by Greg Troxel 2003-09-09 21:58:26 +00:00
thorpej 62a064e24e Bump initial kernel PTs to 4. 2003-09-09 20:42:38 +00:00
cl f8a1f76075 fix timerupcall breakage after SA_SIGINFO changes:
- sa_upcall only stores a pointer to the `arg'
2003-09-09 15:16:30 +00:00
drochner 00c27c6064 Make per-process shm segment descriptor magement scale better for large
shminfo.shmseg, in view of the fact that only few processes utilize a
significant fraction of it:
-turn the table into a linked list, elements allocated from a pool(9)
-On fork(), just bump a refcount instead of copying the list; it will
 be decremented on exit() and exec(). Only copy if an attach or detach
 takes place in between, which is rarely the case.
2003-09-09 15:02:45 +00:00
drochner 1face2cc7a Fix vlan tag sending in the ETHERCAP_VLAN_HWTAGGING case.
Makes my "txp" work and fixes "bge" -- PR kern/20363 by Scott Ellis.
2003-09-09 14:22:19 +00:00
itojun 494fe70198 lint 2003-09-09 11:39:14 +00:00
itojun 919da6bf44 have COMPAT_16 2003-09-09 07:14:01 +00:00
mycroft 3ce80fb07e Make similar changes as with cd_mode_{sense,select}(). 2003-09-09 06:32:14 +00:00
tron ee3ff63574 Remove obsolete file. 2003-09-09 06:21:30 +00:00
mycroft f733d9708b Remove NOMODESENSE quirks for Iomega drives -- they're totally unneeded. 2003-09-09 03:57:57 +00:00
mycroft 1c4e2cf723 Delete the NOMODESENSE quirks for Maxtor USB hard drives, as these are no
doubt resolved (and were never actually needed in the first place -- someone
was let out without supervision).
2003-09-09 03:01:27 +00:00
mycroft 67ed54a25b In the test for whether to start the unit, I used the wrong error code.
ENODEV is only returned when we get "medium not present," which we can fail
immediately on.  All other "not ready" cases return EIO.
2003-09-09 02:43:34 +00:00
mycroft 06fca94595 Exorcise PQUIRK_NODOORLOCK. 2003-09-09 02:37:55 +00:00
mycroft 73b4a9d1ee PQUIRK_NODOORLOCK seems to be strictly unnecessary. If the drive doesn't
support it, we'll just get an ILLEGAL REQUEST and ignore it.  Furthermore,
on the PQI Travel Flash at least, it works just fine without.  These seem to
have been added in omnibus changes for particular devices, along with other
"quirks" that are now gone.  Adios, we won't cry for you.
2003-09-09 01:35:47 +00:00
mycroft 7365679351 Oops. Fix a typo in cd_mode_select(). 2003-09-08 23:44:29 +00:00
mycroft ab5fff1eda Fix an error path where we might scsipi_prevent() on a non-removable device. 2003-09-08 23:43:35 +00:00
mycroft 5ad03464f5 There is absolutely no sense in having a PQUIRK_NODOORLOCK entry for a
non-removable device.  Nuke it.
2003-09-08 23:43:05 +00:00