Commit Graph

129855 Commits

Author SHA1 Message Date
Markus Brueffer
740ae2a34c Fix a buffer overflow iff USB_DEBUG is set, hw.usb.ums.debug is > 5 and the
total size of all input reports is < 6.

PR:		usb/106435
Submitted by:	Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Approved by:	emax (mentor)
MFC after:	3 days
2007-01-17 03:50:45 +00:00
Scott Long
875d25860a Add PCI Id's for upcoming controllers.
Obtained from: LSI Corp.
MFC After: 3 days
2007-01-17 02:58:41 +00:00
Pawel Jakub Dawidek
53feb1d422 Add 3436 file system regression tests in 184 files.
Almost all regression tests are based on very flexible fstest tool.
They verify correctness (POSIX conformance) of almost all file
system-related system calls.

The motivation behind this work is my ZFS port and POSIX, who doesn't
provide free test suites.

Runs on:	FreeBSD/UFS, FreeBSD/ZFS, Solaris/UFS, Solaris/ZFS

To try it out:

	# cd fstest
	# make
	# find tests/* -type d | xargs prove
2007-01-17 01:42:12 +00:00
Olivier Houchard
ebfaa05056 Create bus dma tags for both the PCI bus and the IXP425 root bus. Set the
PCI bus' one as the default one, and explicitely use the other one for
non-PCI devices.
This is needed because the PCI bus can only address 64MB of RAM, while some
IXP425 boards have 128MB or more, and most of the PCI drivers do not bother
providing the parent dma tag.
2007-01-17 00:58:25 +00:00
Olivier Houchard
47010239a8 - Add bounce pages for arm, largely based on the i386 implementation.
- Add a default parent dma tag, similar to what has been done for sparc64.
- Before invalidating the dcache in POSTREAD, save the bits which are in the
same cachelines than our buffers, but not part of it, and restore them after
the invalidation.
2007-01-17 00:53:05 +00:00
Tom Rhodes
752945d6c0 Add a 3rd entry in the cache, which keeps the end position
from just before extending a file.  This has the desired effect
of keeping the write speed constant.  And yes, that helps a lot
copying large files always at full speed now, and I have seen
improvements using benchmarks/bonnie.

Stolen from:	NetBSD
Reviewed by:	bde
2007-01-16 23:43:14 +00:00
Suleiman Souhlal
e8ac01c56a Remove hptlock from the static witness table, now that it's a regular sleep
mutex.
2007-01-16 22:56:28 +00:00
Marius Strobl
0855a1ba50 Resurrect upa(4), now used for the subordinate/slave UPA bridge and
bus hanging off from the Fireplane/Safari bus in some USIII machines.
This is part 3/4 of allowing creator(4) to work in these machines.
The little info needed on how to configure the bridge and to work
around the incorrect values contained in the `interrupts' properties
of its children were obtained form OpenSolaris.
2007-01-16 22:08:27 +00:00
Marius Strobl
d3fc12aff9 - Merge sys/sparc64/creator/creator_upa.c into sys/dev/fb/creator.c.
The separate bus front-end was inherited from the OpenBSD creator(4),
  which at that time had a mainbus(4) (for USI/II machines, which use
  an UPA interconnection bus as the nexus) and an upa(4) (for USIII
  machines, which use a subordinate/slave UPA bus hanging off from the
  Fireplane/Safari interconnection bus) front-end. With FreeBSD and
  newbus there is/will be no need to have two separate bus front-ends
  for these busses, so we can easily coallapse the shared front-end
  and the back-end into a single source file (note that the FreeBSD
  creator_upa.c was misnomer anyway; based on what it actually attached
  to that should have been creator_nexus.c), actually OpenBSD meanwhile
  also has moved to a shared front-end and a single source file. Due
  to the low-level console support creator.c also wasn't free from bus
  related things before.
  While at it, also split sys/sparc64/creator/creator.h into a
  sys/dev/fb/creatorreg.h that only contains register macros and move
  the structures to the top of sys/dev/fb/creator.c as suggested by
  style(9) so creator(4) is no longer scattered over two directories.
- Use OF_decode_addr()/sparc64_fake_bustag() to obtain the bus tags and
  handles for the low-level console support instead of hardcoding
  support for AFB/FFB hanging off from nexus(4) only. This is part 2/4
  of allowing creator(4) to work in USIII machines (which have a UPA
  bus hanging off from the Fireplane/Safari bus reflected by the nexus),
  which already makes it work as the low-level console there.
- Allocate resources in the bus attach routine regardless of whether
  creator(4) is used as for the low-level console and thus the required
  bus tags and handles have been already obtained or not so the resources
  are marked as taken in the respective RMAN.
- For both obtaining the bus tags and handles for the low-level console
  support as well as allocating the corresponding resources in the
  regular bus attach routine don't bother to get all for the maximum of
  24 register banks but only (for) the two tag/handle pairs required for
  providing the video interface for syscons(4) support. If we can't
  allocate the rest of them just limit the memory range accessible via
  creator_fb_mmap() accordingly.
- Sanity check the memory range spanned by the first and last resources
  and the resources in between as far as possible, as the XFree86/Xorg
  sunffb(4) expects to be able to access the whole region, even though
  the backing resources are actually non-continuous. Limit and check
  the memory range accessible via creator_fb_mmap() accordingly.
- Reduce the size of buffers for OFW properties to what they actually
  need to hold.
- Rename some tables to creator_<foo> for consistency.
- Also for the sizes in the creator_fb_mmap() mapping table entries use
  macros for consistency, add macros for the remaining register banks
  for completeness.
2007-01-16 21:08:22 +00:00
Marius Strobl
676503a237 Teach OF_decode_addr() about the bus space used for devices on the
nexus (which might or might not reflect an UPA interconnection bus;
accordingly UPA_BUS_SPACE should be renamed to NEXUS_BUS_SPACE at a
later point) and subordinate/slave UPA busses. This is part 1/4 of
allowing creator(4) to work in USIII machines (which have a UPA bus
hanging off from the Fireplane/Safari bus reflected by the nexus).
2007-01-16 20:42:21 +00:00
Marius Strobl
b4b958792b o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mapping
operation as it ran out of free descriptors or if there are too many
  segments in the first place, call bus_dmamap_unload() in order to
  unload the already loaded segments.
  For trying to map the defragmented mbuf (chain) in re_encap() this
  introduces re_dma_map_desc() setting arg.rl_maxsegs to 0 as a new
  failure mode. Previously we just ignored this case, corrupting our
  view of the TX ring.
o In re_txeof():
  - Don't clear IFF_DRV_OACTIVE unless there are at least 4 free TX
    descriptors. Further down the road re_encap() will bail if there
    aren't at least 4 free TX descriptors, causing re_start() to
    abort and prepend the dequeued mbuf again so it makes no sense
    to pretend we could process mbufs again when in fact we won't.
    While at it replace this magic 4 with a macro RL_TX_DESC_THLD
    throughout this driver.
  - Don't cancel the watchdog timeout as soon as there's at least one
    free TX descriptor but instead only if all descriptors have been
    handled. It's perfectly normal, especially in the DEVICE_POLLING
    case, that re_txeof() is called when only a part of the enqueued
    TX descriptors have been handled, causing the watchdog to be
    disarmed prematurely.
o In re_encap():
  - If m_defrag() fails just drop the packet like other NIC drivers
    do. This should only happen when there's a mbuf shortage, in which
    case it was possible to end up with an IFQ full of packets which
    couldn't be processed as they couldn't be defragmented as they
    were taking up all the mbufs themselves. This includes adjusting
    re_start() to not trying to prepend the mbuf (chain) if re_encap()
    has freed it.
  - Remove dupe initialization of members of struct rl_dmaload_arg to
    values that didn't change since trying to process the fragmented
    mbuf chain.
    While at it remove an unused member from struct rl_dmaload_arg.
o In re_start() remove a abandoned, banal comment. The corresponding
  code was moved to re_attach() some time ago.

With these changes re(4) now survives one day (until stopped) of
hammering out packets here.

Reviewed by:	yongari
MFC after:	2 weeks
2007-01-16 20:35:23 +00:00
Christian Brueffer
fce8985370 Fix a typo in a comment, introduced in rev. 1.19. 2007-01-16 19:46:05 +00:00
John Baldwin
abc007f085 Disable MSI for the Intel 845 and 865 chipsets and update comment for
E7210 to note it is the same devid as the 875 chipset.
2007-01-16 19:44:45 +00:00
Mike Pritchard
6a5c532911 Fix a spelling error. heirarchy -> hierarchy.
Obtained from:	OpenBSD
2007-01-16 19:40:25 +00:00
Mike Pritchard
6192525baf Fix a spelling error in some comments. heirarchy -> hierarchy.
Obtained from: OpenBSD
2007-01-16 19:35:43 +00:00
Maxim Konovalov
198ecec6b9 o Remove duplicate #include <errno.h>.
Obtained from:	NetBSD (submitted by Slava Semushin)
2007-01-16 18:28:43 +00:00
Jung-uk Kim
b2430c5000 Correct driver_t brgphy_driver, which was forgotten from the last commit. 2007-01-16 17:48:57 +00:00
John Baldwin
8bbeb21223 Fix the subvendor ID for PCI-PCI bridges.
- Retire the PCI_SUB*_1 constants and don't try to read a subvendor ID out
  of them.  There isn't a standard subvendor ID field for PCI-PCI bridges.
  Instead, the dword at offset 0x34 is actually mostly reserved except for
  the LSB which is the capabilities pointer.
- Add support for the PCI-PCI bridge subvendor ID capability (13) and use
  it to set the subvendor ID for PCI-PCI bridges.

MFC after:	 1 month
2007-01-16 17:04:42 +00:00
John Baldwin
7029dabe05 Remove duplicate variable initialization.
CID:		1706
Found by:	Coverity Prevent (tm)
2007-01-16 17:01:42 +00:00
Hajimu UMEMOTO
6a550ab34b Avoid infinite loop if nicmp6 and nip6 are not on the same mbuf.
NetBSD PR 34994+35333

MFC after:	3 days
2007-01-16 15:55:29 +00:00
Pawel Jakub Dawidek
e9f0620b9f When we try to set set-gid bit with chmod(2) on a file, which we own, but our
effective group ID (and any of our group) doesn't match the group ID of the
file, we get EPERM.  This doesn't conform POSIX. POSIX requires that we should
return 0, but silently clear the set-gid bit.
2007-01-16 15:17:27 +00:00
Joel Dahl
5c92405025 Fix typo in a comment. 2007-01-16 12:27:13 +00:00
Randall Stewart
9b3386570c Removes useless (flags | ) KASSERT. The ^ one that actually
does what we want.

Submitted by:	Li Xin delphij@delphij.net
Reviewed by:	rrs
Approved by:	gnn
2007-01-16 11:40:55 +00:00
Murray Stokely
b95eac2f41 Add French dvorak keymap that supports accents. Based on Francis
Leboutte's french layout.

Submitted by: Clement Pillias <clementpillias@nerim.net>
MFC after: 1 week
2007-01-16 10:47:56 +00:00
Murray Stokely
71ed4e3258 Provide a more accurate description of the size of the ports collection. 2007-01-16 10:29:10 +00:00
Jung-uk Kim
900e97a881 Move MII model and revision into softc. 2007-01-16 00:52:26 +00:00
Kip Macy
e440d8fff5 Fix warning by adding extra parentheses 2007-01-16 00:09:58 +00:00
Giorgos Keramidas
1833a7eaee Document that uniq(1) limits input line length to LINE_MAX characters.
PR:		docs/107578
Submitted by:	Jan Schaumann, jschauma.at.netmeister.org
MFC after:	3 days
2007-01-15 23:25:51 +00:00
Marius Strobl
c43ab0b9da Check the return value of bus_setup_intr() when setting up the
over-temperature and power-fail interrupts.

Suggested by:	Coverity Prevent (CID 683)
MFC after:	1 week
2007-01-15 22:37:59 +00:00
Jung-uk Kim
d69e0bb92e - Move Ethernet@WireSpeed and jumbo frame configurations to separate
functions.  The idea is taken from OpenBSD.
- Set/clear jumbo frame configurations for bge(4).
- Re-add BCM5750 PHY workaround for bce(4), which was mistakenly removed
from the previous commit.
2007-01-15 22:21:44 +00:00
Jung-uk Kim
5ee49a3a58 - Fix BCM5754 support found in Dell PowerEdge SC440.
- Move some PHY bug detections from brgphy.c to if_bge.c.
- Do not penalize working PHYs.
- Re-arrange bge_flags roughly by their categories.
- Fix minor style(9) nits.

PR:		kern/107257
Obtained from:	OpenBSD
Tested by:	Mike Hibler <mike at flux dot utah dot edu>
2007-01-15 21:43:43 +00:00
Pav Lucistnik
0c09ac0d57 Rewrite the udf_read() routine to use a file vnode instead of the devvp vnode.
The code is modelled after cd9660, including support for simple read-ahead
courtesy of clustered read.

Fix udf_strategy to DTRT.

This change fixes sendfile(2) not to send out garbage.

Reviewed by:	scottl
MFC after:	1 month
2007-01-15 18:45:36 +00:00
Nate Lawson
bd82680347 Clean up some debug prints from last commit and move one under boot -v.
Reminded by:	bruno
2007-01-15 18:17:36 +00:00
Scott Long
df8ed58dc5 Add a missing mutex unlock to an error path.
Submitted by: Yuxiang Luo
PR: 107943
2007-01-15 16:22:20 +00:00
Ruslan Ermilov
f240e019cd Tidy up formatting and some wording. 2007-01-15 15:25:15 +00:00
Randall Stewart
44b7479ba2 - Macroizes the V6ONLY flag check.
- Added a short time wait (not used yet) constant
- Corrected the type of the crc32c table (it was
  unsigned long and really is a uint32_t
- Got rid of the user of MHeaders until they
  are truely needed by lower layers.
- Fixed an initialization problem in the readq structure
  (ordering was off).
- Found yet another collision bug when the random number
  generator returns two numbers on one side (during a collision)
  that are the same. Also added some tracking of cookies
  that will go away when we know that we have the last collision
  bug gone.
- Fixed an init bug for book_size_scale, that was causing
  Early FR code to run when it should not.
- Fixed a flight size tracking bug that was associated with
  Early FR but due to above bug also effected all FR's
- Fixed it so Max Burst also will apply to Fast Retransmit.
- Fixed a bug in the temporary logging code that allowed a
  static log array overflow
- hashinit_flags is now used.
- Two last mcopym's were converted to the macro sctp_m_copym that
  has always been used by all other places
- macro sctp_m_copym was converted to upper case.
- We now validate sinfo_flags on input (we did not before).
- Fixed a bug that prevented a user from sending data and immediately
  shuting down with one send operation.
- Moved to use hashdestroy instead of free() in our macros.
- Fixed an init problem in our timed_wait vtag where we
  did not fully initialize our time-wait blocks.
- Timer stops were re-positioned.
- A pcb cleanup method was added, however this probably will
  not be used in BSD.. unless we make module loadable protocols
- I think this fixes the mysterious timer bug.. it was a
  ordering of locks problem in the way we did timers. It
  now conforms to the timeout(9) manual (except for the
  _drain part, we had to do this a different way due
  to locks).
- Fixed error return code so we get either CONNREUSED or CONNRESET
  depending on where one is in progression
- Purged an unused clone macro.
- Fixed a read erro code issue where we were NOT getting the proper
  error when the connection was reset.
- Purged an unused clone macro.
- Fixed a read erro code issue where we were NOT getting the proper
  error when the connection was reset.
Approved by:	gnn
2007-01-15 15:12:10 +00:00
Randall Stewart
b939bb368a Reviewed by: rwatson
Approved by:	gnn

Add a new function hashinit_flags() which allows NOT-waiting
for memory (or waiting). The old hashinit() function now
calls hashinit_flags(..., HASH_WAITOK);
2007-01-15 15:06:28 +00:00
Maxim Konovalov
36fde22b92 o Add FreeBSD 6.2, bump copyright years. 2007-01-15 06:14:50 +00:00
Gleb Smirnoff
0d1513aa4b Whitespace cleanup.
Checked with:	cvs diff -b
2007-01-15 05:55:56 +00:00
Gleb Smirnoff
bc12a09303 Update ip and tcp pointers after m_pullup().
Submitted by:	Alexander Motin <mav alkar.net>
2007-01-15 05:01:31 +00:00
Sam Leffler
c5bebabde1 add compat shim for ath_hal_isgsmsku until the new hal gets committed 2007-01-15 04:26:19 +00:00
Sam Leffler
9a71a3d565 Add initial support for 900MHz channels; still has some rough
edges but ifconfig ath0 list chan works and you can use ieee
channel #'s to lock/select a channel.

MFC after:	1 month
2007-01-15 01:20:28 +00:00
Sam Leffler
517eabc6fa save changes for handling 5416/5418 parts 2007-01-15 01:17:44 +00:00
Sam Leffler
724c193aed Add initial support for 900MHz cards like the Ubiquiti SR9:
o eliminate assumptions that half/quarter rate channels on exist in 11a
o handle frequency mapping between hal and net80211; hal gives us freq's
  in the range 2422..2437 that we remap

MFC after:	1 month
2007-01-15 01:15:57 +00:00
Sam Leffler
ca4ac7ae14 Add initial support for 900MHz cards like the Ubiquiti SR9:
o add channel flag to enable freq <-> ieee channel # mapping (can
  go away in the future when ieee number is precomputed)
o add mapping between 900mhz freq's and channel #'s that gives a
  unique channel # for each half/quarter/full width channel
o remove assumptions that half/quarter rate channels on happen in 11a
o remove assumptions that all 11g channels are full width
o ensure ic_curchan is reset on mode change so changing the channel
  list (e.g. on countrycode change) doesn't leave curchan set to an
  invalid channel

There is still an issue with switching rate sets; to be fixed separately.

MFC after:	1 month
2007-01-15 01:12:28 +00:00
Marcel Moolenaar
e4da8bea2c Propagate the CPU model to the hw.model sysctl. 2007-01-14 21:45:05 +00:00
Maxim Konovalov
95ebcabed8 o Increment requests counter right before send out an ARP query actually.
Otherwise the code could lead to the spurious EHOSTDOWN errors.

PR:		kern/107807
Submitted by:	Dmitrij Tejblum
MFC after:	1 month
2007-01-14 18:44:17 +00:00
Alexander Leidinger
17011df1e1 MFp4 (112379):
Implement SETALL/GETALL IPC primitives. This fixes some LTP testcases and
LabView is able to proceed a little bit further.

Submitted by:	rdivacky
2007-01-14 16:34:43 +00:00
Alexander Leidinger
973ac082f8 MFp4 (112893):
Make linux_vfork() actually work. This enables make to work again with 2.6.
It also fixes the LTP vfork tests.

Submitted by:	rdivacky
2007-01-14 16:20:37 +00:00
Alexander Leidinger
31becc7692 MFp4 (112705):
Inherit setting of the default emulation version to the jails.

Pointed out by:	jhb
Submitted by:	rdivacky
2007-01-14 16:07:01 +00:00