Ed Maste [Mon, 23 Feb 2009 18:22:06 +0000 (18:22 +0000)]
SVN rev 188743 modified aac_rx_get_fwstatus to use the AAC_RX_OMR0
register instead of AAC_RX_FWSTATUS, as that is the way it's done in
Adaptec's vendor driver and in the Linux drivers. (The same applies
to aac_rkt_get_fwstatus as well.)
However, a concern has been raised about the compatibility of this
change and old hardware / firmware versions. In the absense of
specific information, revert to the original behaviour if the firmware
does not support the "New comm." interface. Users of old cards or
firmware haven't reported the problems that are potentially solved by
switching to OMR0.
John Baldwin [Mon, 23 Feb 2009 15:38:35 +0000 (15:38 +0000)]
FreeBSD/i386 doesn't include a software FPU emulator anymore, so adjust
an iBCS2 syscall to indicate that there is no FPU support at all rather
than emulated support if an FPU is not present.
It is only really necessary for open(2)'s third argument, which is optional and
obtained through stdarg(3). open(2)'s third argument is 32bit and we pass 64
bits. On little endian it works, because we take lower 32 bits, but on big
endian platforms we take upper 32 bits, so we end up with 0.
Andrew Thompson [Sun, 22 Feb 2009 01:02:25 +0000 (01:02 +0000)]
Use root_mount_hold and root_mount_rel to allow the USB bus to be explored
before trying to mount root. Unlike USB1 the busses are not explored at attach
but rather after threads are running.
Alexander Motin [Sat, 21 Feb 2009 23:46:34 +0000 (23:46 +0000)]
Use only higher half of device signature to identify device type. Some
devices return incorrect values in lower part confusing detection, while
higher part itself gives enough information for proper detetion.
Jeff Roberson [Sat, 21 Feb 2009 23:15:34 +0000 (23:15 +0000)]
- Resolve an issue where we may clear an idt while an interrupt on a
different cpu is still assigned to that vector by never clearing idt
entries. This was only provided as a debugging feature and the bugs
are caught by other means.
- Drop the sched lock when rebinding to reassign an interrupt vector
to a new cpu so that pending interrupts have a chance to be delivered
before removing the old vector.
Marcel Moolenaar [Sat, 21 Feb 2009 19:25:13 +0000 (19:25 +0000)]
o When creating the EBR scheme, set the number of entries
properly. Otherwise the minimum of 1 is used and you can
only insert a single partition/slice and only at sector
0 (index 1).
o When adding a partition/slice, recalculate the index after
the start and size of the partition/slice are adjusted to
make them a multiple of the track size. Since the precheck
method sets the index based on the start of the partition
as provided by the user, we know that we're off by at most
1 and adjusting the index is safe.
Attilio Rao [Sat, 21 Feb 2009 15:40:03 +0000 (15:40 +0000)]
Sync with the official Adaptec vendor driver:
[1] Add the support for the NARK controller which seems a variant of
the i960Rx.
[2] Split up memory regions and other resources in 2 different parts
as long as NARK uses them separately (it is not clear to me
why though as long as there are no more informations available
on this controller). Please note that in all the other cases,
the regions overlaps leaving the default behaviour for all the
other controllers.
[3] Implement a clock daemon responsible for maintain updated the
wall clock time of the controller (run any 30 minutes)*.
Jamie Gritton [Sat, 21 Feb 2009 11:15:38 +0000 (11:15 +0000)]
Add support for methods to the OSD subsystem. Each object type has a
predefined set of methods, which are set in osd_register() and called
via osd_call(). Currently, no methods are defined, though prison
objects will have some in the future.
Expand the locking from a single per-type mutex to three different kinds
of locks (four if you include the requirement that the container
(e.g. prison) be locked when getting/setting data). This clears up one
existing issue, as well as others added by the method support.
Alexander Motin [Fri, 20 Feb 2009 23:17:52 +0000 (23:17 +0000)]
Disable port hardware on detach. First switch it to slumber mode to
power-down peer transmitter, then disable completely.
Side effect of this is saving about 0.5W of power per detached device.
Marcel Moolenaar [Fri, 20 Feb 2009 23:01:27 +0000 (23:01 +0000)]
Don't read the TOC for DIOCGPROVIDERALIAS. This causes the
acd code to create new provider (?), but not from an expected
context, which results in a panic (GEOM topology not held).
Alexander Motin [Fri, 20 Feb 2009 20:29:32 +0000 (20:29 +0000)]
Reduce soft-reset assertion time from 5ms to 50us.
ATA specification declares minimal reset time of 5us. SATA keeps it, but
requires devices to handle commands transmitted even one by one without
any gap.
Nathan Whitehorn [Fri, 20 Feb 2009 17:48:40 +0000 (17:48 +0000)]
Add Altivec support for supported CPUs. This is derived from the FPU support
code, and also reducing the size of trapcode to fit inside a 32 byte handler
slot.
Ed Schouten [Fri, 20 Feb 2009 13:05:29 +0000 (13:05 +0000)]
Don't make Linux stat() open character devices to resolve its name.
The existing code calls kern_open() to resolve the vnode of a pathname
right after a stat(). This is not correct, because it causes random
character devices to be opened in /dev. This means ls'ing a tape
streamer will cause it to rewind, for example. Changes I have made:
- Add kern_statat_vnhook() to allow binary emulators to `post-process'
struct stat, using the proper vnode.
- Remove unneeded printf's from stat() and statfs().
- Make the Linuxolator use kern_statat_vnhook(), replacing
translate_path_major_minor_at().
- Let translate_fd_major_minor() use vp->v_rdev instead of
vp->v_un.vu_cdev.
Result:
crw-rw-rw- 1 root root 0, 14 Feb 20 13:54 /dev/ptmx
crw--w---- 1 root adm 136, 0 Feb 20 14:03 /dev/pts/0
crw--w---- 1 root adm 136, 1 Feb 20 14:02 /dev/pts/1
crw--w---- 1 ed tty 136, 2 Feb 20 14:03 /dev/pts/2
Before this commit, ptmx also had a major number of 136, because it
silently allocated and deallocated a pseudo-terminal. Device nodes that
cannot be opened now have proper major/minor-numbers.
Alexander Motin [Fri, 20 Feb 2009 08:49:56 +0000 (08:49 +0000)]
Handle nForce MCP67 and MCP73 SATA controllers as AHCI. They report itself
as ATA RAID, but generic ATAPCI driver unable to detect drives there. AHCI
driver reported to handle them fine. Linux does the same.
Scott Long [Fri, 20 Feb 2009 07:43:43 +0000 (07:43 +0000)]
Tell CAM that CISS logical devices support tagged queueing. This fixes
the low "max device openings" count that has led to poor performance in
FreeBSD 7.0 and 7.1
Scott Long [Fri, 20 Feb 2009 07:40:54 +0000 (07:40 +0000)]
Tell CAM that SPI disconnect works, which in turn will let it use tags.
This fixes the low "max device openings" count that has lead to poor
performance in FreeBSD 7.0 and 7.1.
Extra thanks goes to Mike Tancsa at Sentex for providing a debug system for
this.
Scott Long [Fri, 20 Feb 2009 06:10:12 +0000 (06:10 +0000)]
Add basic support for DDF, often found on Adaptec HostRAID controllers.
Spares and rebuilds are not supported, so this code should be considered
for entertainment purposes only.
Marcel Moolenaar [Fri, 20 Feb 2009 04:48:40 +0000 (04:48 +0000)]
Provide compatibility symlink for logical partitions:
1. Extend geom_dev by having it create the symlink (i.e. call
make_dev_alias) based on the DIOCGPROVIDERALIAS ioctl.
In this way the functionaility is generic and thus usable
by any geom/provider.
2. Have g_part handle said ioctl through the devalias method,
so that it's under control of the scheme itself. By design
the alias will not be created for newly added partitions.
Luigi Rizzo [Fri, 20 Feb 2009 00:05:33 +0000 (00:05 +0000)]
use /boot/loader by default, because the boot code seems to
have problems with kernels larger than 4MB.
Add a flag to avoid the /boot/loader and use the old method.
Add support for an additional makefile to perform custom manipulation
(this is not documented yet).
Add support for building an ISO image (not complete)
John Baldwin [Thu, 19 Feb 2009 22:28:48 +0000 (22:28 +0000)]
Enable caching of negative pathname lookups in the NFS client. To avoid
stale entries, we save a copy of the directory's modification time when
the first negative cache entry was added in the directory's NFS node.
When a negative cache entry is hit during a pathname lookup, the parent
directory's modification time is checked. If it has changed, all of the
negative cache entries for that parent are purged and the lookup falls
back to using the RPC. This required adding a new cache_purge_negative()
method to the name cache to purge only negative cache entries for a given
directory.
John Baldwin [Thu, 19 Feb 2009 22:18:00 +0000 (22:18 +0000)]
When fetching attributes for a file for NFSv3 mounts, do not perform an
opportunistic ACCESS RPC to populate both the access and attribute caches
of the file and instead always use a GETATTR RPC. On many modern NFS
servers, an ACCESS RPC is much more expensive to service than a GETATTR
RPC.
John Baldwin [Thu, 19 Feb 2009 22:10:39 +0000 (22:10 +0000)]
Don't clear the attribute cache of a file when it is closed. A subsequent
open() of the same file will load fresh attributes, so they do not need to
be explicitly flushed in close() to guarantee close to open consistency.
However, other file desciptors may still reference this file and clearing
the attributes in close() forces those other file descriptors to fetch
fresh attributes the next time they need them.
Roman Divacky [Thu, 19 Feb 2009 20:45:37 +0000 (20:45 +0000)]
Display an error message when the requested mode is not known. So the user can
distinguish between a typo in the mode name and that the device does not
support a certain mode (till now both causes show the same result, i.e. the old
mode is displayed).
Submitted by: Christoph Mallon <christoph.mallon gmx.de>
Approved by: kib (mentor)
Ed Schouten [Thu, 19 Feb 2009 17:54:42 +0000 (17:54 +0000)]
Squash some small bugs in pts(4).
- Don't return a negative errno when using an unknown ioctl() on a
pseudo-terminal master device. Be sure to convert ENOIOCTL to ENOTTY,
just like the TTY layer does.
- Even though we should return st_rdev of the master device node when
emulating pty(4) devices, FIODGNAME should still return the name of
the slave device. Otherwise ptsname(3) and ttyname(3) return an
invalid device name.
Warner Losh [Thu, 19 Feb 2009 16:30:11 +0000 (16:30 +0000)]
Properly convert bit value to a bit field. Before we were storing
values like 0x80 or 0x40 into a uint8_t foo:1 bitfield. This would
result in the bit always being 0. One of these caused a warning for
overflow (one that was 0x80), but the other didn't. They were both
wrong.
This is why I hate code that mixes c struct bitfields and #defines.
The rest of the fields accessed by the program should be audited.
Andriy Gapon [Thu, 19 Feb 2009 15:05:30 +0000 (15:05 +0000)]
fs/udf: fix incorrect error return (-1) when reading a large dir
Not enough space in user-land buffer is not an error, userland
will read further until eof is reached. So instead of propagating
-1 to caller we convert it to zero/success.
Andriy Gapon [Thu, 19 Feb 2009 14:39:52 +0000 (14:39 +0000)]
acpi_cpu: fixup for PIIX4E PCI config related to C2
This is triggered only if BIOS configures ACPI_BITREG_BUS_MASTER_RLD
aka BRLD_EN_BM to 1.
Rationale:
1. we do not support C3 on PIIX4E
2. bus master activity need not break out of C2 state
3. because of CPU_QUIRK_NO_BM_CTRL quirk we may reset bus master
status which would result in immediate break out from C2
So if you have seen
cpu0: too many short sleeps, backing off to C1
with this chipset before you may want to try cx_lowest of C2 again.
Alexander Motin [Thu, 19 Feb 2009 12:47:24 +0000 (12:47 +0000)]
Use channel driver's attach/detach routines instead of ata_attach()/
ata_detach() to implement IOCATAATTACH/IOCATADETACH ioctls.
This will permit channel drivers to properly shutdown port hardware on channel
detach and init it on attach.
Sam Leffler [Thu, 19 Feb 2009 05:28:03 +0000 (05:28 +0000)]
Fixup handling of roaming and xmit parameters to support 1/2 and 1/4-width
channel modes:
o usurp 'h' mode flag for half-width channels
o add 'q' mode flag for quarter-width channels
o rewrite rate parameter parsing to handle fractional values
o merge mode loops to eliminate ordering assumptions
o replace 0x80 with IEEE80211_RATE_MCS
Sam Leffler [Thu, 19 Feb 2009 05:21:54 +0000 (05:21 +0000)]
Add modes for 1/2 and 1/4-width channels so we have separate roaming
and xmit parameters. This makes it possible to use tdma on fractional
channels.
o add IEEE80211_MODE_HALF and IEEE80211_MODE_QUARTER; note these are
band-agnostic (may need revisiting)
o setup all default rates in ic_sup_rates instead of doing it only
for active modes; we need these to calculate the default tx parameters
which are not recalculated after a regulatory update (can't just
recalculate after installing a new channel list because we might
clobber user settings)
o remove special case code in ieee80211_get_suprates; this is now
a candidate for an inline or removal
o add various entries for new modes (roaming+tx params, wme, rate
mapping, scan set setup, country ie construction, tdma, basic rates)
Note these modes are intentionally not visible through if_media.
Sam Leffler [Thu, 19 Feb 2009 05:03:10 +0000 (05:03 +0000)]
o looseen abi dependencies on IEEE80211_MODE_MAX by accepting smaller
parameters for IEEE80211_IOC_ROAM and IEEE80211_IOC_TXPARAMS; this
lets us add more modes and still have old apps work
o consolidate loops to remote assumptions about mode ordering