]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoUse sysctl to fetch stats from the kernel instead of reading variables
jhb [Tue, 10 Jun 2008 18:47:43 +0000 (18:47 +0000)]
Use sysctl to fetch stats from the kernel instead of reading variables
directly via libkvm.

PR: kern/122875, bin/123014
Tested by: Danny Braniss  danny cs.huji.ac.il
MFC after: 1 week

16 years agoMake tx(4) MPSAFE
jhb [Tue, 10 Jun 2008 17:59:43 +0000 (17:59 +0000)]
Make tx(4) MPSAFE
- Add a mutex to the softc to protect the softc and device hardware.
- Use a private timer to implement a watchdog for tx timeouts and drive
  the timer for auto negotiation.
- Use bus_foo() rather than bus_space_foo() and remove the bus space
  tag & handle from the softc.
- Call bus_setup_intr() after ether_ifattach().

Tested by: Florian Smeets  flo of kasimir.com

16 years agoAdd support for the P212, P410, P410i, P411, and P812 HP Smart Array
ps [Tue, 10 Jun 2008 17:51:51 +0000 (17:51 +0000)]
Add support for the P212, P410, P410i, P411, and P812 HP Smart Array
controllers.

Submitted by:  Scott Benesh at HP

16 years agoIn the error path through base_alloc(), release base_mtx [1].
jasone [Tue, 10 Jun 2008 15:46:18 +0000 (15:46 +0000)]
In the error path through base_alloc(), release base_mtx [1].

Fix bit vector initialization for run headers.

Submitted by: [1] Mike Schuster <schuster@adobe.com>

16 years agoAdd the pxa_teardown_intr() bus method function to de-associate the
kevlo [Tue, 10 Jun 2008 06:06:15 +0000 (06:06 +0000)]
Add the pxa_teardown_intr() bus method function to de-associate the
interrupt handler

16 years agoPull all the code to deal with bus space methods into a shared set of
kevlo [Tue, 10 Jun 2008 03:44:14 +0000 (03:44 +0000)]
Pull all the code to deal with bus space methods into a shared set of
routines.

16 years ago>From NetBSD:
kevlo [Tue, 10 Jun 2008 02:41:36 +0000 (02:41 +0000)]
>From NetBSD:
Remove the code which disables port status change interrupts for 1s
when one occured -- this makes that events get lost or delayed until
the next change.

Obtained from: NetBSD

16 years ago- Fixed kern/123696 by increasing firmware timeout value from 100 to 1000.
davidch [Tue, 10 Jun 2008 02:19:11 +0000 (02:19 +0000)]
- Fixed kern/123696 by increasing firmware timeout value from 100 to 1000.
- Fixed a problem on i386 architecture when using split header/jumbo frame
  firmware caused by hardware alignment requirements.
- Added #define BCE_USE_SPLIT_HEADER to allow the feature to be enabled/
  disabled.  Enabled by default.

PR: kern/123696
MFC after: 2 weeks

16 years agoMark "highaddr" and "lowaddr" appropriately. Change "dma" to "DMA".
wkoszek [Mon, 9 Jun 2008 22:13:14 +0000 (22:13 +0000)]
Mark "highaddr" and "lowaddr" appropriately. Change "dma" to "DMA".

Fix spelling mistage found by rodrigc@.

Reviewed by: rodrigc, danger

16 years agoSince we create a DMA tag "mtag" for TX map with bus_dmamap_create(),
wkoszek [Mon, 9 Jun 2008 21:51:48 +0000 (21:51 +0000)]
Since we create a DMA tag "mtag" for TX map with bus_dmamap_create(),
we must synchronize such a map against "mtag" with bus_dmamap_sync(),
not the tag designated for RX map.

Fix it.

Approved by: cognet

16 years agoRemoval of gpt(8) and manpage.
marcel [Mon, 9 Jun 2008 21:36:46 +0000 (21:36 +0000)]
Removal of gpt(8) and manpage.

16 years agoNote removal of gpt(8).
marcel [Mon, 9 Jun 2008 21:33:57 +0000 (21:33 +0000)]
Note removal of gpt(8).

16 years agoRemove gpt(8). It's replaced by gpart(8).
marcel [Mon, 9 Jun 2008 21:30:40 +0000 (21:30 +0000)]
Remove gpt(8). It's replaced by gpart(8).

16 years agoUse the -n flag to route(8) when calling "route get". Otherwise we hang
brooks [Mon, 9 Jun 2008 20:03:35 +0000 (20:03 +0000)]
Use the -n flag to route(8) when calling "route get".  Otherwise we hang
for a long time if we get a lease, but DNS isn't working.

MFC after: 1 week

16 years agoDisconnect gpt(8) from the build. gpt(8) is replaced by gpart(8).
marcel [Mon, 9 Jun 2008 16:42:55 +0000 (16:42 +0000)]
Disconnect gpt(8) from the build. gpt(8) is replaced by gpart(8).

16 years agoDon't store a pointer in "next" if we're never going to use it.
cperciva [Mon, 9 Jun 2008 14:44:56 +0000 (14:44 +0000)]
Don't store a pointer in "next" if we're never going to use it.

Fix typo in checking results of strchr.

Found by: Coverity Prevent

16 years agoMake one-bit fields unsigned instead of signed. This has no effect,
cperciva [Mon, 9 Jun 2008 14:41:28 +0000 (14:41 +0000)]
Make one-bit fields unsigned instead of signed.  This has no effect,
since they are only tested for zero/nonzero; but it's arguably a bad
idea to set a {-1, 0} variable to 1 (as happens in this code).

Found by: Coverity Prevent

16 years agoRework code to avoid using a pointer after freeing it. Aside from the
cperciva [Mon, 9 Jun 2008 14:03:55 +0000 (14:03 +0000)]
Rework code to avoid using a pointer after freeing it.  Aside from the
possibility of memory becoming undereferenceable when it is freed, this
change should have no effect on bsdtar behaviour.

Found by: Coverity Prevent

16 years agoProvide the mutual exclusion between the nfs export list modifications
kib [Mon, 9 Jun 2008 10:31:38 +0000 (10:31 +0000)]
Provide the mutual exclusion between the nfs export list modifications
and nfs requests processing. Lockmgr lock provides the shared locking for
nfs requests, while exclusive mode is used for modifications. The writer
starvation is handled by lockmgr too.

Reported by: kris, pho, many
Based on the submission by: mohan
Tested by: pho
MFC after: 2 weeks

16 years agoDocument the misleading nature of the REQUIRE line. The patch in
mtm [Mon, 9 Jun 2008 09:07:58 +0000 (09:07 +0000)]
Document the misleading nature of the REQUIRE line. The patch in
the PR has been heavily edited for style(9) and clarity. Mistakes are
mine.

PR: bin/124251

16 years agoRemove sicontrol(8)'s "ttystat".
ed [Mon, 9 Jun 2008 08:43:27 +0000 (08:43 +0000)]
Remove sicontrol(8)'s "ttystat".

In the FreeBSD base system, there are only two utilities that use struct
tty, namely pstat and sicontrol. The sicontrol utility calls the
TCSI_TTY ioctl(), which copies struct tty back to userspace.

sicontrol should not have this functionality. The same data is already
provided by pstat. If we really want to be able to export these numbers
through a file descriptor to userspace, we can export struct xtty, which
should provide a better abstraction. The ttystat option was only used as
a debugging aid.

This makes sicontrol compile in the mpsafetty branch.

Reviewed by: peter
Approved by: philip (mentor)

16 years agoChange the CTF conversion makefile code to use a new line to avoid
jb [Mon, 9 Jun 2008 06:33:26 +0000 (06:33 +0000)]
Change the CTF conversion makefile code to use a new line to avoid
spawning another shell.

Requested by: Ed Schouten

M    config/mkmakefile.c

16 years agoRemove some sparc-specific stuff from my earlier sun4v work in p4.
jb [Mon, 9 Jun 2008 06:31:17 +0000 (06:31 +0000)]
Remove some sparc-specific stuff from my earlier sun4v work in p4.
It never belonged in current.

Pointed out by: marius

16 years agoRemove sa1_cache_clean_addr
kevlo [Mon, 9 Jun 2008 05:53:04 +0000 (05:53 +0000)]
Remove sa1_cache_clean_addr

16 years agoUnify arminit() and clean up
kevlo [Mon, 9 Jun 2008 05:50:42 +0000 (05:50 +0000)]
Unify arminit() and clean up

16 years agoMake pthread_cleanup_push() and pthread_cleanup_pop() as a pair of macros,
davidxu [Mon, 9 Jun 2008 01:14:10 +0000 (01:14 +0000)]
Make pthread_cleanup_push() and pthread_cleanup_pop() as a pair of macros,
use stack space to keep cleanup information, this eliminates overhead of
calling malloc() and free() in thread library.

Discussed on: thread@

16 years agoChange header file references from <filename>.h to
wkoszek [Sun, 8 Jun 2008 21:08:20 +0000 (21:08 +0000)]
Change header file references from <filename>.h to
path relative to /usr/include. It looks much better anyway.

Instead of referencing "socket", which is bogus, reference
'sys/socket.h', which is what should be placed here from
the beggining.

Suggested by: maxim

16 years agoFix the way the date must be specified (leading 0 is redundant).
wkoszek [Sun, 8 Jun 2008 21:01:39 +0000 (21:01 +0000)]
Fix the way the date must be specified (leading 0 is redundant).
Fix several spelling mistakes brought by my earlier commit.
Trim whitespace.

Submitted by: maxim

16 years agoRemove checks against DDB, which isn't used in this file.
wkoszek [Sun, 8 Jun 2008 20:43:27 +0000 (20:43 +0000)]
Remove checks against DDB, which isn't used in this file.

My intention is to bring no functional change.

Discussion on: IRC
Reviewed by: ed, kan, rink,

16 years agoI missed some "register"s in non-dot-C files.
dwmalone [Sun, 8 Jun 2008 19:59:15 +0000 (19:59 +0000)]
I missed some "register"s in non-dot-C files.

16 years ago- Display '-C' option in usage().
stas [Sun, 8 Jun 2008 19:48:41 +0000 (19:48 +0000)]
- Display '-C' option in usage().

Approved by: kib

16 years agoThe change to add subversion ID has two problems. The first is that when
dougb [Sun, 8 Jun 2008 19:46:23 +0000 (19:46 +0000)]
The change to add subversion ID has two problems. The first is that when
newvers.sh is run pwd is actually the obj directory, so "../../.svn"
doesn't exist and the test always fails. The second is that buildkernel
is executed with a restrictive PATH, so unless you have svnversion in
/bin or /usr/bin it can't run.

Fix this by looking for svnversion in /bin, /usr/bin, and /usr/local/bin
in that order. If found, store the location and derive the value of the
source directory. Then run svnversion in the appropriate directory.

There is one possible refinement which would be to add a test for
LOCALBASE!=/usr/local if we don't find svnversion the first time, but
IMO that's not necessary at this time.

16 years agoFixed the output grammar to properly speak non-terminal dits.
scf [Sun, 8 Jun 2008 19:35:47 +0000 (19:35 +0000)]
Fixed the output grammar to properly speak non-terminal dits.

Updated Lyndon Nerenberg's radio callsign and E-mail address.

PR: bin/7868
Submitted by: Lyndon Nerenberg <lyndon@orthanc.ca>
MFC after: 1 week

16 years agoFix typo in comment.
rpaulo [Sun, 8 Jun 2008 14:42:43 +0000 (14:42 +0000)]
Fix typo in comment.

16 years agoMake usage() 'static'.
wkoszek [Sun, 8 Jun 2008 12:43:02 +0000 (12:43 +0000)]
Make usage() 'static'.

16 years agod_ino member of linux_dirent structure should be unsigned long.
rdivacky [Sun, 8 Jun 2008 11:09:25 +0000 (11:09 +0000)]
d_ino member of linux_dirent structure should be unsigned long.

Submitted by: Chagin Dmitry <chagin.dmitry@gmail.com>
Approved by: kib (mentor)

16 years agoBring more commands to the ddb(4) manual page. This should be considered
wkoszek [Sun, 8 Jun 2008 09:09:08 +0000 (09:09 +0000)]
Bring more commands to the ddb(4) manual page. This should be considered
"complete" list, but some commands might be still missing.

Reviewed by: julian

16 years agoFix spelling of "virtual".
wkoszek [Sun, 8 Jun 2008 08:56:46 +0000 (08:56 +0000)]
Fix spelling of "virtual".

There should be no visible change.

Reviewed by: rink

16 years agoEthernet hardware address stored in DC_AL_PAR0/DC_AL_PAR1 register
yongari [Sun, 8 Jun 2008 02:52:26 +0000 (02:52 +0000)]
Ethernet hardware address stored in DC_AL_PAR0/DC_AL_PAR1 register
is in little endian form. Likewise setting DC_AL_PAR0/DC_AL_PAR1
register expect the address to be in little endian form. For big
endian architectures the address should be swapped to get correct
one.
Change setting/getting ethernet hardware address to big endian
architecture frendly.

Reported by: Robert Murillo ( billypilgrim782001 at yahoo dot com )
Tested by: Robert Murillo ( billypilgrim782001 at yahoo dot com )

16 years agoMove bm(4) from the sys/conf/NOTES to sys/powerpc/conf/NOTES.
marcel [Sun, 8 Jun 2008 01:58:11 +0000 (01:58 +0000)]
Move bm(4) from the sys/conf/NOTES to sys/powerpc/conf/NOTES.
The driver applies to PowerPC only.

16 years agoAdd support for the Apple Big Mac (BMAC) Ethernet controller,
marcel [Sat, 7 Jun 2008 22:58:32 +0000 (22:58 +0000)]
Add support for the Apple Big Mac (BMAC) Ethernet controller,
found on various Apple G3 models.

Submitted by: Nathan Whitehorn

16 years agoAdd support for Apple's Descriptor-Based DMA (DBDMA) engine. The DMA
marcel [Sat, 7 Jun 2008 21:56:48 +0000 (21:56 +0000)]
Add support for Apple's Descriptor-Based DMA (DBDMA) engine. The DMA
engine is usful to various  existing drivers, such as ata(4) and scc(4),
and is used bhy the soon to be added bm(4).

Submitted by: Nathan Whitehorn

16 years agoChange the calling convention for ic_node_alloc to deal with
sam [Sat, 7 Jun 2008 18:38:02 +0000 (18:38 +0000)]
Change the calling convention for ic_node_alloc to deal with
some longstanding issues:
o pass the vap since it's now the "coin of the realm" and required
  to do things like set initial tx parameters in private node
  state for use prior to association
o pass the mac address as cards that maintain outboard station
  tables require this to create an entry (e.g. in ibss mode)
o remove the node table reference, we only have one node table
  and it's unlikely this will change so this is not needed to
  find the com structure

16 years agoSplit ieee80211_notify_erp into locked and unlocked variants
sam [Sat, 7 Jun 2008 17:51:41 +0000 (17:51 +0000)]
Split ieee80211_notify_erp into locked and unlocked variants
and use the locked version to handle the hostap input path
case where the com lock is not already held.

Noticed by: Jared Go

16 years agoFix node cleanup issues when the last reference is held by
sam [Sat, 7 Jun 2008 17:50:24 +0000 (17:50 +0000)]
Fix node cleanup issues when the last reference is held by
the driver (e.g. in the tx q); ni_vap may not be valid, we
must carefully check before using it.

16 years agocorrect code returned in AsssocResp; the previous code is spec'd for use
sam [Sat, 7 Jun 2008 17:43:41 +0000 (17:43 +0000)]
correct code returned in AsssocResp; the previous code is spec'd for use
only in deauth+disassoc frames

Submitted by: Chris Zimmermann
MFC after: 1 month

16 years agouse 'const' for the parameters of the two static functions unalias() and hashalias()
rse [Sat, 7 Jun 2008 16:28:20 +0000 (16:28 +0000)]
use 'const' for the parameters of the two static functions unalias() and hashalias()

16 years agoremove an unnecessary include
rse [Sat, 7 Jun 2008 16:19:28 +0000 (16:19 +0000)]
remove an unnecessary include

16 years agoIf we can find it, include SVN version number in kernel version strings.
phk [Sat, 7 Jun 2008 09:49:57 +0000 (09:49 +0000)]
If we can find it, include SVN version number in kernel version strings.

See also: http://www.bikeshed.org/

16 years agoUnbreak last commit to ln for amd64.
keramida [Sat, 7 Jun 2008 09:37:30 +0000 (09:37 +0000)]
Unbreak last commit to ln for amd64.

Cast string precision to `int'.  amd64 systems warn about the
field precision being `long int' if we don't, and pathnames are
normally short enough to fit in an `int'.

Noticed by: pav

16 years agoFix the incorrect calculation of a block address within a single indirect
kib [Sat, 7 Jun 2008 05:49:24 +0000 (05:49 +0000)]
Fix the incorrect calculation of a block address within a single indirect
block.

PR: 108215
Submitted by: Yuichiro Goto, y7goto gmail com
MFC after: 2 weeks

16 years agoWorkaround a bug in the BIOS of Dell R900 machines. Specifically, each
jhb [Sat, 7 Jun 2008 03:07:32 +0000 (03:07 +0000)]
Workaround a bug in the BIOS of Dell R900 machines.  Specifically, each
entry in the SMAP is a 20 byte structure and they are queried from the
BIOS via sucessive BIOS calls.  Due to an apparent bug in the R900's
BIOS, for some SMAP requests the BIOS overflows the 20 byte buffer
trashing a few bytes of memory immediately after the SMAP structure.  As
a workaround, add 8 bytes of padding after the SMAP structure used in
the loader for SMAP queries.

PR: i386/122668
Submitted by: Mike Hibler  mike flux.utah.edu, silby
MFC after: 3 days

16 years agoDocument the new -p and -i options for writing bootstrap code into
marcel [Sat, 7 Jun 2008 00:14:06 +0000 (00:14 +0000)]
Document the new -p and -i options for writing bootstrap code into
a partition. Make it clear that the -b option embeds boot code in
the meta-data.

16 years agoEnhance the bootcode command to also allow bootcode to be written
marcel [Fri, 6 Jun 2008 23:58:29 +0000 (23:58 +0000)]
Enhance the bootcode command to also allow bootcode to be written
to a partition. This avoids that users need to use dd(1) to install
boot code (as is needed for VTOC8 and booting GPT on PCs).

16 years agoAdd two support functions:
marcel [Fri, 6 Jun 2008 22:44:03 +0000 (22:44 +0000)]
Add two support functions:
o  gctl_delete_param() -- intended for parameters that are consumed
   by geom(8) itself and which should not be passed to the kernel.
o  gctl_has_param() -- intended to check if optional parameters are
   present.

Both are needed by gpart(8) to process the optional parameter for
writing bootcode to a partition (as part of the bootcode verb).
However, the kernel is itself not involved in this matter and the
parameter needs to be removed from the request destined for the
kernel.

16 years agoUpdate description text
peter [Fri, 6 Jun 2008 21:32:01 +0000 (21:32 +0000)]
Update description text

16 years ago- Store the device_t of the smbX device in the softc.
jhb [Fri, 6 Jun 2008 18:45:32 +0000 (18:45 +0000)]
- Store the device_t of the smbX device in the softc.
- Store the softc of the device in the 'si_drv1' of the cdev.
- Lookup the softc via 'si_drv1' in cdev methods rather than using the
  minor number as a unit for devclass_get_softc().
- Lookup the device_t via the softc field in cdev methods rather than
  using the minor number as a unit for devclass_get_device().
- Add a mutex to the softc to protect 'sc_opened'.
- Remove D_NEEDGIANT as all the smbus drivers are now MPSAFE and this driver
  is now MPSAFE.
- Remove some checks for NULL softc pointers that can't happen and don't
  bzero the softc during attach.

16 years agoExplicitly lock Giant in smbus_if methods in the bktr_i2c and iicsmb
jhb [Fri, 6 Jun 2008 18:40:38 +0000 (18:40 +0000)]
Explicitly lock Giant in smbus_if methods in the bktr_i2c and iicsmb
drivers for now.  This can be replaced with driver locks when these
drivers are locked.

16 years agoEssentially, neither madvise(..., MADV_DONTNEED) nor madvise(..., MADV_FREE)
alc [Fri, 6 Jun 2008 18:38:43 +0000 (18:38 +0000)]
Essentially, neither madvise(..., MADV_DONTNEED) nor madvise(..., MADV_FREE)
work.  (Moreover, I don't believe that they have ever worked as intended.)
The explanation is fairly simple.  Both MADV_DONTNEED and MADV_FREE perform
vm_page_dontneed() on each page within the range given to madvise().  This
function moves the page to the inactive queue.  Specifically, if the page is
clean, it is moved to the head of the inactive queue where it is first in
line for processing by the page daemon.  On the other hand, if it is dirty,
it is placed at the tail.  Let's further examine the case in which the page
is clean.  Recall that the page is at the head of the line for processing by
the page daemon.  The expectation of vm_page_dontneed()'s author was that
the page would be transferred from the inactive queue to the cache queue by
the page daemon.  (Once the page is in the cache queue, it is, in effect,
free, that is, it can be reallocated to a new vm object by vm_page_alloc()
if it isn't reactivated quickly enough by a user of the old vm object.)  The
trouble is that nowhere in the execution of either MADV_DONTNEED or
MADV_FREE is either the machine-independent reference flag (PG_REFERENCED)
or the reference bit in any page table entry (PTE) mapping the page cleared.
Consequently, the immediate reaction of the page daemon is to reactivate the
page because it is referenced.  In effect, the madvise() was for naught.
The case in which the page was dirty is not too different.  Instead of being
laundered, the page is reactivated.

Note: The essential difference between MADV_DONTNEED and MADV_FREE is
that MADV_FREE clears a page's dirty field.  So, MADV_FREE is always
executing the clean case above.

This revision changes vm_page_dontneed() to clear both the machine-
independent reference flag (PG_REFERENCED) and the reference bit in all PTEs
mapping the page.

MFC after: 6 weeks

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