Commit graph

42400 commits

Author SHA1 Message Date
Poul-Henning Kamp 41cbb0b237 Don't use seltrue when that is not really what we mean. 2003-09-27 12:44:06 +00:00
Bruce Evans fa2e26c437 MFsio (sio.c 1.413: cleaned up and fixed setting of speeds in comparam()).
This is just a cleanup here (modulo rev.1.108 of kern/tty.c), since the
input speed can be different from to output speed and extra code to
handle both speeds naturally handled all cases.
2003-09-27 12:40:23 +00:00
Poul-Henning Kamp 25d6da1b5e forgot to remove static declaration of fdesc_poll() 2003-09-27 12:34:41 +00:00
Poul-Henning Kamp 36449dc48e Return ENOIOCTL for unknown ioctls, don't use noioctl to return ENODEV. 2003-09-27 12:27:23 +00:00
Poul-Henning Kamp f1cf3def78 fdesc_poll() called seltrue() to do the default thing, this is pointlessly
wrong when we have a default in vop_nopoll() which does the right thing.
2003-09-27 12:24:42 +00:00
Poul-Henning Kamp 04825a77a7 noopen() and noclose() is now no longer used. 2003-09-27 12:09:25 +00:00
Poul-Henning Kamp 4e5f06873f nopsize is no longer used. 2003-09-27 12:05:26 +00:00
Poul-Henning Kamp 70cd771337 The present defaults for the open and close for device drivers which
provide no methods does not make any sense, and is not used by any
driver.

It is a pretty hard to come up with even a theoretical concept of
a device driver which would always fail open and close with ENODEV.

Change the defaults to be nullopen() and nullclose() which simply
does nothing.

Remove explicit initializations to these from the drivers which
already used them.
2003-09-27 12:01:01 +00:00
Bruce Evans 5da172697f Cleaned up and fixed setting of speeds in comparam():
- Removed conversion of a zero input speed to the output speed.  This
  has been done better in ttioctl() since rev.1.108 of kern/tty.c
  almost 5 years ago.  comparam() did the conversion incompletely for
  the case where the output speed is also zero.  It had complications
  to avoid using zero speeds, but would still have used a zero input
  speed for setting watermarks if kern/tty.c had passed one.
- Never permit the input speed to be different from the output speed.
  There was no validity check on the input speed for the case of a zero
  output speed.  Then we didn't change the physical speeds, but we used
  the unvalidated input speed for setting watermarks and didn't return
  an error, so ttioctl() stored the unvalidated input speed in the tty
  struct where it could cause problems later.
- Removed complications that were to avoid using a divisor of 0.  The
  divisor is now always valid if the speed is accepted.
2003-09-27 11:13:59 +00:00
Bruce Evans 7872ac5542 Quick fix for bitrot in locking in the SMP case. cd_getreg() and
cd_setreg() were still using !(read_eflags() & PSL_I) as the condition
for the lock hidden by COM_LOCK() (if any) being held.  This worked
when spin mutexes and/or critical_enter() used hard interrupt disablement,
but it has caused recursion on the non-recursive mutex com_mtx since
all relevant interrupt disablement became soft.  The recursion is
harmless unless there are other bugs, but it breaks an invariant so
it is fatal if spinlocks are witnessed.
2003-09-27 10:30:03 +00:00
Max Khon 5192cc9469 Bump __FreeBSD_version for kiconv(3). 2003-09-27 09:16:18 +00:00
Poul-Henning Kamp 25ae11f8d4 Fix dev_t handling to avoid needless makedev() call. 2003-09-27 08:29:58 +00:00
Alan Cox 4487ff65db Addendum to the previous revision: If vm_page_alloc() for the page
table page fails, perform a VM_WAIT; update some comments in
_pmap_allocpte().
2003-09-27 05:44:53 +00:00
Bruce Evans 67425e4678 Fixed some style bugs in previous commit. Mainly, forward-declare
struct msdosfsmount so that this file has the same prerequisites as
it used to.  The new prerequistite was a meta-style bug.  It required
many style bugs (unsorted includes ...) elsewhere.

Formatted prototypes in KNF.  Resisted urge to sort all the prototypes,
to minimise differences with NetBSD.  (NetBSD has reformatted the
prototypes but has not sorted them and  still uses __P(()).)
2003-09-27 01:18:27 +00:00
Poul-Henning Kamp edafc5663e Fix compilation on alpha. 2003-09-26 21:36:01 +00:00
Nate Lawson 1d7b121ca4 Make debug.acpi.level and debug.acpi.layer sysctls that can be set with
the strings found in acpi(4).  Also make acpi_ca_version a string so it
is more readable.
2003-09-26 21:22:10 +00:00
Poul-Henning Kamp 3eb6ffdf43 Add more KASSERTS(). 2003-09-26 20:52:46 +00:00
Max Khon c4f02a891f - Support for multibyte charsets in LIBICONV.
- CD9660_ICONV, NTFS_ICONV and MSDOSFS_ICONV kernel options
(with corresponding modules).
- kiconv(3) for loadable charset conversion tables support.

Submitted by:	Ryuichiro Imura <imura@ryu16.org>
2003-09-26 20:26:25 +00:00
Poul-Henning Kamp 3f99f14bf1 OK, I messed up /dev/console with what I had hoped would be compat
code.  Convert remaining console drivers and hope for the best.
2003-09-26 19:35:50 +00:00
Poul-Henning Kamp c9f007b685 Convert to cn_name rather than cn_dev. 2003-09-26 18:57:34 +00:00
Marcel Moolenaar 12d984b608 Catch up with the console interface change: the use of makedev() has
been abandoned in favor of a (device) name-based approach.

Submitted by: phk
Tested on: alpha
2003-09-26 18:10:30 +00:00
Sam Leffler 303ebc3c87 Try yet again to deal with timing out nodes. We cannot hold the
node lock while sending a management frame as this will potentially
result in a LOR with a driver lock.  This doesn't happen for the
Atheros driver but does for the wi driver.  Use a generation number
to help process each node once when scanning the node table and
drop the node lock if we need to timeout a node and send a frame.
2003-09-26 17:00:44 +00:00
Sam Leffler ef39d4be37 Correct rate set negotiation when operating as a station: if the
AP has basic rates that we do not support then ignore them instead
of marking the rate set in error.

This fixes an 11b station associating with an 11g/b AP.
2003-09-26 16:54:55 +00:00
Sam Leffler 37c150c4a6 allocate node table entries with a specific malloc type 2003-09-26 16:52:12 +00:00
Sam Leffler 13604e6bad correct spelling of IEEE80211_IOC_RTSTHRESHOLD 2003-09-26 16:48:39 +00:00
Poul-Henning Kamp f9b9ae4dd1 Remove code previously under #ifdef ASR_VERY_BROKEN
Ok'ed by:	scottl
2003-09-26 15:56:42 +00:00
Scott Long 50e2aaa00c Update email addresses, copyrights, and tweak the management interface.
Submitted by: "Leubner, Achim" <Achim_Leubner@adaptec.com>
2003-09-26 15:36:47 +00:00
Robert Drehmel 4cc9f52f78 Move some tracing related code into its own function as it will
be needed for system call related ptrace functionality I plan
to commit soon.
2003-09-26 15:09:46 +00:00
Poul-Henning Kamp 405f776c83 Typo in last commit: missing ')' 2003-09-26 12:13:35 +00:00
Tim J. Robbins aa808a7fa6 Allow the [, ], and = characters in non-8.3 filenames since they
are allowed by Windows (ref: MS KB article 120138).

XXX From my reading of the CIFS specification, it's not clear that
clients need to validate filenames at all.

PR:		57123
Submitted by:	Paul Coucher
MFC after:	1 month
2003-09-26 12:11:08 +00:00
Bruce Evans 3a6a55a60b Use the correct speed in the delay for the transmission of a character
in the loopback test in the probe.  The delay was too short for consoles
at speeds lower than about 3200 bps.  This shouldn't have caused many
problems, since such low speeds are rare and the probe is forced to
succeed for consoles.
2003-09-26 11:36:09 +00:00
Poul-Henning Kamp 2f06c3e7f2 Initialize the cn_name instead of the cn_dev 2003-09-26 10:55:07 +00:00
Poul-Henning Kamp d31593c1a5 Initialize cn_name instead of cn_dev 2003-09-26 10:53:29 +00:00
Poul-Henning Kamp 4866f95d76 Change fb_attach() and fb_detach() to take a integer unit number rather
than a dev_t.

All of the dev_t's passed were bogusly created with makedev()
2003-09-26 10:41:44 +00:00
Poul-Henning Kamp 26b0e90ca2 Set cn_name, not cn_dev 2003-09-26 10:37:16 +00:00
Poul-Henning Kamp 3d4274a52b Update the list of CDROM device names to try for booting with RB_CDROM
flag set.
2003-09-26 09:07:27 +00:00
Poul-Henning Kamp ff2cf8a51d Eliminate bogus use of makedev(): rather than synthesize the dev_t, use
our already cached copy.
2003-09-26 09:05:57 +00:00
Peter Grehan 02b63ceaff DELAY must be a routine, not a macro definition. 2003-09-26 09:02:24 +00:00
Poul-Henning Kamp 3623186cbc Initialize cn_name, ignore cn_dev. 2003-09-26 08:51:54 +00:00
Poul-Henning Kamp c5c8f9652b Adhere to the new console API:
Initialize cn_name
   Use cn_unit for internal housekeeping.
   Forget about cn_dev.
2003-09-26 07:29:34 +00:00
Poul-Henning Kamp 0d44087987 Remove wrongly sized cnd_name field, we now store the name in the
consdev structure.

If the consdev name is not set and we have a cn_dev, set the name
from there.  Try to issue a printf about this, even though it may
not have a place to go.

Modify the sysctl related code to pick up the name from the consdev
instead.
2003-09-26 07:26:54 +00:00
Poul-Henning Kamp d6cfdd73bb Add a cn_unit and cn_name field to the consdev structure.
Most of the actual use of the cn_dev field is merely to get the name,
and most of the actual initializations are bogusly using makedev()
because the probe/attach has not been completed.

Instead we will migrate console drivers to fill in the name and if
the driver needs it: the unit number, thereby avoiding the bogus
calls to makedev().
2003-09-26 07:22:37 +00:00
Nate Lawson 656b9dd5c3 Consistently print attach messages. 2003-09-26 05:24:55 +00:00
Marcel Moolenaar 875f70dba4 Revert the introduction of iobase in struct uart_bas. Both the SAB82532
and the Z8530 drivers used the I/O address as a quick and dirty way to
determine which channel they operated on, but formalizing this by
introducing iobase is not a solution. How for example would a driver
know which channel it controls for a multi-channel UART that only has a
single I/O range?

Instead, add an explicit field, called chan, to struct uart_bas that
holds the channel within a device, or 0 otherwise. The chan field is
initialized both by the system device probing (i.e. a system console)
or it is passed down to uart_bus_probe() by any of the bus front-ends.
As such, it impacts all platforms and bus drivers and makes it a rather
large commit.

Remove the use of iobase in uart_cpu_eqres() for pc98. It is expected
that platforms have the capability to compare tag and handle pairs for
equality; as to determine whether two pairs access the same device or
not. The use of iobase for pc98 makes it impossible to formalize this
and turn it into a real newbus function later. This commit reverts
uart_cpu_eqres() for pc98 to an unimplemented function. It has to be
reimplemented using only the tag and handle fields in struct uart_bas.

Rewrite the SAB82532 and Z8530 drivers to use the chan field in struct
uart_bas. Remove the IS_CHANNEL_A and IS_CHANNEL_B macros. We don't
need to abstract anything anymore.

Discussed with: nyan
Tested on: i386, ia64, sparc64
2003-09-26 05:14:56 +00:00
Marcel Moolenaar 153bbe3e6a Make the port number available to the sub-device with PUC_IVAR_PORT. 2003-09-26 04:44:55 +00:00
Nate Lawson 297835bcd5 Sort debugging levels and update the man page to match reality. Also
update man page to reflect iasl(8) import.
2003-09-26 04:32:40 +00:00
Alan Cox d2a81cdbed MFi386
Allocate the page table directory page as "no object" pages.
2003-09-26 04:12:41 +00:00
Scott Long ba079c0d9f aic79xx_pci.c:
aic7xxx_pci.c:
	When performing our register test, be careful
	to avoid resetting the chip when pausing the
	controller.  The test reads the HCNTRL register
	and then writes it back with the PAUSE bit
	explicitly set.  If the last write to the controller
	before our probe is to reset it, the CHIPRST
	bit will still be set, so we must mask it off
	before the PAUSE operation.  On some chip versions,
	we cannot access registers for a few 100us after
	a reset, so this inadvertant reset was causing PCI
	errors to occur on the read to check for paused
	status.

Submitted by:	gibbs
2003-09-25 23:36:41 +00:00
Sam Leffler 28cfb8fc84 indicate PFIL_HOOKS is now required by IPFILTER; it used to automagically
be defined in net/pfil.h
2003-09-25 16:06:17 +00:00
Hajimu UMEMOTO 5c6ebad8f6 add /*CONSTCOND*/ to reduce diffs against latest KAME.
Obtained from:	KAME
2003-09-25 13:40:06 +00:00