Commit Graph

153332 Commits

Author SHA1 Message Date
Ulrich Spörlein
2b6974bf61 Bump WARNS where possible.
Checked by:	make universe
Approved by:	ed (co-mentor)
2010-02-15 14:07:40 +00:00
Pawel Jakub Dawidek
784949026c Mark various sysctls also as tunables.
Reviewed by:	rwatson
MFC after:	1 week
2010-02-15 09:19:07 +00:00
Andrew Thompson
8bbbf173a2 Add device ID for the FTDI 4232H.
PR:		usb/143832
Submitted by:	UEMURA Tetsuya
2010-02-14 20:10:41 +00:00
Andrew Thompson
2386d71421 Add support for the E1752 3G modem and the required eject command.
Submitted by:	Milan Obuch
2010-02-14 20:05:12 +00:00
Andrew Thompson
3e889e246c Make umodem more tolerant for devices which modem descriptors are misplaced.
Reported by:	Erick Wales
Submitted by:	Hans Petter Selasky
2010-02-14 19:59:19 +00:00
Andrew Thompson
b60541a9ec Add UQ_KBD_BOOTPROTO quirk needed in r203896 2010-02-14 19:56:05 +00:00
Andrew Thompson
1bdb81f124 Detect when we are polling from kernel via cngetc() in the boot process and
reserve the keypresses so they do not get passed to syscons.

Submitted by:	Hans Petter Selasky
2010-02-14 19:53:45 +00:00
Ed Maste
8e7e6335bc Diff reduction with Adaptec's vendor driver.
Driver version 2.1.9 chosen as that Adaptec version roughly corresponds
with the current feature set merged to the in-tree driver.
2010-02-14 17:14:11 +00:00
Marcel Moolenaar
438e84ae72 Some code cleanups:
o   s/u_int32_t/uint32_t/g
o   Add multiple-inclusion protection.
o   Break long lines.
2010-02-14 17:03:20 +00:00
Marcel Moolenaar
26279767e4 Some code churn:
o   Eliminate IA64_PHYS_TO_RR6 and change all places where the macro is used
    by calling either bus_space_map() or pmap_mapdev().
o   Implement bus_space_map() in terms of pmap_mapdev() and implement
    bus_space_unmap() in terms of pmap_unmapdev().
o   Have ia64_pib hold the uncached virtual address of the processor interrupt
    block throughout the kernel's life and access the elements of the PIB
    through this structure pointer.

This is a non-functional change with the exception of using ia64_ld1() and
ia64_st8() to write to the PIB. We were still using assignments, for which
the compiler generates semaphore reads -- which cause undefined behaviour
for uncacheable memory. Note also that the memory barriers in ipi_send() are
critical for proper functioning.

With all the mapping of uncached memory done by pmap_mapdev(), we can keep
track of the translations and wire them in the CPU. This then eliminates
the need to reserve a whole region for uncached I/O and it eliminates
translation traps for device I/O accesses.
2010-02-14 16:56:24 +00:00
Rui Paulo
12fefae25c Revert part of the 9285 support because it breaks the 9280 support. I'll
try to do the 9285 support without interfering with any other chipset
revisions support.
2010-02-14 16:26:32 +00:00
Luigi Rizzo
28e1dd4b75 use log instead of logverbose in three places so the build won't need
input to run to completion

MFC after:	3 days
2010-02-14 15:55:30 +00:00
Luigi Rizzo
91f88f8e7a a minimal set of changes to adapt to the utmp->utmpx changes.
lastlog still not implemented, i am hoping that Ed or someone
has some idea on how to fix this, but it is really not important.
2010-02-14 15:51:36 +00:00
Konstantin Belousov
d07dc8e3eb Do not leak process lock when current thread is not allowed to see target.
Bumped into by:	ed
MFC after:	3 days
2010-02-14 13:59:01 +00:00
Konstantin Belousov
75fb535394 Rename fields to match better the msdosfs headers. This work is still
incomplete as some info doesn't really belong to the structs where it is
defined.

Submitted by:	Pedro F. Giffuni <giffunip tutopia com>
Reviewed by:	bde
MFC after:	2 weeks
2010-02-14 12:31:28 +00:00
Alexander Motin
b41cd53957 MFp4:
With FBS enabled, we have no idea what command caused timeout.
Implement same logic as in siis(4) - wait for other commands
complete or timeout and then give some more time.
2010-02-14 12:30:35 +00:00
Konstantin Belousov
6069db97f6 Bug fixes from NetBSD
- fix sign-compare issues.
- ANSIfy a couple of functions.
- Remove more duplicate #includes.
- Memory leak found by Coverity on NetBSD.

Submitted by:	Pedro F. Giffuni <giffunip tutopia com>
Reviewed by:	bde
MFC after:	2 weeks
2010-02-14 12:30:30 +00:00
Konstantin Belousov
a1882ff2a2 License changes from NetBSD.
Move to 2 clause license, approved by Wolfgang Solfrank.

Submitted by:	Pedro F. Giffuni <giffunip tutopia com>
MFC after:	2 weeks
2010-02-14 12:28:43 +00:00
Alexander Motin
301c88be98 MFp4:
After last running command completed, give commands in timeout state
second time.
2010-02-14 12:27:49 +00:00
Konstantin Belousov
2490c5654b Rename variables to match msdosfs headers.
Submitted by:	Pedro F. Giffuni <giffunip tutopia com>
Reviewed by:	bde
MFC after:	2 weeks
2010-02-14 12:25:39 +00:00
Konstantin Belousov
fb95e056a5 Some cleanups from NetBSD:
- C99 initializers.
- Change the default volume label from "NO NAME" to "NO_NAME".
- Set OEM String to "BSD4.4 " following the unnamed spacing convention
  in that other OS that suggests "MSWIN4.1"
Also, David Naylor's changes for Clang, mostly changing the signess
of constants.

Submitted by:	Pedro F. Giffuni <giffunip tutopia com>
Clang fixes by:	David Naylor <naylor.b.david gmail com>
Reviewed by:	bde (with some disagreement about Clang issues)
MFC after:	2 weeks
2010-02-14 12:25:03 +00:00
Konstantin Belousov
3c8b687fe1 Invalid filesystem might cause the bp to be never read.
Noted by:	Pedro F. Giffuni <giffunip tutopia com>
Obtanined from:	NetBSD
MFC after:	1 week
2010-02-14 12:10:49 +00:00
Gavin Atkinson
8310a1a27a The -newerXB option was being interpreted the same as the -newerXm option
as a check for F_TIME2_B was missing.  Fix this.

PR:		bin/138245
Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
MFC after:	1 month
2010-02-14 12:08:44 +00:00
Ed Schouten
80445d3f53 Make <sys/timeb.h> work without including <sys/types.h>.
According to the last POSIX specification that contained <sys/timeb.h>,
this header should also typedef time_t properly. Also add a proper
comment to the final #endif.
2010-02-14 12:00:42 +00:00
Rui Paulo
3834e46b8e Also build ah_eeprom_v4k.c when ar9280 is selected. 2010-02-14 11:04:52 +00:00
Kevin Lo
4e92112d57 Correct cpu id for FA526.
While I'm here, add cpu id for FA626TE.
2010-02-14 05:02:08 +00:00
Rick Macklem
9c360f222d Change the default value for vfs.newnfs.enable_locallocks to 0 for
the experimental NFS server, since local locking is known to be
broken and the patch to fix it is still a work in progress.

MFC after:	5 days
2010-02-14 00:18:32 +00:00
Rick Macklem
d5ad662523 This fixes the experimental NFS server so that it won't crash in the
caching code for IPv6 by fixing a typo that used the incorrect variable.
It also fixes the indentation of the statement above it.

Reported by:	simon AT comsys.ntu-kpi.kiev.ua
MFC after:	5 days
2010-02-13 23:56:19 +00:00
Michael Tuexen
8d9d061323 Add missing SCTP_PACKED. Spotted by Irene Ruengeler.
MFC after: 1 week
2010-02-13 21:38:15 +00:00
Marius Strobl
a675da796f Predict KASSERTs to be true. 2010-02-13 19:17:06 +00:00
Marius Strobl
f00d6a0cc2 Add ssm(4), which serves as a glue device allowing devices beneath the
scalable shared memory node, which is used in large UltraSPARC III based
machines to group snooping-coherency domains together, like schizo(4) to
be treated like nexus(4) children.
2010-02-13 19:05:34 +00:00
Marius Strobl
527eebfeeb - Add the 'cmp' and 'core' pseudo-busses which are used to group CPU cores
to the exclusion lists as the CPU nodes aren't handled as regular devices
  either. Also add the pseudo-devices found in Sun Fire V1280.
- Allow nexus_attach() and nexus_alloc_resource() to be used by drivers
  derived from nexus(4) for subordinate busses.
- Don't add the zero-sized memory resources of glue devices to the resource
  lists.
2010-02-13 18:51:49 +00:00
Marius Strobl
ac144cadbc Resurrect nexusvar.h from r167307. 2010-02-13 18:18:45 +00:00
Marius Strobl
1c05d13e3f Style fixes 2010-02-13 17:05:57 +00:00
Marius Strobl
c61b6da840 - Search the whole OFW device tree instead of only the children of the
root nexus device for the CPUs as starting with UltraSPARC IV the 'cpu'
  nodes hang off of from 'cmp' (chip multi-threading processor) or 'core'
  or combinations thereof. Also in large UltraSPARC III based machines
  the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which
  group snooping-coherency domains together instead of directly from the
  nexus.
  It would be great if we could use newbus to deal with the different ways
  the 'cpu' devices can hang off of pseudo ones but unfortunately both
  cpu_mp_setmaxid() and sparc64_init() have to work prior to regular device
  probing.
- Add support for UltraSPARC IV and IV+ CPUs. Due to the fact that these
  are multi-core each CPU has two Fireplane config registers and thus the
  module/target ID has to be determined differently so the one specific
  to a certain core is used. Similarly, starting with UltraSPARC IV the
  individual cores use a different property in the OFW device tree to
  indicate the CPU/core ID as it no longer is in coincidence with the
  shared slot/socket ID.
  This involves changing the MD KTR code to not directly read the UPA
  module ID either. We use the MID stored in the per-CPU data instead of
  calling cpu_get_mid() as a replacement in order prevent clobbering any
  registers as side-effect in the assembler version. This requires CATR()
  invocations from mp_startup() prior to mapping the per-CPU pages to be
  removed though.
  While at it additionally distinguish between CPUs with Fireplane and
  JBus interconnects as these also use slightly different sizes for the
  JBus/agent/module/target IDs.
- Make sparc64_shutdown_final() static as it's not used outside of
  machdep.c.
2010-02-13 16:52:33 +00:00
Gavin Atkinson
08f353ebe3 When growing a UFS1 filesystem, we need to initialise all inodes in any new
cylinder groups that are created.  When the filesystem is first created,
newfs always initialises the first two blocks of inodes, and then in the
UFS1 case will also initialise the remaining inode blocks.  The changes in
growfs.c 1.23 broke the initialisation of all inodes, seemingly based on
this implementation detail in newfs(8).  The result was that instead of
initialising all inodes, we would actually end up initialising all but the
first two blocks of inodes.  If the filesystem was grown into empty
(all-zeros) space then the resulting filesystem was fine, however when
grown onto non-zeroed space the filesystem produced would appear to have
massive corruption on the first fsck after growing.
A test case for this problem can be found in the PR audit trail.

Fix this by once again initialising all inodes in the UFS1 case.

PR:		bin/115174
Submitted by:	Nate Eldredgei  nge cs.hmc.edu
Reviewed by:	mjacob
MFC after:	1 month
2010-02-13 16:22:08 +00:00
Max Laier
193cbc4d24 Fix drbr and altq interaction:
- introduce drbr_needs_enqueue that returns whether the interface/br needs
   an enqueue operation: returns true if altq is enabled or there are
   already packets in the ring (as we need to maintain packet order)
 - update all drbr consumers
 - fix drbr_flush
 - avoid using the driver queue (IFQ_DRV_*) in the altq case as the
   multiqueue consumer does not provide enough protection, serialize altq
   interaction with the main queue lock
 - make drbr_dequeue_cond work with altq

Discussed with:		kmacy, yongari, jfv
MFC after:		4 weeks
2010-02-13 16:04:58 +00:00
Marius Strobl
dfade4c0a4 - At least the trap table of the Sun Fire V1280 firmware apparently has
no cleanwindows handler so just remove trying to trigger it from _start
  and the AP trampoline code as that leads to a crash there. This should
  be okay as leaking data from the OFW via the CPU registers on start of
  the kernel should be no real concern.
- Make the comments of _start and the AP trampoline code regarding the
  initializations they perform match each other and reality.
- Make the comments of the AP trampoline code regarding iTLB accesses
  refer to the right macro.
2010-02-13 15:36:33 +00:00
Marius Strobl
8c56bcac75 Correct the panic strings introduced in r203830 to match their arguments. 2010-02-13 15:12:46 +00:00
Marius Strobl
606e071c41 Use the SUNW,{d,i}tlb-load methods for entering locked TLB entries like
OpenBSD and OpenSolaris do instead of fiddling with the MMUs ourselves.
Unlike direct access the firmware methods don't automatically use the
next free (?) TLB slot, instead the slot to be used has to be specified.
We allocate the TLB slots for the kernel top-down as OpenSolaris suggests
that the firmware will always allocate the ones for its own use bottom-up.
Besides being simpler, according to OpenBSD using the firmware methods is
required to allow booting on Sun Fire E10K with multi-systemboard domains.
2010-02-13 14:40:42 +00:00
Marius Strobl
4f607e8ef2 - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmware
of Sun Fire V1280 doesn't round up the size itself but instead lets
  claiming of non page-sized amounts of memory fail.
- Change parameters and variables related to the TLB slots to unsigned
  which is more appropriate.
- Search the whole OFW device tree instead of only the children of the
  root nexus device for the BSP as starting with UltraSPARC IV the 'cpu'
  nodes hang off of from 'cmp' (chip multi-threading processor) or 'core'
  or combinations thereof. Also in large UltraSPARC III based machines
  the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which
  group snooping-coherency domains together instead of directly from the
  nexus.
- Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these
  are multi-core each CPU has two Fireplane config registers and thus the
  module/target ID has to be determined differently so the one specific
  to a certain core is used. Similarly, starting with UltraSPARC IV the
  individual cores use a different property in the OFW device tree to
  indicate the CPU/core ID as it no longer is in coincidence with the
  shared slot/socket ID.
  While at it additionally distinguish between CPUs with Fireplane and
  JBus interconnects as these also use slightly different sizes for the
  JBus/agent/module/target IDs.
- Check the return value of init_heap(). This requires moving it after
  cons_probe() so we can panic when appropriate. This should be fine as
  the PowerPC OFW loader uses that order for quite some time now.
2010-02-13 14:13:39 +00:00
Konstantin Belousov
699d124f23 Fix function name in the comment in the second location too.
Submitted by:	ed
MFC after:	1 week
2010-02-13 12:50:09 +00:00
Konstantin Belousov
48d1bcf8e0 - Add idempotency guards so the structures can be used in other utilities.
- Update bpb structs with reserved fields.
- In direntry struct join deName with deExtension. Although a
  fix was attempted in the past, these fields were being overflowed,
  Now this is consistent with the spec, and we can now share the
  WinChksum code with NetBSD.

Submitted by:	Pedro F. Giffuni <giffunip tutopia com>
Mostly obtained from:	NetBSD
Reviewed by:	bde
MFC after:	2 weeks
2010-02-13 12:41:07 +00:00
Konstantin Belousov
8b36e81367 Use M_ZERO instead of calling bzero().
Fix function name in the comment.

MFC after:	1 week
2010-02-13 12:11:03 +00:00
Edward Tomasz Napierala
ddcd2bc9ec Remove list of locking primitives, which is kind of redundant, move
information about witness(9) to the section about interactions, and
expand 'contexts' table.
2010-02-13 12:03:03 +00:00
Edward Tomasz Napierala
a26a657cd2 Fix VBAD description. 2010-02-13 11:54:01 +00:00
Andriy Gapon
c12959b335 kgdb: initialize n_type field of nlist entry for kvm_nlist call
kvm_nlist skips lookup for entries that have n_type != N_UNDF.
N_UNDF happens to be zero, so n_type typically has a correct
value by accident, but not always.
Note: jhb has a patch that replaces kvm_nlist use with direct
gdb parsing.

MFC after:	5 days
X-MFC-Note:	unless jhb commits kvm_nlist => kgdb_parse change
2010-02-13 11:47:04 +00:00
Konstantin Belousov
4f160a1c59 Remove unused macros.
MFC after:	1 week
2010-02-13 11:34:25 +00:00
Konstantin Belousov
2950ff259c When ffs_realloccg() failed to allocate bigger fragment and, because
pending blocks are scheduled for removal, goes to retry the (re)allocation,
clear the bp pointer. It might happen that meantime free space is really
exhausted and we are entering nospace: label without bread()ing buffer,
causing stale bp value to be brelse()d again.

Tested by:	pho
    (Producing a scenario to reliably reproduce the
     race appeared to be much harder then fixing the bug)
MFC after:	1 week
2010-02-13 10:34:50 +00:00
Jaakko Heinonen
384e3c00a0 Don't try to determine tape block size when the -P option is used.
This was missed in r203157.

PR:		bin/121502
2010-02-13 10:22:07 +00:00