Commit Graph

128685 Commits

Author SHA1 Message Date
Gleb Smirnoff
df79d5278f - Instead of if_watchdog/if_timer interface use our own timer
that piggybacks on fxp_tick() callout.
2006-11-30 14:58:01 +00:00
Florent Thoumie
8fec56e46e Bump __FreeBSD_version after UQ_KBD_IGNORE was set for Wi-Spy devices. 2006-11-30 14:29:47 +00:00
Gleb Smirnoff
b74e67fbfb - Instead of if_watchdog/if_timer interface use our own timer
that piggybacks on bge_tick() callout.
- Lock bge_tick() using callout_init_mtx().
2006-11-30 13:40:39 +00:00
Robert Watson
e3fd5ffdf1 Consistently use #ifdef INET6 rather than mixing and matching with
#if defined(INET6).

Don't comment the end of short #ifdef blocks.

Comment cleanup.

Line wrap.
2006-11-30 10:54:54 +00:00
Konstantin Belousov
7226306ed5 Linker set support depends on the magic __start_<section> and
__stop_<section> symbols generated by the static linker for elf
sections. This is done only for the final link, and not for ld -r.
Augment elf_obj in-kernel linker by recognizing such special symbols,
and resolving them to the start and end of the section automatically.

As result, linker sets on amd64 could be used in the same way as on
other architectures, without explicit calls to linker_file_lookup_set().

Requested by:	rdivacky
No objections from:	peter, jhb
2006-11-30 10:50:29 +00:00
Poul-Henning Kamp
a4dcb4f627 Only grab the sched_lock if we actually need to modify the thread priority.
During a buildworld only 2/3 of the calls to msleep actually changed
the priority.
2006-11-30 08:27:38 +00:00
Peter Grehan
9955cf96f6 Don't use vm_page_flag_set() if installing bootstrap page-table entries
since the vm page mutex's aren't yet initialized. Fixes boot-time panic.

Reported by:	Dario Freni  saturnero at freesbie dot org
2006-11-30 08:13:06 +00:00
John Birrell
d4fbc81d99 Flushing the buffer is conditional on actually using the buffer. Oops. 2006-11-30 07:25:52 +00:00
Kevin Lo
561d953686 Better i2c bit definitions.
Approved by: cognet
2006-11-30 06:30:01 +00:00
Sam Leffler
7a3ac16ec2 fls was missing
MFC after:	1 week
2006-11-30 06:17:54 +00:00
John Birrell
e0b651251d Turn console printf buffering into a kernel option and only on
by default for sun4v where it is absolutely required.

This change moves the buffer from struct pcpu to the stack to avoid
using the critical section which created a LOR in a couple of cases
due to interaction with the tty code and kqueue. The LOR can't be
fixed with the critical section and the pcpu buffer can't be used
without the critical section.

Putting the buffer on the stack was my initial solution, but it was
pointed out that the stress on the stack might cause problems
depending on the call path. We don't have a way of creating tests
for those possible cases, so it's best to leave this as an option
for the time being. In time we may get enough data to enable this
option more generally.
2006-11-30 04:17:05 +00:00
Christian Brueffer
b3ef1381d4 Remove pre-5.3 compatibility ifdefs.
Approved by:	rwatson (mentor)
MFC after:	5 days
2006-11-29 21:42:48 +00:00
Alfred Perlstein
8720d437a4 Bump .Dd, (9 year jump!)
Requested by: ru
cvs: ----------------------------------------------------------------------
2006-11-29 20:24:56 +00:00
Kip Macy
547ba2302a - add separate variable for enabling printing of ranges
- simplify handling of rounding phys_avail ranges to 4M boundaries (needed for all
  memory to be in the direct mapped area)
2006-11-29 19:31:23 +00:00
Alfred Perlstein
06a061cef3 Stop INVARIANTS panics in if_aue with a stopgap.
aue_tick calls several synchronous usb functions from a timeout(9),
this is very broken since a timeout(9) is run as an interrupt
and the usb functions tsleep.

A stopgap fix is to schedule a taskqueue task from the timeout
and defer work to that taskqueue task.
2006-11-29 19:19:44 +00:00
Alfred Perlstein
82c1155773 Do a better job of documenting uio_resid. 2006-11-29 19:10:53 +00:00
Alfred Perlstein
f6ffe52209 Document struct uio.h entries. 2006-11-29 19:08:45 +00:00
Joel Dahl
4a418e5bf9 Add the dev.pcm.%d.polling sysctl and a short description.
Reviewed by:	ru
2006-11-29 17:07:02 +00:00
Andrew Gallatin
a1480dfbad Fix mxge_submit_8rx() to behave like the comments says it does,
and ensure that it copies at most 32 bytes at a time.
2006-11-29 15:30:39 +00:00
Ariff Abdullah
57d90e7fbe Fix support for Medion MD MD95257 (GPIO2 quirk).
Reported by:	Chris Tophe <cohika@gmail.com>
2006-11-29 15:15:30 +00:00
Maxim Konovalov
ca60a6fe85 o Xr netconfig(5).
PR:		docs/105720
Submitted by:	koitsu
MFC after:	1 week
2006-11-29 09:01:28 +00:00
Warner Losh
435620f10d MFp4:
formatting nit
2006-11-29 08:17:40 +00:00
Warner Losh
e8c8e11c08 Make this work a lot better:
Remove a lot of older cruft not needed.
	Improve ISR support, but it is still unused since polling is faster
	Properly initalize the speed register to get 90kb/s, not 400b/s.
	Try to catch NACK
	Allow 0 length read transfers to generate start/top pairs.
2006-11-29 08:15:59 +00:00
Warner Losh
fcf50d482e Build glue for at45d flash support. 2006-11-29 08:08:30 +00:00
Warner Losh
674a914028 MFp4:
Preliminary support for Atmel AT45D series of DataFlash on the
	SPI bus (ok, not really a hardware bus, but a logical
	connection).  This works only for the 8MB version of the part
	due to hard coding.  Both read and write are supported.
2006-11-29 08:05:55 +00:00
Warner Losh
ab45d28ce3 MFp4:
correct data counts so that we clock enough data for the spi
	transaction.  This allows complete spi transactions to happen.
2006-11-29 07:57:02 +00:00
Yaroslav Tykhiy
8eb4aedee6 Note that not all architectures use sendfile(2) buffers;
refer to the respective manpage for details.

MFC after: 3 days
2006-11-29 05:53:25 +00:00
Kip Macy
8751d0554c - Explicitly name the fields in pcb that we use to store trap state for later
retrieval, rather than using pad
- save the fault address in sfar for use by the alignment fixup handler
- mask off the trap number, so the context id doesn't confuse the UT_MAX
  comparison

This change fixes alignment fixup handling which is needed for traceroute
to work in spite of its copious unaligned accesses
2006-11-29 05:18:19 +00:00
Kip Macy
b3592a5ffb We no longer need to remap hardware trap numbers to sparc64 trap numbers
as this happens much earlier in trap handling.

The fact that we continued to do this when it was no longer necessary caused
breapoint to map to SIGILL as opposed to SIGTRAP :-(.
2006-11-29 04:52:51 +00:00
Mohan Srinivasan
594ece53bc In nfs_nget(), we must initialize the fh in the nfsnode before inserting the
vnode into the vfs hash. Otherwise, another thread walking the hash can trip
on an nfsnode with an uninitialized or partially initialized fh.
Thanks to ups@ for spotting this race.
2006-11-29 02:21:40 +00:00
Craig Rodrigues
a6b2640236 Pass a string buffer named "errmsg" to nmount().
This will allow the NFS mount code to return a string error message
in addition to returning an error integer value.

Reviewed by:    mohans
MFC after:      1 month
2006-11-29 00:46:30 +00:00
Craig Rodrigues
412ffff0a0 Deduce the "fstype" parameter to pass to nmount() by looking at
the "_nfs" part of argv[0].  This should facilitate unifying mount_nfs
and mount_nfs4 into one binary.

MFC after:	1 month
Reviewed by:	mohans
2006-11-29 00:41:44 +00:00
Florent Thoumie
454cb2de5b Add a quirk for devices recognized as usb keyboards not to be hooked by
ukbd(4).

PR:		usb/105669
Submitted by:	Henrik Brix Andersen <henrik@brixandersen.dk>
MFC after:	1 week
2006-11-28 21:13:07 +00:00
Ruslan Ermilov
34028cf7d1 Differentiate between data and instruction fetch in the fatal
page fault trap handler.

Reviewed by:	alc
2006-11-28 20:04:00 +00:00
Jim Rees
c1ecb4d7c3 NFSv4 client:
Add support for va_birthtime
Fix va_ctime to use TIME_METADATA, not TIME_CREATE
2006-11-28 19:33:28 +00:00
Ruslan Ermilov
bad4d172b4 - Revert signedness type changes to "struct vmtotal"; by making
them unsigned I made the possible overflows hard to detect,
  and it only saved 1 bit which isn't principal, even less now
  that the underlying issue with the total of virtual memory has
  been fixed.  (For the record, it will overflow with >=2T of
  VM total, with 32-bit ints used to keep counters in pages.)

- While here, fix printing of other "struct vmtotal" members
  such as t_rq, t_dw, t_pw, and t_sw as they are also signed.

Reviewed by:	bde
MFC after:	3 days
2006-11-28 12:46:02 +00:00
Yoshihiro Takahashi
983bba070e Increase USR_MIN_SIZE to 160 because it requires more disk space.
MFC after:	3 days
2006-11-28 11:48:34 +00:00
Robert Watson
1f87450e8b Change net.isr.direct from defaulting to 0 to 1 in 7-CURRENT. This
enables direct dispatch of the network stack from the device driver
ithread, enabling input path parallelism by default when multiple
interfaces are present.

The strategy for network stack parallelism is something being actively
discussed, and this is just one of several possible (and perfectly
reasonable) strategies, but has the distinct advantage of reducing the
number of context switches and preemptions significantly, resulting in
higher efficiency in many cases.  In some caes, this may reduce
network stack parallelism due to work not being deferred from the
ithread to the netisr.  Therefore, the strategy may change in the
future, but this offers a reasonable first pass and enabling
parallelism while maintaining strong ordering.

Hopefully this will trigger lots of nice new bugs.

This change is not intended for MFC.
2006-11-28 11:19:36 +00:00
David Xu
6f54e82927 If a thread was detached, return EINVAL instead, the error code
is also returned by pthread_detach() if a thread was already
detached, the error code was already documented:

>    [EINVAL]	The implementation has detected that the value speci-
>		fied by thread does not refer to a joinable thread.
2006-11-28 11:05:31 +00:00
Warner Losh
46ca0665fd Add a fake flag for write. Many drivers have started to use it and it
seems like a good idea.

Submitted by: sam
2006-11-28 06:51:36 +00:00
David Xu
843b99c6f7 - Remove third parameter of itimer_find, the parameter is always zero.
- Call callout_drain on deleting POSIX timer.
- Use kern_timer_delete in exiting hook.
2006-11-28 03:24:34 +00:00
Marius Strobl
3961cd0d76 - Clear the PCN_MISC_ASEL bit so the media port can be actually set
via the PCN_CSR_MODE register. Along with sys/dev/mii/nsphy.c 1.26
  this fixes the case of certain Am79c971-based HP cards and on-board
  ones in IBM machines reporting link but not actually passing any
  traffic. [1]
- Add support for the internal 10baseT PHY, which actually is used on
  at least said HP cards (together with an external DP83840A in a
  multiple PHYs configuration). With cards that don't make use of this
  internal PHY it'll also show up in FreeBSD but not cause any harm.
  This is still missing support for multiple PHYs configuration using
  the internal 100baseTX and/or HomePNA PHYs together with external
  PHYs or multiple external PHYs though.
- In pcn_ifmedia_upd() call pcn_reset() as otherwise the Am79C971 of
  at least said HP cards can wedge when switching from the internal
  10baseT PHY to the external PHY. This means that we need to also
  initialize and possibly start the chip again in pcn_ifmedia_upd(),
  which isn't that bad though as for setting the media port the chip
  has to be powered down or stopped anyway and unlike documented
  doesn't take effect until the next initialization.

PR:		27995, 25959, 72966 (likely) [1]
MFC after:	2 weeks
2006-11-28 01:33:17 +00:00
Marius Strobl
38ee137b26 - In rlphy_service() for the MII_TICK case don't bother to check whether
the currently selected media is of type IFM_AUTO as auto-negotiation
  doesn't need to be kicked anyway.
- In rlphy_status() just use if_dname instead of determining the name
  of the parent NIC via device_get_name(device_get_parent(sc->mii_dev)).
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
- Take advantage of mii_phy_setmedia().
- Fix some whitespace nits and remove commented out code that just can't
  be used with RealTek PHYs.

MFC after:	2 weeks
2006-11-28 01:14:09 +00:00
Marius Strobl
f8f3badf74 - In qsphy_service() for the MII_TICK case don't bother to check whether
the currently selected media is of type IFM_AUTO as auto-negotiation
  doesn't need to be kicked anyway.
- Don't set MIIF_NOISOLATE so qsphy(4) can be used in configurations
  with multiple PHYs. There doesn't seem to be a problem with isolating
  QS6612 per se nor in combination with the NICs they're used with.
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
- Take advantage of mii_phy_setmedia().

Obtained from:	NetBSD (except for the first item)
MFC after:	2 weeks
2006-11-28 01:08:45 +00:00
Ruslan Ermilov
9a0b47981d Add arm to universe. 2006-11-28 01:03:29 +00:00
Marius Strobl
fb58dc87ca - Don't add IFM_NONE when used in combination with pcn(4) as for MII
loopback to work PCnet chips additionally need to be placed into
  external loopback mode which pcn(4) doesn't do so far.
- In nsphy_service() just use if_dname instead of determining the name
  of the parent NIC via device_get_name(device_get_parent(sc->mii_dev)).
- Don't set MIIF_NOISOLATE, except for when used in combination with a
  NIC that wedges when isolating the PHYs, so nsphy(4) can be used in
  configurations with multiple PHYs.
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
- Take advantage of mii_phy_setmedia() (requires the MIIF_FORCEANEG
  added in sys/dev/mii/mii_physubr.c 1.26, sys/dev/mii/miivar.h 1.19).
- Implement a separate nsphy_reset(). There are two reasons for this:
  1) This PHY can take an inordinate amount of time to reset if media
     is attached; under fairly normal circumstances up to nearly one
     second. This is because it appears to go through an implicit auto-
     negotiation cycle as part of the reset.
  2) During reset and auto-negotiation, the BMCR will clear the reset
     bit before the process is complete. It will return 0 until the
     process is complete and it's safe to access the PHY again.

  This is the first of two changes required to make the combination of
  Am79c971 and DP83840A found on certain HP cards and on-board in IBM
  machines work.
- Fix some whitespace nits.

Based on:	NetBSD (except for the first and second item)
MFC after:	2 weeks
2006-11-28 01:01:02 +00:00
Marius Strobl
1f4308521e - Rely on mii_phy_add_media() setting mii_anegticks as appropriate.
- Fix some whitespace nits.

MFC after:	2 weeks
2006-11-28 00:47:54 +00:00
Marius Strobl
79c8bb63d4 - Don't set MIIF_NOISOLATE so lxtphy(4) can be used in configurations
with multiple PHYs. There doesn't seem to be a problem with isolating
  LXT970 per se nor in combination with the NICs they're used with and
  lxtphy(4) was already adding IFM_NONE anyway.
- Use mii_phy_add_media() instead of mii_add_media() so the latter can
  be eventually retired.
- Take advantage of mii_phy_setmedia().
- Fix some whitespace nits.

Obtained from:	NetBSD
MFC after:	2 weeks
2006-11-28 00:45:48 +00:00
Marius Strobl
19e9da2099 - Remove a dupe $FreeBSD$.
- Fix some whitespace nits.
2006-11-28 00:43:38 +00:00
Warner Losh
7c8a068553 Remove unused leftovers. 2006-11-28 00:05:04 +00:00