]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years ago- Use bus_foo() rather than bus_space_foo() and remove bus space tag/handle
jhb [Fri, 6 Jun 2008 18:29:56 +0000 (18:29 +0000)]
- Use bus_foo() rather than bus_space_foo() and remove bus space tag/handle
  from softc.
- Mark interrupt handlers MPSAFE as these drivers have been locked for a
  while.

16 years agoTweak a comment and a constant to restore old 30ms upper bound.
imp [Fri, 6 Jun 2008 17:27:19 +0000 (17:27 +0000)]
Tweak a comment and a constant to restore old 30ms upper bound.
cs_readreg takes ~2us not ~1us to run.

16 years agoo Remove unused cs_debug tunable. I think I added it and then nothing with
imp [Fri, 6 Jun 2008 17:22:07 +0000 (17:22 +0000)]
o Remove unused cs_debug tunable.  I think I added it and then nothing with
  it.  Bad imp.  Removing us dips us under 10,000 in size too.
o Replace an unconditional 30ms DELAY (yes, busy wait) with a check of the
  SIBUSY bit in the SelfST register before accessing the eeprom.  This changes
  the time to read the EEPROM from 2 * 20 * 30ms (1.2s) to < 20*25us (.0005s)
  and make the attach of the card tolerable when ethernet media is present.
  Include data from the datasheet about why this works.  While this is a 2500x
  speed increase, it doesn't really matter at all once the card is probed...
o set dev earlier in softc.

16 years agoOptimize the CVS bug #17168 fix by relaxing the conditions for update
obrien [Fri, 6 Jun 2008 16:16:44 +0000 (16:16 +0000)]
Optimize the CVS bug #17168 fix by relaxing the conditions for update
with respect to sticky options.  (r179561 was WRT sticky and branch tags)

Consulted with: Mark Baushke <mdb@gnu.org>

16 years agoForgot to commit these files too :-(
imp [Fri, 6 Jun 2008 16:10:10 +0000 (16:10 +0000)]
Forgot to commit these files too :-(

16 years agoDon't abend if we get ENOMEM from sysctl(3). The data returned
brian [Fri, 6 Jun 2008 08:59:55 +0000 (08:59 +0000)]
Don't abend if we get ENOMEM from sysctl(3).  The data returned
is sufficient

MFC after: 2 weeks

16 years agoAdd a -w warning flag to ln(1). When the -w option is enabled,
keramida [Fri, 6 Jun 2008 08:27:59 +0000 (08:27 +0000)]
Add a -w warning flag to ln(1).  When the -w option is enabled,
ln(1) checks to see if the source of a symlink, i.e. the file it
should point to actually exists.  The default is the old ln
behavior, that does not check, to avoid surprising people who may
be using ln(1) in scripts or other non-interactive places.

PR: bin/7265
Submitted by: Joel Ray Holveck, detlev!joelh at mail.camalott.com
MFC after: 2 weeks

16 years agoTweak rc.firewall to allow incoming limited broadcast traffic,
keramida [Fri, 6 Jun 2008 07:17:04 +0000 (07:17 +0000)]
Tweak rc.firewall to allow incoming limited broadcast traffic,
when configured to run in 'client' mode.

PR: conf/15010
Submitted by: Bill Trost, trost at cloud.rain.com
Reviewed by: bz
MFC after: 2 weeks

16 years agoMinor clean up to shave about 1.5k off the size of the driver:
imp [Fri, 6 Jun 2008 05:25:24 +0000 (05:25 +0000)]
Minor clean up to shave about 1.5k off the size of the driver:
o remove unused fields from softc and args from cs_alloc_irq
o remove some commented code that will never be implemented.
o Don't try to send a packet and see if it worked.  We don't
  need this anymore, and it doesn't add any value.
o tweaks for BNC and AUI.
o limit possible time hung in the kernel to 4s rather than 40s.

16 years agoUpdate the manpage to reflect reality:
marcel [Fri, 6 Jun 2008 05:14:16 +0000 (05:14 +0000)]
Update the manpage to reflect reality:
o  The BSD, PC98 and VTOC8 schemes are supported.
o  The bootcode command was added to allow installing bootstrap code
   into the scheme's metadata.

16 years agoSupport for the XScale PXA255 SoC as found on the Gumstix Basix and Connex
benno [Fri, 6 Jun 2008 05:08:09 +0000 (05:08 +0000)]
Support for the XScale PXA255 SoC as found on the Gumstix Basix and Connex
boards.  This is enough to net-boot to multiuser.

Also supported is the SMSC LAN91C111 parts used on the netCF, netDUO and netMMC
add-on boards.

I'll be putting some instructions on how to boot this on the Gumstix boards
online soon.

This is still fairly rough and will be refined over time but I felt it was
better to get this out there where other people can help out.

16 years agoSimplify error checking when reading the function....
imp [Fri, 6 Jun 2008 05:02:36 +0000 (05:02 +0000)]
Simplify error checking when reading the function....

16 years agocs has detach, remove bogus ifdef.
imp [Fri, 6 Jun 2008 05:02:01 +0000 (05:02 +0000)]
cs has detach, remove bogus ifdef.
Remove dedundant initialization of error to 0.

16 years agoThis is a rewritten driver for the SMSC LAN91C111. It's based in part on the
benno [Fri, 6 Jun 2008 05:00:49 +0000 (05:00 +0000)]
This is a rewritten driver for the SMSC LAN91C111.  It's based in part on the
sn(4) driver and also looking at newer drivers.  The reason for the rewrite is
to support MII and to try and resolve some performance issues found when trying
to use the sn(4) driver on the Gumstix network boards.

For reference, the SMSC LAN91C111 is a non-PCI ethernet part whose lineage
dates back to Ye Olde Days of ISA.  It seems to get some use in the embedded
space these days on parts lacking on-board MACs or on-board PCI controllers,
such as the XScale PXA line of ARM CPUs.

This also includes a driver for the SMSC LAN83C183 10/100 PHY.

Man page to follow.

16 years agoRemove unused fields in softc. If they are ever really needed again,
imp [Fri, 6 Jun 2008 04:56:27 +0000 (04:56 +0000)]
Remove unused fields in softc.  If they are ever really needed again,
they can re-added.  Remove CS_NAME.  Don't whine when there's an
ignored checksum error: User has said STFU, so we should S the FU.
(remove mandated properties).

16 years agoAdd more card state dump routines. Decode more bitfields etc.
peter [Fri, 6 Jun 2008 03:23:34 +0000 (03:23 +0000)]
Add more card state dump routines.  Decode more bitfields etc.

16 years agoCheckpoint what I've been running for the last year. Tidy up a
peter [Fri, 6 Jun 2008 03:21:59 +0000 (03:21 +0000)]
Checkpoint what I've been running for the last year.  Tidy up a
bunch of loose ends that "can't happen" any more, if they ever could.

16 years agoUpdate LOCKS syntax.
peter [Thu, 5 Jun 2008 19:47:58 +0000 (19:47 +0000)]
Update LOCKS syntax.

Approved by: core (implicit)

16 years agoFix range check for rtable id.
mlaier [Thu, 5 Jun 2008 19:30:20 +0000 (19:30 +0000)]
Fix range check for rtable id.

16 years agoMake ppp use <termios.h>, not <sys/tty.h>.
ed [Thu, 5 Jun 2008 17:46:32 +0000 (17:46 +0000)]
Make ppp use <termios.h>, not <sys/tty.h>.

ppp's physical.c is filled with calls to termios. For some reason, it
includes <sys/tty.h>, not <termios.h>. Even though this works with the
current version of FreeBSD, we'd better follow the standards.

Approved by: philip (mentor)

16 years agoFix faulty character to control-character conversion for CTRL().
ed [Thu, 5 Jun 2008 17:44:18 +0000 (17:44 +0000)]
Fix faulty character to control-character conversion for CTRL().

The CTRL() macro seems to perform character to control-character
conversion (i.e. 'A' to 0x01) to lowercase characters. This is actually
not valid. If we use lowercase characters, conversions such as
CTRL('\\') and CTRL('?') will result to invalid conversions.

Because we must still support old source code that uses CTRL() (bad!),
we make CTRL() accept both forms. When the character is a lowercase
character, we perform the old style conversion.

Approved by: philip (mentor)

16 years agoFix the wait for default route change I made a few weeks ago by creating
brooks [Thu, 5 Jun 2008 17:26:47 +0000 (17:26 +0000)]
Fix the wait for default route change I made a few weeks ago by creating
a new defaultroute script that just does the wait.  The previous attempt
created a circular dependency through network_ipv6.

Pointy hat to: brooks

16 years agoAdd the missing option LK_NOWITNESS for vn_lock / VOP_LOCK operations.
attilio [Thu, 5 Jun 2008 17:07:33 +0000 (17:07 +0000)]
Add the missing option LK_NOWITNESS for vn_lock / VOP_LOCK operations.

16 years agoAdd the support for the Globetrotter Max 3.6 HSDPA Modem.
attilio [Thu, 5 Jun 2008 16:56:56 +0000 (16:56 +0000)]
Add the support for the Globetrotter Max 3.6 HSDPA Modem.

PR: usb/118374
Submitted by: Greg Rivers <gcr at tharned dot org>

16 years agoObsolete gpt(8) by replacing it with geom(8). Add the glabel and
marcel [Thu, 5 Jun 2008 15:32:05 +0000 (15:32 +0000)]
Obsolete gpt(8) by replacing it with geom(8). Add the glabel and
gpart symlinks for easy access.

16 years agoAllow building a static geom(8) for release related crunched
marcel [Thu, 5 Jun 2008 15:24:10 +0000 (15:24 +0000)]
Allow building a static geom(8) for release related crunched
binaries. In particular, this allows geom to be added to the
boot_crunch binary on ia64.

16 years agoOptimize the CVS bug #17168 fix by relaxing the conditions for update.
obrien [Thu, 5 Jun 2008 15:09:53 +0000 (15:09 +0000)]
Optimize the CVS bug #17168 fix by relaxing the conditions for update.

16 years agoMake the cs(4) driver MPSAFE:
jhb [Thu, 5 Jun 2008 14:49:35 +0000 (14:49 +0000)]
Make the cs(4) driver MPSAFE:
- Add a mutex to the softc to protect the softc and the device hardware.
- Add a private timer to manage transmit watchdogs rather than using
  if_timer/if_watchdog.
- Setup the interrupt handler after ether_ifattach().

Tested by: imp

16 years agoRename the ie_EE16 module to just 'ie' so that at least one of the modules
jhb [Thu, 5 Jun 2008 14:45:32 +0000 (14:45 +0000)]
Rename the ie_EE16 module to just 'ie' so that at least one of the modules
for this driver is called 'ie'.  Otherwise, ifconfig(8) doesn't recognize
any of the modules as being the ie(4) driver and will always try to kldload
the driver even when it is already present in the kernel.

Reported by: Thierry Herbelot

16 years ago- Fix two calls to ieinit() in ieioctl() to call ieinit_locked() instead to
jhb [Thu, 5 Jun 2008 14:43:55 +0000 (14:43 +0000)]
- Fix two calls to ieinit() in ieioctl() to call ieinit_locked() instead to
  avoid recursing on the lock.
- Use IFQ_SET_MAXLEN().

16 years ago- ncurses has been updated to 5.6-20080503
rafan [Thu, 5 Jun 2008 13:37:40 +0000 (13:37 +0000)]
- ncurses has been updated to 5.6-20080503

16 years agoWhen devfs_allocv() committed to create new vnode, since de_vnode is NULL,
kib [Thu, 5 Jun 2008 09:15:47 +0000 (09:15 +0000)]
When devfs_allocv() committed to create new vnode, since de_vnode is NULL,
the dm_lock is held while the newly allocated vnode is locked. Since no
other threads may try to lock the new vnode yet, the LOR there cannot
result in the deadlock.

Shut down the witness warning to note this fact.

Tested by: pho
Prodded by: attilio

16 years agoFix the media auto code by breaking it :-). Auto now just means 'use
imp [Thu, 5 Jun 2008 05:51:19 +0000 (05:51 +0000)]
Fix the media auto code by breaking it :-).  Auto now just means 'use
10BaseT' since it required 10BaseT to have carrier to switch to it.
This chip makes it hard to do proper auto, so we don't do it.  We
can't test carrier on things easily.

Don't insist on carrier when we set the media.  Don't report failures.
Remove a 1s! delay that appears to not be needed.

With these patches, and John Baldwin's patches, I'm able to pass
packets on my IBM EtherJet card again.

16 years agoAdd a newline after usage.
mlaier [Wed, 4 Jun 2008 23:31:53 +0000 (23:31 +0000)]
Add a newline after usage.

16 years agoStyle(9) xe(4). The MD5 sums are different, but comparing the dissassemblies
jhb [Wed, 4 Jun 2008 20:26:57 +0000 (20:26 +0000)]
Style(9) xe(4).  The MD5 sums are different, but comparing the dissassemblies
the only changes are from gcc moving some global variables around slightly.

16 years agoReplace checks for RESCUE in sources with checks for STATIC_GEOM_CLASSES
marcel [Wed, 4 Jun 2008 20:07:59 +0000 (20:07 +0000)]
Replace checks for RESCUE in sources with checks for STATIC_GEOM_CLASSES
and define STATIC_GEOM_CLASSES when building the rescue binary. This way
geom can more easily be part of other crunched binaries, as it requires
only a Makefile change.

16 years agoDe-register declarations.
dwmalone [Wed, 4 Jun 2008 19:50:34 +0000 (19:50 +0000)]
De-register declarations.

16 years agoGah, always reset the timer for the watchdog check.
jhb [Wed, 4 Jun 2008 19:33:23 +0000 (19:33 +0000)]
Gah, always reset the timer for the watchdog check.

16 years agoFix a strict aliasing warning - I think it is really telling us
dwmalone [Wed, 4 Jun 2008 19:16:54 +0000 (19:16 +0000)]
Fix a strict aliasing warning - I think it is really telling us
that the way char * and void * pointers may not be stored in the
same way.

16 years ago- Split the interrupt handler up into separate subroutines for rx, tx, and
jhb [Wed, 4 Jun 2008 15:19:58 +0000 (15:19 +0000)]
- Split the interrupt handler up into separate subroutines for rx, tx, and
  MAC events.
- Use bus_*() rather than bus_space_*() and remove the bus space tag and
  handle from the softc.
- Retire unused macros for examining CIS tuples.

16 years agoRecode the colemak keymap to ISO-8859.
philip [Wed, 4 Jun 2008 12:22:03 +0000 (12:22 +0000)]
Recode the colemak keymap to ISO-8859.

I accidently converted the file to Unicode before committing it and
kbdcontrol doesn't like that very much.

Spotted by: ed
Pointy hat to: philip
MFC after: 1 day

16 years agoAdd device IDs for Ricoh R5U870-based OEM cameras
kevlo [Wed, 4 Jun 2008 10:36:24 +0000 (10:36 +0000)]
Add device IDs for Ricoh R5U870-based OEM cameras

16 years ago- update maintainer's info per src/MAINTAINERS
rafan [Wed, 4 Jun 2008 07:38:38 +0000 (07:38 +0000)]
- update maintainer's info per src/MAINTAINERS

16 years ago- Associate myself with ncurses
rafan [Wed, 4 Jun 2008 07:37:26 +0000 (07:37 +0000)]
- Associate myself with ncurses

16 years agoAdd link register to fatal trap printout to better diagnose NULL
grehan [Wed, 4 Jun 2008 07:32:49 +0000 (07:32 +0000)]
Add link register to fatal trap printout to better diagnose NULL
function pointer derefs.

16 years agoo Improve the probe code dealing with interrupts.
imp [Wed, 4 Jun 2008 06:07:13 +0000 (06:07 +0000)]
o Improve the probe code dealing with interrupts.
o When forced to be 10baseT, don't require that the 10baseT interface
  have link to succeed.  Still require it for IFM_AUTO, however, since it
  appears that there's no way to tell if a specific type of interface
  worked.  I'm doing a web search for a datasheet now to see if there's
  anything obvious.
o Minor incidental formatting nits, including collapsing code of the form
if (foo) {
bar();
} else {
if (baz)
bing();
}
  into:
if (foo) {
bar();
} else if (baz) {
bing();
}
  to save an indentation level.
o Remove stray reference to 3.x config file syntax.

# I believe John's patches still apply after this...

16 years ago- Replace rcsid with __FBSDID.
jkim [Tue, 3 Jun 2008 22:34:52 +0000 (22:34 +0000)]
- Replace rcsid with __FBSDID.
- Remove paths.h and embed it in the source.
- Remove stale alpha support.
- Clean up compiler warnings and fix style(9) bugs.

16 years agoUpdate mctest and its associated script to have a base port to listen
gnn [Tue, 3 Jun 2008 20:54:46 +0000 (20:54 +0000)]
Update mctest and its associated script to have a base port to listen
on so that multiple copies can be run easily.

Update documentation with group and port arguments which are optional.

16 years ago- Change the watchdog timer logic to match other drivers that use their own
jhb [Tue, 3 Jun 2008 20:40:33 +0000 (20:40 +0000)]
- Change the watchdog timer logic to match other drivers that use their own
  timer by keeping a once-a-second timer running that decrements a counter
  similar to if_timer and reset the chip if it gets down to zero via the
  decrement.
- Use IFQ_SET_MAXLEN().

16 years agocvs2svn did not delete this, even though it is empty.
peter [Tue, 3 Jun 2008 19:27:02 +0000 (19:27 +0000)]
cvs2svn did not delete this, even though it is empty.

16 years agoFix the date in the last commit.
rdivacky [Tue, 3 Jun 2008 18:09:10 +0000 (18:09 +0000)]
Fix the date in the last commit.

Approved by: kib (mentor)

16 years agoSwitch to emulating Linux 2.6 on default.
rdivacky [Tue, 3 Jun 2008 17:50:13 +0000 (17:50 +0000)]
Switch to emulating Linux 2.6 on default.

Approved by: kib (mentor)

16 years agoExclude .svn directories from generated distfile.
flz [Tue, 3 Jun 2008 14:48:16 +0000 (14:48 +0000)]
Exclude .svn directories from generated distfile.

16 years agoRemove unneeded Giant locking of /dev/tty.
ed [Tue, 3 Jun 2008 12:38:00 +0000 (12:38 +0000)]
Remove unneeded Giant locking of /dev/tty.

The Giant lock is acquired in two places in tty_tty.c. In both places,
it is unneeded.

There is no reason to specify D_NEEDGIANT on this device node. The
device node has only been designed to return ENXIO when opened. It
doesn't make any sense to lock/unlock Giant, just to return this error.
D_TTY is also unneeded. The unimplemented functions don't need to be
patched by devfs.

We don't need to lock Giant when we want to lookup the proper TTY vnode.
s_ttyvp is already protected by proctree_lock (see devfs_vnops.c).

Approved by: philip (mentor)

16 years agoAdd an XXX comment regarding a bug I introduced when modifying the behavior
rwatson [Tue, 3 Jun 2008 11:06:34 +0000 (11:06 +0000)]
Add an XXX comment regarding a bug I introduced when modifying the behavior
of audit log vnode rotation: on shutdown, we may not properly drain all
pending records, which could lead to lost records during system shutdown.

16 years agoFix markup.
ru [Tue, 3 Jun 2008 09:43:28 +0000 (09:43 +0000)]
Fix markup.

16 years agoAdd note about a reason to use mount(8) instead of mount_somefs.
kib [Tue, 3 Jun 2008 09:05:04 +0000 (09:05 +0000)]
Add note about a reason to use mount(8) instead of mount_somefs.

Reported and proof-readed by: pho
Discussed with: rodrigc
MFC after: 3 days

16 years agoBack out the nlm_global_lock part of the last change - I forgot that only
dfr [Tue, 3 Jun 2008 08:10:58 +0000 (08:10 +0000)]
Back out the nlm_global_lock part of the last change - I forgot that only
exists in my perforce branch :(

Pointy hat: dfr

16 years agoCorrect logic error that would prevent cs pccards from working on
imp [Tue, 3 Jun 2008 05:47:28 +0000 (05:47 +0000)]
Correct logic error that would prevent cs pccards from working on
systems where the CardBus bridge was connected to a APIC.  The case
where the probe routine is told to not setup the IRQ was mishandled
but the error was masked in the case where the IRQ was a valid one
for the card.

MFC after: 1 week

16 years agoAdd device ID for AnyDATA ADU-500A EV-DO modem.
kan [Tue, 3 Jun 2008 03:31:53 +0000 (03:31 +0000)]
Add device ID for AnyDATA ADU-500A EV-DO modem.

Submitted by: Oleksandr Tatmanyants
PR: 118479

16 years agoAdd vendor/device IDs for Novatel U740 repackaged by Dell.
kan [Tue, 3 Jun 2008 03:13:57 +0000 (03:13 +0000)]
Add vendor/device IDs for Novatel U740 repackaged by Dell.

Submitted by: David Gilbert
PR: 122803

16 years agoUpdate if_ndis to remove the legacy if_watchdog interface and
cokane [Tue, 3 Jun 2008 00:55:48 +0000 (00:55 +0000)]
Update if_ndis to remove the legacy if_watchdog interface and
bring it more up to date. The watchdog timer, and its
associated code, is all collapsed into the ndis_tick function
that was implemented for the NDIS-subsystem watchdog. This
implementation is similar to what numerous other drivers use
to implement the watchdog.

Reviewed by: thompsa, jhb
MFC after: 2 weeks

16 years agoFix a crash when Arctic Ocean is selected.
jkim [Mon, 2 Jun 2008 23:37:33 +0000 (23:37 +0000)]
Fix a crash when Arctic Ocean is selected.

MFC after: 1 week

16 years agoAdd proper mime-types for files that they are relevant for.
dougb [Mon, 2 Jun 2008 20:37:11 +0000 (20:37 +0000)]
Add proper mime-types for files that they are relevant for.
This is useful for things like *.pdf files that svn needs
to know about, and will probably be useful down the road
for other things.

16 years agoMake fe(4) MPSAFE:
jhb [Mon, 2 Jun 2008 19:58:48 +0000 (19:58 +0000)]
Make fe(4) MPSAFE:
- Add a mutex to the softc to protect the softc and device hardware.
- Don't leak bus resources if if_alloc() fails during attach.
- Setup the interrupt handler after calling ether_ifattach().
- Use a private timer to manage the transmit watchdog.

Tested by:  WATANABE Kazuhiro  CQG00620 of nifty.ne.jp

16 years agoAdd locking and make xe(4) MPSAFE:
jhb [Mon, 2 Jun 2008 19:43:24 +0000 (19:43 +0000)]
Add locking and make xe(4) MPSAFE:
- Add a mutex to protect the softc and device hardware.
- Use a callout rather than a callout_handle for the media timer.
- Use a dedicated timer for managing the tx watchdog rather than if_timer.
- Fix some resource leaks if xe_attach() fails.
- Shutdown the device before detaching the driver.
- Setup the interrupt handler after ether_ifattach().

Tested by: Ian FREISLICH  ianf of clue.co.za

16 years agoMake ie(4) MPSAFE:
jhb [Mon, 2 Jun 2008 19:17:40 +0000 (19:17 +0000)]
Make ie(4) MPSAFE:
- Add a mutex to the softc and use it to protect the softc and device.
- Setup the interrupt handler in the common code instead of in each front
  end and do it after ether_ifattach().
- Use ie_stop() and ieinit_locked() in iereset() rather than frobbing IFF_UP
  and invoking ieioctl().
- Use DELAY() to implement a spin loop on a register with a timeout rather
  than scheduling a timeout and then doing a tight spin on the register.
  In the non-MPSAFE case this would never have worked because the spinning
  code held Giant and the timeout routine would have been blocked on Giant
  forever.  The same approach would not worke in the MPSAFE case either for
  the same reason, hence use a loop around DELAY().
- Clear IFF_DRV_(RUNNING|OACTIVE) in ie_stop() rather than in callers.
- Call ieinit_locked() directly rather than ieioctl(!) from ie_mc_reset().
- Don't leak the rx frame buffer on detach.

Tested by: Thierry Herbelot  thierry of herbelot.com

16 years agoSort IP addresses before hashing them for the signature. Otherwise carp is
mlaier [Mon, 2 Jun 2008 18:58:07 +0000 (18:58 +0000)]
Sort IP addresses before hashing them for the signature.  Otherwise carp is
sensitive to address configuration order.

PR: kern/121574
Reported by: Douglas K. Rand, Wouter de Jong
Obtained from: OpenBSD (rev 1.114 + fixes)
MFC after: 2 weeks

16 years agoAdd a missing call to init_nsm().
dfr [Mon, 2 Jun 2008 16:00:49 +0000 (16:00 +0000)]
Add a missing call to init_nsm().

MFC after: 1 week

16 years agoWhen attempting to use the NSM state number in a lock request to detect
dfr [Mon, 2 Jun 2008 15:59:10 +0000 (15:59 +0000)]
When attempting to use the NSM state number in a lock request to detect
a client reboot, do this check before performing the lock otherwise we
will trash the new lock along with any other old locks the client held
before rebooting.

Make sure nlm_check_idle always returns with nlm_global_lock held.

MFC after: 1 week

16 years agoWhen allocating temporary storage to hold a TCP/IP packet header
rwatson [Mon, 2 Jun 2008 14:20:26 +0000 (14:20 +0000)]
When allocating temporary storage to hold a TCP/IP packet header
template, use an M_TEMP malloc(9) allocation rather than an mbuf
with mtod(9) and dtom(9).  This eliminates the last use of
dtom(9) in TCP.

MFC after: 3 weeks

16 years agoPush down the major/minor conversion for pts/%u to improve consistency.
ed [Mon, 2 Jun 2008 08:40:06 +0000 (08:40 +0000)]
Push down the major/minor conversion for pts/%u to improve consistency.

In the mpsafetty branch, Linux sshd seems to work properly inside a
jail. Some small modifications had to be made to the Linux compatibility
layer.

The Linux PTY routines always expect the device major number to be 136
or higher. Our code always set the major/minor number pair to 136:0.
This makes routines like ttyname() and ptsname() fail, because we'll end
up having ambiguous device numbers.

The conversion was not performed on all *stat() routines, which meant in
some cases the numbers didn't get transformed. By pushing the conversion
into linux_driver_get_major_minor(), the transformation will take place
on all calls.

Approved by: philip (mentor), rdivacky

16 years agogetopt returns an int, not a char. Make sure that we store the
imp [Mon, 2 Jun 2008 04:50:47 +0000 (04:50 +0000)]
getopt returns an int, not a char.  Make sure that we store the
variable in an int to avoid casting to an unsigned value which causes
the comparison with -1 to fail.

PR: 123807
Submitted by: Matthew Luckie
Reviewed by: keramida@
MFC after: 1 week

16 years agoSlight simplification of the power parsing code, as well as using
imp [Sun, 1 Jun 2008 20:55:34 +0000 (20:55 +0000)]
Slight simplification of the power parsing code, as well as using
autoincrement in some places where it makes sense.  This makes this .o
about 180 bytes smaller on x86 and amd64 with no apparent functional
changes.

16 years agoIncrease LINK_TABLE_OUT_SIZE from 101 to 4001 like LINK_TABLE_IN_SIZE
mav [Sun, 1 Jun 2008 18:34:58 +0000 (18:34 +0000)]
Increase LINK_TABLE_OUT_SIZE from 101 to 4001 like LINK_TABLE_IN_SIZE
to reduce performance degradation under heavy outgoing scan/flood.
Scalability is now much more important then several kilobytes of RAM.

Remove unneded TCP-specific expiration handeling. Before this connected
TCP sessions could never expire. Now connected TCP sessions will expire
after 24hours of inactivity.

Simplify HouseKeeping() to avoid several mul/div-s per packet. Taking into
account increased LINK_TABLE_OUT_SIZE, precision is still much more then
required.

16 years agoMake m_megapullup() more intelligent:
mav [Sun, 1 Jun 2008 17:52:40 +0000 (17:52 +0000)]
Make m_megapullup() more intelligent:
 - to increase performance do not reallocate mbuf when possible,
 - to support up to 16K packets (was 2K max) use mbuf cluster of proper size.
This change depends on recent ng_nat and ip_fw_nat changes.

16 years agoPass really available buffer size to libalias instead of MCLBYTES constant.
mav [Sun, 1 Jun 2008 15:13:32 +0000 (15:13 +0000)]
Pass really available buffer size to libalias instead of MCLBYTES constant.
MCLBYTES constant were used with believe that m_megapullup() always moves
date into a fresh cluster that may become not so.

16 years agoUse INSERT_OBJECT_INT_LINK_INDEX macro instead of TAILQ_INSERT_TAIL when
philip [Sun, 1 Jun 2008 14:09:54 +0000 (14:09 +0000)]
Use INSERT_OBJECT_INT_LINK_INDEX macro instead of TAILQ_INSERT_TAIL when
filling the table of ALTQ queues retrieved from the kernel.

It is possible for the kernel to return the queues not by pa.altq.qid order.
When this happens, pf_snmp would only partially fill its table.

PR: bin/120974
Submitted by: Mykola Dzham <i -at- levsha.org.ua>
MFC after: 3 days

16 years agoRevert the changes I made to devfs_setattr() in r179457.
ed [Sun, 1 Jun 2008 14:02:46 +0000 (14:02 +0000)]
Revert the changes I made to devfs_setattr() in r179457.

As discussed with Robert Watson and John Baldwin, it would be better if
PTY's are created with proper permissions, turning grantpt() into a
no-op.

Bypassing security frameworks like MAC by passing NOCRED to
VOP_SETATTR() will only make things more complex.

Approved by: philip (mentor)

16 years agoTry to detect a Synaptics touchpad before IntelliMouse. Some touchpads will
philip [Sun, 1 Jun 2008 13:44:51 +0000 (13:44 +0000)]
Try to detect a Synaptics touchpad before IntelliMouse.  Some touchpads will
pretend to be IntelliMouse (which have a few more features than generic mice)
causing the IntelliMouse probe to work and the Synaptics code never to be
called.

This should not break "real" IntelliMouse because the Synaptics detection code
is fairly specific.

PR: kern/120833
Submitted by: Eygene Ryabinkin <rea-fbsd -at- codelabs.ru>
MFC after: 1 week

16 years agoPKT_ALIAS_FOUND_HEADER_FRAGMENT result is not an error, so pass that packet.
mav [Sun, 1 Jun 2008 12:29:23 +0000 (12:29 +0000)]
PKT_ALIAS_FOUND_HEADER_FRAGMENT result is not an error, so pass that packet.
This fixes packet fragmentation handeling.

Pass really available buffer size to libalias instead of MCLBYTES constant.
MCLBYTES constant were used with believe that m_megapullup() always moves
date into a fresh cluster that sometimes may become not so.

16 years agoFix packet fragmentation support broken by copy/paste error in rev.1.60.
mav [Sun, 1 Jun 2008 11:47:04 +0000 (11:47 +0000)]
Fix packet fragmentation support broken by copy/paste error in rev.1.60.
ip_id should be u_short, but not u_char.

16 years agoCorrect an error in pmap_promote_pde() that may result in an errant
alc [Sun, 1 Jun 2008 07:36:59 +0000 (07:36 +0000)]
Correct an error in pmap_promote_pde() that may result in an errant
promotion within the kernel's address space.  Specifically,
pmap_promote_pde() is only called when the page table page (PTP) that
is referenced by the given PDE has a full "use count", i.e., its
wire_count is 512.  Although this guarantees for a user address space
that all 512 PTEs in the PTP hold valid mappings, the same is not true
of the kernel's address space.  A kernel PTP always has a use count of
512 regardless of the state of the PTEs.  Therefore,
pmap_promote_pde() should not assume (or assert) that the first PTE in
the PTP is valid.

16 years agoMerge a recent change from the OpenSolaris source tree.
jb [Sun, 1 Jun 2008 01:46:37 +0000 (01:46 +0000)]
Merge a recent change from the OpenSolaris source tree.
(Don't ask for a vendor import of this yet, we're in the early days of svn)

Instead of using cyclic timers to call the state clean and deadman callbacks,
use a callout on FreeBSD to avoid the deadlock on FreeBSD due to trying to
send interprocessor interrupts with interrupts disabled.

Reported by: ps, jhb, peter, thompsa

16 years ago5416 and similar chips grew another region in the pci clock domain
sam [Sat, 31 May 2008 22:44:06 +0000 (22:44 +0000)]
5416 and similar chips grew another region in the pci clock domain
where register accesses do not pass through the byte-lane hardware;
extend the register op macros to deal with this

MFC after: 1 week

16 years agoDont install .svn metadata with the sendmail install.
remko [Sat, 31 May 2008 19:15:15 +0000 (19:15 +0000)]
Dont install .svn metadata with the sendmail install.

Submitted by: marcel
Approved by: imp (mentor, implicit)
MFC after: 3 days

16 years agoRemove a quote about the instant-workstation, this port
remko [Sat, 31 May 2008 18:07:16 +0000 (18:07 +0000)]
Remove a quote about the instant-workstation, this port
has been removed ages ago.

PR: docs/124166
Submitted by: keramida
Prodded by: novel,keramida

16 years agoImport rewritten nve device id's, which brings this more
remko [Sat, 31 May 2008 14:17:36 +0000 (14:17 +0000)]
Import rewritten nve device id's, which brings this more
inline with if_nfe.

PR: 110883
Submitted by: Claudel <regis at claudel dot ch>
Approved by: imp (mentor, implicit)
MFC after: 1 week

16 years agoMerge back devfs changes from the mpsafetty branch.
ed [Sat, 31 May 2008 14:06:37 +0000 (14:06 +0000)]
Merge back devfs changes from the mpsafetty branch.

In the mpsafetty branch, PTY's are allocated through the posix_openpt()
system call. The controller side of a PTY now uses its own file
descriptor type (just like sockets, vnodes, pipes, etc).

To remain compatible with existing FreeBSD and Linux C libraries, we can
still create PTY's by opening /dev/ptmx or /dev/ptyXX. These nodes
implement d_fdopen(). Devfs has been slightly changed here, to allow
finit() to be called from d_fdopen().

The routine grantpt() has also been moved into the kernel. This routine
is a little odd, because it needs to bypass standard UNIX permissions.
It needs to change the owner/group/mode of the slave device node, which
may often not be possible. The old implementation solved this by
spawning a setuid utility.

When VOP_SETATTR() is called with NOCRED, devfs_setattr() dereferences
ap->a_cred, causing a kernel panic. Change the de_{uid,gid,mode} code to
allow changes when a->a_cred is set to NOCRED.

Approved by: philip (mentor)

16 years ago- Add ARM as a platform under development.
hrs [Sat, 31 May 2008 13:45:35 +0000 (13:45 +0000)]
- Add ARM as a platform under development.
- Bump copyright year.

16 years agoNew release notes:
hrs [Sat, 31 May 2008 13:27:16 +0000 (13:27 +0000)]
New release notes:
syscons(4) Colemak keyboard layout support,
jme(4) for JMicron JMC250 Gigabit/JMC260 Fast Ethernet controllers,
ISDN4BSD and netatm removal,
libarchive-based cpio added and GNU cpio renamed as gcpio,
jexec(8) -j option added,
ping6(8) return value is now the same as ping(8),
tar(1) --numeric-owner, -S, and -s options added, and
pkg_create(1) -n option added.

16 years agoAdd the DTrace test kernel module so that people can run the tests.
jb [Sat, 31 May 2008 09:37:40 +0000 (09:37 +0000)]
Add the DTrace test kernel module so that people can run the tests.

16 years agoDis-associate from ncurses.
peter [Sat, 31 May 2008 08:13:58 +0000 (08:13 +0000)]
Dis-associate from ncurses.

16 years agoRemove one of my dead email addresses from a copyright message.
peter [Sat, 31 May 2008 06:03:23 +0000 (06:03 +0000)]
Remove one of my dead email addresses from a copyright message.

16 years agoAfter probing the available frequency settings, restore the CPU to run at
jhb [Fri, 30 May 2008 22:01:09 +0000 (22:01 +0000)]
After probing the available frequency settings, restore the CPU to run at
whatever frequency it started at instead of always picking the highest
frequency.  The first version of this driver attempted to do this, but it
set the speed to the first frequency in the list rather than the value it
had saved.

MFC after: 1 week
Discussed with: rpaulo, phk

16 years agoRemove various and sundry NetBSDism's in preparation for adding locking.
jhb [Fri, 30 May 2008 21:48:05 +0000 (21:48 +0000)]
Remove various and sundry NetBSDism's in preparation for adding locking.

16 years agoTrim an extra semi-colon.
jhb [Fri, 30 May 2008 18:26:37 +0000 (18:26 +0000)]
Trim an extra semi-colon.

16 years agoFix build with DEBUG defined.
jhb [Fri, 30 May 2008 16:22:30 +0000 (16:22 +0000)]
Fix build with DEBUG defined.

Reported by: tinderbox

16 years agoCall the fcntl compatiblity wrapper from the thread library fcntl wrappers
dfr [Fri, 30 May 2008 14:47:42 +0000 (14:47 +0000)]
Call the fcntl compatiblity wrapper from the thread library fcntl wrappers
so that they get the benefit of the (limited) forward ABI compatibility.

MFC after: 1 week

16 years ago- Add long options to pkg_install.
flz [Fri, 30 May 2008 14:26:09 +0000 (14:26 +0000)]
- Add long options to pkg_install.
- Remove check for '-?' as it's not listed in authorized options.
- Bump PKG_INSTALL_VERSION to 20080530.