Commit Graph

44739 Commits

Author SHA1 Message Date
Maxim Sobolev
e13f9ac88b Regen after rev. 1.161 of usbdevs. 2004-01-24 21:24:36 +00:00
Maxim Sobolev
0bc4abec87 Add support for Crystalfontz CFA-631 USB LCD (uftdi(4) driver).
For some very unclear reason this device contains a FTDI 8U232AM USB->COM
adapter, but reports different device id than original 8U232AM. At the same
time, it reports vendor id of FTDI.

Sponsored by:	Porta Software Ltd
MFC after:	2 weeks
2004-01-24 21:23:12 +00:00
Maxim Sobolev
983a9b60e6 - Move performance-controlling sysctls into hw.p4tcc.* tree;
Suggested by:   nate

- get rid of "magick" values in code and make sysctl's reflecting reality
  on processor versions which have one or another frequency "forbidden"
  due to errata.

MFC after:      2 weeks
2004-01-24 21:13:13 +00:00
Maxim Sobolev
82b95ace07 - Move performance-controlling sysctls into hw.p4tcc.* tree;
Suggested by:   nate

- get rid of "magick" values in code and make sysctl's reflecting reality
  on processor versions which have one or another frequency "forbidden"
  due to errata.

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:      2 weeks
2004-01-24 21:13:12 +00:00
Jeff Roberson
b9509b56fa - Move smp_topology to subr_smp.c so that it is defined on all architectures. 2004-01-24 19:52:48 +00:00
Jacques Vidrine
5864cda7c6 Add PFIL_HOOKS to the GENERIC kernel configuration, primarily so
that one can load the IPFilter module (which requires PFIL_HOOKS).

Requested by:	Many, for over a year
2004-01-24 14:59:51 +00:00
Tim J. Robbins
3215f33192 Copy workaround from FFS: open device for write access even if
the user requests a read-only mount. This is necessary because we
don't do the VOP_OPEN again if they upgrade a read-only mount to
read-write.

Noticed by:	bde
2004-01-24 08:43:06 +00:00
MIHIRA Sanpei Yoshiro
7d825ee7ff Sync to 1.160 of usbdevs 2004-01-24 07:15:23 +00:00
MIHIRA Sanpei Yoshiro
21c5b9f9e5 Add Support
- 2nd type of GL641USB USB-IDE bridge	[1]
	- Plextor Plexwriter 40/12/40U		[2]

PR:		kern/61671	[1]
		kern/61803	[2]
Submitted by:	Ralf Wenk <RZ-FreeBSD0401@fh-karlsruhe.de>	[1]
		Feisal Mohammed <feisal@uwi.tt>			[2]
MFC after:	1 week
2004-01-24 07:14:07 +00:00
Bill Paul
6f56639b42 Add missing newlines to some device_printf()s.
Don't do anything in ndis_get_assoc() if the link isn't up (avoids
spurrious "couldn't get bssid" messages on the console).
2004-01-24 02:48:22 +00:00
Matt Jacob
e23df011da If we have ISP_ROLE_INITIATOR set, make sure that we clear ICBOPT_INI_DISABLE
from the fwoptions. Likewise, we *set* ICBOPT_INI_DISABLE if we don't have
initiator role.
2004-01-23 23:23:31 +00:00
Matt Jacob
520b6299ac add MAKE_WWN_FROM_NODE_NAME macro 2004-01-23 23:22:35 +00:00
Matt Jacob
a556b68e3a Add firmware major, minor and micro revsions to the ISP_FC_GETHINFO ioctl
structure.
2004-01-23 23:22:11 +00:00
Poul-Henning Kamp
57ab2e0468 Make sure to keep track of canceled events.
Submitted by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2004-01-23 21:09:38 +00:00
Robert Watson
646e29ccac Don't grab Giant in crfree(), since prison_free() no longer requires it.
The uidinfo code appears to be MPSAFE, and is referenced without Giant
elsewhere.  While this grab of Giant was only made in fairly rare
circumstances (actually GC'ing on refcount==0), grabbing Giant here
potentially introduces lock order issues with any locks held by the
caller.  So this probably won't help performance much unless you change
credentials a lot in an application, and leave a lot of file descriptors
and cached credentials around.  However, it simplifies locking down
consumers of the credential interfaces.

Bumped into by:	sam
Appeased:	tjr
2004-01-23 21:07:52 +00:00
Poul-Henning Kamp
799426f877 Add KASSERTS.
Submitted by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2004-01-23 21:02:49 +00:00
Robert Watson
b3059e09f6 Defer the vrele() on a jail's root vnode reference from prison_free()
to a new prison_complete() task run by a task queue.  This removes
a requirement for grabbing Giant in crfree().  Embed the 'struct task'
in 'struct prison' so that we don't have to allocate memory from
prison_free() (which means we also defer the FREE()).

With this change, I believe grabbing Giant from crfree() can now be
removed, but need to check the uidinfo code paths.

To avoid header pollution, move the definition of 'struct task'
to _task.h, and recursively include from taskqueue.h and jail.h; much
preferably to all files including jail.h picking up a requirement to
include taskqueue.h.

Bumped into by:	sam
Reviewed by:	bde, tjr
2004-01-23 20:44:26 +00:00
Poul-Henning Kamp
f5b3481451 Plug an insignificant memoryleak.
Submitted by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2004-01-23 20:40:25 +00:00
Poul-Henning Kamp
752e0f0196 Add missing newline in printf.
Submitted by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2004-01-23 20:36:21 +00:00
Philip Paeps
e609fbdbc7 Add missing options from pcvt_conf.h to options.i386. This
allows the kernel build to survive config when these options
are specified in the config file.

Reviewed by:	hm
Approved by:	njl (mentor)
2004-01-23 20:30:52 +00:00
Hidetoshi Shimokawa
1398a889e6 * fwohci_pci.c
Improve error message for attach failure.

* sbp_targ.c
	- Add speed in struct sbp_targ_login.
	- Remove unnecessary htonl().
2004-01-23 17:37:09 +00:00
Mathew Kanner
3c6b655dff Sync with DFBSD v.1.16. Add new codecs IDs, fix some spelling.
Approved by:    des (interim mentor)
2004-01-23 16:38:54 +00:00
Ruslan Ermilov
12b8b80e45 Don't panic if there are more than 255 interfaces in the system. 2004-01-23 15:53:23 +00:00
Ruslan Ermilov
d2030b65a6 Allow the socket buffer sizes to be controlled via sysctl(8).
MFC after:	3 days
2004-01-23 14:35:44 +00:00
Poul-Henning Kamp
bbf53bc053 Remove the MD5_KEY debugging tool 2004-01-23 11:47:06 +00:00
Poul-Henning Kamp
8cae62eee9 Remove no longer necessary debug printfs 2004-01-23 10:56:16 +00:00
Søren Schmidt
17cafb29a0 Fix breakage in PIO multisector support. 2004-01-23 10:38:56 +00:00
Andrey A. Chernov
51cf017614 Copy comment about caller check from ffs_read to ffs_extread, don't
check for uio_resid < 0 here too.
2004-01-23 06:00:41 +00:00
Andrey A. Chernov
070f8eefb1 Fix various panic() strings to reflect true function name to allow
easy grep.
Small code reorganization to look more logic.
Copy ffs_write check from prev. commit to ffs_extwrite.
2004-01-23 05:52:31 +00:00
Andrey A. Chernov
bd0cc17757 ffs_read:
Replace wrong check returned EFBIG with EOVERFLOW handling from POSIX:

36708 [EOVERFLOW] The file is a regular file, nbyte is greater than 0, the
starting position is before the end-of-file, and the starting position is
greater than or equal to the offset maximum established in the open file
description associated with fildes.

ffs_write:
Replace u_int64_t cast with uoff_t cast which is more natural for types
used.

ffs_write & ffs_read:
Remove uio_offset and uio_resid checks for negative values, the caller
supposed to do it already. Add comments about it.

Reviewed by:    bde
2004-01-23 05:38:02 +00:00
Andre Oppermann
241f1e33b1 Remove leftover FREE() from changes in rev 1.50.
Noticed by:	Jun Kuriyama <kuriyama@imgsrc.co.jp>
2004-01-23 01:39:12 +00:00
Peter Wemm
ccaa41bc2c Unbreak amd64: Rename calls from panic to __panic 2004-01-23 01:04:28 +00:00
Andre Oppermann
201d185b69 Split the overloaded variable 'win' into two for their specific purposes:
recwin and sendwin.  This removes a big source of confusion and makes
following the code much easier.

Reviewed by:	sam (mentor)
Obtained from:	DragonFlyBSD rev 1.6 (hsu)
2004-01-22 23:22:14 +00:00
Andre Oppermann
1ddba8d63e Move the reduction by one of the syncache limit after the zone has been
allocated.

Reviewed by:    sam (mentor)
Obtained from:  DragonFlyBSD rev 1.6 (hsu)
2004-01-22 23:14:48 +00:00
Andre Oppermann
73080de2be Remove an unused variable and put the sockaddr_in6 onto the stack instead
of malloc'ing it.

Reviewed by:	sam (mentor)
Obtained from:	DragonFlyBSD rev 1.6 (hsu)
2004-01-22 23:10:11 +00:00
Poul-Henning Kamp
ee57aeea65 Write 100 times for tomorrow:
"Always print time_t as %jd, you never know what width it has"
2004-01-22 19:50:06 +00:00
John Baldwin
acf7d97237 Fix the PCI attach routine to properly setup the IRQ and port resource
rid's and to deallocate resources if a failure occurs during attach.  This
patch also fixes the driver to return failure if bus_alloc_resource() for
the IRQ fails rather than panic'ing on the next line by passing a NULL
resource to bus_setup_intr().  The other attachments already do all this.

Submitted by:	Jun Su <csujun@263.net>
2004-01-22 16:07:03 +00:00
Hidetoshi Shimokawa
4c790222f6 Add missing free() in exception handlers.
Reported by:    Stanford Metacompilation research group
2004-01-22 14:41:17 +00:00
Ralf S. Engelschall
446655ac4f Fix generation of random multicast MAC address.
In case no real/physical IEEE 802 address is available, both the expired
"draft-leach-uuids-guids-01" (section "4. Node IDs when no IEEE 802
network card is available") and RFC 2518 (section "6.4.1 Node Field
Generation Without the IEEE 802 Address") recommend (quoted from RFC
2518):

  "The ideal solution is to obtain a 47 bit cryptographic quality random
  number, and use it as the low 47 bits of the node ID, with the _most_
  significant bit of the first octet of the node ID set to 1. This bit
  is the unicast/multicast bit, which will never be set in IEEE 802
  addresses obtained from network cards; hence, there can never be a
  conflict between UUIDs generated by machines with and without network
  cards."

Unfortunately, this incorrectly explains how to implement this and
the FreeBSD UUID generator code inherited this generation bug from
the broken reference code in the standards draft. They should instead
specify the "_least_ significant bit of the first octet of the node ID"
as the multicast bit in a memory and hexadecimal string representation
of a 48-bit IEEE 802 MAC address.

This standards bug arised from a false interpretation, as the multicast
bit is actually the _most_ significant bit in IEEE 802.3 (Ethernet)
_transmission order_ of an IEEE 802 MAC address. The standards authors
forgot that the bitwise order of an _octet_ from a MAC address _memory_
and hexadecimal string representation is still always from left (MSB,
bit 7) to right (LSB, bit 0).

Fortunately, this UUID generation bug could have occurred on systems
without any Ethernet NICs only.
2004-01-22 13:34:11 +00:00
Ruslan Ermilov
95d9bfd8d6 Only enforce -fno-strict-aliasing for optimization levels that
imply -fstrict-aliasing.

Reviewed by:	bde
2004-01-22 10:01:47 +00:00
Peter Grehan
53cd4099fb Make proc's kg_nice/ki_nice explicitly signed for PPC. This is a
no-op on {i386/alpha/ia64/sparc64} where chars are signed by
default. Should help ARM and S390 which also suffer from this.

Tested on: ppc, i386, objdump disasm before/after diffs
Reviewed by: obrien, bde (a while back)
2004-01-22 06:56:00 +00:00
Atsushi Onoe
c66380c122 Fix definition of IFM_MODE, which should be refrected the change of
IFM_IEEE80211_ mode.  Also ifconfig(8) must be recompiled.
Pointed out by Sam Leffeler.
2004-01-22 03:23:28 +00:00
Bill Paul
a6ef105236 Add suspend and resume methods. I'm not certain this work correctly
since I can't easily test them on my laptop right now, but they
should do the right thing.
2004-01-22 03:00:59 +00:00
Bill Paul
d74c903a6f Add support for TCP/IP checksum offload.
No, really.
2004-01-22 02:36:34 +00:00
John Baldwin
4939882522 If a transfer to or from a floppy disk crosses a 64k boundary, we have to
use a bounce buffer for the actual transfer to avoid crossing a 64k
boundary.  To do this, we malloc a buffer twice as big as we need and then
find an aligned block within that buffer to do the transfer.  The check
to see which part of the block we use used the wrong variable for part of
the condition meaning that in certain edge cases we would ask the BIOS to
cross a 64k boundary.  The BIOS request would then fail resulting in file
transfers that just magically fail in the middle without any apparent
reason.  Specifically, my tests for the splitfs boot floppies managed to
trigger this edge case.

MFC after:	1 week
X-MFC-info:	along with fixes to libstand filesystems
2004-01-21 23:22:29 +00:00
Bill Paul
94215c94fe Fix multicast and promiscuous mode handling for Yukon devices.
Submitted by:	Jung-uk Kim <jkim@niksun.com>
2004-01-21 22:32:15 +00:00
Bill Paul
9afca9391c Calculate the right register offset when clearing TX buffer pointer
registers in rl_stop().

PR:		kern/60250
2004-01-21 22:29:51 +00:00
Bill Paul
71a14876e1 Add structures and definitions for task offload (TCP/IP checksum,
IPSec, TCP large send).
2004-01-21 21:09:09 +00:00
Poul-Henning Kamp
4e74721cac Add a sysctl (default: off) which enables a log(LOG_INFO...) warning
if the clock is stepped.
2004-01-21 21:05:40 +00:00
Poul-Henning Kamp
58d120f6d3 Simplify timing gymnastics a bit. 2004-01-21 19:20:57 +00:00
Bill Paul
dda13ca0ef Make sure to trap failures correctly in ndis_get_info() and ndis_set_info(). 2004-01-21 19:14:52 +00:00
Poul-Henning Kamp
d1bab139fe Remove #ifdef for ancient source FreeBSD compat. 2004-01-21 19:02:02 +00:00
Brooks Davis
b5897e3235 Don't leak softc's when destroying interfaces.
Init the softc list when loaded.

Noticed by:	Maurycy Pawlowski-Wieronski <maurycy at fouk dot org>
2004-01-21 18:05:38 +00:00
Colin Percival
9d0be84912 Fix style(9) of my previous commit.
Noticed by: nate
Approved by: nate, rwatson (mentor)
2004-01-21 18:03:54 +00:00
Robert Watson
679365e7b9 Reduce gratuitous includes: don't include jail.h if it's not needed.
Presumably, at some point, you had to include jail.h if you included
proc.h, but that is no longer required.

Result of:	self injury involving adding something to struct prison
2004-01-21 17:10:47 +00:00
Colin Percival
9f8ef8b8d1 Allow devfs path rules to work on directories. Without this fix,
devfs rule add path fd unhide
is a no-op, while it should unhide the fd subdirectory.

Approved by: phk, rwatson (mentor)
PR: kern/60897
2004-01-21 16:43:29 +00:00
Yoshihiro Takahashi
0461cbf76e MFi386: revisions from 1.1116 to 1.1119.
Remove NEWCARD related devices.
2004-01-21 16:28:19 +00:00
Yoshihiro Takahashi
9ce630976e Merged from sys/dev/sio/sio.c revision 1.418. 2004-01-21 16:12:29 +00:00
Hajimu UMEMOTO
7a2e32cbe3 Sync to pccarddevs 1.81. 2004-01-21 16:03:40 +00:00
Hajimu UMEMOTO
a950ec6208 There is PANASONIC KXLC005 which has another product id. 2004-01-21 16:02:20 +00:00
Olivier Houchard
cf45d5da77 Setting pccb->ccb_h.status to CAM_REQ_CMP one time is enough. 2004-01-21 10:49:42 +00:00
Ruslan Ermilov
c7301f9132 The gdbinit.${MACHINE_ARCH} script may not exist. 2004-01-21 08:23:46 +00:00
Peter Grehan
e878e0085f Add syscons options and enable USB, since there is no conflict between
the OpenFirmware console and the syscons console when using a USB
keyboard.
2004-01-21 05:22:53 +00:00
Peter Grehan
e723eedf01 Add required GFB options as well as one for ofw/syscons. 2004-01-21 05:20:58 +00:00
Peter Grehan
473795dcdf Add syscons files, and also generate a syscons font since Apple
SVGA adapters don't have one available in their ROMs.
2004-01-21 05:19:59 +00:00
Peter Grehan
e976ea5a89 - Catch up with panic __LINE__/__FILE__ changes by moving panic calls
out of asm.
- remove some long-dead code from machdep.c
2004-01-21 05:18:08 +00:00
Peter Grehan
462ded3729 A syscons implementation using the 8-bit framebuffer set up by
OpenFirmware. Not at all optimized, but provides a PC-style
user-experience.

Tested on revA imac, B&W G3, 2k iBook, and G4 eMac.
2004-01-21 05:16:23 +00:00
Peter Grehan
a2dce78a84 __powerpc__ conditional code for the syscons OpenFirmware/PPC framebuffer.
Took the opportunity to reduce

 __i386__ || __ia64__ || __amd64__ || __sparc64__ || __powerpc__

 to

 !__alpha__

reviewed by: gallatin
2004-01-21 05:08:51 +00:00
Peter Grehan
feb43b1c96 Update 128-bit long double constants to match what is expected
by libc
2004-01-21 04:56:39 +00:00
Sam Leffler
b5b47bc6fa Fix ipip_output() to always set *mp to NULL on failure, even if 'm'
is NULL, otherwise ipsec4_process_packet() may try to m_freem() a
bad pointer.

In ipsec4_process_packet(), don't try to m_freem() 'm' twice; ipip_output()
already did it.

Obtained from:	netbsd
2004-01-20 22:45:10 +00:00
Sam Leffler
c58cde95d1 fix build after KAME changes 2004-01-20 22:44:21 +00:00
Jeffrey Hsu
61a36e3dfc Merge from DragonFlyBSD rev 1.10:
date: 2003/09/02 10:04:47;  author: hsu;  state: Exp;  lines: +5 -6
Account for when Limited Transmit is not congestion window limited.

Obtained from:	DragonFlyBSD
2004-01-20 21:40:25 +00:00
John Baldwin
1aa9b61068 Use getenv_int() rather than reimplementing it. 2004-01-20 21:38:48 +00:00
Robert Watson
be05719004 Pay attention to mac_portacl_enabled.
Submitted by:   simon
2004-01-20 18:33:02 +00:00
Søren Schmidt
8a1bddb753 Update the support for the VIA 8237 southbridge. 2004-01-20 16:51:02 +00:00
Bill Paul
67e272e2b8 Correct instances of mtx_lock()/mtx_unlock() that should have been
mtx_pool_lock()/mtx_pool_unlock().
2004-01-20 08:19:42 +00:00
Mathew Kanner
222d2384ef Reduce latency when using the SNDCTL_DSP_RESET ioctl by calling
chn_resetbuf().

Submited by:	Pyun YongHyeon <yongari@kt-is.co.kr>
Approved by:	tanimura (mentor)
2004-01-20 05:30:09 +00:00
David E. O'Brien
556c5b97ea Fix sort misordering. 2004-01-20 04:37:07 +00:00
Mathew Kanner
5ee30e277a Fix a panic when kldloading a sound driver. Do this by replacing the
link-list of dev_t's with named variables.  Remove used code.

Approved by:		tanimura (mentor)
2004-01-20 03:58:57 +00:00
Marcel Moolenaar
28466ae036 Fix handling of FP traps:
o  For traps, the cr.iip register points to the next instruction to
   execute on interrupt return (modulo slot). Since we need to get
   the bundle of the instruction that caused the FP fault/trap, make
   sure we fetch the previous bundle if the next instruction is in
   fact the first in a bundle.
o  When we call the FPSWA handler, we need to tell it whether it's
   a trap or a fault (first argument). This was hardcoded to mean a
   fault.

Also, for FP faults, when a fault is converted to a trap, adjust the
cr.iip and cr.ipsr registers to point to the next instruction. This
makes sure that the SIGFPE handler gets a consistent state.
2004-01-20 03:29:24 +00:00
Marcel Moolenaar
dd45fd9791 s/framep/tf/g -- this normalizes on the use of tf to point to the
trapframe and improves grep-ability.
2004-01-20 02:35:46 +00:00
Andrey A. Chernov
9bbee25931 pread/pwrite:
follow lseek spirit - return EINVAL on negative offset for non-VCHR
2004-01-20 01:27:42 +00:00
Poul-Henning Kamp
50d23be140 Add linenumber and source filename to panic(9) output.
Ideally a traceback should be printed too, any takers ?
2004-01-19 21:27:11 +00:00
Alexander Kabaev
54556cc7b8 One more instance of magic number used in place of IO_SEQSHIFT.
Submitted by:	alc
2004-01-19 20:45:43 +00:00
Bill Paul
40e22f3c3f Add WDM major/minor #defines. 2004-01-19 20:45:27 +00:00
Alexander Kabaev
6bd39fe978 Spell magic '16' number as IO_SEQSHIFT. 2004-01-19 20:03:43 +00:00
Bill Paul
4f7a266b2f Implement IofCompleteRequest() and IoIsWdmVersionAvailable().
Correct IofCallDriver(): it's fastcall, not stdcall.
Add vector to vsprintf().
2004-01-19 19:57:00 +00:00
Bill Paul
259c9c6054 Implement atoi() and atol(). Some drivers appear to need these. Note
that like most C library routines, these appear to be _cdecl in Windows.
2004-01-19 19:21:25 +00:00
Bill Paul
35f5524920 Eliminate some code duplication: since ndis_runq() and ndis_intq() were
basically the same function, compact them into a single loop which can
be used for both threads.
2004-01-19 18:56:31 +00:00
Søren Schmidt
cedc7194d5 Fix breakage on timeout/retries. The bug cause a sema to be leaked so
that the calling process would newer wakeup.
2004-01-19 15:20:00 +00:00
Ruslan Ermilov
d8239e2877 Removed custom "load" and "unload" targets.
Removed "deinstall" targets -- the idea is to provide the standard
"deinstall" target.
2004-01-19 14:00:26 +00:00
MIHIRA Sanpei Yoshiro
146dec80e1 Sync to 1.159 of usbdevs 2004-01-19 12:53:23 +00:00
MIHIRA Sanpei Yoshiro
cf73864749 Add support IO-data DVD Multi-plus unit iU-CD2
PR:		kern/61578
Submitted by:	Masaharu FUJITA <m@fjts.org>
MFC after:	1 week
2004-01-19 12:51:40 +00:00
Ruslan Ermilov
9cf7b16038 Normalize SUBDIR. 2004-01-19 12:36:08 +00:00
Bill Paul
f98f50fcfd Properly program the multicast filter in ndis_setmulti(),
and fix promisc mode in ndis_ioctl().
2004-01-19 07:03:46 +00:00
Atsushi Onoe
e249fdbedb Change WI_RID_SCAN_RES compatibility interface to return the result after
active scan is completed just as WI_RID_READ_APS.
This fixes wicontrol -L for ath(4) and awi(4) to have results even if
the driver cannot associate any APs.
2004-01-19 05:25:43 +00:00
Bruce Evans
389ed6f873 Fixed misplacement and bitrot in the cy driver's configuration in
rev.1.1040.  It is a miscellaneous isa+pci driver, but came back
described as a pci-only driver and placed in an i4b pci subsection
after its migration to /sys/conf/NOTES.  Put it back where it used to
be, fully unsorted in the `Miscellaneous hardware' section.  Reduced
nearby disorder in this section by moving configuration of the digi
driver to where it was for the old digiboard drivers, so that the
order at least matches the order in the table of contents.
2004-01-19 02:18:34 +00:00
Bruce Evans
1d34d1e618 Removed some garbage comments:
- references to removed math emulators for NPX_DEBUG
- header for the null set of mandatory devices
- reference to the removed (and bogus when it existed) sysctl
  kern.timecounter.method.
2004-01-19 01:44:06 +00:00
Bruce Evans
645267ebdc Fixed formatting of sentence breaks. Use 2 spaces for all of them instead
of for about 3/4 of them.
2004-01-19 01:26:59 +00:00
Bruce Evans
b0d6888131 FIxed unsorting in previous commit (description of CPU_ENABLE_TCC).
FIxed some nearby disorder (descriptions of CPU_BLUELIGHTNING_3X,
CPU_DIRECT_MAPPED_CACHE, CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE,
CPU_ELAN_XTAL and CPU_SOEKRIS, and options for all of these except
CPU_DIRECT_MAPPED_CACHE).
2004-01-19 01:07:18 +00:00
Bill Paul
ed880bb60f Convert from using taskqueue_swi to using private kernel threads. The
problem with using taskqueue_swi is that some of the things we defer
into threads might block for up to several seconds. This is an unfriendly
thing to do to taskqueue_swi, since it is assumed the taskqueue threads
will execute fairly quickly once a task is submitted. Reorganized the
locking in if_ndis.c in the process.

Cleaned up ndis_write_cfg() and ndis_decode_parm() a little.
2004-01-18 22:57:11 +00:00
Maxim Sobolev
4168deefd6 Add new CPU_ENABLE_TCC option, from NOTES:
CPU_ENABLE_TCC enables Thermal Control Circuitry (TCC) found in some
Pentium(tm) 4 and (possibly) later CPUs. When enabled and detected,
TCC allows to restrict power consumption by using machdep.cpuperf*
sysctls. This operates independently of SpeedStep and is useful on
systems where other mechanisms such as apm(4) or acpi(4) don't work.

Given the fact that many, even modern, notebooks don't work properly
with Intel ACPI, this is indeed very useful option for notebook owners.

Obtained from:  OpenBSD
MFC after:      2 weeks
2004-01-18 21:18:00 +00:00
Maxim Sobolev
e7846ad79e Add new CPU_ENABLE_TCC option, from NOTES:
CPU_ENABLE_TCC enables Thermal Control Circuitry (TCC) found in some
Pentium(tm) 4 and (possibly) later CPUs. When enabled and detected,
TCC allows to restrict power consumption by using machdep.cpuperf*
sysctls. This operates independently of SpeedStep and is useful on
systems where other mechanisms such as apm(4) or acpi(4) don't work.

Given the fact that many, even modern, notebooks don't work properly
with Intel ACPI, this is indeed very useful option for notebook owners.

Obtained from:	OpenBSD
MFC after:	2 weeks
2004-01-18 21:06:56 +00:00
Yaroslav Tykhiy
a4e16ddd8d A network interface driver can support IFCAP_VLAN_MTU only,
without IFCAP_VLAN_HWTAGGING.  The previous version of the
leading comment in this file could lead to the opposite conclusion.

Fix some typos in the comment as well.
2004-01-18 19:29:04 +00:00
Ruslan Ermilov
7287c40c0d Fixed a memory leak.
Reported by:	Stanford Metacompilation research group
Reviewed by:	scottl
2004-01-18 17:34:11 +00:00
Ruslan Ermilov
bbc712e6ba Fixed a memory leak. 2004-01-18 17:21:15 +00:00
Ruslan Ermilov
4c7ca6e54c Fixed a memory leak.
Reported by:	Stanford Metacompilation research group
2004-01-18 16:55:01 +00:00
Søren Schmidt
61016883ad Fix botch in last commit. 2004-01-18 15:58:30 +00:00
Ruslan Ermilov
0541040c46 Since "m" is not part of the "mp" chain, need to free() it.
Reported by:	Stanford Metacompilation research group
2004-01-18 14:02:53 +00:00
Ruslan Ermilov
ebbdb48fe6 Apparently there's a good reason why M_WAITOK malloc() is done before
xpt_create_path().
2004-01-18 13:09:38 +00:00
Ruslan Ermilov
85e17c603d Fixed a memory leak.
Reported by:	Stanford Metacompilation research group
2004-01-18 12:49:36 +00:00
MIHIRA Sanpei Yoshiro
edac5229ae Empty vendor string overrides knowndevs
ubd_devinfo_vp() is getting an empty string from its  usbd_get_string()
call on the vendor, instead of NULL.  This means usb_knowndevs in not
consulted.

Add lines between grabbing those char *s and the USBVERBOSE ifdef to
set vendor to NULL if it is the empty string (similarly for product).

This causes vendor to be filled-out, although the product name read
overrules usb_knowndevs (this appears to be a conscience decision made
by the NetBSD folks):

PR:		kern/56097
Submitted by:	Hal Burch <hburch@lumeta.com>
MFC after:	1 week
2004-01-18 12:46:19 +00:00
Ruslan Ermilov
703981ae28 Fixed a memory leak.
Submitted by:	Stanford Metacompilation research group
2004-01-18 12:32:06 +00:00
Ruslan Ermilov
b659f64e82 Fixed a memory leak.
Submitted by:	Stanford Metacompilation research group
2004-01-18 12:26:33 +00:00
Søren Schmidt
7c633af872 Add missing free's. 2004-01-18 10:50:40 +00:00
Yaroslav Tykhiy
6bb87e74a6 Avoid overwriting capability bits marked earlier
when setting HW checksum offload bits.

Enable available capabilities properly.

Reviewed by:	sam
2004-01-18 10:15:48 +00:00
MIHIRA Sanpei Yoshiro
dd4350b4a7 Pay attention to the timeout value passed down by the upper layer.
(NetBSD src/sys/dev/usb/umass.c rev.1.67)

PR:		kern/58649 (Problem 1)
Submitted by:	SAKIYAMA Nobuo <sakichan@sakichan.org>
MFC after:	1 week
2004-01-18 09:19:53 +00:00
MIHIRA Sanpei Yoshiro
3121d08f99 Sync to 1.158 of usbdevs 2004-01-18 09:04:57 +00:00
MIHIRA Sanpei Yoshiro
a4a37c3010 add device id for PANASONIC KXLRW32AN(USB CD-R/RW,not yet support) 2004-01-18 08:02:34 +00:00
Alan Cox
c19aa3402b Increase UMA_BOOT_PAGES because of changes to pv entry initialization in
revision 1.457 of i386/i386/pmap.c.
2004-01-18 05:51:06 +00:00
Yoshihiro Takahashi
c9a7784cc7 PC98 uses the different frame code. 2004-01-18 04:13:27 +00:00
Yoshihiro Takahashi
2b0292a5ae Fix to support KANA and graphics characters which code are over 0x80. 2004-01-18 04:10:45 +00:00
Alan Cox
23b186d324 Don't acquire Giant in vm_object_deallocate() unless the object is vnode-
backed.
2004-01-18 03:44:14 +00:00
Johan Karlsson
8004412590 Fix type in comment, 's/writtent/written/'
PR:		56954
Submitted by:	Dan Langille <dan@langille.org>
2004-01-18 00:17:14 +00:00
Søren Schmidt
74a1b9fccf Add support for the Silicon Image 3114 4 channel SATA controller. 2004-01-17 23:34:13 +00:00
Warner Losh
70be398070 It appears that the changes in the resources allocated is causing much
pain and suffering.  Attempt to back it out by removing the 'if the
requested range is larger than the window, clip to the window' code.
This is a band-aide until the issues are better understood and the
issues with the lazy allocation patches are resolved.
2004-01-17 21:54:04 +00:00
Alfred Perlstein
95f94a7ff7 Don't panic because of RPC proto mismatches. Whitespace cleanup.
Submitted by: Jim Rees <rees@umich.edu>
2004-01-17 21:25:05 +00:00
Andrew Gallatin
1c318b9665 Handle sf_buf_alloc() returning null. This can happen if the
process takes a signal while waiting for an sf_buf to become available.

Reviewed by: alc
2004-01-17 21:16:51 +00:00
Poul-Henning Kamp
37f0ad870c remove elan_mmcr, I'm not sure I understand what it did here in the
first place.
2004-01-17 13:13:48 +00:00
Poul-Henning Kamp
5e289f9eb6 Mostly mechanical rework of libalias:
Makes it possible to have multiple packet aliasing instances in a
single process by moving all static and global variables into an
instance structure called "struct libalias".

Redefine a new API based on s/PacketAlias/LibAlias/g

Add new "instance" argument to all functions in the new API.

Implement old API in terms of the new API.
2004-01-17 10:52:21 +00:00
Poul-Henning Kamp
135bd3f8a1 Make sure set the media type in the phy, we cannot trust it to have chosen
the type we happen to want.

Bug triggered by net-booting soekris hardware which comes up in 10/hdx mode
by default.
2004-01-17 10:44:39 +00:00
Poul-Henning Kamp
4555065861 As previously announced: discontinue use of makedev() call in soundcode.
This takes us a lot closer to refcounting dev_t.

This patch originally by cg@ with a few minor changes by me.

It is largely untested, but has been HEADSUP'ed twice, so presumably
people have not found any issues with it.

Submitted by:	cg@
2004-01-17 10:37:11 +00:00
Matthew N. Dodd
baa039868e - Handle failure of cam_sim_alloc().
This prevents xpt_bus_register() from dereferencing NULL.
- Assign pointer to NULL after cam_sim_free().

Submitted by:	 Paul Twohey <twohey@CS.Stanford.EDU>
2004-01-17 05:57:52 +00:00
Ruslan Ermilov
2e53e513a8 Replaced outdated comment. 2004-01-17 03:28:27 +00:00
Dag-Erling Smørgrav
a6d4491c71 Restore correct semantics for F_DUPFD fcntl. This should fix the errors
people have been getting with configure scripts.
2004-01-17 00:59:04 +00:00
Brian Feldman
6d8e1f823b Do not allow operations which cause known file-system corruption. 2004-01-16 22:55:25 +00:00
Brian Feldman
478382096e Remove a warning. 2004-01-16 22:54:33 +00:00
Dag-Erling Smørgrav
56a9fc0e93 WITNESS won't let us hold two filedesc locks at the same time, so juggle
fdp and newfdp around a bit.
2004-01-16 21:54:56 +00:00
Robert Watson
bafc8f255a KASSERT() that initproc->p_pid is 1. Very bad things happen if init's
pid isn't 1, and it can actually occur if kthread_create() is called
before SUB_SI_CREATE_INIT without RFHIGHPID.

Discussed with:	jhb
2004-01-16 20:29:23 +00:00
Brian Feldman
016344807a Fix an upper-vnode leak created in revision 1.52. When an upper-layer
file has been removed, it should be purged from the cache, but it need
not be removed from the directory stack causing corruption; instead,
it will simply be removed once the last references and holds on it
are dropped at the end of the unlink/rmdir system calls, and the
normal !UN_CACHED VOP_INACTIVE() handler for unionfs finishes it off.

This is easily reproduced by repeated "echo >file; rm file" on a
unionfs mount.  Strangely, "echo -n >file; rm file" didn't make
it happen.
2004-01-16 16:31:01 +00:00
Ruslan Ermilov
b8eaa978fc - Build things in pure alphabetical dictionary order.
- Unify the conditional assignments section so that architectural
  exclusions come first, sorted, then options and !options, sorted
  by the option name, also in directory order, then architecture
  specific sections, sorted by the architecture name, with i386
  being a traditional exception.

Prodded by:	bde
2004-01-16 15:55:29 +00:00
MIHIRA Sanpei Yoshiro
203d1f9b68 Sync to 1.157 of usbdevs 2004-01-16 15:31:20 +00:00
MIHIRA Sanpei Yoshiro
24ce22f495 Add support SUNTAC U-Cable type A3(AS64LX)
Submitted by:	TAKAHASHI Daisuke <takaha@mue.biglobe.ne.jp> [FreeBSD-users-jp 72475]
		and MIZUTANI Masaki <m-saki@rr.iij4u.or.jp>
MFC after:	1 week
2004-01-16 15:29:27 +00:00
Dag-Erling Smørgrav
ddce426f69 Remove two KASSERTs which were overly paranoid. 2004-01-16 08:45:56 +00:00
David E. O'Brien
a971a19262 The ndis_kspin_lock type is called KSPIN_LOCK in MS-Windows.
According to the Windows DDK header files, KSPIN_LOCK is defined like this:
	typedef ULONG_PTR KSPIN_LOCK;

From basetsd.h (SDK, Feb. 2003):
	typedef [public] unsigned __int3264 ULONG_PTR, *PULONG_PTR;
	typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
	typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;

The keyword __int3264 specifies an integral type that has the following
properties:
 + It is 32-bit on 32-bit platforms
 + It is 64-bit on 64-bit platforms
 + It is 32-bit on the wire for backward compatibility.
   It gets truncated on the sending side and extended appropriately
   (signed or unsigned) on the receiving side.

Thus register_t seems the proper mapping onto FreeBSD for spin locks.
2004-01-16 02:07:04 +00:00
Peter Grehan
ec9db41566 Catch up with ATA UMA changes 2004-01-15 23:52:32 +00:00
Bill Paul
ece759a4da The definition for __stdcall logically belongs in pe_var.h, but
the definitions for NDIS_BUS_SPACE_IO and NDIS_BUS_SPACE_MEM logically
belong in hal_var.h. At least, that's my story, and I'm sticking to it.

Also, remove definition of __stdcall from if_ndis.c now that it's pulled
in from pe_var.h.
2004-01-15 21:31:49 +00:00
David E. O'Brien
75280cae75 Create NDIS_BUS_SPACE_{IO,MEM} to abstract MD BUS_SPACE macros.
Provide appropriate definitions for i386 and AMD64.
2004-01-15 19:34:56 +00:00
Dag-Erling Smørgrav
12d568c2b1 Take care to drop locks when calling malloc() 2004-01-15 18:50:11 +00:00
Atsushi Onoe
7cab13c7c0 Correct beacon (src/bssid) for hostap and adhoc mode. 2004-01-15 13:30:06 +00:00