Commit Graph

78431 Commits

Author SHA1 Message Date
Adrian Chadd
53436ace02 Extend the mx25l erase function to support different erase commands. 2010-07-19 21:46:40 +00:00
Pyun YongHyeon
c87831d8f4 Do not report current link state if interface is not UP.
Reviewed by:	davidch
2010-07-19 21:41:54 +00:00
Adrian Chadd
d2cf1fd5e4 Extend the mx25l flash device support to include a set of per-device
flags.

Some of these parts will support 4K/32K block erases rather than
a sector erase. This includes (at least) the MX25L128.
2010-07-19 21:38:15 +00:00
Pyun YongHyeon
f8bfabe733 Correctly check the result of media selection. Previously it always
returned success.

Reviewed by:	davidch
2010-07-19 21:38:07 +00:00
Pyun YongHyeon
a3e063e20d Don't change current media in bce_stop(). There is no need to do
this here.

Reviewed by:	davidch
2010-07-19 21:32:47 +00:00
Pyun YongHyeon
68de78a5fa Have bce_init_ctx() return error code and make caller check the
return code. If context was not setup correctly give up
initialization. While I'm here move variable declarations to the
beginning of the function.

Reviewed by:	davidch
2010-07-19 21:25:05 +00:00
Pyun YongHyeon
5c4ac8ba07 When we didn't find a matching flash device, do not touch flash
config data. While I'm here, use return code of bce_init_nvram()
to set error instead of directly setting ENODEV.

Reviewed by:	davidch
2010-07-19 21:13:07 +00:00
Jung-uk Kim
25a14f561c Improve style slightly. 2010-07-19 20:31:04 +00:00
Rafal Jaworowski
294e2f046a Now that we are fully FDT-driven on MRVL platforms, remove PHYSMEM_SIZE option. 2010-07-19 19:19:33 +00:00
Jung-uk Kim
490770af47 Fix two long-standing line wrapping bugs in VGA renderer for pixel mode.
Font size may be smaller than 16 and logical scan line may be larger than
the displayed scan line.

MFC after:	3 days
2010-07-19 18:56:18 +00:00
Rafal Jaworowski
4f124b977c Eliminate FDT_IMMR_VA define.
This removes platform dependencies from <machine>/fdt.h for the benfit of
portability.
2010-07-19 18:47:18 +00:00
Rafal Jaworowski
5710b7a9da Move MRVL FDT fixups and PIC decode routine to a platform specific area.
This allows for better encapsulation (and eliminates generic fdt_arm.c, at
least for now).
2010-07-19 18:41:50 +00:00
Pyun YongHyeon
6c9a12e7b0 Implement WOL. WOL is supported on RTL8139B or newer controllers.
PR:	kern/148013
2010-07-19 18:01:06 +00:00
Adrian Chadd
dddd00f6a4 Include 4k/32k erase commands.
These were sourced from the MX25L128 datasheet and match up
with what is used in Linux mtd/devices/m25p80.c .

Add a FreeBSD keyword whilst I'm here.
2010-07-19 15:05:35 +00:00
Rick Macklem
6ec1ef63d1 Add a call to nfscl_mustflush() in nfs_close() of the experimental
NFSv4 client, so that attributes are not acquired from the server
when a delegation for the file is held. This can reduce the number
of Getattr Ops significantly.

MFC after:	2 weeks
2010-07-18 22:35:46 +00:00
Edward Tomasz Napierala
1a996ed1d8 Revert r210225 - turns out I was wrong; the "/*-" is not license-only
thing; it's also used to indicate that the comment should not be automatically
rewrapped.

Explained by:	cperciva@
2010-07-18 20:57:53 +00:00
Edward Tomasz Napierala
805cc58ac0 The "/*-" comment marker is supposed to denote copyrights. Remove non-copyright
occurences from sys/sys/ and sys/kern/.
2010-07-18 20:23:10 +00:00
Edward Tomasz Napierala
eea4ac8b3f Remove outdated comment and move part of it into more applicable place. 2010-07-18 19:29:12 +00:00
Edward Tomasz Napierala
3ea270e878 Style fix - keep the line length below 80 characters.
Submitted by:	bde@
2010-07-18 11:13:36 +00:00
Ivan Voras
1de98e0687 In keeping with the Age-of-the-fruitbat theme, scale up hirunningspace on
machines which can clearly afford the memory.

This is a somewhat conservative version of the patch - more fine tuning may be
necessary.

Idea from: Thread on hackers@
Discussed with: alc
2010-07-18 10:15:33 +00:00
Edward Tomasz Napierala
9c76e90717 Style fix. 2010-07-18 08:54:31 +00:00
Edward Tomasz Napierala
dce36a0159 Fix build.
Submitted by:	Andreas Tobler <andreast-list at fgznet.ch>
2010-07-18 07:55:22 +00:00
Lawrence Stewart
79848522b5 - Move common code from the hook functions that fills in a packet node struct to
a separate inline function. This further reduces duplicate code that didn't
  have a good reason to stay as it was.

- Reorder the malloc of a pkt_node struct in the hook functions such that it
  only occurs if we managed to find a usable tcpcb associated with the packet.

- Make the inp_locally_locked variable's type consistent with the prototype of
  siftr_siftdata().

Sponsored by:	FreeBSD Foundation
2010-07-18 05:09:10 +00:00
Rick Macklem
5813b99c83 Change the nfscl_mustflush() function in the experimental NFSv4
client to return a boolean_t in order to make it more compatible
with style(9).

MFC after:	2 weeks
2010-07-18 00:24:01 +00:00
Edward Tomasz Napierala
49e134dfa6 Remove proc locking, it's not needed after r210132. 2010-07-17 15:52:11 +00:00
Edward Tomasz Napierala
b29d02f258 Remove updating process count by unionfs. It serves no purpose, unionfs just
needs root credentials for a moment.
2010-07-17 15:45:20 +00:00
Nathan Whitehorn
2785677d3d Add OpenSolaris atomics for powerpc64 and connect ZFS to the build on
this platform.

Reviewed by:	pjd
2010-07-17 13:34:01 +00:00
Nathan Whitehorn
04bcbbf81e Increase stack size for ZFS sync thread. This is required to make ZFS
function on 64-bit PowerPC.

Reviewed by:	pjd
Obtained from:	OpenSolaris changeset 14653:7cf402a7f374
2010-07-17 13:31:27 +00:00
Lawrence Stewart
96f2f82a69 Unbreak DPCPU_SUM() by dereferencing the pointer returned by DPCPU_ID_PTR().
MFC after:	3 days
2010-07-17 03:39:50 +00:00
Alexander Motin
060d7431b5 Add hints for i8254 timer on i386 and amd64. Some people report about
systems with PnP/ACPI not reporting i8254 timer. In some cases it can be
fatal, as i8254 can be the only available time counter hardware. From other
side we are now heavily depend on i8254 timer and till the last time it's
init/usage was completely hardcoded. So this change just restores previous
behavior in more regular fashion.
2010-07-16 23:21:46 +00:00
Rick Macklem
2cf552b115 Patch the experimental NFSv4 server so that it acquires a reference
count on nfsv4rootfs_lock when dumping state, since these functions
are not called by nfsd threads. Without this reference count, it
is possible for an nfsd thread to acquire an exclusive lock on
nfsv4rootfs_lock while the dump is in progress and then change the
lists, potentially causing a crash.

Reported by:	zack.kirsch at isilon.com
MFC after:	2 weeks
2010-07-16 23:17:05 +00:00
Alexander Motin
a448e0d827 Allocate proper ammount of memory for interrupt names on sparc64 and
sun4v, same as done on other architectures. This removes garbage from
`vmstat -ia` output.

Reviewed by:	marius@
2010-07-16 22:09:29 +00:00
John Baldwin
61e1c19319 Revert the previous commit. The race is not applicable to the lockmgr
implementation in 8.0 and later as its flags field does not hold dynamic
state such as waiters flags, but is only modified in lockinit() aside
from VN_LOCK_*().

Discussed with:	attilio
2010-07-16 19:52:03 +00:00
John Baldwin
dbfcf8cfea When the MNTK_EXTENDED_SHARED mount option was added, some filesystems were
changed to defer the setting of VN_LOCK_ASHARE() (which clears LK_NOSHARE
in the vnode lock's flags) until after they had determined if the vnode was
a FIFO.  This occurs after the vnode has been inserted a VFS hash or some
similar table, so it is possible for another thread to find this vnode via
vget() on an i-node number and block on the vnode lock.  If the lockmgr
interlock (vnode interlock for vnode locks) is not held when clearing the
LK_NOSHARE flag, then the lk_flags field can be clobbered.  As a result
the thread blocked on the vnode lock may never get woken up.  Fix this by
holding the vnode interlock while modifying the lock flags in this case.

MFC after:	3 days
2010-07-16 19:20:20 +00:00
Alexander Motin
e064bdc08a Make legacy ATA emulation detection more strict. This should fix false
positive legacy detection and attach failure/panic for Marvell 88SX6141
controller and potentially some others.

PR:		kern/145064
2010-07-16 17:27:43 +00:00
Alexander Motin
6332c92180 Improve interrupt setup errors handling. 2010-07-16 10:05:00 +00:00
Warner Losh
f1d242081d Move common macros into asm.h. Replace MIPS_CPU_NOP_DELAY with
HAZARD_DELAY.  Move HAZARD_DELAY and ITLBNOPFIX into asm.h, for
possible later optimization...

Reviewed by:	jmallet, jchandra
2010-07-16 06:35:17 +00:00
Warner Losh
43e05a6523 machine/cpu.h isn't appropriate for this file,so remove it 2010-07-16 06:32:38 +00:00
Warner Losh
8bf733e458 This file appears not to be used. 2010-07-16 06:31:37 +00:00
Warner Losh
e0e27ec197 Use #define for get_cyclecount rather than inline function.
mips_rd_count() isn't defined in userland, and cpu.h is included there
in alias_scpt.h (maybe they don't need it in the first place).
2010-07-16 06:09:51 +00:00
Jung-uk Kim
69496408a5 Simplify AcpiOsReadPort() and AcpiOsWritePort() with iodev_read_*() and
iodev_write_*().  This removes unnecessary uses of temporary macros as well.
There is no functional change after this (verified with md5(1) on amd64).
2010-07-16 04:27:38 +00:00
Adrian Chadd
e87f728e23 Fix KASSERT() messages to reflect reality. 2010-07-16 04:26:37 +00:00
Jung-uk Kim
aa353b1b6b Use pmap_mapdev()/pmap_unmapdev() to map device memory instead of using
AcpiOsMapMemory()/AcpiOsUnmapMemory() (-> pmap_mapbios()/pmap_unmapbios())
for AcpiOsReadMemory() and AcpiOsWriteMemory().  Although they do not sound
too obvious, these functions are exclusively used to access memory mapped
IO in ACPICA.
2010-07-16 03:59:50 +00:00
Rick Macklem
866e6c5adb Delete comments related to soft clock interrupts that don't apply
to the FreeBSD port of the experimental NFSv4 server.

Submitted by:	zack.kirsch at isilon.com
MFC after:	2 weeks
2010-07-16 01:44:49 +00:00
Pyun YongHyeon
caf088fc1f Use Miscellaneous Configuration Register bit definition instead of
magic number.
2010-07-15 23:34:58 +00:00
Warner Losh
f50baba14b Simple compatibility hacks for building on older systems where
MACHINE_CPUARCH isn't defined.  I believe that this will cover all
options.

I didn't define it in kern.mk because $M is set to MACHINE_CPUARCH and
then is expanded for the genassym.o rule in kern.post.mk and kern.mk
is included after this, so the expansion isn't quite right.  I think
this is a bug in make, but don't have the time to track it to ground
(and even if I did, fixing it would require a MFC of the change to the
very old systems we're targetting with this fix).
2010-07-15 23:32:53 +00:00
Jung-uk Kim
337744d9a6 If there is any pending sleep request, disallow entering S5 state.
Otherwise, bad things may happen. ;-)
2010-07-15 23:24:06 +00:00
Jung-uk Kim
6b0dfd288f When we are not switching VTs, just mark all buffer to be updated. 2010-07-15 23:11:51 +00:00
Warner Losh
4fc94b98b1 Better description of this file 2010-07-15 21:56:45 +00:00
John Baldwin
f2a664ac97 Retire td_syscalls now that it is no longer needed. 2010-07-15 20:24:37 +00:00