]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
14 years agoMFC r199274, r199284:
marcel [Tue, 24 Nov 2009 03:38:42 +0000 (03:38 +0000)]
MFC r199274, r199284:
Fix an obvious panic by not casting from a pointer that is 4-bytes
alignment to a type that needs 8-byte alignment, and thus causing
misaligned memory references.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199733 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198733:
marcel [Tue, 24 Nov 2009 03:32:42 +0000 (03:32 +0000)]
MFC r198733:
Reimplement the lazy FP context switching...
...This change fixes the high FP inconsistency panics.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198452:
marcel [Tue, 24 Nov 2009 03:28:35 +0000 (03:28 +0000)]
MFC r198452:
Add PRINTF_BUFR_SIZE=128, since we have SMP by default.
While here, fix tabulation.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199731 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198450:
marcel [Tue, 24 Nov 2009 03:23:40 +0000 (03:23 +0000)]
MFC r198450:
Implement _umtx_op_err() for ia64.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199730 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198338:
marcel [Tue, 24 Nov 2009 03:17:00 +0000 (03:17 +0000)]
MFC r198338:
o   Align function on a 32-byte boundary so that the core's front-end
    can deliver 2 bundles per cycle to the back-end.
o   Mark syscall stubs with a special unwind ABI tag so that unwind
    libraries know how to unwind.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199729 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199321:
mav [Mon, 23 Nov 2009 17:54:57 +0000 (17:54 +0000)]
MFC r199321:
Disable PortMultiplier Async Notifications for time of ports reset.
They are useless at that time, but confuse Marvell AHCI.

Add quirk for SiI57XX Port Multipliers, to hide extra port.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199716 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r199320
brueffer [Mon, 23 Nov 2009 09:44:08 +0000 (09:44 +0000)]
MFC: r199320

Fix grammar.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199709 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199258:
mav [Mon, 23 Nov 2009 09:28:16 +0000 (09:28 +0000)]
MFC r199258:
Add more codec IDs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199708 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197611, r197640:
mav [Mon, 23 Nov 2009 09:26:30 +0000 (09:26 +0000)]
MFC r197611, r197640:
- Add some bits of HDMI/DisplayPort support from later specification updates.
It may be not enough to make them work, but at least should give some
information about these beasts.
- Add Realtek ALC887 codec ID.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199707 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197018:
mav [Mon, 23 Nov 2009 09:22:38 +0000 (09:22 +0000)]
MFC r197018:
Add NVidia MCP89 HDA controller IDs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199706 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197017:
mav [Mon, 23 Nov 2009 09:21:35 +0000 (09:21 +0000)]
MFC r197017:
Add Intel 82801JD (one more ICH10) HDA controller ID.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199705 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196762:
mav [Mon, 23 Nov 2009 09:20:33 +0000 (09:20 +0000)]
MFC r196762:
Improve HDA controller capabilities logging.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 199699:
mav [Mon, 23 Nov 2009 09:13:32 +0000 (09:13 +0000)]
MFC 199699:
Refer more recently added Marvell chips.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199701 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r199317
brueffer [Mon, 23 Nov 2009 09:10:08 +0000 (09:10 +0000)]
MFC: r199317

Fix a memory leak in acl_from_text() in case the conversion succeeded.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199700 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199259, r199262, r199322:
mav [Mon, 23 Nov 2009 08:56:17 +0000 (08:56 +0000)]
MFC r199259, r199262, r199322:
Change the way in which AHCI+PATA combined controllers, such as JMicron
are handled. Instead of trying to attach two different drivers to
single device, wrapping each call, make one of them (atajmicron)
attach do device solely, but create child device for AHCI driver,
passing it all required resources. It is quite easy, as none of
resources are shared, except IRQ.
Add support for AHCI SATA parts of alike SATA+PATA MArvell controllers.
Add IDs of Marvell 88SX6102, 88SX6111. 88SX6141 controllers.

As result, it:
- makes drivers operation more independent and straitforward,
- allows to use new ahci(4) driver with such devices, adding support for
new features, such as PMP and NCQ, same time keeping legacy PATA support,
- will allow to just drop old ataahci driver, when it's time come.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199698 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198752:
mav [Mon, 23 Nov 2009 08:46:26 +0000 (08:46 +0000)]
MFC r198752:
Allow SATA1 SiI chips to do full-sized DMA. Specification tells that we may
release DMA constrants even more, but it require some additional handling.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199697 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198717:
mav [Mon, 23 Nov 2009 08:45:17 +0000 (08:45 +0000)]
MFC r198717:
- Remove most of direct relations between ATA(4) peripherial and controller
levels. It makes logic more transparent and is a mandatory step to wrap
ATA(4) controller level into ATA-native CAM SIM.
- Tune AHCI and SATA2 SiI drivers memory allocation a bit to allow bigger
I/O transaction sizes without additional cost.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199179, r199271:
ume [Sun, 22 Nov 2009 17:25:11 +0000 (17:25 +0000)]
MFC r199179, r199271:
- Add unit to the short month names for Japanese locales.
  Without unit, the output of the application like ls(1)
  is complicated.
- Since %b contains unit, %b is not suitable for c_fmt,
  now.  Use %_m instead.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199242: Use ncursesw to output the date field of vmstat
ume [Sun, 22 Nov 2009 17:16:37 +0000 (17:16 +0000)]
MFC r199242: Use ncursesw to output the date field of vmstat
display with multi-byte string, correctly.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199092: Add gai_strerror() catalog for ja_JP.UTF-8
ume [Sun, 22 Nov 2009 17:08:52 +0000 (17:08 +0000)]
MFC r199092: Add gai_strerror() catalog for ja_JP.UTF-8
and ja_JP.eucJP.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199657 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199083: Add NLS catalogs support to gai_strerror(3).
ume [Sun, 22 Nov 2009 17:05:46 +0000 (17:05 +0000)]
MFC r199083: Add NLS catalogs support to gai_strerror(3).
Controlled by NLS define.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199656 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199024:
attilio [Sun, 22 Nov 2009 16:13:16 +0000 (16:13 +0000)]
MFC r199024:
Use a safety belt for cases where corrupted narg can be passed to the
ktrsyscall().

git-svn-id: svn://svn.freebsd.org/base/stable/8@199654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199008:
attilio [Sun, 22 Nov 2009 16:11:20 +0000 (16:11 +0000)]
MFC r199008:
Track lockmgr_disown() in the stack.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199007:
attilio [Sun, 22 Nov 2009 16:09:27 +0000 (16:09 +0000)]
MFC r199007:
Fix a memory leak.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199652 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199208, r199223:
attilio [Sun, 22 Nov 2009 16:04:49 +0000 (16:04 +0000)]
MFC r199208, r199223:
Move inet_aton() (specular to inet_ntoa(), already present in libkern)
into libkern in order to made it usable by other modules than alias_proxy.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@199651 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199210:
attilio [Sun, 22 Nov 2009 15:57:08 +0000 (15:57 +0000)]
MFC r199210:
Introduce the new loader compile-time option BOOT_PROMPT_123 which allows
to enter the loader prompt just after entering the sequence "123".

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@199650 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199209:
attilio [Sun, 22 Nov 2009 15:53:39 +0000 (15:53 +0000)]
MFC r199209:
Fix a potential buffer boundaries overflow in devclass_add_device() by
using all available int lenghts digits for storing the information.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@199649 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years ago- MFC r199067,199215,199253
kuriyama [Sun, 22 Nov 2009 14:32:32 +0000 (14:32 +0000)]
- MFC r199067,199215,199253

  - Add hw.clflush_disable loader tunable to avoid panic (trap 9) at
    map_invalidate_cache_range() even if CPU is not Intel.

  - This tunable can be set to -1 (default), 0 and 1.  -1 is same as
    current behavior, which automatically disable CLFLUSH on Intel CPUs
    without CPUID_SS (should be occured on Xen only).  You can specify 1
    when this panic happened on non-Intel CPUs (such as AMD's).  Because
    disabling CLFLUSH may reduce performance, you can try with setting 0
    on Intel CPUs without SS to use CLFLUSH feature.

  - Amd64 init_secondary() calls initializecpu() while curthread is
    still not properly set up. r199067 added the call to
    TUNABLE_INT_FETCH() to initializecpu() that results in hang because
    AP are started when kernel environment is already dynamic and thus
    needs to acquire mutex, that is too early in AP start sequence to
    work.

    Extract the code that should be executed only once, because it sets
    up global variables, from initializecpu() to initializecpucache(),
    and call the later only from hammer_time() executed on BSP. Now,
    TUNABLE_INT_FETCH() is done only once at BSP at the early boot
    stage.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199648 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198420
rnoland [Sat, 21 Nov 2009 15:02:35 +0000 (15:02 +0000)]
MFC 198420

  Correct some issues with zfs boot.

   - Teach it to read gang blocks. (essentially untested)
     If you see "ZFS: gang block detected!", please let
     me know, so we can either remove the printf if it
     works, or fix it if it doesn't.

   - If multiple partitions exist on a disk, probe them all.
     We also need to reset dsk->start to 0 to read the right
     sector here.

   - With GPT, we can have 128 partitions.

   - If the bootfs property has ever been set on a pool
     it seems that it never goes away.  zpool won't allow
     you to add to the pool with the bootfs property set.
     However, if you clear the property back to default
     we end up getting 0 for the object number and read
     a bogus block pointer and fail to boot.

   - Fix some error printfs. The printf in the loader is
     only capable of c,s and u formats.

   - Teach printf how to display %llu

git-svn-id: svn://svn.freebsd.org/base/stable/8@199634 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199017,199228
rnoland [Sat, 21 Nov 2009 14:53:08 +0000 (14:53 +0000)]
MFC r199017,199228

Fix handling of GPT headers when size is > 92 bytes.

This should address reading GPT headers written by opensolaris.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoBump __FreeBSD_version to reflect the point when EVFILT_USER kevent
sson [Sat, 21 Nov 2009 12:38:45 +0000 (12:38 +0000)]
Bump __FreeBSD_version to reflect the point when EVFILT_USER kevent
filter has been implemented.

Approved by: rwatson (co-mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@199627 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoPurge extraneous mergeinfo.
jhb [Fri, 20 Nov 2009 15:27:52 +0000 (15:27 +0000)]
Purge extraneous mergeinfo.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199583 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199522..199528:
bms [Fri, 20 Nov 2009 12:30:40 +0000 (12:30 +0000)]
MFC r199522..199528:
  Pullup IPv6 mcast SSM KPI fixes from HEAD, including fix for
  filter deallocation from Stef Walter.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199578 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199518:
bms [Fri, 20 Nov 2009 11:58:04 +0000 (11:58 +0000)]
MFC r199518:
  Adapt the fix for IGMPv2 in r199287 for the IPv6 stack.
  Only multicast routing is affected by the issue.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199577 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r199349
brueffer [Fri, 20 Nov 2009 07:19:09 +0000 (07:19 +0000)]
MFC: r199349

Fix typo.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199571 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r199255, r199257
brueffer [Fri, 20 Nov 2009 06:55:35 +0000 (06:55 +0000)]
MFC: r199255, r199257

Improved the manpage description.  The committed wording
was provided by jhb.

Remove a note about vfork(4) going to be eliminated, it's here to stay.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199568 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199225:
ume [Fri, 20 Nov 2009 06:54:47 +0000 (06:54 +0000)]
MFC r199225:
- We are not guaranteed that we're not dropping a reference that
  we did not add.  Call LLE_REMREF() only when callout_stop()
  actually canceled a pending callout.
- callout_reset() may cancel a pending callout.  When
  callout_reset() canceled a pending callout, call LLE_REMREF()
  to drop a reference for the canceled callout.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199567 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC of r199336
edwin [Thu, 19 Nov 2009 20:40:11 +0000 (20:40 +0000)]
MFC of r199336
MFV of tzdata2009s, r199334

- Fix (harmless) typo in the definitions of Antarctica/David
- Fiji will go into DST from 29 November 2009 to 25 April 2010.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 199232:
rpaulo [Thu, 19 Nov 2009 15:28:08 +0000 (15:28 +0000)]
MFC 199232:
   Add a missing check for Apple HFS partitions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199530 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: revision 199219
nyan [Thu, 19 Nov 2009 12:07:00 +0000 (12:07 +0000)]
MFC: revision 199219

  Fix cpu model for PODP5V83.  It is P24T, not P54T.
  Also remove redundant 'Overdrive' word.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199519 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 199477
tuexen [Wed, 18 Nov 2009 15:35:03 +0000 (15:35 +0000)]
MFC 199477
Fix a bug where the system panics when a SHUTDOWN is received with an
illegal TSN.
This bug was reported by Irene Ruengeler.

Approved by: re, rrs (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@199484 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199188: ANSIfy.
ume [Wed, 18 Nov 2009 14:40:00 +0000 (14:40 +0000)]
MFC r199188: ANSIfy.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196964:
mav [Tue, 17 Nov 2009 21:45:28 +0000 (21:45 +0000)]
MFC r196964:
Do not check proper request alignment here in geom_dev in production.
It will be checked any way later by g_io_check() in g_io_schedule_down().
It is only needed here to not trigger panic from additional check, when
INVARIANTS enabled. So cover it with #ifdef INVARIANTS. It saves two
64bit divisions per request.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199456 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196904:
mav [Tue, 17 Nov 2009 21:43:42 +0000 (21:43 +0000)]
MFC r196904:
Remove msleep() timeout from g_io_schedule_up/down(). It works fine
without it, saving few percents of CPU on high request rates without
need to rearm callout twice per request.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199455 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196837:
mav [Tue, 17 Nov 2009 21:42:11 +0000 (21:42 +0000)]
MFC r196837:
Remove artificial MAX_IO_SIZE constant, equal to DFLTPHYS * 2. Use MAXPHYS
instead. It is NULL change for GENERIC kernel, but allows 'fast' mode to
work on systems with increased MAXPHYS.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199454 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199333:
mav [Tue, 17 Nov 2009 21:28:59 +0000 (21:28 +0000)]
MFC r199333:
Do not require payload data to be aligned. It is not mentioned in datasheet
and works fine in practice.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199453 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199278:
mav [Tue, 17 Nov 2009 21:27:21 +0000 (21:27 +0000)]
MFC r199278:
Check SNCQ HBA capability bit when reporting NCQ support to CAM.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199452 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199263:
mav [Tue, 17 Nov 2009 21:26:05 +0000 (21:26 +0000)]
MFC r199263:
Do not enable tagged queueing if controller reports 0 tags support.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199451 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199178:
mav [Tue, 17 Nov 2009 21:23:05 +0000 (21:23 +0000)]
MFC r199178:
- Move tagged queueing control from ADA to ATA XPT. It allows to control
  device command queue length correctly. First step to support < 32 tags.
- Limit queue for non-tagged devices by 2 slots for ahci(4) and siis(4).
- Implement quirk matching for ATA devices.
- Move xpt_schedule_dev_sendq() from header to source file.
- Move delayed queue shrinking to the more expected place - element freeing.
- Remove some SCSIsms in ATA.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199450 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199176:
mav [Tue, 17 Nov 2009 21:21:27 +0000 (21:21 +0000)]
MFC r199176:
Add set of chip IDs, known to support AHCI.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199449 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199132:
mav [Tue, 17 Nov 2009 21:20:19 +0000 (21:20 +0000)]
MFC r199132:
Organize device IDs and add some more of them.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199448 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r199079, r199101:
mav [Tue, 17 Nov 2009 21:17:22 +0000 (21:17 +0000)]
MFC r199079, r199101:
Add support for ATA Power Management.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199447 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198947:
mav [Tue, 17 Nov 2009 21:14:58 +0000 (21:14 +0000)]
MFC r198947:
Implement device stats accounting for ATA commands.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199446 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198904, r198905:
mav [Tue, 17 Nov 2009 21:14:02 +0000 (21:14 +0000)]
MFC r198904, r198905:
PMP commands use short format. PMP write doesn't return result.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198899:
mav [Tue, 17 Nov 2009 21:09:47 +0000 (21:09 +0000)]
MFC r198899:
- Remove CAM_PERIPH_POLLED flag. It is broken by design. Polling can't be
periph flag. May be SIM, may be CCB, but now it works fine just without it.
- Remove check unused for at least five years. If we will ever have non-BIO
devices in CAM, this check is smallest of what we will need.
- If several controllers complete requests same time, call swi_sched()
only once.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199444 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198897:
mav [Tue, 17 Nov 2009 21:08:12 +0000 (21:08 +0000)]
MFC r198897:
- Add support for sector size > 512 bytes and physical sector of several
logical sectors, introduced by ATA-7 specification.
- Remove some obsoleted code.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199443 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198896:
mav [Tue, 17 Nov 2009 21:00:02 +0000 (21:00 +0000)]
MFC r198896:
Do not unarm callout on request completion and change slot selection
algorithm as done in ahci(4). This saves some CPU time on high request
rates.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199441 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198852:
mav [Tue, 17 Nov 2009 20:59:00 +0000 (20:59 +0000)]
MFC r198852:
- Rework timeout handling, to make it more graceful for devices sharing
controller port (with PMP). Wait for other commands completion/timeout
before initiating recovery.
- Handle timeouts and fatal errors with port hard-reset. The rest of
recovery will be done by XPT on receiving async event. More gracefull
per-device soft-reset recovery can be implemented later.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199440 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198851:
mav [Tue, 17 Nov 2009 20:57:35 +0000 (20:57 +0000)]
MFC r198851:
- Handle timeouts and fatal errors with port hard-reset. The rest of
recovery will be done by XPT on receiving async event. More gracefull
per-device soft-reset recovery can be implemented later.
- Add workaround for ATI SB600/SB700 PMP probe related bug, to speedup boot.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198849:
mav [Tue, 17 Nov 2009 20:56:24 +0000 (20:56 +0000)]
MFC r198849:
Improve reporting ATA Status error details.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199438 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198832:
mav [Tue, 17 Nov 2009 20:54:52 +0000 (20:54 +0000)]
MFC r198832:
Provide the same sanity check on the sector size in dagetcapacity as when the
disk is first probed. dagetcapacity is called whenever the disk is opened from
geom via d_open(), a zero sector size will cause geom to panic later on.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199436 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198748, r198782:
mav [Tue, 17 Nov 2009 20:49:26 +0000 (20:49 +0000)]
MFC r198748, r198782:
Fix reference counting bug, when device unreferenced before
invalidated. To do it, do not handle validity flag as another
reference, but explicitly modify reference count each time flag is
modified.
The async callback could free the device. If it is a broadcast async,
it doesn't hold device reference, so take our own reference.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199435 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198709:
mav [Tue, 17 Nov 2009 20:45:49 +0000 (20:45 +0000)]
MFC r198709:
Sync connection speed reporting with kernel.
Report speed in identify command, same as done by inquiry.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199432 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198708:
mav [Tue, 17 Nov 2009 20:43:04 +0000 (20:43 +0000)]
MFC r198708:
- Reduce code duplication in ATA XPT and PMP driver.
- Move PIO size setting from ada driver to ATA XPT. It is XPT business
to negotiate transfer details. ada driver is now stateless.
- Report PIO size to SIM. It is required for correct PATA SIM operation.
- Tune PMP scan timings. It workarounds some problems with SiI.
- If reset hapens during PMP initialization - restart it.
- Introduce early-initialized periph drivers, which are used during initial
scan process. Use it for xpt, probe, aprobe and pmp. It gives pmp chance
to finish scan before mountroot and numerate devices in right order.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199431 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198705:
mav [Tue, 17 Nov 2009 20:41:15 +0000 (20:41 +0000)]
MFC r198705:
Ensure target/lun passed from user-level supported on this bus.
Scanning unsupported IDs causes different issues from duplicate
devices to system crash.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199430 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198426:
mav [Tue, 17 Nov 2009 20:35:29 +0000 (20:35 +0000)]
MFC r198426:
Reimplement device reset sequence in more controller-specific way.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199429 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198394:
mav [Tue, 17 Nov 2009 20:20:56 +0000 (20:20 +0000)]
MFC r198394:
Make "Retrying Command" to be printed before actual retrying.
It should make debug/error log a bit more readable.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199428 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198390:
mav [Tue, 17 Nov 2009 20:19:20 +0000 (20:19 +0000)]
MFC r198390:
Revert interrupt reason check order back.
ATAPI errors may set IF bit together with TFE.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199427 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198389:
mav [Tue, 17 Nov 2009 20:17:48 +0000 (20:17 +0000)]
MFC r198389:
Move Port Multiplier support code out of ATA XPT into pmp periph driver.
This is convinient, as PMP itself is a bus target and has own state.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199426 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197545:
mav [Tue, 17 Nov 2009 19:52:51 +0000 (19:52 +0000)]
MFC r197545:
Fethch more information from IDENTIFY result.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199425 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197419:
mav [Tue, 17 Nov 2009 19:51:39 +0000 (19:51 +0000)]
MFC r197419:
Reduce code duplication.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199424 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198321
mav [Tue, 17 Nov 2009 19:42:06 +0000 (19:42 +0000)]
MFC r198321
Freeze device queue on error to permit periph driver to do proper recovery.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199423 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198319:
mav [Tue, 17 Nov 2009 19:40:39 +0000 (19:40 +0000)]
MFC r198319:
On error, freeze device queue, to allow periph driver to do proper recovery.
Freeze SIM queue only in some cases, when it is needed to protect SIM.

Implement better command timeout detection logic for non-queued commands.
This fixes false positives when command with short timeout waiting for the
long one. For example, when hald tastes CD during burning process.

Read and clear SERR register on interrupt.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199422 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198382, r198385:
mav [Tue, 17 Nov 2009 19:38:19 +0000 (19:38 +0000)]
MFC r198382, r198385:
Replace most of priority numbers with defines. No logical changes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199421 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197838:
mav [Tue, 17 Nov 2009 19:36:06 +0000 (19:36 +0000)]
MFC r197838:
On command timeout handle frozen command first, to not run it inside
XXX_end_transaction().

git-svn-id: svn://svn.freebsd.org/base/stable/8@199420 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198505:
kib [Tue, 17 Nov 2009 18:38:00 +0000 (18:38 +0000)]
MFC r198505:
When protection of wired read-only mapping is changed to read-write,
install new shadow object behind the map entry and copy the pages
from the underlying objects to it. This makes the mprotect(2) call to
actually perform the requested operation instead of silently do nothing
and return success, that causes SIGSEGV on later write access to the
mapping.

Reuse vm_fault_copy_entry() to do the copying, modifying it to behave
correctly when src_entry == dst_entry.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199416 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198476 (by alc):
kib [Tue, 17 Nov 2009 18:31:09 +0000 (18:31 +0000)]
MFC r198476 (by alc):
Simplify the inner loop of vm_fault_copy_entry().

Approved by: alc

git-svn-id: svn://svn.freebsd.org/base/stable/8@199415 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198986:
jhb [Tue, 17 Nov 2009 16:50:57 +0000 (16:50 +0000)]
MFC 198986:
Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
a page mapped by a large page in the kernel.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199408 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoHoist mergeinfo from sys/net/ up to sys/.
jhb [Tue, 17 Nov 2009 16:30:57 +0000 (16:30 +0000)]
Hoist mergeinfo from sys/net/ up to sys/.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199406 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198990:
jhb [Tue, 17 Nov 2009 16:17:11 +0000 (16:17 +0000)]
MFC 198990:
Several years ago a feature was added to TCP that casued soreceive() to
send an ACK right away if data was drained from a TCP socket that had
previously advertised a zero-sized window.  The current code requires the
receive window to be exactly zero for this to kick in.  If window scaling is
enabled and the window is smaller than the scale, then the effective window
that is advertised is zero.  However, in that case the zero-sized window
handling is not enabled because the window is not exactly zero.  The fix
changes the code to check the raw window value against zero.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199400 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197286, r197306:
ume [Tue, 17 Nov 2009 16:11:53 +0000 (16:11 +0000)]
MFC r197286, r197306:
V_irtualize the lltables list, making ARP and ND reasonably
usable again with options VIMAGE kernels.

Discussed with: hrs

git-svn-id: svn://svn.freebsd.org/base/stable/8@199399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198043:
jhb [Tue, 17 Nov 2009 15:56:45 +0000 (15:56 +0000)]
MFC 198043:
Move the USB wireless drivers down into their own section next to the USB
ethernet drivers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198856: Fix a couple of comment typos.
jhb [Tue, 17 Nov 2009 15:30:16 +0000 (15:30 +0000)]
MFC 198856: Fix a couple of comment typos.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199393 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC 198820:
jhb [Tue, 17 Nov 2009 15:28:14 +0000 (15:28 +0000)]
MFC 198820:
Ensure 'kvm' is always initialized.  If "-M" was not specified and the
garbage value on the stack was not zero, then 'ddb capture' would try to
use the garbage value as a kvm_t pointer.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199391 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198381:
mav [Tue, 17 Nov 2009 15:16:21 +0000 (15:16 +0000)]
MFC r198381:
Remove some obsoleted comments.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199390 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198372, r198377:
mav [Tue, 17 Nov 2009 15:14:13 +0000 (15:14 +0000)]
MFC r198372, r198377:
Implement cam_ccbq_fini().
This is effectively NULL change, but makes this API a bit more consistent.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199389 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198333:
mav [Tue, 17 Nov 2009 15:08:01 +0000 (15:08 +0000)]
MFC r198333:
Do not search for bus when it is not needed.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199388 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198331:
mav [Tue, 17 Nov 2009 15:04:58 +0000 (15:04 +0000)]
MFC r198331:
Separate CAM_DEV_IDENTIFY_DATA_VALID flag from CAM_DEV_INQUIRY_DATA_VALID.
Add workaround for very old devices without support for mode setting.
Add some PATA bus scanning support.
Remove some SCSIsms.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199387 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198328:
mav [Tue, 17 Nov 2009 14:56:00 +0000 (14:56 +0000)]
MFC r198328:
Add support for PIO-only devices.
Fix maxio values and 256 sectors transactions for 28bits commands.
Implement periodic ordered commands insertion, sames as da driver does.
Remove some SCSIsms.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198322:
mav [Tue, 17 Nov 2009 14:49:35 +0000 (14:49 +0000)]
MFC r198322:
Report real max_target = 15. SIM doesn't need to know that target 15 is PMP.
It is XPT business.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196907:
mav [Tue, 17 Nov 2009 14:47:40 +0000 (14:47 +0000)]
MFC r196907:
To save small bit of CPU time, hide part of SNTF register read latency
behind other reads.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197541:
mav [Tue, 17 Nov 2009 14:38:47 +0000 (14:38 +0000)]
MFC r197541:
Report SATA 3.x devices.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r197421:
mav [Tue, 17 Nov 2009 14:37:20 +0000 (14:37 +0000)]
MFC r197421:
If on sense request device returns no sence, give up and return,
or we may loop forever.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199382 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r198049:
bz [Tue, 17 Nov 2009 14:30:09 +0000 (14:30 +0000)]
MFC r198049:

  Immediately after clearing a pending callout that didn't make it due
  to the lock we hold, disable interrupts, and announce to the firmware
  that we are shutting down. Especially do this before disabling blocks.

  This makes some types of machines with asf enabled no longer hang upon
  boot, when we start configuring the interface.

PR: i386/96382, kern/100410, kern/122252, kern/116328

git-svn-id: svn://svn.freebsd.org/base/stable/8@199381 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196983:
mav [Tue, 17 Nov 2009 14:14:07 +0000 (14:14 +0000)]
MFC r196983:
Free the correct buffer in an error case.

Submitted by:   phk

git-svn-id: svn://svn.freebsd.org/base/stable/8@199379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMove mergeinfo for netinet6 up to sys.
jhb [Tue, 17 Nov 2009 14:08:42 +0000 (14:08 +0000)]
Move mergeinfo for netinet6 up to sys.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199377 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196903:
mav [Tue, 17 Nov 2009 13:48:27 +0000 (13:48 +0000)]
MFC r196903:
Remove duplicate qfrozen_cnt variable from struct cam_ed.
ccbq.queue.qfrozen_cnt should be used instead.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199376 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC: r198952
brueffer [Tue, 17 Nov 2009 13:37:27 +0000 (13:37 +0000)]
MFC: r198952

Fix two memory leaks in error cases.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196901:
mav [Tue, 17 Nov 2009 13:04:05 +0000 (13:04 +0000)]
MFC r196901:
Remove unneeded CAM_SIM_MPSAFE check.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

14 years agoMFC r196898:
mav [Tue, 17 Nov 2009 13:01:17 +0000 (13:01 +0000)]
MFC r196898:
Report scbusX in xpt_announce_periph() to less confuse users by two
different bus addressing schemes.

MFC r196900:
s/bus %d/scbus%d/ in some messages to correct terminology.

git-svn-id: svn://svn.freebsd.org/base/stable/8@199367 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f