Commit graph

23066 commits

Author SHA1 Message Date
Nick Hibma 4e457f4298 AcerScan 320U's are braindead. Sometimes they do not return strings
descriptors and if they do the strings are nonsense.
2000-11-02 20:42:34 +00:00
Andrew Gallatin abb23d13ae zap a stray include that snuck in with rev 1.56
Submitted by:	Clive Lin <clive@CirX.ORG>
2000-11-02 18:51:32 +00:00
Jonathan Lemon 054a22a50c Have tuninit() return an error if an interface address is NULL.
SIOCGIFSTATUS was returning at splimp(); fix this.  (to be MFC'd)

Submitted by:  Marius Bendiksen
2000-11-02 16:30:26 +00:00
Andrew Gallatin 323c105fbc fix a comment that was inadvertantly changed by a cvs merge
pointed out by: obrien
2000-11-02 15:04:19 +00:00
Sheldon Hearn 0fa66a3170 Retire the joy(8) script. Using shell scripts to load kernel loadable
modules is out of fashion.

There is still a joy(4) manual page to clue people into the existence of
the joy of FreeBSD.
2000-11-02 14:15:30 +00:00
Sheldon Hearn 59807abe47 Retire linux(8). Using shell scripts to load kernel loadable modules is
out of fashion.  This particular case, unlike joy(8) and friends which
are just plain silly, did more than just load a kernel loadable module.
However, /etc/rc and the linux_base port were adjusted a while back to
cope with the absence of this script.

The only outstanding reason to hang on to it would have been for the
linux(8) manual page, which clued folks into the existence of the
Linuxulator.  A new linux(4) was introduced a while back.  It does
a much better job.

This script just isn't useful any more.
2000-11-02 13:48:53 +00:00
Ruslan Ermilov 1d02752206 Fixed the bug I have introduced in icmp_error() in revision 1.44.
The amount of data we copy from the original IP datagram into the
ICMP message was computed incorrectly for IP packets with payload
less than 8 bytes.
2000-11-02 09:46:23 +00:00
MIHIRA Sanpei Yoshiro defc432c55 add support for 3Com 3c575TX Fast Etherlink XL.
Device information for 3C575-TX is from NetBSD,
sys/dev/cardbus/if_ex_cardbus.c file.

Reviewed by:	wpaul, imp
2000-11-02 06:49:38 +00:00
Marcel Moolenaar a4e130249f Fix linux_ustat syscall. We only have cdevs now, so looking
for a block device isn't that useful anymore.

Reported by: Wesley Morgan <morganw@chemicals.tacorp.com>
Submitted by: gallatin
Acknowledged by: phk
2000-11-02 06:08:26 +00:00
David E. O'Brien 896fc61a66 Sort. 2000-11-02 04:13:51 +00:00
Mike Smith 099d058b54 Improve the PCI interrupt routing code. Now the process is as follows:
- Look for a hardwired interrupt in the routing table for this
   bus/device/pin (we already did this).
 - Look for another device with the same link byte which has a hardwired
   interrupt.
 - Look for a PCI device matching an entry with the same link byte
   which has already been assigned an interrupt, and use that.
 - Look for a routable interrupt listed in the "PCI only" interrupts
   field and use that.
 - Pick the first interrupt that's marked as routable and use that.
2000-11-02 00:37:45 +00:00
Bill Paul 9c4d1b1c93 Fix a couple of cases where I tried to release the I/O space resource twice
(once as as an I/O space resource and once as an IRQ resource). There was
a problem with this in if_rl too, which is how I found it.
2000-11-02 00:00:30 +00:00
Bill Paul 57c19b2049 Fix 8-bit EEPROM breakage: compare against 0x8129, not 8129. 2000-11-01 23:56:46 +00:00
Andrew Gallatin f11610e091 Support for the linux ipc syscalls on the alpha, where each one has
its own syscall rather than going through a demux function like
linux_ipc() on i386
2000-11-01 23:17:31 +00:00
Andrew Gallatin d0ce99c874 use DUMMY macro and support from linux_util.h 2000-11-01 23:13:49 +00:00
Andrew Gallatin b36abb04e5 Move the linux abi's alpha md files over to using David's build-time
syscall generation method
2000-11-01 23:07:25 +00:00
Andrew Gallatin e70ce4d9c5 fix linux_termio and linux_termios structs on alpha. alpha differences
are in the termios struct (probably because linux wants to be compatible
with the osf/1 termios struct), not the termio struct.
2000-11-01 22:36:41 +00:00
Poul-Henning Kamp 62e12bb630 Make internal clock sourcing work right by tying the NCO to the
Xtal reference instead of the CLADI input.

In unframed E1 mode, tie SIGFRZ low so that the mysycc doesn't
get confused.

Don't mask errors with OOF.  Don't ignore OOF errors.

Stop the channel before freeing mbufs in disconnect.

I still have no T1 devices to test with, so the T1 code is non-existent.
2000-11-01 22:04:15 +00:00
David E. O'Brien 5231fb2059 The MI/MD split wasn't perfect and the MI files need hacks for the
AlphaLinux compat bits.  This will be better cleaned up soon.

Agreed to what ever was necessary by:	marcel
2000-11-01 19:48:35 +00:00
Eivind Eklund ab3240e198 Fix overflow from jail hostname.
Bug found by:	Esa Etelavuori <eetelavu@cc.hut.fi>
2000-11-01 19:38:08 +00:00
John Baldwin a07b7a4e35 Pass in the new-bus flags to alpha_setup_intr(). 2000-11-01 18:40:42 +00:00
John Baldwin 90652ed180 - Modify alpha_setup_intr() to take interrupt handler flags as an additional
argument.  These flags include INTR_FAST, INTR_MPSAFE, etc.
- Properly handle INTR_EXCL when it is passed in to allow an interrupt
  handler to claim exclusive ownership of an interrupt thread.
- Add support for psuedo-fast interrupts on the alpha.  For fast interrupts,
  we don't allocate an interrupt thread; instead, during dispatching of an
  interrupt, we run the handler directly instead of scheduling the thread
  to run.  Note that the handler is currently run without Giant and must be
  MP safe.  The only fast handler currently is for the sio driver.

Requested by:	dfr
2000-11-01 18:40:02 +00:00
Bill Paul 9cf05fe7a1 Close PR #21078: the aue driver was not correctly programming the
multicast filter on the Pegasus chip. Since IPv6 depends a lot
on multicasting, this caused several failures for people trying to
use IPv6 with Pegasus USB ethernet devices.

Submitted by:	Jun Kuriyama <kuriyama@FreeBSD.org>
2000-11-01 18:26:36 +00:00
Eivind Eklund e3c4036b18 Give vop_mmap an untimely death. The opportunity to give it a timely
death timed out in 1996.
2000-11-01 17:57:24 +00:00
Nick Hibma 03eb1a83f8 Make the Ricochet modems work through the USB interface.
Tested by:	jim
Obtained from:	NetBSD
2000-11-01 17:35:57 +00:00
Søren Schmidt 6cc33af8f1 Update the config gathering code for both Promise & HPT 2000-11-01 17:35:44 +00:00
Hajimu UMEMOTO e1a3fa4d50 IPv6 was not work on FDDI.
Reported by:	Akihiro IIJIMA <aki@noc.titech.ac.jp>
Submitted by:	JINMEI Tatuya <jinmei@isl.rdc.toshiba.co.jp>
Reviewed by:	Akihiro IIJIMA <aki@noc.titech.ac.jp>
2000-11-01 16:57:01 +00:00
Ruslan Ermilov 506f494939 Wrong checksum may have been computed for certain UDP packets.
Reviewed by:	jlemon
2000-11-01 16:56:33 +00:00
David E. O'Brien ac4c54948c Apply style(9). 2000-11-01 16:38:40 +00:00
David E. O'Brien 7b4cc3fd44 Minimal set of diffs from the i386 bits to the AlphaLinux.
(based on a patch to sys/i386/linux/linux_dummy.c by gallatin)
2000-11-01 16:34:16 +00:00
Ruslan Ermilov 60123168be Wrong checksum used for certain reassembled IP packets before diverting. 2000-11-01 11:21:45 +00:00
David E. O'Brien 73bf6c9152 Allow the building of the syscall bits at compile time. 2000-11-01 09:23:12 +00:00
David E. O'Brien 23d3a6fe6e Need to dummy-out rt_sigreturn.
submitted by:	gallatin
2000-11-01 08:52:24 +00:00
David E. O'Brien 60f618a04d Need to include sys/proc.h. 2000-11-01 08:49:48 +00:00
David E. O'Brien 727fba5373 I don't know why this used to compile for me, but now struct
linux_sigcontext seems to have changed and some members are gone.
2000-11-01 08:48:53 +00:00
David E. O'Brien 83d2913008 Make the target a little bit more generic. 2000-11-01 08:47:34 +00:00
Josef Karthauser ffa37b3f9b It's no longer true that "nobody uses ia beyond here"; it's now
used to keep address based if_data statistics in.

Submitted by:	ru
2000-11-01 01:59:28 +00:00
Cameron Grant b15e2b4bee kill old sb driver 2000-11-01 00:56:52 +00:00
Cameron Grant 6093b91dea switch over to new sb8/sb16 code 2000-11-01 00:53:16 +00:00
MIHIRA Sanpei Yoshiro d4479fc128 fix type check in pccard_beep_select 2000-11-01 00:37:34 +00:00
Matthew Hunt 26b5d23688 "it's" --> "its" (possessive).
Correct a malformed sentence.
2000-11-01 00:36:12 +00:00
Nick Hibma 59490b7d67 Cut&paste bug: Set USBD_SHORT_XFER_OK unconditionally 2000-11-01 00:28:40 +00:00
Matt Jacob 47c27de5b5 1. Oops on last commit: note a few SCSI-3 items for data compression page.
2. Change copyright to me- per practive of scsi_sa.c that Justin had
me do a while back.
2000-10-31 22:36:33 +00:00
Matt Jacob eab2467fc8 scsi_sa.h 2000-10-31 22:34:51 +00:00
Justin T. Gibbs 8fcf57f5f6 Treat engine inquiry the same as path inquiry in xptioctl().
Return ENOTSUP for any opcode that is not supported by the XPT
device.

Add back a missing local declaration that seems to have been deleted
by my last commit.
2000-10-31 22:07:02 +00:00
Nick Sayer 27beb2e98d Don't needlessly indirect the APM softstate. It does nothing but
obfuscate the code.
2000-10-31 21:00:15 +00:00
Justin T. Gibbs 83b9eb545c Generate bmov instructions for all move requests. The driver
converts these to an equivalent 'and' operation on chips that
don't support this opcode.
2000-10-31 18:44:32 +00:00
Justin T. Gibbs dd1290f033 aic7xxx.c:
Filter incoming transfer negotiation requests to ensure they
	never exceed the settings specified by the user.

	In restart sequencer attempt to deal with a bug in the aic7895.
	If a third party reset occurs at just the right time, the
	stack register can lock up.  When restarting the sequencer
	after handling the SCSI reset, poke SEQADDR1 before resting
	the sequencers program counter.

	When something strange happens, dump the card's transaction
	state via ahc_dump_card_state().  This should aid in debugging.

	Handle request sense transactions via the QINFIFO instead of
	attaching them to the waiting queue directly.  The waiting
	queue consumes card SCB resources and, in the pathological case
	of every target on the bus beating our selection attemps and
	issuing a check condition, could have caused us to run out
	of SCBs.  I have never seen this happen, and only early
	cards with 3 or 4 SCBs had any real chance of ever getting
	into this state.

	Add additional sequencer interrupt codes to support firmware
	diagnostics.  The diagnostic code is enabled with the
	AHC_DEBUG_SEQUENCER kernel option.

	Make it possible to switch into and out of target mode on
	the fly.  The card comes up by default as an initiator but
	will switch into target mode as soon as an enable lun operation
	is performed.  As always, target mode behavior is gated
	by the AHC_TMODE_ENABLE kernel option so most users will
	not be affected by this change.

	In ahc_update_target_msg_request(), also issue a new
	request if the ppr_options have changed.

	Never issue a PPR as a target.  It is forbidden by the spec.

	Correct a bug in ahc_parse_msg() that prevented us from
	responding to PPR messages as a target.

	Mark SCBs that are on the untagged queue with a flag instead
	of checking several fields in the SCB to see if the SCB should
	be on the queue.  This makes it easier for things like automatic
	request sense requests to be queued without touching the
	untagged queues even though they are untagged requests.

	When dealing with ignore wide residue messages that occur
	in the middle of a transfer, reset HADDR, not SHADDR for
	non-ultra2 chips.  Although SHADDR is where the firmware
	fetches the ending transfer address for a save data pointers
	request, it is readonly. Setting HADDR has the side effect
	of also updating SHADDR.

	Cleanup the output of ahc_dump_card_state() by nulling out the
	free scb list in the non-paging case.  The free list is only
	used if we must page SCBs.

	Correct the transmission of cdbs > 12 bytes in length.  When
	swapping HSCBs prior to notifing the sequencer of the new
	transaction, the bus address pointer for the cdb must also
	be recalculated to reflect its new location.  We now defer
	the calculation of the cdb address until just before queing
	it to the card.

	When pulling transfer negotiation settings out of scratch
	ram, convert 5MHz/clock doubled settings to 10MHz.

	Add a new function ahc_qinfifo_requeue_tail() for use by
	error recovery actions and auto-request sense operations.
	These operations always occur when the sequencer is paused,
	so we can avoid the extra expense incurred in the normal
	SCB queue method.

	Use the BMOV instruction for all single byte moves on
	controllers that support it.  The bmov instruction is
	twice as fast as an AND with an immediate of 0xFF as
	is used on older controllers.

	Correct a few bugs in ahc_dump_card_state().  If we have
	hardware assisted queue registers, use them to get the
	sequencer's idea of the head of the queue.  When enumerating
	the untagged queue, it helps to use the correct index for
	the queue.

aic7xxx.h:

	Indicate via a feature flag, which controllers can take
	on both the target and the initiator role at the same time.

	Add the AHC_SEQUENCER_DEBUG flag.

	Add the SCB_CDB32_PTR flag used for dealing with cdbs
	with lengths between 13 and 32 bytes.

	Add new prototypes.

aic7xxx.reg:
	Allow the SCSIBUSL register to be written to.  This is
	required to fix a selection timeout problem on the 7892/99.

	Cleanup the sequencer interrupt codes so that all debugging
	codes are grouped at the end of the list.

	Correct the definition of the ULTRA_ENB and DISC_DSB locations
	in scratch ram.  This prevented the driver from properly honoring
	these settings when no serial eeprom was available.

	Remove an unused sequencer flag.

aic7xxx.seq:
	Just before a potential select-out, clear the SCSIBUSL
	register.  Occasionally, during a selection timeout, the
	contents of the register may be presented on the bus,
	causing much confusion.

	Add sequencer diagnostic code to detect software and or
	hardware bugs.  The code attempts to verify most list
	operations so any corruption is caught before it occurs.
	We also track information about why a particular reconnection
	request was rejected.

	Don't clobber the digital REQ/ACK filter setting in SXFRCTL0
	when clearing the channel.

	Fix a target mode bug that would cause us to return busy
	status instead of queue full in respnse to a tagged transaction.

	Cleanup the overrun case.  It turns out that by simply
	butting the chip in bitbucket mode, it will ack any
	bytes until the phase changes.  This drasticaly simplifies
	things.

	Prior to leaving the data phase, make sure that the S/G
	preload queue is empty.

	Remove code to place a request sense request on the waiting
	queue.  This is all handled by the kernel now.

	Change the semantics of "findSCB".  In the past, findSCB
	ensured that a freshly paged in SCB appeared on the disconnected
	list.  The problem with this is that there is no guarantee that
	the paged in SCB is for a disconnected transation.  We now
	defer any list manipulation to the caller who usually discards
	the SCB via the free list.

	Inline some busy target table operations.

	Add a critical section to protect adding an SCB to
	the disconnected list.

aic7xxx_freebsd.c:
	Handle changes in the transfer negotiation setting API
	to filter incoming requests.  No filtering is necessary
	for "goal" requests from the XPT.

	Set the SCB_CDB32_PTR flag when queing a transaction with
	a large cdb.

	In ahc_timeout, only take action if the active SCB is
	the timedout SCB.  This deals with the case of two
	transactions to the same device with different timeout
	values.

	Use ahc_qinfifo_requeu_tail() instead of home grown
	version.

aic7xxx_inline.h:
	Honor SCB_CDB32_PTR when queuing a new request.

aic7xxx_pci.c:
	Use the maximum data fifo threshold for all chips.
2000-10-31 18:43:29 +00:00
Justin T. Gibbs a08d5a42df Add the aic7xxx option AHC_DEBUG_SEQUENCER. This enables some diagnostic
code in the firmware downloaded to the aic7xxx RISC engine.
2000-10-31 18:01:15 +00:00
Justin T. Gibbs df7addf026 0x03F -> 0x3F for consistancy with the rest of the file. 2000-10-31 18:00:23 +00:00
Justin T. Gibbs 04b1132484 Allow async transfer negotiation updates to modify tagging behavior.
The XPT uses this to prevent tags from being used on parallel SCSI
interfaces immediately after a bus reset or BDR so that controllers
have an oportunity to renegotiate without tag messages in the way.
Somehow this got disabled... the functionality has been here for
quite some time.

Noticed by: my SCSI bus analyzer
2000-10-31 17:59:43 +00:00
John Baldwin bfbc104f8a Use do { ... } while (0) to wrap the body of mtx_assert().
Reported by:	rwatson
2000-10-31 17:20:55 +00:00
Julian Elischer 7ccbb17bb3 Swap the order of two tags in the pppoe PADI and PADS packets
as there are apparently some buggy switches that need them in that order.
(I hope there aren't any that require them in the old order!)
2000-10-31 14:40:23 +00:00
Roger Hardiman def1ddf3a8 Fix typo in comments 2000-10-31 14:30:29 +00:00
Roger Hardiman 51c5172097 Upgrade to driver 2.18
Support for new Hauppauge Model 44xxx WinTV Cards
(the ones with no audio mux)

Submitted by:	Christian Gusenbauer <Christian.Gusenbauer@netway.at>
2000-10-31 13:09:56 +00:00
Takanori Watanabe 840f9b5317 If acpica driver is loaded using kldload(8), warn and just ignore. 2000-10-31 11:54:10 +00:00
Poul-Henning Kamp a16d0eb2d7 Deprecate devsw->d_bmaj entirely.
This removes support for booting current kernels with very old bootblocks.

Device driver writers: Please remove initializations for the d_bmaj
field in your cdevsw{}.
2000-10-31 10:58:14 +00:00
Ruslan Ermilov 48cb400fb1 Do not waste a time saving a copy of IP header if we are certainly
not going to send an ICMP error message (net.inet.udp.blackhole=1).
2000-10-31 09:13:02 +00:00
Poul-Henning Kamp 9005f14a3b Remove unused #includes.
Approved by:	nyan
2000-10-31 08:22:26 +00:00
Yoshihiro Takahashi 168d542ea5 Disabled EGA/VGA 1bpp/4bpp modes support. This is not real fix, but this comes
back to support 8bpp mode.
2000-10-31 07:58:34 +00:00
Jordan K. Hubbard e7c2b5a51d Add a new ioctl for doing virgin disklabels.
Submitted by:	dillon
2000-10-31 07:05:40 +00:00
Matt Jacob aa0898c0e0 I'm dropping the MAINTAINER request and see what happens. If it becomes
too hard for me to keep in sync with other platforms, FreeBSD will go
it's own way.
2000-10-31 05:55:54 +00:00
Takanori Watanabe e927e6a1c0 Makefile for ACPI CA base acpi driver kernel module.
This module is intended to be loaded from /boot/loader,not from kldload(8).
2000-10-31 04:09:35 +00:00
MIHIRA Sanpei Yoshiro 3637a0ce8b Oops, in previous commit(rev.1.4), I replaced
pitch and duration only in ``struct'', I forgot
to replace these in sysbeep and timeout, sorry.
2000-10-31 03:28:02 +00:00
Andrew Gallatin 84aa58ab03 fix the sigaltstack hack by lowering the stack size to the original value
if the request was for less than MINSIGSTKSZ (in which case we "round up").
discussed with: marcel
2000-10-31 03:10:41 +00:00
Brian Somers 76a70671fc Change the format of ngpppoe_init_data so that the provider is NUL
terminated and the data_len field is no longer necessary.

Add ASCII2BINARY and BINARY2ASCII capabilities.

The old format is still understood and dealt with, but can't do
the ASCII2BINARY and BINARY2ASCII stuff.

Approved by: archie
2000-10-31 02:45:24 +00:00
Takanori Watanabe 0df282c2e4 Add pcib_if location to list of *.m files. 2000-10-31 02:25:20 +00:00
Robert Watson cb1f0db9db o Deny access to System V IPC from within jail by default, as in the
current implementation, jail neither virtualizes the Sys V IPC namespace,
  nor provides inter-jail protections on IPC objects.
o Support for System V IPC can be enabled by setting jail.sysvipc_allowed=1
  using sysctl.
o This is not the "real fix" which involves virtualizing the System V
  IPC namespace, but prevents processes within jail from influencing those
  outside of jail when not approved by the administrator.

Reported by:	Paulo Fragoso <paulo@nlink.com.br>
2000-10-31 01:34:00 +00:00
Mark Murray f7261d9c5f Convert the de driver into a loadable module. Still missing is an
unload method. Lots of old cruft is removed.

Thanks to WPaul for large clue-injection and debugging services.

Reviewed by:	wpaul
2000-10-31 01:25:10 +00:00
Bill Paul e99285a4f7 Call dc_apply_fixup() in dc_setcfg() for the MII case. 2000-10-31 00:06:39 +00:00
Bill Paul 5d801891d3 Grrr. The 'reg' variable in dc_apply_fixup() needs to be a u_int32_t, not
a u_int8_t. Pass the conical hat. This should fix certain cardbus 21143
cards that require SROM h0h0magic in order to enable their transceivers.
2000-10-30 23:51:39 +00:00
Scott Long 8c7a96c55b Allow XPT_PATH_INQ to be performed on the XPT device, as per the CAM spec.
Return ENOTSUP for XPT_ENG_INQ and XPT_ENG_EXEC when performed on the XPT
device.

Reviewed by:	gibbs
2000-10-30 23:30:28 +00:00
Søren Schmidt afaa0eb776 Try a bit harder to test for ATA/ATAPI HW to probe, this is to avoid
some of the false comrades some devices fakes...
2000-10-30 20:45:24 +00:00
Poul-Henning Kamp 7e17175887 Remove an evil conditional nested include of <sys/systm.h> 2000-10-30 20:37:45 +00:00
Poul-Henning Kamp ef10cd6a64 Add a missing <sys/systm.h> 2000-10-30 20:37:19 +00:00
Poul-Henning Kamp 8879e52387 Add back some #include <sys/systm.h> which were needed when <sys/ktr.h>
doesn't mess us up.

Noted by:	Harti Brandt <brandt@fokus.gmd.de>
2000-10-30 20:37:01 +00:00
Poul-Henning Kamp 54dfbb1460 Comment out the (old) acpi stuff, it breaks LINT. 2000-10-30 20:35:31 +00:00
Robert Watson c087a04f6a o Tighten up rules for which processes can't debug which other processes
in the p_candebug() function.  Synchronize with sef's CHECKIO()
  macro from the old procfs, which seems to be a good source of security
  checks.

Obtained from:	TrustedBSD Project
2000-10-30 20:30:03 +00:00
Ruslan Ermilov 642cd09fb3 Added boolean argument to link searching functions, indicating
whether they should create a link if lookup has failed or not.
2000-10-30 17:24:12 +00:00
Søren Schmidt 92be7ac569 Update the Promise RAID code, there are differences between BIOS
version unfortunately...
2000-10-30 17:11:40 +00:00
Hellmuth Michaelis 86bc05b331 Remove unused #include statements
Submitted by:	phk
2000-10-30 14:49:26 +00:00
Ruslan Ermilov 03453c5e87 A significant rewrite of PPTP aliasing code.
PPTP links are no longer dropped by simple (and inappropriate in this
case) "inactivity timeout" procedure, only when requested through the
control connection.

It is now possible to have multiple PPTP servers running behind NAT.
Just redirect the incoming TCP traffic to port 1723, everything else
is done transparently.

Problems were reported and the fix was tested by:
		Michael Adler <Michael.Adler@compaq.com>,
		David Andersen <dga@lcs.mit.edu>
2000-10-30 12:39:41 +00:00
Noriaki Mitsunaga c868d858b4 Remove unused #includes.
Submitted by:	phk@FreeBSD.ORG
2000-10-30 12:21:19 +00:00
Kris Kennaway fe2869c8fa Initial import of AES algorithm code (aka Rijndael) from KAME. 2000-10-30 11:03:32 +00:00
Nick Hibma d69d452a55 remove an unused function (and a warning) 2000-10-30 10:58:02 +00:00
Nick Hibma 25c8418620 Add entry for umodem 2000-10-30 10:55:03 +00:00
Søren Schmidt 0dbc12d8ca Fix the PCCARD ATA breakage..
This is due to a bug that has been in there since Warneer did the
PCCARD stuff, the altioaddr is not offset 8 its offset 14 from
the base address.
Also only probe the master device, no known PCCARD ATA thingies
has a slave AFAIK..
2000-10-30 09:36:40 +00:00
Ruslan Ermilov dc5a40409d Add pfil.9 manpage to build after a repository copy. 2000-10-30 09:16:18 +00:00
Kris Kennaway d8740da240 Revert previous commit after discussion with phk. 2000-10-30 09:13:46 +00:00
Poul-Henning Kamp 4078082415 Remove unused #includes
Reviewed by:	ken
2000-10-30 08:08:00 +00:00
Bill Paul 78d2de28df Fix support for cardbus cards:
- Add DRIVER_MODULE() declaration to make this driver a
	  child of cardbus
	- Handle different width EEPROMs

The CIS parser still barfs when scanning this card, but it seems to
probe/attach correctly anyway. I can't do a traffic test just yet
since I don't have a proper crossover cable handy.
2000-10-30 07:54:38 +00:00
Poul-Henning Kamp a3b266147d Remove more unused #includes. 2000-10-30 07:42:06 +00:00
Kenneth D. Merry 2906da29dc Write support for the cd(4) driver.
This allows writing to DVD-RAM, PD and similar drives that probe as CD
devices.  Note that these are randomly writeable devices, not
sequential-only devices like CD-R drives, which are supported by cdrecord.

Add a new flag value for dsopen(), DSO_COMPATLABEL.  The cd(4) driver now
uses this flag instead of the DSO_NOLABELS flag.  The DSO_NOLABELS always
used a "fake" disklabel for the entire disk, provided by the caller.

With the DSO_COMPATLABEL flag, dsopen() will first search the media for a
label, and if it finds a label, it will use that label.  Otherwise it will
use the fake disklabel provided by the caller.  This provides backwards
compatibility, since we will still have labels for ISO9660 media.

It also provides new functionality, since you can now have a regular BSD
disklabel on read-only media, or on writeable media (e.g. DVD-RAM).

Bruce and I both think that we should eventually (in a few years) get
away from using disklabels for ISO9660 media, and just use the whole disk
device (/dev/cd0).  At that point disklabel handling in the cd(4) driver
could follow the "normal" model, as used in the da(4) driver.

Also, clean up the path in a couple of places in cdregister().  (Thanks to
Nick Hibma for catching that bug.)

Reviewed by:	bde
2000-10-30 07:03:00 +00:00
Warner Losh f3b7b7b4ae Add some additional message types for coming raylan driver from Duncan
Barclay.
2000-10-30 06:03:57 +00:00
Matt Jacob 2170c2d960 Remember to decrement interrupt nesting level if leaving early
(in the unlikely case we get a clock interrupt on a non-primary CPU).
2000-10-30 04:18:54 +00:00
Alan Cox 39b2b25fa0 _aio_aqueue(): Change kevent registration to use its own struct file pointer.
Otherwise, aio_read() and aio_write() on sockets are broken if a kevent is
 registered.  (The code after kevent registration for handling sockets assumes
 that the struct file pointer "fp" still refers to the socket, not the kqueue.)
2000-10-29 21:38:28 +00:00
Poul-Henning Kamp fe4e324374 Allow all users to access the dev -> devname sysctl. 2000-10-29 19:50:06 +00:00
Poul-Henning Kamp da936bf80a Remove unneeded <stddef.h> #includes. 2000-10-29 16:57:42 +00:00
David Malone 66efa50621 Make a few more mallocs use M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Approved by:	imp
2000-10-29 16:29:05 +00:00
Andrew Gallatin 2ff04fe232 Unmask cypress ata controllers. This bug was hidden before
the addition of the serverworks isab support because the
cypress case was the last one in the switch
2000-10-29 16:27:40 +00:00
David Malone da71e9a21b Make malloc use M_ZERO in some more locations.
Don't check for a null pointer if malloc called with M_WAITOK.

Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Approved by:	bp
2000-10-29 16:14:28 +00:00
Poul-Henning Kamp cf9fa8e725 Move suser() and suser_xxx() prototypes and a related #define from
<sys/proc.h> to <sys/systm.h>.

Correctly document the #includes needed in the manpage.

Add one now needed #include of <sys/systm.h>.
Remove the consequent 48 unused #includes of <sys/proc.h>.
2000-10-29 16:06:56 +00:00
David Malone 5417ec4db1 Add the use of M_ZERO to some malloc calls.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
Approved by:	gibbs
2000-10-29 15:47:16 +00:00
Poul-Henning Kamp 9f69a4578a Weaken a bogus dependency on <sys/proc.h> in <sys/buf.h> by #ifdef'ing
the offending inline function (BUF_KERNPROC) on it being #included
already.

I'm not sure BUF_KERNPROC() is even the right thing to do or in the
right place or implemented the right way (inline vs normal function).

Remove consequently unneeded #includes of <sys/proc.h>
2000-10-29 14:54:55 +00:00
Poul-Henning Kamp 53ce36d17a Remove unneeded #include <sys/proc.h> lines. 2000-10-29 13:57:19 +00:00
Darren Reed 72371ff249 fix warning compile error about unused variable 2000-10-29 10:07:43 +00:00
Poul-Henning Kamp db4035961b Fix params passed to pci_porten() and pci_memen(). 2000-10-29 09:59:28 +00:00
Poul-Henning Kamp 26dac111f1 Add a hook for doing #include magic (for src/tools/tools/kerninclude). 2000-10-29 09:47:50 +00:00
Darren Reed 0c72e2855d Fix conflicts creted by import. 2000-10-29 07:53:05 +00:00
Noriaki Mitsunaga 82fdce0977 Change flags of ncv and nsp driver. Both were conflicted with the flags
used in lower layer (scsi_low.c).

The flag of ncv for KME KXLC004 was chaged from 0x1 to 0x100.
The flag of nsp for PIO mode was chaged from 0x1 to 0x100.
2000-10-29 06:54:32 +00:00
Noriaki Mitsunaga 8306c0027e Changed not to use struct isa_device in the argument of scsi_low_activate().
You will not need COMPAT_OLDISA in config file.
This interface may have to change in future.
2000-10-29 06:47:16 +00:00
Noriaki Mitsunaga 8e47dfb8e0 Remove unnecessary printf(). 2000-10-29 06:03:47 +00:00
Noriaki Mitsunaga 918dbed337 Add hints for ISA cards (such as TMC1610M) which use stg driver.
The values has been given by Arai Mikio <m-arai@sco.bekkoame.ne.jp>.
2000-10-29 05:51:46 +00:00
Tor Egge e4e7a9a4e9 Reduce kernel stack usage by not having large packets on the stack.
Supply correct size parameter to dhcpd.
Replace some magic numbers with macro names.
Handle more than one interface.
2000-10-29 01:19:32 +00:00
Josef Karthauser fe93767490 Count per-address statistics for IP fragments.
Requested by:	ru
Obtained from:	BSD/OS
2000-10-29 01:05:09 +00:00
Don Lewis 19c34d1596 Nuke a bit of dead code. 2000-10-29 01:00:36 +00:00
Mike Smith f53e8493fb Unconditionally turning on the I/O and memory enable bits in the PCI
command register is too aggressive.  Revert to the previous behaviour, but
leave the new behaviour available as an undocumented option.  It's not
clear what the Right, Right Thing is to do here, but the more conservative
approach is safer.
2000-10-28 23:07:13 +00:00
John Baldwin a76e4179b4 Don't ignore VESA modes that have the NON-VGA bit set. All of the SVGA
graphical modes on some systems have this bit set causing our VESA code
to ignore them.
2000-10-28 22:35:57 +00:00
Nik Clayton f94a808c35 Add a brief comment telling people to retain 'device miibus' as necessary.
PR:		docs/21981
Submitted by:	Matthew Emmerton <matt@gsicomp.on.ca>
2000-10-28 22:32:17 +00:00
Alan Cox 4a71feb71c Add missing call to knote_fdclose() in setugidsafety() and fdcloseexec().
Reviewed by:	jlemon
2000-10-28 20:27:32 +00:00
Cameron Grant 5bc2a29c8c add commented-out dependancies on the new sb8 and sb16 drivers 2000-10-28 19:35:54 +00:00
Cameron Grant 3d26e60a2d modules for the new sb8 and sb16 drivers 2000-10-28 19:28:49 +00:00
Cameron Grant eee8b161e5 add commented-out entries for the new sb8 and sb16 drivers 2000-10-28 19:24:14 +00:00
Cameron Grant eadd0f839e split up sb16 and sb/sbpro drivers
we do not support sb versions <2.00, and the sb8 driver has not been tested
yet.

these drivers are not yet enabled by default.
2000-10-28 19:20:03 +00:00
MIHIRA Sanpei Yoshiro 33eb563d67 add PC-Card melody beep(PC Card bus, kludge version)
Original idea from:	PAO3
2000-10-28 13:35:34 +00:00
Yoshihiro Takahashi 65a68d7647 Restore GDC mode to initial mode instead of 24KHz.
Submitted by:	Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
2000-10-28 11:27:56 +00:00
Yoshihiro Takahashi 12f1a08005 Fixed extention memory check routine.
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2000-10-28 11:16:42 +00:00
Yoshihiro Takahashi de103326a4 Removed extra calculation for X position (PC-98 only).
Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
2000-10-28 10:59:21 +00:00
Mike Smith e10f2ee576 Return -10 from the PCI probe to allow room for an updated driver to
override one built into the kernel.
2000-10-28 10:46:30 +00:00
Peter Wemm 41fced74eb Fix typo s/DE_DEVICEID_FE2500/DC_DEVICEID_FE2500/ 2000-10-28 10:03:54 +00:00
Bill Paul 1d5e53109c Add PCI IDs for some additional cardbus cards. Yes, there really is
a RealTek 8139 cardbus device. Unfortunately it doesn't quite work yet
because the CIS parser barfs on it.

Submitted by msmith, with some small tweaks by me.
2000-10-28 09:00:20 +00:00
Mike Smith a61a28f04c We should include <machine/stdarg.h> not <stdarg.h>
Submitted by:	phk
2000-10-28 08:32:43 +00:00
Bruce Evans 27c6358927 Quick fix for namespace problems which broke many ports. Spell
uint16_t as "unsigned short" like it used to be and uint32_t as
"unsigned int" not like it used to be (was: "unsigned long").
2000-10-28 08:20:33 +00:00
Mike Smith 683212b993 Some AML code assumes that a function without an explicit ReturnOp will
return the last value returned by a nested method call.  This violates
the ACPI spec, but is implemented by the Microsoft interpreter, and thus
vendors can (and do) get away with it.

Intel's stance is that this is illegal and should not be supported.
As they put it, however, we have to live in the real world.  So go ahead
and implement it.

Submitted by:	Mitsaru IWASAKI <iwasaki@jp.freebsd.org>
2000-10-28 07:32:13 +00:00
Mike Smith 31239e0d37 FreeBSD-specific customisations:
- Set debugger options for kernel build
 - Define some missing functions
 - Bring in GCC defines
 - Disable the 'wbinvd' macro as it conflicts with our inline
2000-10-28 07:29:08 +00:00
Mike Smith 975e9c4c52 Add some extra fuctions:
- AcpiGetProcessorID (fetch the ACPI processor ID for a given ACPI_HANDLE)
 - AcpiSetSystemSleepState (set the Sx sleeping state, proposed by Intel
   but not actually implemented)
2000-10-28 07:26:48 +00:00
Mike Smith 0da9b7818e Add some verbiage about the new ACPICA code. Note that this probably
breaks building this config, as the old ACPI code will conflict.  The
old code will be going away shortly, so this should not be an issue.
2000-10-28 07:07:02 +00:00
Mike Smith 011d43cdb3 Allow PCI busses to be connected to host bridges detected by ACPI as well. 2000-10-28 07:04:07 +00:00
Mike Smith a06f3df81d Connect the new ACPICA code to the 'acpica' device. 2000-10-28 07:03:39 +00:00
Mike Smith 15e32d5d03 Initial FreeBSD OSPM (operating system power management) modules for
ACPICA.  Most of these are still works in progress.  Support exists for:

 - Fixed feature and control method power, lid and sleep buttons.
 - Detection of ISA PnP devices using ACPI namespace.
 - Detection of PCI root busses using ACPI namespace.
 - CPU throttling and sleep states (incomplete)
 - Thermal monitoring and cooling control (incomplete)
 - Interface to platform embedded controllers (mostly complete)
 - ACPI timer (incomplete)
 - Simple userland control of sleep states.
 - Shutdown and poweroff.
2000-10-28 06:59:48 +00:00
Mike Smith fd660059d9 FreeBSD-specific OSD (operating system dependant) modules for the Intel
ACPICA code.
2000-10-28 06:56:15 +00:00
Poul-Henning Kamp 54b1161b73 Revert two experimental changes which escaped from my devel machine. 2000-10-28 06:55:12 +00:00
Mike Smith ee1c50ab3a This commit was generated by cvs2svn to compensate for changes in r67754,
which included commits to RCS files with non-trunk default branches.
2000-10-28 05:01:06 +00:00
Mike Smith 926328c406 Initial import of the Intel-maintained ACPI Component Architecture. This
is Intel's reference implementation of the core operating-system ACPI
support.  (This import is on the vendor branch.)
2000-10-28 05:01:06 +00:00
David E. O'Brien 23104303fa Hook ipfilter back up as it compiles now. 2000-10-28 04:51:47 +00:00
Kenneth D. Merry b38d50a507 Add a quirk entry for Nakamichi MJ-* changers. The changer in question is
a <NAKAMICH MJ-5.16S 1.06>.

Submitted by:	Kevin Van Maren <vanmaren@fast.cs.utah.edu>
2000-10-28 03:14:59 +00:00
John Baldwin 55d79ad0db The x86 atomic operations are already locked, so they do not need an
additional locked instruction to guarantee a write barrier for the acquire
variants.

Approved by:	dfr
Pointy hat to:	jhb
2000-10-28 00:28:15 +00:00
Mike Smith 6dc6d3bb7c Fix typo in the 4.x case. 2000-10-27 23:40:45 +00:00
Cameron Grant d16b567379 implement SNDCTL_DSP_POST 2000-10-27 22:20:45 +00:00
John Baldwin 7c0cb49a64 Fix a couple of whitespace nits. 2000-10-27 21:45:50 +00:00
Poul-Henning Kamp bb2e7ebb7c Remove 86 unneeded #includes 2000-10-27 21:32:10 +00:00
Poul-Henning Kamp c77dceb5d3 Remove more unused #includes. 2000-10-27 21:14:25 +00:00
Garrett Wollman 9d31ac12b7 Initialize rn_mklist in rn_newpair(). The undocumented assumption
seems to be that the nodes are bzero'd beforehand, but the submitter
found that this was not always the case, and in any event defensive
programming here costs epsilon squared.

PR:		22244
Submitted by:	Dave Gillam <daveg@chiaro.com>
2000-10-27 20:50:14 +00:00
Andrew Gallatin a415ada785 remove a stddef.h missed by phk 2000-10-27 18:57:31 +00:00
Matt Jacob 55acaca9e1 Add usage of M_ZERO to malloc calls where the result was just bzeroed.
PR:		22186
Submitted (partially) by:	josh@zipperup.org
2000-10-27 16:40:57 +00:00
Matt Jacob 657e6b0d78 Add M_ZERO to malloc calls where the result is just bzeroed.
PR:		22188
Submitted (partially) by:	josh@zipperup.org
2000-10-27 16:36:26 +00:00
David E. O'Brien d0eaa94443 Include sys/param.h for `__FreeBSD_version' rather than the non-existent
osreldate.h.

Submitted by:	dougb
2000-10-27 12:53:31 +00:00
Andrey A. Chernov 9d70d03341 Remove ipfilter and mark it as broken until it will be fixed by maintainer.
Not compiles under -current
2000-10-27 12:45:31 +00:00
Poul-Henning Kamp 46aa3347cb Convert all users of fldoff() to offsetof(). fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.

Define __offsetof() in <machine/ansi.h>

Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>

Remove myriad of local offsetof() definitions.

Remove includes of <stddef.h> in kernel code.

NB: Kernelcode should *never* include from /usr/include !

Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.

Deprecate <struct.h> with a warning.  The warning turns into an error on
01-12-2000 and the file gets removed entirely on 01-01-2001.

Paritials reviews by:   various.
Significant brucifications by:  bde
2000-10-27 11:45:49 +00:00
Doug Barton c9e6ddc6af Expand on the reasons for and against defining NO_F00F_HACK. This is one of
those options that is frequently misunderstood, and ends up on -questions.

PR:		21852
2000-10-27 10:57:33 +00:00
Doug Rabson 445516e4e0 Backout revision 1.7 which was a bad idea since it would force people
to reinstall boot1 after a 'make world'.

Unfortunately this means that people who have already installed a new
boot1 from a 'make world' after 2000/09/18 *must* reinstall it after
their next build using something like:

        # disklabel -B /dev/da0c
2000-10-27 09:36:34 +00:00
Poul-Henning Kamp 9d087b798d Remove bogus undocumented macros used to control conditional assembly. 2000-10-27 08:39:41 +00:00
Poul-Henning Kamp a92ddba779 Remove #if DO_DEFLATE
Remove #if DO_BSD_COMPRESS

They are the wrong way to enable/disable features and undocumented to boot.
2000-10-27 08:38:26 +00:00
Bruce Evans 4a3bb59944 Declare or #define per-cpu globals in <machine/globals.h> in all cases.
The i386 UP case was messily different.
2000-10-27 08:30:59 +00:00
Ruslan Ermilov 3cebc3e4de Fetch the protocol header (TCP, UDP, ICMP) only from the first fragment
of IP datagram.  This fixes the problem when firewall denied fragmented
packets whose last fragment was less than minimum protocol header size.

Found by:	Harti Brandt <brandt@fokus.gmd.de>
PR:		kern/22309
2000-10-27 07:19:17 +00:00
Roger Hardiman 5d4152e3e8 Merge from i386: Add MSP ioctl 2000-10-27 07:07:24 +00:00
Mark Murray 5f3431b5ad As the blocking model has seems to be troublesome for many, disable
it for now with an option.

This option is already deprecated, and will be removed when the
entropy-harvesting code is fast enough to warrant it.
2000-10-27 06:06:04 +00:00
Mike Smith cb16d62f47 Add PCI device ID for an upcoming revision of the product. 2000-10-27 05:58:45 +00:00
Mike Smith d1702591ac Add a missing newline to a diagnostic. 2000-10-27 05:58:16 +00:00
John Baldwin 660d1e3a9d Add and document the WITNESS_SKIPSPIN and WITNESS_DDB kernel options. 2000-10-27 03:00:28 +00:00
John Baldwin a5a96a1978 - Use MUTEX_DECLARE() and MTX_COLD for the WITNESS code's internal mutex so
it can function before malloc(9) is up and running.
- Add two new options WITNESS_DDB and WITNESS_SKIPSPIN.  If WITNESS_SKIPSPIN
  is enabled, then spin mutexes are ignored by the WITNESS code.  If
  WITNESS_DDB is turned on and DDB is compiled into the kernel, then the
  kernel will drop into DDB when either a lock hierarchy violation occurs
  or mutexes are held when going to sleep.
- Add some new sysctls:
  debug.witness_ddb is a read-write sysctl that corresponds to WITNESS_DDB.
     The kernel option merely changes the default value to on at boot.
  debug.witness_skipspin is a read-only sysctl that one can use to determine
     if the kernel was compiled with WITNESS_SKIPSPIN.
- Wipe out the BSD/OS-specific lock order lists.  We get to build our own
  lists now as we add mutexes to the kernel.
2000-10-27 02:59:30 +00:00
Bill Paul 0a46b1dccc Yet another bug fix/optimization for the Davicom DM9100/9102: increase
the PCI latency timer value to 0x80. Davicom's Linux driver does this,
and it drastically reduces the number of TX underruns in my tests. (Note:
this is done only for the Davicom chips. I'm not sure it's a good idea to
do it for all of them.)

Again, still waiting on confirmation before merging to stable.
2000-10-27 00:15:04 +00:00
David E. O'Brien bc6049dd46 Install the loader manpages. 2000-10-26 21:47:59 +00:00
Cameron Grant 9ec437a334 add reinit functions to mixers
unstaticize chn_start()
add reset/resetdone functions to channels
2000-10-26 20:46:58 +00:00
Cameron Grant badd7dc127 do not attach to soundblaster 1.x - they are unsupported 2000-10-26 20:31:16 +00:00
Warner Losh dc84c5ac4c Change comment from sprintf to snprintf 2000-10-26 19:46:20 +00:00
Warner Losh 85cc5e3588 Change snprintf to strncpy.
Also add a comment about a bogus assumption in the current code found at
bsdcon by jhb.
2000-10-26 19:45:42 +00:00
Roger Hardiman 870b024f5d Add new ioctls for userland access to the MSP device 2000-10-26 16:41:48 +00:00
Andrew Gallatin 382e2ab4b1 add a version tag for the alpha linulator to depend on 2000-10-26 16:31:29 +00:00
Roger Hardiman 9dc7a78df5 Fix typo 2000-10-26 16:27:51 +00:00
Doug Rabson b2950f19aa Minor build fixes. 2000-10-26 16:23:18 +00:00
Andrew Gallatin af06b8d8a5 Update osf1_setuid() and osf1_setgid() to use the new change_euid() and
change_ruid() in kern_prot.c.  This fixes an incorrect use
of chgproccnt().

Update both osf1_setuid() and osf1_setgid() to use setsugid() instead
of just frobbing the flag.

(mostly) submitted by: truckman
2000-10-26 15:53:00 +00:00
Andrew Gallatin 810bfc8ea1 unstaticize change_ruid() because it is needed by osf1_setuid() 2000-10-26 15:49:35 +00:00
Ruslan Ermilov b6ea1aa58d RFC 791 says that IP_RF bit should always be zero, but nothing
in the code enforces this.  So, do not check for and attempt a
false reassembly if only IP_RF is set.

Also, removed the dead code, since we no longer use dtom() on
return from ip_reass().
2000-10-26 13:14:48 +00:00
Darren Reed 60b88d9681 fix conflicts from rcsids 2000-10-26 12:33:42 +00:00
Ruslan Ermilov 7e2df4520d Wrong header length used for certain reassembled IP packets.
This was first fixed in rev 1.82 but then broken in rev 1.125.

PR:		6177
2000-10-26 12:18:13 +00:00
Hellmuth Michaelis f33f907ea4 Add infrastructure for Cologne Chip HFC-S PCI driver. 2000-10-26 07:00:05 +00:00
Hellmuth Michaelis d1dad62933 Add infrastructure for Cologne Chip HFC-S PCI driver.
Increment isdn4bsd step.
2000-10-26 06:58:43 +00:00
Hellmuth Michaelis 065a09a83c Make the software HDLC decoder work again.
Submitted by:	Hans Petter Selasky <hselasky@c2i.net>
2000-10-26 06:31:18 +00:00
Cameron Grant c0960a5e91 handle AFMT_QUERY right 2000-10-26 01:34:54 +00:00
Luigi Rizzo 1f8ed85239 Close PR22152 and PR19511 -- correct the naming of a variable 2000-10-26 00:16:12 +00:00
Bill Paul 318a72d7b0 Set the DC_TX_INTR_ALWAYS and DC_TX_STORENFWD flags for the Davicom
DM9100/DM9102 chips. Do not set DC_TX_ONE. The DC_TX_USE_TX_INTR flag
causes dc_encap() to set the 'interrupt on TX completion' bit only
once every 64 packets. This is an attempt to reduce the number
of interrupts generated by the chip. You're supposed to get a 'no more
TX buffers left' interrupt once you hit the last packet whether you
ask for one or not, however it seems the Davicom chip doesn't generate
this interrupt, or at least it doesn't generate it under the same
circumstances. The result is that if you transmit n packets, where
n is less than 64, and then wait 5 seconds, you'll get a watchdog
timeout whether you want one or not. The DC_TX_INTR_ALWAYS causes
dc_encap() to request an interrupt for every frame.

I'm still waiting on confirmation from a couple of users to see if this
fixes their problems with the Davicom DM9102 before I merge this into
-stable, but this fixed the problem for me in my own testing so I'm
willing to make the change to -current right away.
2000-10-25 23:46:31 +00:00
Bill Paul ee27ba8eae Add a missing SK_UNLOCK() to sk_attach_xmac(). 2000-10-25 23:36:45 +00:00
Doug Rabson d2041924cd Move the call to extend_heap() from main to start so that if our BSS
expands beyond the limit we will extend the address space before trying
to zero the BSS. This should give us plenty of headroom for modest
expansion of the loader.
2000-10-25 23:36:01 +00:00
Doug Rabson 75cdadceb4 Don't build start.S as part of libalpha.a - its built specially. 2000-10-25 23:30:04 +00:00
Doug Rabson bcdb85b6b8 Don't indirect through a null pointer if we run out of kernel filenames. 2000-10-25 23:28:19 +00:00
Doug Rabson a3fc4e0754 Make a few functions inline to save space. 2000-10-25 23:24:43 +00:00
Dag-Erling Smørgrav f8c05e5019 Bring cpuinfo closer to what it looks like in Linux 2.2.
Submitted by:	R Bradford Jones <brad@kazrak.com>
2000-10-25 22:38:23 +00:00
Dag-Erling Smørgrav 886a6f6fca Add /proc/<pid>/status and /proc/<pid>/stat (the latter being mostly
zeroes for the time being).

Prompted by:	Nathan Boeger <nathan@khmere.com>
2000-10-25 22:12:59 +00:00
John Baldwin ee8f2f372c - Add atomic_cmpset_{acq_,rel_,}_long
- Add in atomic operations for 8-bit, 16-bit, and 32-bit integers
2000-10-25 21:56:16 +00:00
John Baldwin 083cc8729c This driver doesn't have a software interrupt handler, so don't attempt to
schedule a non-existant handler to run.
2000-10-25 21:29:36 +00:00
John Baldwin fbc9c4f042 Catch up to the new software interrupt code.
Noticed by:	phk
2000-10-25 21:24:08 +00:00
John Baldwin 49e0078b0f - Catch up to new software interrupt code.
- Add a missing curly brace.

Noticed by:	phk
2000-10-25 21:13:42 +00:00
John Baldwin 62a010fecf - Remove unneeded machine/ipl.h #include.
- Change the softintr() macro to do nothing on FreeBSD.  Previously,
  this macro would set a bit in spending and schedule the softinterrupt
  thread to run.  However, the bs driver never actually registers a
  a software interrupt handler, so all this work achieved nothing.  From
  the code it is not clear what exactly the softintr() macro is actually
  supposed to be doing.  It looks like it is supposed to be possibly
  running the hardware interrupt handler maybe?  This handler is only
  present in the #ifdef __NetBSD__ code however.  I have no idea how this
  driver handles interrupts at all, but at least it compiles now.
2000-10-25 20:38:08 +00:00
John Baldwin cba5b33d1a Catch up to the new swi code.
Noticed by:	phk
2000-10-25 20:21:42 +00:00
Ruslan Ermilov 8829f4ee0b We now keep the ip_id field in network byte order all the
time, so there is no need to make the distinction between
ip_output() and ip_input() cases.

Reviewed by:	silence on freebsd-net
2000-10-25 10:56:41 +00:00
Paul Saab fbdfe15620 Fast interrupts have no associated process, therefore do not try
and schedule it.  This fixes booting machines with broken MP tables.
2000-10-25 10:40:20 +00:00
Nick Hibma 2fd84f56d5 The USB scanner driver. To be used together with SANE. 2000-10-25 10:34:38 +00:00
Nick Hibma bebddc8cd2 Regen. 2000-10-25 10:14:44 +00:00
Nick Hibma 84b3d895ef Sync with NetBSD 2000-10-25 10:13:47 +00:00
Mike Smith e6c12d85d0 Major update to the 'twe' driver.
- Layout reorganisation to enhance portability.  The driver now has
   a relatively MI 'core' and a FreeBSD-specific layer over the top.
   Since the NetBSD people have already done their own port, this is
   largely just to help me with the BSD/OS port.

 - Request ID allocation changed to improve performance (I'd been
   considering switching to this approach after having failed to come
   up with a better way to dynamically allocate request IDs, and seeing
   Andy Doran use it in the NetBSD port of the driver convinced me
   that I was wasting my time doing it any other way).  Now we just
   allocate all the requests up front.

 - Maximum request count bumped back to 255 after characterisation
   of a firmware issue (off-by-one causing it to crash with 256
   outstanding commands).

 - Control interface implemented.  This allows 3ware's '3dm' utility to
   talk to the controller.  3dm will be available from 3ware shortly.

 - Controller soft-reset feature added; if the controller signals a
   firmware or protocol error, the controller will be reset and all
   outstanding commands will be retried.
2000-10-25 06:59:06 +00:00
John Baldwin 8088699f79 - Overhaul the software interrupt code to use interrupt threads for each
type of software interrupt.  Roughly, what used to be a bit in spending
  now maps to a swi thread.  Each thread can have multiple handlers, just
  like a hardware interrupt thread.
- Instead of using a bitmask of pending interrupts, we schedule the specific
  software interrupt thread to run, so spending, NSWI, and the shandlers
  array are no longer needed.  We can now have an arbitrary number of
  software interrupt threads.  When you register a software interrupt
  thread via sinthand_add(), you get back a struct intrhand that you pass
  to sched_swi() when you wish to schedule your swi thread to run.
- Convert the name of 'struct intrec' to 'struct intrhand' as it is a bit
  more intuitive.  Also, prefix all the members of struct intrhand with
  'ih_'.
- Make swi_net() a MI function since there is now no point in it being
  MD.

Submitted by:	cp
2000-10-25 05:19:40 +00:00
Matt Jacob 650789cb1b Get rid of ridiculous ISP_PVS macro. Instead, just set an
ISP_SMPLOCK define based on the previous 5.4 major/minor release
define of PVS- because this allows us to turn it off easier.
2000-10-25 04:42:46 +00:00
Matt Jacob 3395b0568a Whoops! Forgot to commit this when I committed the other (turnin on locks)
change. Sorry about that.
2000-10-25 04:40:49 +00:00
John Baldwin 3127162743 Quite some warnings. 2000-10-25 04:37:54 +00:00
Andrew Gallatin 2acbb2b129 fix bogus cast in osf1_getrlimit/osf1_setrlimit 2000-10-25 00:37:34 +00:00
John Baldwin f6835fffeb Implement atomic_{set,clear,add,subtract}_{acq_,rel_,}_ptr() 2000-10-25 00:16:38 +00:00
John Baldwin 2a1c4d6378 Only use 1 set of memory barrier operations with the atomic_*_{acq,rel}_ptr
functions.
2000-10-25 00:15:21 +00:00
Andrew Gallatin 785640153d teach the osf1_getsysinfo() function about a few more fields
submitted by: Jim.Pirzyk@disney.com
PR: alpha/22263
2000-10-25 00:14:11 +00:00
John Baldwin 7ff9f88355 - Forward declare struct mtx instead of #include'ing sys/mutex.h 2000-10-25 00:07:09 +00:00
John Baldwin 915cf38b11 - Catch a machine/mutex.h -> sys/mutex.h I somehow missed.
- Close a small race condition.  The sched_lock mutex protects
  p->p_stat as well as the run queues.  Another CPU could change p_stat
  of the process while we are waiting for the lock, and we would end up
  scheduling a process that isn't runnable.
2000-10-25 00:04:16 +00:00
John Baldwin d543796f86 - Make the eventhandler_mutex mutex a private variable in
subr_eventhandler.c
- Move the extra #include's in sys/eventhandler.h to be protected by
  the #ifndef SYS_EVENTHANDLER/#endif
2000-10-25 00:01:39 +00:00
Tor Egge 5b93d1da3f Eliminate some bitrot (nonexisting member variable names).
Don't use curproc when a proc pointer is available.
2000-10-24 23:33:01 +00:00
Tor Egge 6d7518c134 Style fixes. 2000-10-24 22:40:18 +00:00
Bill Paul f709eddf9f Convert the USB ethernet drivers to use mutexes. Also convert
usb_ethersubr.c. This module maintains two queues for packets which
are each protected with one mutex. These are all the changes I can
do for now. Removing the USBD_NO_TSLEEP flag doesn't work yet: when
I tried it, the system would usually freeze up after a NIC had been
operating for a while. The usb_ethersubr module itself ought to
go away; this is the next thing I need to test.
2000-10-24 22:38:54 +00:00
Tor Egge f6ee793a3c Make RPC timeout message more readable.
Supply proc pointer to sosend.
2000-10-24 22:37:55 +00:00
Doug Rabson ce97a5fc4e * Various fixes to breakage introduced by the atomic and mutex reorgs.
* Fixes to the signal delivery code. Not quite right yet.

I would have preferred to wait until I have signal delivery actually
working but the current kernel in CVS doesn't build.
2000-10-24 19:54:38 +00:00
Julian Elischer cc3bbd68c5 Since neither archie nor I work at Whistle any more, change our email
addresses to be the more usefu @freebsd.org ones
so we can keep getting bug-reports.
- man pages to follow..
2000-10-24 17:32:45 +00:00
Søren Schmidt 7f7e251f51 Fix the problem with DMA mode not working on Aladdin chips.
Amasing in how many ways Acer has screwed up that chip.
2000-10-24 13:50:22 +00:00
David E. O'Brien 2d26708326 Adjust comments
Submitted by:	bde

Add ISO C99's long long type limits.
Reviewed by:	bde
2000-10-24 10:49:56 +00:00
David E. O'Brien 780ba1bcc0 * Update comments
* convert decimal constants to hex
Submitted by:	bde

* Add ISO-C99 long long limits
2000-10-24 10:48:50 +00:00
David Malone dc6dd1259f Problem to avoid processes getting stuck in "vmopar". From Ian's
mail:

	The problem seems to originate with NFS's postop_attr
	information that is returned with a read or write RPC.
	Within a vm_fault context, the code cannot deal with
	vnode_pager_setsize() shrinking a vnode.

	The workaround in the patch below stops the nfsm_postop_attr()
	macro from ever shrinking a vnode. If the new size in the
	postop_attr information is smaller, then it just sets the
	nfsnode n_attrstamp to 0 to stop the wrong size getting
	used in the future. This change only affects postop_attr
	attributes; the nfsm_loadattr() macro works as normal.

	The change is implemented by adding a new argument to
	nfs_loadattrcache() called 'dontshrink'. When this is
	non-zero, nfs_loadattrcache() will never reduce the
	vnode/nfsnode size; instead it zeros n_attrstamp.

There remain other was processes can get stuck in vmopar.

Submitted by:	Ian Dowse <iedowse@maths.tcd.ie>
Reviewed by:	dillon
Tested by:	Vadim Belman <voland@lflat.org>
2000-10-24 10:13:36 +00:00
Sergey Babkin 356329f0dd Added the CAM-ified wds driver for the ancient WD7000 SCSI card.
Last time it was present in FreeBSD 3.x, before CAM.

Reviewed by:	gibbs
Approved by:	gibbs
2000-10-24 03:44:31 +00:00
Sergey Babkin 821c54a1eb Added lines for the wds driver.
Approved by:	gibbs
2000-10-24 03:38:28 +00:00
John Baldwin a555b1468d Don't dink with interrupts in vm_page_zero_idle(). This code assumed it
was being called with interrupts disabled, when it was actually being called
with them enabled.

Pointed out by:	tegge
2000-10-23 23:32:36 +00:00
Matt Jacob fc11653f20 CURTHD now defines in globals.h 2000-10-23 18:39:30 +00:00
Matt Jacob eb661345a9 Move bogus proc reference stuff into <machine/globals.h>. There is no
more include file including <sys/proc.h>, but there still is this wonky
and (causes warnings on i386) reference in globals.h.

CURTHD is now defined in <machine/globals.h> as well. The correct thing
to do is provide a platform function for this.
2000-10-23 18:36:03 +00:00
Matt Jacob 4ae338d0f2 Put back inclusion of proc.h so that alpha kernels (at the very least)
will compile again. I can't quite see where this was a recursive inclusion.
We probably need to do something to fix the alpha, but let's not break it
in the interim- it's broken enough.
2000-10-23 15:34:44 +00:00
Noriaki Mitsunaga ae94720d12 Add PC-Card/ISA SCSI host adpater drivers from NetBSD/pc98
(a NetBSD port for NEC PC-98x1 machines). They are ncv for NCR 53C500,
nsp for Workbit Ninja SCSI-3, and stg for TMC 18C30 and 18C50.

I thank NetBSD/pc98 and bsd-nomads people.

Obtained from:	NetBSD/pc98
2000-10-23 12:55:51 +00:00
Poul-Henning Kamp 04c94f3cfd Generate LOTS of warnings to remind the SMPng crew to fix the curproc
UP/SMP issue.
2000-10-23 09:22:18 +00:00
Poul-Henning Kamp 90b32bf849 Do not recursively include <sys/proc.h> 2000-10-23 09:14:20 +00:00
David E. O'Brien 45428438f7 Apply style(9). [best I could] 2000-10-23 08:46:25 +00:00
David E. O'Brien e413f7bf97 Apply style(9).
(best I could)
2000-10-23 08:36:59 +00:00
Poul-Henning Kamp 416282b562 Get rid of the last traces of ACTUALLY_LKM_NOT_KERNEL 2000-10-23 08:35:41 +00:00
David E. O'Brien 30e3f60f75 Sort the #define's. 2000-10-23 08:29:04 +00:00
David E. O'Brien 683713f8e9 Minimal set of diffs from the i386 bits to the AlphaLinux. 2000-10-23 08:15:58 +00:00
David E. O'Brien d1121275d5 Re-order the #define's into a more logical one. 2000-10-23 08:13:19 +00:00
Jun-ichiro itojun Hagino d31944e6ec be careful on mbuf overrun on ctlinput.
short icmp6 packet may be able to panic the kernel.
sync with kame.
2000-10-23 07:11:01 +00:00
Jun-ichiro itojun Hagino a91a9fde81 kame 1.32 -> 1.33
in add_m6fc(), set interface list for all cases.
in response to a report from Hoerdt Mickael.

kame 1.31 -> 1.32
discard PIM register if the version of the inner packet is incorrect (i.e. IPv6)
(according to clarfication of recent discussion in the IETF pim ML)
2000-10-23 07:07:33 +00:00
David E. O'Brien 2159c8905f We need to explicitly tell the args struct for COMPAT functions we use
that use the same args struct as their non-COMPAT counter parts.
2000-10-23 02:20:01 +00:00
David E. O'Brien b608e3ff66 Somehow I left out sycall #98 2000-10-22 21:47:07 +00:00
David E. O'Brien dd3ccfd92e Minor whitespace cleanup. 2000-10-22 21:42:03 +00:00
David E. O'Brien 8c2c12607a Minimal set of diffs from the i386 bits to the AlphaLinux.
Submitted by:	gallatin (content, minimization by me)
2000-10-22 21:36:27 +00:00
Poul-Henning Kamp 5a008b9415 Don't bogusly include <struct.h>
Bogusly define our own versions of strbase() and fldoff() until we
have sorted out where they live in the kernel.
2000-10-22 19:43:01 +00:00
Poul-Henning Kamp dd98c08d71 Don't rely on <sys/queue.h> to bogusly include <struct.h>.
Bogusly include <struct.h> until we have a better place to get
fldoff() from.
2000-10-22 19:39:17 +00:00
Yoshihiro Takahashi 97ae0fe84c Moved prototypes of isa_alloc_resourcev() and isa_load_resourcev() to
isa/isavar.h, and added needed includes.
2000-10-22 16:48:08 +00:00
Boris Popov 6716c905c9 Rev 1.41 was committed from wrong diff, now do it right. 2000-10-22 16:15:12 +00:00
Poul-Henning Kamp 41f7aa55ba Make LINT compile again. 2000-10-22 16:09:12 +00:00
Boris Popov 3ae19dd8cd Release and unlock vnode if resource deadlock detected. 2000-10-22 15:40:22 +00:00
Boris Popov b1b494a765 Update stale comment.
PR:		kern/21805
2000-10-22 14:24:30 +00:00
Boris Popov e7b1ac75dd Remove de_lock field from denode structure and make msdosfs PDIRUNLOCK aware. 2000-10-22 14:22:17 +00:00
Søren Schmidt 0f4eed7d8b Clean up the raid code a bit, also allow disks on HPT controllers to
be swapped around and still be put in the correct order in a raid.
2000-10-22 12:17:57 +00:00
Søren Schmidt 7dda7872cb Fix warning in the ISA only case. 2000-10-22 12:17:38 +00:00
Søren Schmidt 8f281eed6c Get the prober error code instead of relying on scp->error to contain
the lastest greatest.
2000-10-22 12:16:51 +00:00
Søren Schmidt d29f653d3a Up the reset pulse to 100ms in ata_reset, some drives especially
DVD drives need this to reset proberly.

Remove some verboseness..
2000-10-22 12:16:00 +00:00
Scott Long f38211c796 First attempt at timeouts for bio commands sent to the controller. No retry is
attempted right now; the failure is merely passed up.  This may help with the
mysterious lockups seen by some with Pablano controllers.
2000-10-22 09:21:19 +00:00
Warner Losh 869975bf96 Make usual 1-line cardbus support modification.
I'm committing this over an Intel PRO-100 CardBus II card.
2000-10-22 06:41:46 +00:00
Warner Losh bbfe025461 Cleanup the rman_make_alignment_flags function to be much clearer and shorter
than the prior version.
2000-10-22 04:48:11 +00:00
Warner Losh fe8d027cd8 o Remove lots of kludges with iospace and irq.
o Make sure that I/O space is aligned properly based on the length of the
  resource we're allocating.
o Add bootverbose message when we fail.
2000-10-22 04:46:56 +00:00
Warner Losh 283a983028 Cleanup allocation of resources for 16-bits. We now do the right
thing in pccbb bridge (the pcic bridge will be updated as I merge the
two copies of the code that were in the original cardbus commit).
2000-10-22 04:37:57 +00:00
Yoshihiro Takahashi 95dc2c3cae if_ed_cbus.c is required from PC-98 only, and if_ed_isa.c is not necessary
for PC-98.
2000-10-21 02:44:11 +00:00
Yoshihiro Takahashi 04b57749a0 Add '-DPC98' to CFLAGS if MACHINE == pc98. 2000-10-21 02:37:17 +00:00
Bosko Milekic ca43854a66 (Introduce something sitting in my repo for 3 weeks now...)
Have if_ti stop "hiding" the softc pointer in the buffer region. Rather,
use the available void * passed to the free routine and pass the softc
pointer through there.

To note: in MEXTADD(), TI_JUMBO_FRAMELEN should probably be TI_JLEN. I left it
unchanged, because this way I'm sure to not damage anything in this respect...
2000-10-21 00:13:35 +00:00
John Baldwin b67a3e6e85 Propogate the 'const'ness of mutex descriptions to the witness code to
quiet warnings.
2000-10-20 22:45:01 +00:00
John Baldwin bd4635599d Define the mtx_legal2block() macro used in the witness code that managed
to get lost during the MI mutex conversion.

Reported by:    Steve Kargl <sgk@troutmask.apl.washington.edu>
2000-10-20 22:44:06 +00:00
John Baldwin 32a48fa01c Revert the init_clocks change in revision 1.72. On the alpha we use an
ISA device for our clock, so trying to initialize the clock before probing
devices introduces a chicken and egg problem.

Debug help from:	peter
2000-10-20 22:12:16 +00:00
John Baldwin 78f0da0373 Actually enable the witness code if the WITNESS kernel option is enabled. 2000-10-20 21:58:11 +00:00
Warner Losh f40ed9c2e4 Allow interrupts to be sharable.
This allows us to probe, but not attach.
2000-10-20 20:29:59 +00:00
Warner Losh 4659a20822 Get the interrupt correct. 2000-10-20 20:27:22 +00:00
John Baldwin 9aea17a792 Fix a braino in the ASS_SIEN() macro in the MUTEX_DEBUG case by using
mtx_saveintr instead of saveintr.
2000-10-20 20:27:12 +00:00
John Baldwin f5271ebc2f Doh. Fix a 64-bit-ism by using uintptr_t for a temporary lock variable
instead of int.
2000-10-20 20:24:40 +00:00
John Baldwin 8a6149a3a3 Don't bother setting the saved IPL in the sched_lock mutex as it doesn't
really do anything since the first mtx_enter() will overwrite the value
saved here.
2000-10-20 20:14:55 +00:00
John Baldwin 8cc99fae9a Catch up to some of the changes to _getlock_spin_block. Specifically,
use _obtain_lock() instead of a manual atomic_cmpset_ptr.
2000-10-20 19:54:47 +00:00
John Baldwin bb352e20a2 Grrrr. Fix the order of the #define's so atomic_cmpset_{acq,rel}_long
are defined before atomic_cmpset_{acq,rel}_ptr tries to call them.
2000-10-20 19:53:52 +00:00
John Baldwin 6d02703c2f Fix the atomic_cmpset_{acq,rel}_ptr() functions to do proper type-casting. 2000-10-20 19:46:02 +00:00
Jonathan Chen 8d0e8723e1 remove old pccbb bridge code.
(argh, I thought I already did this in the original commmit)
2000-10-20 19:37:51 +00:00
Poul-Henning Kamp 1921a06d6a Introduce the M_ZERO flag to malloc(9)
Instead of:

        foo = malloc(sizeof(foo), M_WAIT);
        bzero(foo, sizeof(foo));

You can now (and please do) use:

        foo = malloc(sizeof(foo), M_WAIT | M_ZERO);

In the future this will enable us to do idle-time pre-zeroing of
malloc-space.
2000-10-20 17:54:55 +00:00
Archie Cobbs 69ad30ba3a Add actual URL for XMAC II datasheet in comments. 2000-10-20 16:18:16 +00:00
Andrey A. Chernov 6fdfeafd1b Add i815 host to PCI bridge ID 2000-10-20 16:05:47 +00:00
Andrey A. Chernov c07f6a2dd1 Return -10000 in pci_hostb_probe to allow agp driver (disabled otherwise) 2000-10-20 15:40:05 +00:00
Andrey A. Chernov da0f52e1ea Add i815 Host to Hub 2000-10-20 15:14:51 +00:00
Andrey A. Chernov 000fc03e87 Add i815 IDs 2000-10-20 15:12:57 +00:00
Ruslan Ermilov cc22c7a746 Save a few CPU cycles in IP fragmentation code. 2000-10-20 14:10:37 +00:00
Hellmuth Michaelis 1c2715d95d Submitted by: Hans Petter Selasky <hselasky@c2i.net>
Remove double 0x7e flags between hdlc-frames.
2000-10-20 11:20:58 +00:00
KATO Takenori 8de38d83a3 Used kbio.h and consio.h instead of machine/console.h. 2000-10-20 10:35:44 +00:00
KATO Takenori 5a262ebb43 Merged from sys/i386/isa/npx.c revision 1.86. 2000-10-20 10:20:27 +00:00
KATO Takenori 618028ff9f Merged from sys/i386/isa/clock.c revision 1.160. 2000-10-20 10:19:40 +00:00
KATO Takenori 6a8ef4f44f Merged from sys/i386/i386/machdep.c revisions 1.417 and 1.418. 2000-10-20 10:17:26 +00:00
Roger Hardiman b02fea74af Add missing 'unit' code
Submitted by:	Brad L. Chisholm <blc@bsdwins.com>
2000-10-20 08:16:53 +00:00
John Baldwin 35e0e5b311 Catch up to moving headers:
- machine/ipl.h -> sys/ipl.h
- machine/mutex.h -> sys/mutex.h
2000-10-20 07:58:15 +00:00