Commit Graph

119955 Commits

Author SHA1 Message Date
Marius Strobl
933b731c67 Remove unused function and variables. 2005-11-22 14:21:03 +00:00
Gleb Smirnoff
a9fe9149a8 Check IFF_DRV_RUNNING in the re_intr() loop. It can disappear,
since re_rxeof() drops the lock for some time.

Reported & tested by:	XueFeng Deng <dsnofe yahoo.com.cn>
2005-11-22 12:46:15 +00:00
Ruslan Ermilov
0da07b29c3 Get rid of SPECIAL_INSTALLCHECKS variable that isn't settable
by a user.  Instead, add individual checks as dependencies to
the main "installcheck" target.  Make sure that installkernel
etc. depend on it (including the UID/GID checks).
2005-11-22 12:02:41 +00:00
Ruslan Ermilov
05359b9bb5 Fold some common stuff into a macro ${KMAKE}. 2005-11-22 11:31:03 +00:00
Boris Popov
cc518d3b67 Fix interaction with Windows 2000/XP based servers:
If the complete reply on the TRANS2_FIND_FIRST2 request fits exactly
into one responce packet, then next call to TRANS2_FIND_NEXT2 will return
zero entries and server will close current transaction.  To avoid
subsequent errors we should not perform FIND_CLOSE2 request.

PR:		kern/78953
Submitted by:	Jim Carroll
2005-11-22 07:13:00 +00:00
Hajimu UMEMOTO
4796860760 Cache the result of battery info retrieval from smbat as well
as cmbat.

Reviewed by:	njl
MFC after:	3 days
2005-11-22 03:34:09 +00:00
Boris Popov
19caf6c088 Prevent module unloading if there are active connections.
PR:		kern/89085
Submitted by:	Rostislav Krasny
MFC after:	1 week
2005-11-22 02:15:46 +00:00
John Polstra
ba3612cd5c Fix a bug in the loop in sonewconn that makes room on the incomplete
connection queue for a new connection.  It was removing connections
from the wrong list.

Submitted by:	Paul Mikesell
Sponsored by:	Isilon Systems
MFC after:	1 week
2005-11-22 01:55:29 +00:00
Marcel Moolenaar
829733d045 Resolve misalignment traps caused by changes to IF_LLADDR().
Use de16dec() and le16dec() to fetch the link-level address
from struct ifnet.

Tested on: alpha
Reviewed by: jhb
See also: de(4)
2005-11-22 01:51:57 +00:00
Craig Rodrigues
f2bccf4766 Bring mount_nullfs up to WARNS=6. 2005-11-21 22:51:16 +00:00
John Baldwin
aed0e2071f Overhaul nve(4) locking to make it more like other ethernet drivers in
the tree.
- Add locked variants of nve_start(), nve_init(), and nve_ifmedia_upd().
- Use callout_* to manage callouts rather than timeout(9).
- Mark interrupt handler MPSAFE (IFF_NEEDGIANT was already clear).
- Lock the driver lock in driver entry points such as the interrupt
  handler, if_start, and if_init rather than locking the driver mutex
  in the various work functions called by the binary blob.  The spin lock
  used by the binary block can probably be stubbed out now.
- Use IFQ_DRV_IS_EMPTY() macro rather than doing it by hand.
- Fix locking in detach.
- Remove some unused fields from the softc.

Tested by:	cognet
MFC after:	2 weeks
2005-11-21 22:14:49 +00:00
Craig Rodrigues
b1e6b7123d For mounting a UFS filesystem, call nmount() directly, instead of having
special logic which called mount() in a separate mount_ufs() function.
2005-11-21 22:07:54 +00:00
John Baldwin
a4104d1c3b Fix the code to look up the BIOS IRQ for a given link device by reading
the IRQ set by the BIOS in existing devices to actually get the correct
bus number of the child PCI bus.  I was not reading the bus number from
the bridge device correctly.  The __BUS_ACCESSOR() macros (from which
pcib_get_bus() is built) assume that the passed in argument is a child
device.  However, at the time I'm reading the bus there is no child
device yet, so I was passing in the pcib device as the child device.
The parent of the pcib device probably returned an error in the case of
a host bridge, thus resulting in random stack garbage for the bus number.
For PCI-PCI bridges, the bus number being used was actually the subvendor
of the PCI-PCI bridge device itself.

MFC after:	1 week
2005-11-21 22:01:16 +00:00
John Baldwin
f5e19c7342 Various fixes to make de(4) not panic after ru@'s IF_LLADDR() changes:
- Don't call tulip_addr_filter() to reset the RX address filter in
  tulip_reset() since that gets called before ether_ifattach().  Just
  call it in tulip_init_locked().
- Use be16dec() and le16dec() to parse MAC addresses when programming
  the RX filter.
- Let ether_ioctl() handle SIOCSIFMTU since we were doing the exact same
  thing with the added bonus that we leaked the driver lock if the MTU
  was > ETHERMTU in the homerolled version.  This part will be MFC'd.

Clue from:	wpaul (1)
Stolen from:	marcel (2 via patch for dc(4))
MFC after:	1 week
2005-11-21 21:50:07 +00:00
Wilko Bulte
1fbc4b9d85 add witty remark about serious thought.
MFC after: 2 days
2005-11-21 21:42:43 +00:00
John Baldwin
72590141ef Turn PUC_FASTINTR back off on by default on sparc64 since it breaks with
the built-in serial ports on the ultra60 and e4500.

In collusion with:	kris
2005-11-21 21:40:33 +00:00
Scott Long
01e7fb47d5 Teach schedgraph how to parse KTR_CRITICAL records. critical_enter/exit
events are now plotted as a counting graph, similar to CPU load, so that
their duration and critnest values can be visualized.
2005-11-21 21:27:40 +00:00
John Baldwin
7417e80b4e Don't enable PUC_FASTINTR by default in the source. Instead, enable it
via the DEFAULTS kernel configs.  This allows folks to turn it that option
off in the kernel configs if desired without having to hack the source.
This is especially useful since PUC_FASTINTR hangs the kernel boot on my
ultra60 which has two uart(4) devices hung off of a puc(4) device.

I did not enable PUC_FASTINTR by default on powerpc since powerpc does not
currently allow sharing of INTR_FAST with non-INTR_FAST like the other
archs.
2005-11-21 20:22:35 +00:00
John Baldwin
d0750fb9b0 Create DEFAULTS files for alpha, ia64, powerpc, and sparc64 and move
'device mem' over from GENERIC to DEFAULTS to be consistent with i386 and
amd64.  Additionally, on ia64 enable ACPI by default since ia64 requires
acpi.
2005-11-21 20:17:46 +00:00
Ruslan Ermilov
33b61b6752 Pull up sys/modules/acpi/acpi/Makefile,v 1.10 change by iedowse@.
This should fix another parallel make breakage, reported by pjd@.
2005-11-21 20:11:39 +00:00
Paul Saab
38b29f71ef Fix for a bug where NFS/TCP would not reconnect (in the case where
the server FIN'ed). Seen with Solaris NFS servers.

Reported by:	TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp>
Submitted by:	Mohan Strinivasan
2005-11-21 19:25:24 +00:00
Paul Saab
3834aac17e - Always return success from NFS strategy. nfs_doio(), in the
event of an error, does the right thing, in terms of setting
  the error flags in the buf header. That fixes a crash from
  bstrategy().
- Treat ETIMEDOUT as a "recoverable" error, causing the buffer
  to be re-dirtied. ETIMEDOUT can occur on soft mounts, when
  the number of retries are exceeded, and we don't want data loss
  in that case.

Submitted by:	Mohan Srinivasan
2005-11-21 19:23:46 +00:00
Paul Saab
d0a14f55c3 Fix for a bug that causes SACK scoreboard corruption when the limit
on holes per connection is reached.

Reported by:	Patrik Roos
Submitted by:	Mohan Srinivasan
Reviewed by:	Raja Mukerji, Noritoshi Demizu
2005-11-21 19:22:10 +00:00
Olivier Houchard
94d8cf9916 Force pmap to write-back the pte cacheline after each pte modification,
even if the pte is supposed to be cached in write through mode (might be a
skyeye bug, I'll have to check).
2005-11-21 19:10:44 +00:00
Olivier Houchard
f9126cfb8f Add an alternate ID for the arm920t (the real solution is to have
per-cpu class masks, but oh well).
2005-11-21 19:06:25 +00:00
Jim Rees
cb156cc603 fix a problem with XID re-use when a server returns NFSERR_JUKEBOX.
Submitted by:	cel@citi.umich.edu
Fixed by:	rick@snowhite.cis.uoguelph.ca
Approved by:	alfred
MFC after:	3 weeks
2005-11-21 18:39:18 +00:00
John Baldwin
16e0d8caf8 Expand the hack to mask the atpics if 'device atpic' is not in the kernel
during boot up.  Now we do a full reset of the 8259As and setup a simple
interrupt handler (we actually borrow the apic one that just does an
immediate iret) to handle any spurious interrupts triggered by either chip.
This should fix some folks that were getting a Trap 30 during bootup of
certain SMP AMD systems.  This might get pushed into the 6.0 branch as an
errata.  For now a suitable workaround is to add 'device atpic' to your
kernel config.

Tested by:	scottl
Helpful info from:	dillon
MFC after:	1 week
2005-11-21 18:39:17 +00:00
Ruslan Ermilov
33d6b9fbe6 Tidy up markup and fix two bugs. 2005-11-21 17:18:34 +00:00
Ruslan Ermilov
6e1b5aa172 - Merge FreeBSD Configuration subsection etc. with SYNOPSIS.
- Remove the description of how to build a module.
- Remove the description of how to patch the sources.
- Refer to the polling(4) manpage on how to enable the polling mode.
- Tidy up markup.
2005-11-21 16:44:16 +00:00
Ruslan Ermilov
95ec61c094 Fix mysterious build failures (with parallel make) early in
buildkernel: provide a real but dummy name to ${DEPENDFILE}
so that the relevant exists() check in bsd.prog.mk fails and
ensures that ${GENHDRS} are built before any other objects.

MFC after:	3 days
2005-11-21 14:41:10 +00:00
Bruce Evans
4ce5120952 Mess up the "kernel" float trig function .c files with ifdefs so that
they can be #included in other .c files to give inline functions, and
use them to inline the functions in most callers (not in e_lgammaf_r.c).
__kernel_tanf() is too large and complicated for gcc to inline very well.

An athlons, this gives a speed increase under favourable pipeline
conditions of about 10% overall (larger for AXP, smaller for A64).
E.g., on AXP, sinf() on uniformly distributed args in [-2Pi, 2Pi]
now takes 30-56 cycles; it used to take 45-61 cycles; hardware fsin
takes 65-129.
2005-11-21 04:57:12 +00:00
Arun Sharma
9e5e0f978e Create a device node in /dev when a USB keyboard is plugged in.
Reviewed by: grehan
2005-11-21 04:47:46 +00:00
Pyun YongHyeon
77805d0e09 busdma cleanup for em(4).
- don't force busdma to pre-allocate bounce pages for parent tag.
 - use system supplied roundup2 macro instead of rolling its own version.
 - TX/RX decriptor length should be multiple of 128. There is no
   no need to expand the size with the multiple of 4096.
 - don't create/destroy DMA maps in TX/RX handlers. Use pre-allocated
   DMA maps. Since creating DMA maps on sparc64 is time consuming
   operations(resource mananger overhead), this change should boost
   performance on sparc64. I could get > 2x speedup on Ultra60.
 - TX/RX descriptors could be aligned on 128 boundary. Aligning them
   on PAGE_SIZE is waste of resource.
 - don't blindly create TX DMA tag with size of MCLBYTES * 8. The size
   is only valid under jumbo frame environments. Instead of using the
   hardcoded value, re-compute necessary size on the fly.
 - RX side bus_dmamap_load_mbuf_sg(9) support.
 - remove unused macro EM_ROUNDUP and constant EM_MMBA.

Reviewed by:	scottl
Tested by:	glebius
2005-11-21 04:17:43 +00:00
Pyun YongHyeon
d0ddbe88db Add a hack to ignore PCR bit for 6300ESB, 82801[D-G]B chips. It seems
that enabling busmastering would result in PCR bit ON after codec
reset.
While I'm here add DELAY(1) to codec access routine to give reasonable
time to codec operation. Without the delay, it would cause problems on
super-fast machines(> 2GHz). Also enable legacy audio for all 6300ESB,
82801[D-G]B chips. Previously, it enabled legacy audio for 82801DB(ICH4)
chip only.

Reported by:    Maxim Maximov mcsi AT mcsi DOT pp DOT ru
		Andrew Bliznak andriko.b AT gmail DOT com
Tested by:	brueffer, Maxim Maximov, Andrew Bliznak
2005-11-21 03:37:43 +00:00
Bruce Evans
58652034e8 Use double precision to simplify and optimize a long division.
On athlons, this gives a speedup of 10-20% for tanf() on uniformly
distributed args in [-2Pi, 2Pi].  (It only directly applies for 43%
of the args and gives a 16-20% speedup for these (more for AXP than
A64) and this gives an overall speedup of 10-12% which is all that it
should; however, it gives an overall speedup of 17-20% with gcc-3.3
on AXP-A64 by mysteriously effected cases where it isn't executed.)

I originally intended to use double precision for all internals of
float trig functions and will probably still do this, but benchmarking
showed that converting to double precision and back is a pessimization
in cases where a simple float precision calculation works, so it may
be optimal to switch precisions only when using extra precision is
much simpler.
2005-11-21 00:38:21 +00:00
Bruce Evans
23f6483e0a Restored a cleanup in rev.1.9 tthat was lost in rev.1.10. 2005-11-20 20:17:04 +00:00
Craig Rodrigues
cea903627f If export mount flag is not passed in, set default parameters
for export structure and pass that to vfs_export().
Currently in userland mount(8), an export structure is unconditionally
passed in, only for UFS.  This is an attempt to move that UFS-specific
behavior out of mount(8) and into the UFS filesystem code.
2005-11-20 17:04:50 +00:00
Andre Oppermann
71590103f4 Include ip_options.h for IPX-IP encapsulation.
Noticed by:	Tinderbox
Sponsored by:   TCP/IP Optimization Fundraise 2005
2005-11-20 16:17:12 +00:00
Damien Bergamini
3afda804ab Use memcpy/memset consistently accross ipw and iwi instead of bcopy/bzero. 2005-11-20 16:13:00 +00:00
Damien Bergamini
a4f5ae8ad6 Don't use /etc/firmware. /etc is for configuration files only.
Use /boot to store firmware files instead.

Requested by:	Daniel O'Connor, Scott Long
2005-11-20 16:02:04 +00:00
Diomidis Spinellis
855196e9fa Use the appropriate error function for displaying the error,
instead of printing it to stdout.

MFC after:	1 week
2005-11-20 13:48:15 +00:00
Lukas Ertl
8eb116b96e Whitespace. 2005-11-20 12:14:18 +00:00
Lukas Ertl
2e42895a97 Always declare variables at the start of the function.
Don't allocate potentially large variables on the stack.
Check strsep() return values when the string comes from userland.
Shorten variable names for lucidity's sake.

most of the stuff:
Pointed out by:    njl@
2005-11-20 12:12:31 +00:00
Lukas Ertl
47517eab34 Fix whitespace issue.
Pointed out by:   joel@
2005-11-20 10:40:06 +00:00
Lukas Ertl
ff98e7ce7a Fix whitespace issues.
Pointed out by:    joel@
2005-11-20 10:35:46 +00:00
Alan Cox
97a0c226d6 Eliminate pmap_init2(). It's no longer used. 2005-11-20 06:09:49 +00:00
Scott Long
e1000b3617 Fix compile on 64-bit platforms. 2005-11-20 04:27:24 +00:00
Marcel Moolenaar
93eed66913 Improve inittodr(). Assume the real-time clock is reliable and only
use the base time in case the real-time clock is bogus or behind the
base time. Most importantly, don't sanity-check the base time up front
because it may be zero. This is not a preposterous condition. It just
means that none of the file systems have their mount time updated.

MFC after: 1 week
2005-11-20 01:31:29 +00:00
Bill Paul
78edd540cf Correct the API for Windows interupt handling a little. The prototype
for a Windows ISR is 'BOOLEAN isrfunc(KINTERRUPT *, void *)' meaning
the ISR get a pointer to the interrupt object and a context pointer,
and returns TRUE if the ISR determines the interrupt was really generated
by the associated device, or FALSE if not.

I had mistakenly used 'void isrfunc(void *)' instead. It happens the
only thing this affects is the internal ndis_intr() ISR in subr_ndis.c,
but it should be fixed just in case we ever need to register a real
Windows ISR vi IoConnectInterrupt().

For NDIS miniports that provide a MiniportISR() method, the 'is_our_intr'
value returned by the method serves as the return value from ndis_isr(),
and 'call_isr' is used to decide whether or not to schedule the interrupt
handler via DPC. For drivers that only supply MiniportEnableInterrupt()
and MiniportDisableInterrupt() methods, call_isr is always TRUE and
is_our_intr is always FALSE.

In the end, there should be no functional changes, except that now
ntoskrnl_intr() can terminate early once it finds the ISR that wants
to service the interrupt.
2005-11-20 01:29:29 +00:00
Colin Percival
3d19fd3190 An empty file does not have a positive number of lines.
Make sure that the number of lines read is non-zero before in order to
avoid dumping core.

Reported by:	Wojciech A. Koszek
Pointy hat to:	cperciva
2005-11-20 00:50:30 +00:00