]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoAdd a test for r185231.
Stefan Farfeleder [Sun, 23 Nov 2008 20:27:03 +0000 (20:27 +0000)]
Add a test for r185231.

15 years agoFix $? at the first command of a function. The previous exit status was saved
Stefan Farfeleder [Sun, 23 Nov 2008 20:23:57 +0000 (20:23 +0000)]
Fix $? at the first command of a function.  The previous exit status was saved
twice and thus lost.

15 years agoDo not use soft PCM volume for digital outputs to allow SPDIF AC3 bypass
Alexander Motin [Sun, 23 Nov 2008 20:19:35 +0000 (20:19 +0000)]
Do not use soft PCM volume for digital outputs to allow SPDIF AC3 bypass
to work. Soft PCM volume (and vchans) unable to bypass AC3 stream now.

15 years agoMark all the places where Linux is not POSIX-compilant. Tested on ext3.
Pawel Jakub Dawidek [Sun, 23 Nov 2008 20:17:17 +0000 (20:17 +0000)]
Mark all the places where Linux is not POSIX-compilant. Tested on ext3.

15 years agoDon't use PRIV_ROOT. Here we check if user can share ZFS file system, so
Pawel Jakub Dawidek [Sun, 23 Nov 2008 20:14:19 +0000 (20:14 +0000)]
Don't use PRIV_ROOT. Here we check if user can share ZFS file system, so
PRIV_NFS_DAEMON seems best choice.

Discussed with: rwatson

15 years agofstest for Linux:
Pawel Jakub Dawidek [Sun, 23 Nov 2008 20:07:00 +0000 (20:07 +0000)]
fstest for Linux:
- Use -- when needed so Linux getopt(3) won't get confused.
- Follow POSIX more closely.

Submitted by: Szabolcs Szakacsits <szaka@ntfs-3g.org>

15 years agoRemove vfs_mountedon(9) manual page. The vfs_mountedon(9) has been
Hiroki Sato [Sun, 23 Nov 2008 20:05:12 +0000 (20:05 +0000)]
Remove vfs_mountedon(9) manual page.  The vfs_mountedon(9) has been
removed since 2004.

15 years agoStrictly differentiate digital and analog PCM devices according to codec
Alexander Motin [Sun, 23 Nov 2008 20:03:58 +0000 (20:03 +0000)]
Strictly differentiate digital and analog PCM devices according to codec
nodes capabilities. Add "Analog"/"Digital" marks to the pcm device names.

I hope it will help new users easier accept concept of several PCM devices
and understand exact purposes of that devices.

15 years agovn_fullpath(9) does not assume vp is locked by the caller now.
Hiroki Sato [Sun, 23 Nov 2008 20:02:58 +0000 (20:02 +0000)]
vn_fullpath(9) does not assume vp is locked by the caller now.

15 years agofstest for Linux:
Pawel Jakub Dawidek [Sun, 23 Nov 2008 20:02:14 +0000 (20:02 +0000)]
fstest for Linux:
Automatically detect file system type.

15 years agoFreeBSD's way of handling rmdir("..") is not POSIX-compilant.
Pawel Jakub Dawidek [Sun, 23 Nov 2008 19:58:26 +0000 (19:58 +0000)]
FreeBSD's way of handling rmdir("..") is not POSIX-compilant.

15 years agoShorter version.
Pawel Jakub Dawidek [Sun, 23 Nov 2008 19:57:16 +0000 (19:57 +0000)]
Shorter version.

15 years agoAdd support for pathconf(2).
Pawel Jakub Dawidek [Sun, 23 Nov 2008 19:56:40 +0000 (19:56 +0000)]
Add support for pathconf(2).

15 years agoDetect operating system automatically.
Pawel Jakub Dawidek [Sun, 23 Nov 2008 19:56:09 +0000 (19:56 +0000)]
Detect operating system automatically.

15 years agoEnhance the explanation of using filesystem-specific mount options
Giorgos Keramidas [Sun, 23 Nov 2008 19:52:56 +0000 (19:52 +0000)]
Enhance the explanation of using filesystem-specific mount options
in /etc/fstab.  We do support passing special options on a per
filesystem type basis, like `-u UID -g GID' for mount_msdosfs, but
the syntax of these options in fstab is non-obvious and a lot of
users have asked about it.

PR: docs/128816
Submitted by: Roland Smith, rsmith at xs4all dot nl
MFC after: 2 days

15 years agofstest for Linux:
Pawel Jakub Dawidek [Sun, 23 Nov 2008 19:50:20 +0000 (19:50 +0000)]
fstest for Linux:
- Use /dev/urandom, it is more portable.
- Implement todo() function which allows to mark known failures.

15 years agoReport card erase sector size as disk stripe size.
Alexander Motin [Sun, 23 Nov 2008 14:32:40 +0000 (14:32 +0000)]
Report card erase sector size as disk stripe size.

15 years agoImprove detach handling: close races, flush queue.
Alexander Motin [Sun, 23 Nov 2008 14:02:06 +0000 (14:02 +0000)]
Improve detach handling: close races, flush queue.

15 years agoImplement -T option as found in Linux df(1). When given, file system type
Pawel Jakub Dawidek [Sun, 23 Nov 2008 13:03:44 +0000 (13:03 +0000)]
Implement -T option as found in Linux df(1). When given, file system type
will be included in output.

Reviewed and tested by: keramida
MFC after: 2 weeks

15 years agoAdd backward compatibility ifdefs for non-multiq kernels
Kip Macy [Sun, 23 Nov 2008 07:30:07 +0000 (07:30 +0000)]
Add backward compatibility ifdefs for non-multiq kernels

15 years agocorrect sorting
Sam Leffler [Sun, 23 Nov 2008 01:51:14 +0000 (01:51 +0000)]
correct sorting

15 years agowork around periodic leak on queue overrun by enabling coalescing of packets in to
Kip Macy [Sun, 23 Nov 2008 00:22:52 +0000 (00:22 +0000)]
work around periodic leak on queue overrun by enabling coalescing of packets in to
work requests by default

15 years agobuf_ring_peek should return NULL if the ring is empty rather than
Kip Macy [Sun, 23 Nov 2008 00:20:51 +0000 (00:20 +0000)]
buf_ring_peek should return NULL if the ring is empty rather than
whatever happened to be at cons_tail last time it was in use

15 years agointr_machdep.h breaks build on some arches and is not needed
Kip Macy [Sun, 23 Nov 2008 00:13:25 +0000 (00:13 +0000)]
intr_machdep.h breaks build on some arches and is not needed

15 years agoUnbreak previous commit.
Marcel Moolenaar [Sat, 22 Nov 2008 22:15:34 +0000 (22:15 +0000)]
Unbreak previous commit.

15 years agoInclude the QUICC backend in the kernel module.
Marcel Moolenaar [Sat, 22 Nov 2008 21:24:07 +0000 (21:24 +0000)]
Include the QUICC backend in the kernel module.

PR: 127120

15 years agoCast to uintptr_t before casting to void*. This allows the
Marcel Moolenaar [Sat, 22 Nov 2008 21:22:53 +0000 (21:22 +0000)]
Cast to uintptr_t before casting to void*. This allows the
QUICC backend to be built on LP64 platforms. This makes it
possible to include the QUICC backend in the kernel module.

PR: 127120

15 years agoAllow multiple makeoption lines to be used with the += operator, this permits
Andrew Thompson [Sat, 22 Nov 2008 21:12:47 +0000 (21:12 +0000)]
Allow multiple makeoption lines to be used with the += operator, this permits
the following syntax in the kernel config.

 makeoptions MODULES_OVERRIDE=foo
 makeoptions MODULES_OVERRIDE+=bar
 makeoptions MODULES_OVERRIDE+=baz

Bump config minor version to 600007.

15 years agoRemove unused variable.
Alexander Motin [Sat, 22 Nov 2008 16:55:55 +0000 (16:55 +0000)]
Remove unused variable.

Found with:     Coverity Prevent(tm)
CID:            3682

15 years agoFix typo. Clear session stats instead of config and part of stats.
Alexander Motin [Sat, 22 Nov 2008 16:40:12 +0000 (16:40 +0000)]
Fix typo. Clear session stats instead of config and part of stats.

Found with: Coverity Prevent(tm)
CID: 2472

15 years agoRemove unneeded NULL check. At first msg can't be null here and and at second
Alexander Motin [Sat, 22 Nov 2008 16:03:18 +0000 (16:03 +0000)]
Remove unneeded NULL check. At first msg can't be null here and and at second
NG_FREE_MSG() also checks it.

Found with: Coverity Prevent(tm)

15 years agoWhitespace cleanup for previous commit.
Alexander Motin [Sat, 22 Nov 2008 15:38:24 +0000 (15:38 +0000)]
Whitespace cleanup for previous commit.

15 years agoHandle device_get_children() errors in more correct way.
Alexander Motin [Sat, 22 Nov 2008 15:35:21 +0000 (15:35 +0000)]
Handle device_get_children() errors in more correct way.
We shouldn't detach until all children are surely destroyed.

Found with:     Coverity Prevent(tm)
CID:            2137

15 years agoChange check order to avoid array overrun.
Alexander Motin [Sat, 22 Nov 2008 14:48:40 +0000 (14:48 +0000)]
Change check order to avoid array overrun.

Found with: Coverity Prevent(tm)
CID: 2497

15 years agoFix amd64 build and re-enable gptzfsboot.
Doug Rabson [Sat, 22 Nov 2008 14:24:55 +0000 (14:24 +0000)]
Fix amd64 build and re-enable gptzfsboot.

15 years agoIFp4: Don't rely on disk IDs and always use vdev guids, which means always look
Pawel Jakub Dawidek [Sat, 22 Nov 2008 13:33:06 +0000 (13:33 +0000)]
IFp4: Don't rely on disk IDs and always use vdev guids, which means always look
up for components by reading metadata. This might be slower when there are big
number of disks in the system, but is definiately more reliable.

15 years agoIFp4: Regression tests for FreeBSD/ZFS chflags(2)/lchflags(2).
Pawel Jakub Dawidek [Sat, 22 Nov 2008 13:27:15 +0000 (13:27 +0000)]
IFp4: Regression tests for FreeBSD/ZFS chflags(2)/lchflags(2).

15 years agoIFp4: Finish implemnetation of chflags(2) for ZFS. While doing this I found
Pawel Jakub Dawidek [Sat, 22 Nov 2008 13:24:44 +0000 (13:24 +0000)]
IFp4: Finish implemnetation of chflags(2) for ZFS. While doing this I found
that zfs_access() can only handle VREAD, VWRITE and VEXEC, for the rest we need
to use vaccess(9).

15 years agoIFp4: Don't free pathname too soon, debugging code is still using it.
Pawel Jakub Dawidek [Sat, 22 Nov 2008 13:22:24 +0000 (13:22 +0000)]
IFp4: Don't free pathname too soon, debugging code is still using it.

15 years agoBusy ufs filesystem around block of code that does ".." lookup. Since
Konstantin Belousov [Sat, 22 Nov 2008 13:11:11 +0000 (13:11 +0000)]
Busy ufs filesystem around block of code that does ".." lookup. Since
mnt_lock is before lock of any vnode on the mp, it uses LK_NOWAIT. Since
MNTK_UNMOUNT may be transient, pdp lock is dropped when vfs_busy()
failed, and operation is retried after some time. This way, ffs_vget()
is not called on the mp that may be in the process of being destroyed by
unmount.

Check for the VI_DOOMED flag on pdp after its lock is reacquired, to
better detect some situations where directory containing ".."
entry is removed during the lookup.

Reviewed by: tegge, attilio (previous version)
Tested by: pho
MFC after: 1 month

15 years agoAdd sv_flags field to struct sysentvec with intention to provide description
Konstantin Belousov [Sat, 22 Nov 2008 12:36:15 +0000 (12:36 +0000)]
Add sv_flags field to struct sysentvec with intention to provide description
of the ABI of the currently executing image. Change some places to test
the flags instead of explicit comparing with address of known sysentvec
structures to determine ABI features.

Discussed with: dchagin, imp, jhb, peter

15 years agoUnbreak LINT.
Joseph Koshy [Sat, 22 Nov 2008 12:34:49 +0000 (12:34 +0000)]
Unbreak LINT.

15 years agoAdd flowid to mbuf to allow drivers to uniquely
Kip Macy [Sat, 22 Nov 2008 08:46:16 +0000 (08:46 +0000)]
Add flowid to mbuf to allow drivers to uniquely
identify connection flows to guarantee ordering
across queues

15 years ago- enable multiple transmit queues
Kip Macy [Sat, 22 Nov 2008 08:05:05 +0000 (08:05 +0000)]
- enable multiple transmit queues
- invert sense of hw.cxgb.singleq tunable to hw.cxgb.multiq
- don't wake up transmitting thread by default
- add per tx queue ifaltq to handle ALTQ
- remove several unused functions in cxgb_multiq.c
- add several sysctls: multiq_tx_enable, coalesce_tx_enable,
  and wakeup_tx_thread
- this obsoletes the hw.cxgb.snd_queue_len as ifq is replaced
  by a buf_ring

15 years agoconvert calls to IFQ_HANDOFF to if_transmit
Kip Macy [Sat, 22 Nov 2008 07:35:45 +0000 (07:35 +0000)]
convert calls to IFQ_HANDOFF to if_transmit

15 years agoDefine mb(), rmb() and wmb() for real.
Marcel Moolenaar [Sat, 22 Nov 2008 06:56:49 +0000 (06:56 +0000)]
Define mb(), rmb() and wmb() for real.

15 years ago- bump __FreeBSD version to reflect added buf_ring, memory barriers,
Kip Macy [Sat, 22 Nov 2008 05:55:56 +0000 (05:55 +0000)]
- bump __FreeBSD version to reflect added buf_ring, memory barriers,
  and ifnet functions

- add memory barriers to <machine/atomic.h>
- update drivers to only conditionally define their own

- add lockless producer / consumer ring buffer
- remove ring buffer implementation from cxgb and update its callers

- add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to
  allow drivers to efficiently manage multiple hardware queues
  (i.e. not serialize all packets through one ifq)
- expose if_qflush to allow drivers to flush any driver managed queues

This work was supported by Bitgravity Inc. and Chelsio Inc.

15 years agoSeveral small additions to the Chelsio 10G driver.
George V. Neville-Neil [Fri, 21 Nov 2008 19:22:25 +0000 (19:22 +0000)]
Several small additions to the Chelsio 10G driver.

1) Fix a bug in dealing with the Alerus 1006 PHY which prevented the
device from ever coming back up once it had been set to down.

2) Add a kernel tunable (hw.cxgb.snd_queue_len) which makes it possible
to give the device more than IFQ_MAXLEN entries in its send queue.  The
default remains 50.

3) Add code to place the card'd identification and serial number into
its description (%desc) so that users can tell which card they have
installed.

15 years ago'Strict EAP conformance' makes more sense here than 'String EAP
Warner Losh [Fri, 21 Nov 2008 18:15:39 +0000 (18:15 +0000)]
'Strict EAP conformance' makes more sense here than 'String EAP
conformance.'

15 years agouse the correct variable in a debug message.
Luigi Rizzo [Fri, 21 Nov 2008 09:14:29 +0000 (09:14 +0000)]
use the correct variable in a debug message.

15 years agoAdd definitions for ZFS pool version 13.
Doug Rabson [Fri, 21 Nov 2008 09:10:35 +0000 (09:10 +0000)]
Add definitions for ZFS pool version 13.

15 years agoDisconnect gptzfsboot from the build until dfr@ gets his act together.
Dag-Erling Smørgrav [Fri, 21 Nov 2008 08:10:07 +0000 (08:10 +0000)]
Disconnect gptzfsboot from the build until dfr@ gets his act together.

15 years agoCreate a /dev/cardbus%d.cis, to be compatible with older versions of
Warner Losh [Fri, 21 Nov 2008 03:03:57 +0000 (03:03 +0000)]
Create a /dev/cardbus%d.cis, to be compatible with older versions of
the software.  This is a trivial amount of code to keep wireless
monitoring software working...  I plan on removing it in 9.0.

15 years ago- According to OpenSolaris, CDMA flushing/syncing for Tomatillos
Marius Strobl [Thu, 20 Nov 2008 18:44:09 +0000 (18:44 +0000)]
- According to OpenSolaris, CDMA flushing/syncing for Tomatillos
  and XMITS has to be basically done in the same manner as for
  the Sabres, i.e. only for devices behind PCI-PCI-bridges and
  after a PIO read on the far side of the farest PCI-PCI-bridge.
  Given that the Tomatillo documentation mentions no difference
  to the Schizo bridges in this regard and this is also still
  part of the procedure described Schizo documentation this
  seems about right so adjust accordingly (the unconditional
  CDMA flushing/syncing previously done was based on how Linux
  behaves).
- Implement CDMA flushing/syncing for Schizo version >= 5,
  which requires the workaround described in Schizo Errata I-23.
  According to Schizo Errata I-13 it's just unusable with
  version < 5 though. [1]
- Don't register the Schizo streaming buffer for now until it's
  usage is sorted out according to the erratas.
- Register our interrupt filters with the revived INTR_FAST so
  they these interrupts can even interrupt filters of device
  drivers as necessary.
- Remove the comment regarding lack of newbus'ified bus_dma(9)
  as being able to associate a DMA tag with a device would
  allow to implement CDMA flushing/syncing in bus_dmamap_sync(9)
  but that would totally kill performance. Given that for devices
  not behind a PCI-PCI bridge the host-to-PCI bridges also only
  do CDMA flushing/syncing based on interrupts there's no
  additional disadvantage for polling(4) callbacks in the case
  schizo(4) has to do the CDMA flushing/syncing but rather a
  general problem.

Reported by: Michael Moll [1]

15 years agoAs reported in kern/118222, pxeboot in RELENG7 (and presumably
Luigi Rizzo [Thu, 20 Nov 2008 14:57:09 +0000 (14:57 +0000)]
As reported in kern/118222, pxeboot in RELENG7 (and presumably
above) exhibits some misbehaviours on machines with AMD64 CPUs,
which at least in some cases I have tracked down to a heap overflow.

It is unclear whether it depends on the CPU or on the pxe bios
itself which may use more memory on AMD machines.

Noticeably a pxeboot compiled from 6.x sources works fine on all
machines I have tried so far, while a pxeboot compiled from 7.x
sources does not.

This patch is a first step in reducing the amount of memory used
while processing the configuration files read by the loader at boot
(some of them are quite large, 1700+ lines), and it does so by:
+ moving a buffer to static memory instead of allocating in the heap;
+ skipping empty lines;
+ reducing the amount of memory used for line descriptors;

Unfortunately there are several changes between 6.x and above,
affecting the compiler, the loader code itself, and libstand,
and it is not so straightforward to
These changes fix the behaviour on one motherboard with a
single-core AMD cpu, but are still not enough e.g on an Asus
M2N-VM (with a dual-core CPU).

I need to investigate the problem a bit more before figuring
out what should be committed to RELENG_7

PR: kern/118222

15 years agodamn. Always do make depend. Forgot to recompile main because of it,
Warner Losh [Thu, 20 Nov 2008 08:32:19 +0000 (08:32 +0000)]
damn.  Always do make depend.  Forgot to recompile main because of it,
so the changes for the struct cis -> struct tuple_list didn't get
made.  They have been now.

15 years agoFix check for link target so we don't print cardbus CIS information twice.
Warner Losh [Thu, 20 Nov 2008 08:30:15 +0000 (08:30 +0000)]
Fix check for link target so we don't print cardbus CIS information twice.
Also, eliminate some magic constants and replace them with values from cis.h.

15 years agoRestore now-useless ioctl as a roadmap. The original dumpcis code
Warner Losh [Thu, 20 Nov 2008 08:20:53 +0000 (08:20 +0000)]
Restore now-useless ioctl as a roadmap.  The original dumpcis code
assumed it had to toggle between attribute and common memory in the
cards.  The kernel is supposed to cope with that automatically and
give us a tuple list.  However, there's a number of details of how
that happens that's currently, ummm, magical and/or not implemented
for 16-bit PC Cards that have CIS_LONGLINK_C tuples in them (eg, mix
both attribute memory and common memory).  Also, CIS_LOGNLINK_A
entries might not be handled completely correctly either, since there
can be gaps in the attribute vs common stuff.

All this will need to be corrected in the kernel.  Once it is
corrected, dumpcis can be made even simpler in some ways, a little
more complicated in others once an API for presentation of CIS to
userland in these weird cases is settled upon.

15 years agoMore dead code removal.
Warner Losh [Thu, 20 Nov 2008 08:14:14 +0000 (08:14 +0000)]
More dead code removal.

15 years agoThe original programs that this code was lifted from (pccardd and
Warner Losh [Thu, 20 Nov 2008 08:12:26 +0000 (08:12 +0000)]
The original programs that this code was lifted from (pccardd and
pccardc) parsed data to make decisions about stuff related to card
configuration.

The purely CIS dumping aspect of this program obviates the need for
such parsing.  Save some space and don't parse the data anymore for
configuration purposes.  Just parse it to print an interpreatation of
it.

15 years agodump() really is unused, so retire it.
Warner Losh [Thu, 20 Nov 2008 03:34:36 +0000 (03:34 +0000)]
dump() really is unused, so retire it.

15 years agoSimplify: move dumpcis.c and dumpcisfile.c into main.
Warner Losh [Thu, 20 Nov 2008 03:30:27 +0000 (03:30 +0000)]
Simplify: move dumpcis.c and dumpcisfile.c into main.

15 years agoUse the interrupt level right below PIL_FAST for executing interrupt
Marius Strobl [Wed, 19 Nov 2008 22:12:32 +0000 (22:12 +0000)]
Use the interrupt level right below PIL_FAST for executing interrupt
filters instead of PIL_FAST and allow special filters and handlers
for interrupts which need to be able to interrupt even filters, f.e.
bus error interrupts, to be registered with the revived INTR_FAST
at PIL_FAST.

15 years agoGiven that the buffer dcons_crom(4) exposes is used for both input
Marius Strobl [Wed, 19 Nov 2008 22:09:03 +0000 (22:09 +0000)]
Given that the buffer dcons_crom(4) exposes is used for both input
and output, set BUS_DMA_COHERENT when creating the DMA map used for
loading the buffer. As a side-effect this solves locking issues on
sparc64 when dcons(4) calls bus_dmamap_sync(9) while in an interrupt
filter, which are executed in a critical section, and iommu(4) has
to use a sleep lock when taking advantage of the streaming buffer.

Reported and tested by: kensmith
Approved by: simokawa

15 years agoAlso make dcons(4) use MPSAFE callouts.
Ed Schouten [Wed, 19 Nov 2008 21:12:26 +0000 (21:12 +0000)]
Also make dcons(4) use MPSAFE callouts.

The callout locks the TTY layer the way it should, so there is no reason
why its callout shouldn't set this flag.

15 years agoMake nmdm(4) use MPSAFE callouts.
Ed Schouten [Wed, 19 Nov 2008 21:07:33 +0000 (21:07 +0000)]
Make nmdm(4) use MPSAFE callouts.

For some reason the nmdm(4) driver doesn't use CALLOUT_MPSAFE, even
though we live in the MPSAFE TTY era. Add the CALLOUT_MPSAFE flags.
System survives.

15 years agoUse "KSE" instead of "kse".
Xin LI [Wed, 19 Nov 2008 20:38:10 +0000 (20:38 +0000)]
Use "KSE" instead of "kse".

15 years agoUse igb(4) entry
Xin LI [Wed, 19 Nov 2008 20:35:37 +0000 (20:35 +0000)]
Use igb(4) entry

15 years agoMake sure legacy replacement route is turned off when enbling HPET.
Jung-uk Kim [Wed, 19 Nov 2008 20:31:38 +0000 (20:31 +0000)]
Make sure legacy replacement route is turned off when enbling HPET.

Reviewed by: jhb

15 years agoFix typo.
John Baldwin [Wed, 19 Nov 2008 20:06:59 +0000 (20:06 +0000)]
Fix typo.

15 years agoFix a scope problem in the multiple routing table code that stopped the
Julian Elischer [Wed, 19 Nov 2008 19:19:30 +0000 (19:19 +0000)]
Fix a scope problem in the multiple routing table code that stopped the
SO_SETFIB socket option from working correctly.

Obtained from: Ironport
MFC after: 3 days

15 years agoInitial storage functionality for U-Boot support library.
Rafal Jaworowski [Wed, 19 Nov 2008 17:34:28 +0000 (17:34 +0000)]
Initial storage functionality for U-Boot support library.

- Only non-sliced bsdlabel style partitioning is currently supported (but provisions
  are made towards GPT support, which should follow soon)
- Enable storage support in loader on ARM

Obtained from: Semihalf

15 years agoImprove error handling in pcib_mbus_identify().
Rafal Jaworowski [Wed, 19 Nov 2008 17:07:01 +0000 (17:07 +0000)]
Improve error handling in pcib_mbus_identify().

15 years agoSome zfsboot fixes from Norikatsu Shigemura:
Doug Rabson [Wed, 19 Nov 2008 16:59:19 +0000 (16:59 +0000)]
Some zfsboot fixes from Norikatsu Shigemura:

1. zfsboot2 (boot2) doesn't %d (printf), so change %d to %u.
2. chase new zpool versioning as SPA_VERSION.
   Obtained from: sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h

Submitted by: nork

15 years agoAdd a GPT-aware variant of zfsboot which should be used in a similar manner
Doug Rabson [Wed, 19 Nov 2008 16:39:01 +0000 (16:39 +0000)]
Add a GPT-aware variant of zfsboot which should be used in a similar manner
to gptboot, i.e. installed in a freebsd-boot partition using /sbin/gpart or
/sbin/gpt.

Tweak the /boot/loader ZFS support so that it can find ZFS pools that are
contained in GPT partitions.

15 years agoIf we free the GPT partition list in bd_open_gpt() because of an error, don't
Doug Rabson [Wed, 19 Nov 2008 16:04:07 +0000 (16:04 +0000)]
If we free the GPT partition list in bd_open_gpt() because of an error, don't
try to free it again in bd_closedisk(). While I'm here, fix a DEBUG print.

15 years agoImprove style(9) and other cosmetics in Marvell SOCs code.
Rafal Jaworowski [Wed, 19 Nov 2008 11:57:16 +0000 (11:57 +0000)]
Improve style(9) and other cosmetics in Marvell SOCs code.

15 years agoFix off-by-one error in mbus_attach().
Rafal Jaworowski [Wed, 19 Nov 2008 11:49:35 +0000 (11:49 +0000)]
Fix off-by-one error in mbus_attach().

15 years agoEnable PCI in Marvell kernel configs.
Rafal Jaworowski [Wed, 19 Nov 2008 11:47:23 +0000 (11:47 +0000)]
Enable PCI in Marvell kernel configs.

15 years agoPCI/PCI-Express support for Marvell systems.
Rafal Jaworowski [Wed, 19 Nov 2008 11:30:44 +0000 (11:30 +0000)]
PCI/PCI-Express support for Marvell systems.

Obtained from: Marvell, Semihalf

15 years agoChange the initialization methodology for global variables scheduled
Marko Zec [Wed, 19 Nov 2008 09:39:34 +0000 (09:39 +0000)]
Change the initialization methodology for global variables scheduled
for virtualization.

Instead of initializing the affected global variables at instatiation,
assign initial values to them in initializer functions.  As a rule,
initialization at instatiation for such variables should never be
introduced again from now on.  Furthermore, enclose all instantiations
of such global variables in #ifdef VIMAGE_GLOBALS blocks.

Essentialy, this change should have zero functional impact.  In the next
phase of merging network stack virtualization infrastructure from
p4/vimage branch, the new initialization methology will allow us to
switch between using global variables and their counterparts residing in
virtualization containers with minimum code churn, and in the long run
allow us to intialize multiple instances of such container structures.

Discussed at: devsummit Strassburg
Reviewed by: bz, julian
Approved by: julian (mentor)
Obtained from: //depot/projects/vimage-commit2/...
X-MFC after: never
Sponsored by: NLnet Foundation, The FreeBSD Foundation

15 years agosrc/sys/dev/usb2/controller/uss820dci_pccard.c
Alfred Perlstein [Wed, 19 Nov 2008 08:56:35 +0000 (08:56 +0000)]
src/sys/dev/usb2/controller/uss820dci_pccard.c
src/sys/dev/usb2/core/usbdevs
src/sys/dev/usb2/include/urio2_ioctl.h
src/sys/dev/usb2/storage/ustorage2_fs.h

These files are not used any more.

src/usr.sbin/Makefile
src/etc/mtree/BSD.include.dist
src/include/Makefile
src/lib/Makefile
src/share/man/man7/hier.7
src/share/mk/bsd.libnames.mk
src/etc/mtree/BSD.include.dist

Make "usbconfig" and "libusb20" a part of the default build.

src/sys/dev/usb/rio500_usb.h
src/sys/dev/usb2/storage/urio2.c

Use common include file.

src/sys/dev/usb2/bluetooth/ng_ubt2.c

Make USB bluetooth depend on "ng_hci" module.

src/sys/dev/usb2/controller/ehci2.c
src/sys/dev/usb2/controller/ehci2.h

Patches for Marvell EHCI.

src/sys/dev/usb2/core/usb2_busdma.c

Bugfix for 64-bit platforms. Need to unload the previously loaded DMA
map and some cleanup regarding some corner cases.

src/sys/dev/usb2/core/usb2_core.h
src/sys/dev/usb2/core/usb2_dev.c
src/sys/dev/usb2/core/usb2_dev.h

Bugfix for libusb filesystem interface.

New feature: Add support for filtering device data at the expense of the
userland process.

Add some more comments.

Some minor code styling.

Remove unused function, usb2_fifo_get_data_next().

Fix an issue about "fifo_index" being used instead of "ep_index".

src/sys/dev/usb2/core/usb2_device.c
src/sys/dev/usb2/core/usb2_generic.c

Bugfix for Linux USB compat layer. Do not free non-generic FIFOs when
doing an alternate setting.

Cleanup USB IOCTL and USB reference handling.
Fix a corner case where USB-FS was left initialised after
setting a new configuration or alternate setting.

src/sys/dev/usb2/core/usb2_hub.c

Improvement: Check all USB HUB ports by default at least one time.

src/sys/dev/usb2/core/usb2_request.c

Bugfix: Make sure destination ASCII string is properly zero terminated
in all cases.

Improvement: Skip invalid characters instead of replacing with a dot.

src/sys/dev/usb2/core/usb2_util.c
src/sys/dev/usb2/image/uscanner2.c

Spelling.

src/sys/dev/usb2/include/Makefile

Share "usbdevs" with the old USB stack.

src/sys/dev/usb2/include/usb2_devid.h
src/sys/dev/usb2/include/usb2_devtable.h

Regenerate files.

Alfred: Please fix the RCS tag at the top.

src/sys/dev/usb2/include/usb2_ioctl.h

Fix compilation of "kdump".

src/sys/dev/usb2/serial/ubsa2.c
src/sys/dev/usb2/serial/ugensa2.c

Remove device ID's which will end up in a new 3G driver.

src/sys/dev/usb2/sound/uaudio2.c

Correct a debug printout.

src/sys/dev/usb2/storage/umass2.c

Sync with old USB stack.

src/lib/libusb20/libusb20.3

Add more documentation.

src/lib/libusb20/libusb20.c

Various bugfixes and improvements.

src/usr.sbin/usbconfig/dump.c
src/usr.sbin/usbconfig/usbconfig.c

New commands for dumping strings and doing custom USB requests from
the command line.

Remove keyword requirements from generated files:
 "head/sys/dev/usb2/include/usb2_devid.h"
 "head/sys/dev/usb2/include/usb2_devtable.h"

15 years agoCorrect a logic error when testing BCE_PHY_SERDES_FLAG.
Xin LI [Wed, 19 Nov 2008 03:24:35 +0000 (03:24 +0000)]
Correct a logic error when testing BCE_PHY_SERDES_FLAG.

PR: kern/128801
Pointed out by: Adam Morrison
Ok'ed by: davidch
MFC after: 3 days

15 years agoAs a matter of good programming style, stop PMCs before releasing
Joseph Koshy [Wed, 19 Nov 2008 02:22:34 +0000 (02:22 +0000)]
As a matter of good programming style, stop PMCs before releasing
them.

15 years agoGrammar.
Xin LI [Wed, 19 Nov 2008 00:25:15 +0000 (00:25 +0000)]
Grammar.

Submitted by: "bf" <bf2006a at yahoo com>

15 years agoUse strlcpy() where appropriate.
Xin LI [Wed, 19 Nov 2008 00:14:15 +0000 (00:14 +0000)]
Use strlcpy() where appropriate.

15 years agoConstify return value of stripath and avoid unnecessary deconst
Xin LI [Wed, 19 Nov 2008 00:09:01 +0000 (00:09 +0000)]
Constify return value of stripath and avoid unnecessary deconst
casts.

15 years ago- fix typo
Daniel Gerzo [Tue, 18 Nov 2008 23:38:47 +0000 (23:38 +0000)]
- fix typo

PR: docs/128973
Submitted by: tabthorpe

15 years ago- Fix a typo in a comment.
John Baldwin [Tue, 18 Nov 2008 23:19:43 +0000 (23:19 +0000)]
- Fix a typo in a comment.
- Whitespace fix.
- Remove #if 0'd BSD 4.x code for flushing busy buffers from a mountpoint
  during an unmount.  FreeBSD uses vflush() for this.

15 years agoWhen looking up the vnode for the device to mount the filesystem on,
John Baldwin [Tue, 18 Nov 2008 23:18:37 +0000 (23:18 +0000)]
When looking up the vnode for the device to mount the filesystem on,
ask NDINIT to return a locked vnode instead of letting it drop the
lock and return a referenced vnode and then relock the vnode a few
lines down.  This matches the behavior of other filesystem mount routines.

15 years agoRemove copy/paste code from UFS to handle sparse blocks. While Rock
John Baldwin [Tue, 18 Nov 2008 23:15:17 +0000 (23:15 +0000)]
Remove copy/paste code from UFS to handle sparse blocks.  While Rock
Ridge does support sparse files, the cd9660 code does not currently
support them.

15 years agoRemove unused i_flags field and IN_ACCESS flag from cd9660 in-memory
John Baldwin [Tue, 18 Nov 2008 23:13:40 +0000 (23:13 +0000)]
Remove unused i_flags field and IN_ACCESS flag from cd9660 in-memory
i-nodes.  cd9660 doesn't support access times.

15 years agoMention that listsnapshots is disabled by default after latest ZFS import.
Xin LI [Tue, 18 Nov 2008 21:41:09 +0000 (21:41 +0000)]
Mention that listsnapshots is disabled by default after latest ZFS import.

15 years agoANSIfy the wwend function.
Roman Divacky [Tue, 18 Nov 2008 21:06:49 +0000 (21:06 +0000)]
ANSIfy the wwend function.

Approved by: kib (mentor)

15 years agoAllow device hints to wire the unit numbers of devices.
John Baldwin [Tue, 18 Nov 2008 21:01:54 +0000 (21:01 +0000)]
Allow device hints to wire the unit numbers of devices.
- An "at" hint now reserves a device name.
- A new BUS_HINT_DEVICE_UNIT method is added to the bus interface.  When
  determining the unit number of a device, this method is invoked to
  let the bus driver specify the unit of a device given a specific
  devclass.  This is the only way a device can be given a name reserved
  via an "at" hint.
- Implement BUS_HINT_DEVICE_UNIT() for the acpi(4) and isa(4) bus drivers.
  Both of these busses implement this by comparing the resources for a
  given hint device with the resources enumerated by ACPI/PnPBIOS and
  wire a unit if the hint resources are a subset of the "real" resources.
- Use bus_hinted_children() for adding hinted devices on isa(4) busses
  now instead of doing it by hand.
- Remove the unit kludging from sio(4) as it is no longer necessary.

Prodding from: peter, imp
OK'd by: marcel
MFC after: 1 month

15 years agoGrammar improvements.
Xin LI [Tue, 18 Nov 2008 20:38:07 +0000 (20:38 +0000)]
Grammar improvements.

Submitted by: kensmith

15 years agoRestore original frequency on exit.
Alexander Motin [Tue, 18 Nov 2008 15:48:23 +0000 (15:48 +0000)]
Restore original frequency on exit.

PR: bin/113813

15 years agoAdd myself
Peter Holm [Tue, 18 Nov 2008 14:05:11 +0000 (14:05 +0000)]
Add myself

Approved by: kib (mentor)

15 years agoSet of powerd enchancements:
Alexander Motin [Tue, 18 Nov 2008 13:24:38 +0000 (13:24 +0000)]
Set of powerd enchancements:

1. Make it more SMP polite. Previous version uses average CPU load that
often leads to load underestimation. It make powerd with default
configuration unusable on systems with more then 2 CPUs. I propose to use
summary load instead of average one. IMO this is the best we can do without
specially tuned scheduler. Also as soon as measuring total load on SMP
systems is more useful then total idle, I have switched to it.

2. Make powerd's operation independent from number and size of frequency
levels. I have added internal frequency counter which translated into real
frequencies only on a last stage and only as good as gone. Some systems may
have only several power levels, while others - many of them, so adaptation
time with previous approach was completely different.

3. As part of previous I have changed adaptive mode to rise frequency on
demand up to 2 times and fall on 1/8 per time internal.

4. For desktop (AC-powered) systems I have added one more mode - "hiadaptive".
It rises frequency twice faster, drops it 4 times slower, prefers twice
lower CPU load and has additional delay before leaving the highest frequency
after the period of maximum load. This mode was specially made to improve
interactivity of the systems where operation capabilities are more
significant then power consumption, but keeping maximum frequency all the
time is not needed.

5. I have reduced default polling interval from 1/2 to 1/4 of second.
It is not so important for algorithm math now, but gives better system
interactivity.

Discussed on: mobile@

15 years ago- Fix two minor errors in at91 code.
Stanislav Sedov [Tue, 18 Nov 2008 12:42:59 +0000 (12:42 +0000)]
- Fix two minor errors in at91 code.

PR: arm/128959
Submitted by: Bjorn Konig <bkoenig@alpha-tierchen.de>
Approved by: kib (mentor)