Commit Graph

74560 Commits

Author SHA1 Message Date
Pyun YongHyeon
9b96de9413 MFC r199565:
Move interface reinitialization down after disabling WOL in resume
  path.
2009-12-03 18:48:32 +00:00
Pyun YongHyeon
86032a4158 MFC r199564:
Minimize interface reinitialization by checking IFF_DRV_RUNNING
  flag. This fixes unnecessary interface UP/DOWNs during getting an
  IP address via DHCP.
2009-12-03 18:42:19 +00:00
Alexander Motin
06a7b83b5e MFC r199822:
Drop USB mass storage devices support from ata(4). It is out of the build as
long as I remember, and completely superseded by better maintained umass(4).
It's main idea was to optionally avoid CAM dependency for such devices, but
with move ATA to CAM, it is not actual any more.

No objections:  hselasky@, thompsa@, arch@
2009-12-02 10:47:11 +00:00
Alexander Motin
03b5c37446 MFC r199747, r199799, r199821:
- Extend XPT-SIM transfer settings control API. Now it allows to report to
SATA SIM number of tags supported by each device, implement ATA mode and
SATA revision negotiation for both SATA and PATA SIMs.
- Make ahci(4) and siis(4) to use submitted maximum tag number, when
scheduling requests. It allows to support NCQ on devices with lower tags
count then controller supports.
- Make PMP driver to report attached devices connection speeds.
- Implement ATA mode negotiation between user settings, device and
controller capabilities.
- Improve ATA mode/SATA revision control.
2009-12-02 10:32:34 +00:00
Alexander Motin
7e7ac267c9 MFC r199279, r199280, r199281:
- Fix several device freeze counting bugs.
- Remove code that years ago was closing race between request submission
to SIM and device/SIM freeze. That race become impossible after moving from
spl to mutex locking, while this workaround causes some unexpected effects.
2009-12-02 10:10:37 +00:00
Fabien Thomas
baa1e3c69a MFC 199763:
- fix a LOR between process lock and pmc thread mutex
 - fix a system deadlock on process exit when the sample buffer
 is full (pmclog_loop blocked in fo_write) and pmcstat exit.
2009-12-01 23:06:17 +00:00
Fabien Thomas
7619fb0cbd MFC 198343:
Handle the case where there is only one PMC in the system.
2009-12-01 22:59:37 +00:00
John Baldwin
fa860bed4e MFC 199579:
Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to
fully support booting from large volumes.
2009-12-01 22:38:17 +00:00
Andriy Gapon
e9aa44c800 MFC r199016: acpi: remove 'magic' ivar
Note that the ivar itself is kept in the stable branches, only its use is
dropped.
2009-12-01 06:11:42 +00:00
Pyun YongHyeon
de75e77770 MFC r199413:
It seems generation of link state change of e1000phy(4) is not
  reliable on some Marvell PHYs. If msk(4) know it still does not
  have established link check whether msk(4) missed the link state
  change by looking into polled link state.

  Reported by:	Mel Flynn < mel.flynn+fbsd.current <> mailing.thruhere dot net >,
		Gleb Kurtsou <gleb.kurtsou <> gmail dot com >
  Tested by:	Gleb Kurtsou <gleb.kurtsou <> gmail dot com >
2009-11-29 20:19:24 +00:00
Pyun YongHyeon
75c4ab0ae9 MFC r199012:
Add preliminary Yukon Ultra 2 support(88E8057). The controller
  looks very similar to Yukon EC Ultra.

  Tested by:	kalin m ( kalin <> el dot net )
2009-11-29 19:58:35 +00:00
Pyun YongHyeon
30c8843f6a MFC 198996-198997.
r198996:
  Remove unnecessary header file.

r198997:
  It's normal to see Rx FIFO overruns under high network load and
  showing the message creates other side-effects. Remove the Rx
  FIFO overrun message in interrupt handler. msk(4) should recover
  from the FIFO overruns without any user intervention. Users can
  still check the Rx FIFO overrun counter from MAC MIB statistics
  maintained in driver(dev.msk.0.stats.rx.overflows).
2009-11-29 19:54:32 +00:00
Pyun YongHyeon
2ff1d99219 MFC 198814.
Add a check to know whether driver is still running after
  reacquiring driver lock in Rx handler. re(4) drops a driver lock
  before passing received frame to upper stack and reacquire the
  lock. During the time window ioctl calls could be executed and if
  the ioctl was interface down request, driver will stop the
  controller and free allocated mbufs. After that when driver comes
  back to Rx handler again it does not know what was happend so it
  could access free mbufs which in turn cause panic.

  Reported by:	Norbert Papke < npapk <> acm dot org >
  Tested by:	Norbert Papke < npapk <> acm dot org >
2009-11-29 19:49:21 +00:00
Pyun YongHyeon
cb08d589eb MFC 198813.
Add BCM5761 PHY id.
2009-11-29 19:46:15 +00:00
Pyun YongHyeon
4a288ceae9 MFC 197627.
Fix multicast handling. All Atheros controllers use big-endian form
  in computing multicast hash.

  PR:	kern/139137
2009-11-29 19:29:11 +00:00
Pyun YongHyeon
621838143b MFC 197600.
For AR8132 fast ethernet controller, do not report 1000baseT
  capability to mii(4). Even though AR8132 uses the same model/
  revision number of F1 gigabit PHY, the PHY has no ability to
  establish 1000baseT link. I have no idea why Atheros use the same
  device/model id for this PHY.
  With this change atphy(4) does not report 1000baseT media
  capability and manual 1000baseT configuration is also disabled
  which is more desirable behavior for 10/100Mbps PHY.
2009-11-29 19:25:15 +00:00
Pyun YongHyeon
02b6f045fe MFC 197592.
Add DGE-560SX(Yukon XL) to the supported device list. Many thanks
  to "Eugene Perevyazko <john <> dnepro dot net>" who kindly gave
  remote access to system with DGE-560SX.
2009-11-29 19:18:22 +00:00
Pyun YongHyeon
26ac5ae5da MFC 197591.
Add workaround for Yukon XL which has hardware bug that can't flush
  FIFO.
2009-11-29 19:15:08 +00:00
Pyun YongHyeon
4b4edd6101 MFC 197590.
Add hack to pass controller specific information to phy driver.
  Unlike most other PHYs there is no easy way to know which media
  type the PHY supports on Marvell PHYs. MIIF_HAVEFIBER flags is now
  passed via bus-specific instance variable of a device. While I'm
  here add 88E1112 specific work around to set SIGDET polarity low.
  Many thanks "Eugene Perevyazko <john <> dnepro dot net>" who kindly
  gave remote access to system with DGE-560SX.
2009-11-29 19:11:03 +00:00
Pyun YongHyeon
b76e9c0853 MFC 197589.
Fix MIB statistics clear routine. This should fix alignment errors on sparc64.

  Reported by:	Garrett Damore < gdamore <> opensolaris dot org >
2009-11-29 19:06:33 +00:00
Pyun YongHyeon
5bb9dc0d8f MFC 197588.
Some fiber PHY(88E1112) does not seem to set resolved speed so
  always assume we've got IFM_1000_SX.
2009-11-29 19:03:20 +00:00
Pyun YongHyeon
ee9449a145 MFC 197587.
Don't encode model id twice.

  Reported by:	Kristof Provost <kristof <> sigsegv dot be>
2009-11-29 18:59:43 +00:00
Pyun YongHyeon
e39d827775 MFC r197585.
Remove unnecessary device reinitialization.
2009-11-29 18:51:58 +00:00
Nathan Whitehorn
1abf14215a MFC r199226:
Provide a real fix to the too-many-translations problem when booting
from CD on 64-bit hardware to replace existing band-aids. This occurred
when the preloaded mdroot required too many mappings for the static
buffer.

Since we only use the translations buffer once, allocate a dynamic
buffer on the stack. This early in the boot process, the call chain
is quite short and we can be assured of having sufficient stack space.
2009-11-28 20:02:45 +00:00
Nathan Whitehorn
0b5ac7b6b9 MFC r198212,198378,198427,198428,198723,198724,198725,198731:
SMP support for PowerPC G5 systems.

r198724:
	Fix a race in casuword() exposed by csup. casuword() non-atomically
read the current value of its argument before atomically replacing it,
which could occasionally return the wrong value on an SMP system. This
resulted in user mutex operations hanging when using threaded applications.

r198723,198725,198731:
	Loop on blocked threads when using ULE scheduler, removing an
XXX MP comment.

r198427:
	Add some more paranoia to setting HID registers, and update the AIM
clock routines to work better with SMP.

r198378:
	Add SMP support on U3-based G5 systems. While here, correct the
64-bit tlbie function to set the CPU to 64-bit mode correctly.

r198212:
	Don't assume that physical addresses are identity mapped. This
allows the second processor on G5 systems to start.
2009-11-28 19:37:58 +00:00
Nathan Whitehorn
b17e03bd8a MFC r198400:
Do not map the trap vectors into the kernel's address space. They are
only used in real mode and keeping them mapped only serves to make NULL
a valid address, which results in silent NULL pointer deferences.

Suggested by:   Patrick Kerharo
Obtained from:  projects/ppc64
2009-11-28 18:36:58 +00:00
Nathan Whitehorn
b478ed7a6b MFC r197961,197962:
Fix two typos that caused DSISR and CR not to be preserved across context
switches.
2009-11-28 18:34:35 +00:00
Rafal Jaworowski
000d6fb9d9 MFC r199580:
tsec: Use IFQ_DRV macros for managing interface packet queue.

This lets tsec(4) work with ALTQ.

Submitted by:	Marcin Ligenza
2009-11-27 13:38:59 +00:00
Attilio Rao
08742bd257 MFC r199260:
Add sysctls in ahd(4) in order to keep track of different classes of
errors. So far 3 different classes are present (correctable,
uncorrectable and fatal) but more can be added easilly.

Sponsored by:	Sandvine Incorporated
2009-11-27 02:47:49 +00:00
Attilio Rao
9a6d318802 MFC r199227:
Add the possibility for vfs.root.mountfrom tunable to accept a list of
items rather than a single one.
While there fix also a nit in a comment.

Sponsored by:	Sandvine Incorporated
2009-11-27 02:45:50 +00:00
Ken Smith
fac7a2abd8 8.0-RELEASE is done, shift stable/8 to -STABLE designation. 2009-11-27 00:21:17 +00:00
Rafal Jaworowski
5e54294468 MFC r199534:
Provide an effective (relocated) address when building modules metadata.

This lets modules loaded dynamically in loader(8) work for U-Boot-based
platforms.
2009-11-26 22:35:26 +00:00
Alexander Motin
c68cd0c40d MFC r199043:
Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
attach chips with generic Marvell (non-HighPoint) PCI identification.
These chips are also supported by ata(4). Some vendors, like Supermicro,
are using same chips without providing HPT RAID BIOS.

PR:		kern/120842, kern/136750
2009-11-26 15:16:03 +00:00
Alexander Motin
4fb5bc4259 MFC r199268, r199269, r199273:
Core2Duo/Core2Quad CPUs are unable to control frequency of single CPU
core, only pair of them. As result, both cores are running on highest
one of requested frequencies, and that is reported by status register.
Such behavior confuses frequency validation logic, as it runs on only
one core, as SMP is not yet launched, making EIST completely unusable.

Disable frequency validation by default, for systems with more then one
CPU, until we can implement it properly. It looks like making more harm
now then benefits. Add 'hw.est.strict' loader tunable to control it.

PR:		amd64/140506
2009-11-26 15:11:19 +00:00
Alexander Motin
0264833689 MFC r199645, r199646:
Fix Intel PATA UDMA timings setting, affecting write performance.
Binary divider value 10 specified in datasheet is not a hex 0x10.
UDMA2 should be 33/2 instead of 66/4, which is documented as reverved,
UDMA4 should be 66/2 instead of 66/4, which is definitely wrong.
Release over-agressive WDMA0 mode timings as close to spec as chip can.
2009-11-26 14:56:58 +00:00
Alexander Motin
052c5232f5 MFC r199749:
Use only lower byte of sectors_intr IDENTIFY word as sector count.
This fixes SET_MULTI error during boot on devices supporting less then
16 sectors per interrupt.
2009-11-26 14:50:01 +00:00
Alexander Motin
70f426fe84 MFC r199717:
Do not attach JMicrons with single PCI function. They are not working as
AHCI for some reason, even when declaring so. Let atajmicron configure
them for us and provide PATA support.
2009-11-26 08:29:02 +00:00
Marius Strobl
f6b36bbd8a MFC: r198502
Sync with the other archs and wrap the prototype of in_cksum_skip(9)
in #ifdef _KERNEL.

Submitted by:	Ulrich Spoerlein
2009-11-25 18:31:34 +00:00
Rui Paulo
6772a8e0d0 MFC r199491:
Add WorldB SKU.
2009-11-25 14:54:58 +00:00
Kip Macy
fa178c7b04 fix UP compilation 2009-11-25 01:55:34 +00:00
Kip Macy
4956a0d10f MFC xen pmap updates and eflags fixes 2009-11-25 01:52:36 +00:00
Kip Macy
7d326ccdfc remove gratuitous comment 2009-11-25 01:51:07 +00:00
Kip Macy
0039b95019 MFC core dump support 2009-11-25 01:50:17 +00:00
Marius Strobl
8158a254e9 MFC: r199442
Unroll copying of the registers in {g,s}et_mcontext() and limit it
to the set actually restored by tl0_ret() instead of using the whole
trapframe. Additionally skip %g7 as that register is used as the
userland TLS pointer.

PR:		140523
2009-11-24 20:04:31 +00:00
Alexander Motin
5f0993cb40 MFC r199535:
Tune CAM ATA kernel options a bit. Move PMP support from da to scbus and
add ada device option, according to man page.
2009-11-24 09:10:43 +00:00
Marcel Moolenaar
564da3e7b4 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.
2009-11-24 03:38:42 +00:00
Marcel Moolenaar
0d5340f697 MFC r198733:
Reimplement the lazy FP context switching...
...This change fixes the high FP inconsistency panics.
2009-11-24 03:32:42 +00:00
Marcel Moolenaar
97d630ed47 MFC r198452:
Add PRINTF_BUFR_SIZE=128, since we have SMP by default.
While here, fix tabulation.
2009-11-24 03:28:35 +00:00
Marcel Moolenaar
80f7b7c39e 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.
2009-11-24 03:17:00 +00:00
Alexander Motin
fbd6bbe74b 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.
2009-11-23 17:54:57 +00:00
Alexander Motin
506ef9edb8 MFC r199258:
Add more codec IDs.
2009-11-23 09:28:16 +00:00
Alexander Motin
2c5d7e80c6 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.
2009-11-23 09:26:30 +00:00
Alexander Motin
c1ebbbc962 MFC r197018:
Add NVidia MCP89 HDA controller IDs.
2009-11-23 09:22:38 +00:00
Alexander Motin
95eaf85a77 MFC r197017:
Add Intel 82801JD (one more ICH10) HDA controller ID.
2009-11-23 09:21:35 +00:00
Alexander Motin
510e0aaa49 MFC r196762:
Improve HDA controller capabilities logging.
2009-11-23 09:20:33 +00:00
Alexander Motin
8f51326c68 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.
2009-11-23 08:56:17 +00:00
Alexander Motin
0cde70967f 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.
2009-11-23 08:46:26 +00:00
Alexander Motin
555a8009dd 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.
2009-11-23 08:45:17 +00:00
Attilio Rao
fbf9555aa0 MFC r199008:
Track lockmgr_disown() in the stack.
2009-11-22 16:11:20 +00:00
Attilio Rao
7f7bb30263 MFC r199007:
Fix a memory leak.
2009-11-22 16:09:27 +00:00
Attilio Rao
a5e831ded9 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
2009-11-22 16:04:49 +00:00
Attilio Rao
ea46ba3475 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
2009-11-22 15:57:08 +00:00
Attilio Rao
36a59d0306 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
2009-11-22 15:53:39 +00:00
Jun Kuriyama
9497adf974 - 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.
2009-11-22 14:32:32 +00:00
Robert Noland
262b2ce076 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
2009-11-21 15:02:35 +00:00
Robert Noland
4cb9493f3f MFC r199017,199228
Fix handling of GPT headers when size is > 92 bytes.

This should address reading GPT headers written by opensolaris.
2009-11-21 14:53:08 +00:00
Stacey Son
1c7de26f34 Bump __FreeBSD_version to reflect the point when EVFILT_USER kevent
filter has been implemented.

Approved by: rwatson (co-mentor)
2009-11-21 12:38:45 +00:00
Bruce M Simpson
025bbb4984 MFC r199522..199528:
Pullup IPv6 mcast SSM KPI fixes from HEAD, including fix for
  filter deallocation from Stef Walter.
2009-11-20 12:30:40 +00:00
Bruce M Simpson
28d8e43cf7 MFC r199518:
Adapt the fix for IGMPv2 in r199287 for the IPv6 stack.
  Only multicast routing is affected by the issue.
2009-11-20 11:58:04 +00:00
Hajimu UMEMOTO
30178759ac 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.
2009-11-20 06:54:47 +00:00
Rui Paulo
bbe1ae3552 MFC 199232:
Add a missing check for Apple HFS partitions.
2009-11-19 15:28:08 +00:00
Yoshihiro Takahashi
50324497fb MFC: revision 199219
Fix cpu model for PODP5V83.  It is P24T, not P54T.
  Also remove redundant 'Overdrive' word.
2009-11-19 12:07:00 +00:00
Michael Tuexen
21bd3c552d 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)
2009-11-18 15:35:03 +00:00
Alexander Motin
c4511bef96 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.
2009-11-17 21:45:28 +00:00
Alexander Motin
9c4a609c2d 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.
2009-11-17 21:43:42 +00:00
Alexander Motin
8c184a2d26 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.
2009-11-17 21:42:11 +00:00
Alexander Motin
7c1a88d4f8 MFC r199333:
Do not require payload data to be aligned. It is not mentioned in datasheet
and works fine in practice.
2009-11-17 21:28:59 +00:00
Alexander Motin
c263e77659 MFC r199278:
Check SNCQ HBA capability bit when reporting NCQ support to CAM.
2009-11-17 21:27:21 +00:00
Alexander Motin
dbf0a1cd3e MFC r199263:
Do not enable tagged queueing if controller reports 0 tags support.
2009-11-17 21:26:05 +00:00
Alexander Motin
99695a07ce 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.
2009-11-17 21:23:05 +00:00
Alexander Motin
4799e6b756 MFC r199176:
Add set of chip IDs, known to support AHCI.
2009-11-17 21:21:27 +00:00
Alexander Motin
f629df5749 MFC r199132:
Organize device IDs and add some more of them.
2009-11-17 21:20:19 +00:00
Alexander Motin
6bb752977c MFC r198947:
Implement device stats accounting for ATA commands.
2009-11-17 21:14:58 +00:00
Alexander Motin
f6e8afbf7a MFC r198904, r198905:
PMP commands use short format. PMP write doesn't return result.
2009-11-17 21:14:02 +00:00
Alexander Motin
2c588f5344 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.
2009-11-17 21:09:47 +00:00
Alexander Motin
a60c326522 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.
2009-11-17 21:08:12 +00:00
Alexander Motin
ecc2f2f455 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.
2009-11-17 21:00:02 +00:00
Alexander Motin
d54c3c6363 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.
2009-11-17 20:59:00 +00:00
Alexander Motin
bf60b82344 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.
2009-11-17 20:57:35 +00:00
Alexander Motin
33e000ff00 MFC r198849:
Improve reporting ATA Status error details.
2009-11-17 20:56:24 +00:00
Alexander Motin
5907c56d56 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.
2009-11-17 20:54:52 +00:00
Alexander Motin
0e3aa3c51e 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.
2009-11-17 20:49:26 +00:00
Alexander Motin
8eea8c79fc 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.
2009-11-17 20:43:04 +00:00
Alexander Motin
a3a475dfb6 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.
2009-11-17 20:41:15 +00:00
Alexander Motin
e587ad07dc MFC r198426:
Reimplement device reset sequence in more controller-specific way.
2009-11-17 20:35:29 +00:00
Alexander Motin
844c81cb6d MFC r198394:
Make "Retrying Command" to be printed before actual retrying.
It should make debug/error log a bit more readable.
2009-11-17 20:20:56 +00:00
Alexander Motin
47a0c6b476 MFC r198390:
Revert interrupt reason check order back.
ATAPI errors may set IF bit together with TFE.
2009-11-17 20:19:20 +00:00
Alexander Motin
262d120349 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.
2009-11-17 20:17:48 +00:00
Alexander Motin
2ab5a453f6 MFC r198321
Freeze device queue on error to permit periph driver to do proper recovery.
2009-11-17 19:42:06 +00:00
Alexander Motin
8f5dee240e 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.
2009-11-17 19:40:39 +00:00
Alexander Motin
4956ef3a42 MFC r198382, r198385:
Replace most of priority numbers with defines. No logical changes.
2009-11-17 19:38:19 +00:00
Alexander Motin
01007372f2 MFC r197838:
On command timeout handle frozen command first, to not run it inside
XXX_end_transaction().
2009-11-17 19:36:06 +00:00
Konstantin Belousov
4a0dfeb299 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.
2009-11-17 18:38:00 +00:00
Konstantin Belousov
82bccc6465 MFC r198476 (by alc):
Simplify the inner loop of vm_fault_copy_entry().

Approved by:	alc
2009-11-17 18:31:09 +00:00
John Baldwin
24b458cf34 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.
2009-11-17 16:17:11 +00:00
Hajimu UMEMOTO
0e78091638 MFC r197286, r197306:
V_irtualize the lltables list, making ARP and ND reasonably
usable again with options VIMAGE kernels.

Discussed with:	hrs
2009-11-17 16:11:53 +00:00
John Baldwin
fb5f8c0a4f MFC 198043:
Move the USB wireless drivers down into their own section next to the USB
ethernet drivers.
2009-11-17 15:56:45 +00:00
Alexander Motin
0072eeecbe MFC r198381:
Remove some obsoleted comments.
2009-11-17 15:16:21 +00:00
Alexander Motin
9afd1b3ab3 MFC r198372, r198377:
Implement cam_ccbq_fini().
This is effectively NULL change, but makes this API a bit more consistent.
2009-11-17 15:14:13 +00:00
Alexander Motin
c6956547fc MFC r198333:
Do not search for bus when it is not needed.
2009-11-17 15:08:01 +00:00
Alexander Motin
1d686e05d5 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.
2009-11-17 15:04:58 +00:00
Alexander Motin
3c6b9b48a0 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.
2009-11-17 14:56:00 +00:00
Alexander Motin
db581aa0e3 MFC r198322:
Report real max_target = 15. SIM doesn't need to know that target 15 is PMP.
It is XPT business.
2009-11-17 14:49:35 +00:00
Alexander Motin
b06be4e00c MFC r196907:
To save small bit of CPU time, hide part of SNTF register read latency
behind other reads.
2009-11-17 14:47:40 +00:00
Alexander Motin
1987ffda92 MFC r197541:
Report SATA 3.x devices.
2009-11-17 14:38:47 +00:00
Alexander Motin
71f045ca3f MFC r197421:
If on sense request device returns no sence, give up and return,
or we may loop forever.
2009-11-17 14:37:20 +00:00
Bjoern A. Zeeb
422426a5f1 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
2009-11-17 14:30:09 +00:00
Alexander Motin
72d128fa0b MFC r196983:
Free the correct buffer in an error case.

Submitted by:   phk
2009-11-17 14:14:07 +00:00
Alexander Motin
028a10f917 MFC r196903:
Remove duplicate qfrozen_cnt variable from struct cam_ed.
ccbq.queue.qfrozen_cnt should be used instead.
2009-11-17 13:48:27 +00:00
Christian Brueffer
e8f2b1218b MFC: r198952
Fix two memory leaks in error cases.
2009-11-17 13:37:27 +00:00
Alexander Motin
f26a262eeb MFC r196901:
Remove unneeded CAM_SIM_MPSAFE check.
2009-11-17 13:04:05 +00:00
Alexander Motin
05e4022d23 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.
2009-11-17 13:01:17 +00:00
Alexander Motin
b351967560 MFC r196897:
Avoid extra swi_sched() call, if this SIM is already queued.
It reduces overhead for coalesced command completions.
2009-11-17 12:58:07 +00:00
Alexander Motin
cfd3d58f6f MFC r197540, r198587, r198865:
Add more defines for bits from ATA and CF specifications.
2009-11-17 12:42:27 +00:00
Alexander Motin
b882e0398e MFC r199074:
Add more ICH10 chip IDs.
2009-11-17 12:30:06 +00:00
Alexander Motin
dfa1c364b8 MFC r198583:
Add some magic taken from OS X and Linux to support early revision K2
SATA controllers, like those found on the G5 Xserve.
2009-11-17 12:25:34 +00:00
Alexander Motin
3f2bdafd97 MFC r198582:
Turn off use of ATA_A_4BIT on modern hardware. This flag was already
obsoleted in 1996 by ATA-2, and crashes some modern hardware like some
revisions of the Serverworks K2 SATA controller. Even very ancient
hardware seems not to require it. In the unlikely event this causes
problems, the previous behavior can be re-enabled by defining
ATA_LEGACY_SUPPORT at the top of this file.
2009-11-17 12:23:14 +00:00
Alexander Motin
ba0e41c3cc MFC r198519:
Don't ignore the return value of g_modevent() in acd_modevent().
2009-11-17 12:18:14 +00:00
Konstantin Belousov
5c3037910a MFC r199137:
Detect the slashdot lookup for RENAME or REMOVE in lookup(), and return
EINVAL.
2009-11-17 11:46:55 +00:00
Konstantin Belousov
c3568f6fbd MFC r198853:
If socket buffer space appears to be lower then sum of count of
already prepared bytes and next portion of transfer, inner loop of
kern_sendfile() aborts, not preparing next mbuf for socket buffer, and
not modifying any outer loop invariants. The thread loops in the outer
loop forever.

Instead of breaking from inner loop, prepare only bytes that fit into
the socket buffer space.
2009-11-17 11:43:53 +00:00
Bruce M Simpson
7ea239483a MFC r199287:
Fix a functional regression in multicast.

  Userland daemons need to see IGMP traffic regardless of the group;
  omit the imo filter check if the proto is IGMP. The kernel part
  of IGMP will have already filtered appropriately at this point.

Submitted by:   Franz Struwig
Reported by:    Ivor Prebeg, Franz Struwig
2009-11-17 10:59:51 +00:00
Andriy Gapon
7a04f19803 MFC r199015: ichwd: don't attach to isa pnp device(s) by accident 2009-11-17 09:35:13 +00:00
Jack F Vogel
95d8c74501 On a 32 bit kernel the igb driver may cause a page
fault panic due to a failed bounce page allocation
during RX mbuf setup. The large demand on bounce pages
is due to the alignment requirement in the tag. This
restriction was removed in the ixgbe driver with no
ill effects and so is being removed here also.
2009-11-16 18:58:45 +00:00
Rick Macklem
43bd82988b MFC: r199053
Add a check for the connection being shut down to the krpc
client just before queuing a request for the connection. The
code already had a check for the connection being shut down
while the request was queued, but not one for the shut down
having been initiated by the server before the request was
in the queue. This fixes some cases of problems w.r.t. reconnecting
to a NFS server that drops inactive TCP connections.

Tested by:	Olaf Seibert, Daniel Braniss
Reviewed by:	dfr
2009-11-15 19:26:06 +00:00
Stanislav Sedov
5b7c45037d - MFC r198320:
Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header
  in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not
  into if_bce.c anyway.  It is disabled by default.
2009-11-15 11:30:59 +00:00
Robert Noland
1de2992578 MFC r199241
This patch addresses an overflow in the the zfs boot code and allows
users to boot from zfs raidz volumes.  This has been tested by a number
of users and does not impact those which are not booting from zfs raidz
volumes.

Submitted by:	Matt Reimer <mattjreimer@gmail.com>
2009-11-14 16:14:51 +00:00
Pawel Jakub Dawidek
5f99f88975 MFC r198703,r199156,r199157:
r198703:

- zfs_zaccess() can handle VAPPEND too, so map V_APPEND to VAPPEND and call
  zfs_access() instead of vaccess() in this case as well.
- If VADMIN is specified with another V* flag (unlikely) call both
  zfs_access() and vaccess() after spliting V* flags.

This fixes "dirtying snapshot!" panic.

PR:	kern/139806
Reported by:	Carl Chave <carl@chave.us>
In co-operation with:	jh

r199156:

Avoid passing invalid mountpoint to getnewvnode().

Reported by:	rwatson
Tested by:	rwatson

r199157:

Be careful which vattr fields are set during setattr replay.
Without this fix strange things can appear after unclean shutdown like
files with mode set to 07777.

Reported by:	des
2009-11-14 11:59:59 +00:00
Hajimu UMEMOTO
864fb934d0 MFC r199173: CURVNET_RESTORE() was not called in certain cases. 2009-11-14 04:46:24 +00:00
Alexander Leidinger
43b4fbd112 MFC r198945:
Fix typo in kernel message. The fix is based upon the patch in the PR.

  PR:		kern/140279
  Submitted by:	Alexander Best <alexbestms@math.uni-muenster.de>
2009-11-12 13:09:36 +00:00
Navdeep Parhar
bbec3bb581 MFC r197791
cxgb(4) updates, including:
- support for the new Gen-2, BT, and LP-CR cards.
- T3 firmware 7.7.0
- shared "common code" updates.
2009-11-12 00:20:31 +00:00
Navdeep Parhar
585be673c5 MFC r197043 2009-11-11 22:31:02 +00:00
Ken Smith
7647320449 Shift what stable/8 calls itself to the thing that people who tend to
complain about such things find, on average, the least objectionable.
2009-11-11 14:38:45 +00:00
Andrew Thompson
41de786582 MFC r199058
Integrate lost interrupts patch from the old USB stack.

 Some EHCI chips from VIA / ATI seem to trigger interrupts before writing back
 the qTD status, or miss signalling occasionally under heavy load.  If the host
 machine is too fast, we can miss transaction completion - when we scan the
 active list the transaction still seems to be active. This generally exhibits
 itself as a umass stall that never recovers.

 We work around this behaviour by setting up this callback after any softintr
 that completes with transactions still pending, giving us another chance to
 check for completion after the writeback has taken place

Submitted by:	Alexander Nedotsuko
2009-11-11 01:33:06 +00:00
Alexander Motin
58ad43feb1 MFC r198486, r199050:
Increase ATA command timeouts. Introduce define and kernel option
ATA_REQUEST_TIMEOUT to control it.

PR:		kern/111023
2009-11-10 22:37:44 +00:00
Xin LI
ce5c80071f MFC revision 199069:
Initialize the whole message unit's DMA buffer to zero, this fixes a panic
during boot when ARC1200 is being used with certain motherboard models.

This commit brings the driver to the same state of vendor's 1.20.00.16
release.  Many thanks to Areca for their continued support to FreeBSD.

This instant MFC was requested by re@ (kensmith) in preparation for
8.0-RC3.

Reported by:	Jirka Mikulas <jiri mikulas com>
Submitted by:	Erich Chen (Areca)
2009-11-10 00:34:25 +00:00
Ken Smith
50aa951061 Comment out the sbp(4) entry for GENERIC config files that contain it.
There are known issues with this driver that are beyond what can be
fixed for 8.0-RELEASE and the bugs can cause boot failure on some systems.
It's not clear if it impacts all systems and there is interest in getting
the problem fixed so for now just comment it out instead of remove it.

Commit straight to stable/8, this is an 8.0-RELEASE issue.  Head was left
alone so work on it can continue there.

Reviewed by:	Primary misc. architecture maintainers (marcel, marius)
2009-11-09 21:39:42 +00:00
Nathan Whitehorn
006a483528 Insta-MFC of r199084,199108:
Increase the size of the OFW translations buffer to handle G5 systems
   that use many translation regions in firmware, and add bounds checking
   to prevent buffer overflows in case even the new value is exceeded.

Short MFC requested by re since the problem this fixes breaks CD boot on
most G5 systems, making them uninstallable.

Reported by:	Jacob Lambert
Approved by:	re (kensmith,kib)
Requested by:	re
2009-11-09 21:30:45 +00:00
Ken Smith
973e10a816 MFC r198719:
> While certain supported Symbios/LSI SCSI chips (532c896, 53c1000, 53c1010)
> do support 64bit addresses, the current SCRIPTS code supports only 32bit
> addresses causing data corruption for buffer addresses >4GB. This problem
> affects 64bit machines with more than 4GB RAM or amd64 with 4GB and
> memory hole remapping.
> Work-around this problem with a bus_dma tag that requests bounce-buffers
> for addresses >4GB. This causes some overhead, but given the maximum SCSI
> bus speed of 160MB/s compared, the effect should hardly be noticeable.
> The problem was reported by Mike Watters (mike at mwatters net) who also
> verified that this fix cures the problem.
>
> Since this change is a NOOP on systems with less than 4GB RAM and fixes
> data corruption (in RAM and on disk) on systems with more than 4GB, I hope
> that this change is accepted for 8.0.

Requested by:	Stefan Esser (se at freebsd dot org)[1]
Reviewed by:	jhb, scottl

[1] Stefan requested this be part of 8.0 but has been unavailable to do
    the MFC since submitting the request.  We want to get 8.0-RC3 started
    so I'm doing the merges with re@ hat on.
2009-11-09 18:09:10 +00:00
Hajimu UMEMOTO
c303f1eb39 MFC r198976, r198993:
- Don't call LLE_FREE() after nd6_free().
 - Make nd6_llinfo_timer() does its job, again.  ln->la_expire was
   greater than time_second, in most cases.
2009-11-09 15:11:37 +00:00
Oleg Bulyzhin
c366b7c1e2 MFC r198845:
Fix two issues that can lead to exceeding configured pipe bandwidth:
- do not expire queues which are not ready to be expired.
- properly calculate available burst size.

MFC r199073:
style(9): add missing parentheses
2009-11-09 10:13:24 +00:00
Ulf Lilleengen
6ab1fc9fb1 MFC r198475:
- Add support for Marvell Yukon 88E8042 device.

Submitted by:   Mario Lobo <mlobo -at- digiart.art.br>
2009-11-08 17:59:55 +00:00
Alexander Motin
7d767be8c7 MFC r198818:
Add IDs for nVidia MCP65/77/79/89 SATA conntrollers.
2009-11-08 14:06:15 +00:00
John Baldwin
f6b15c7b77 MFC 198367:
Set the devclass_t pointer specified in the DRIVER_MODULE() macro
sooner so it is always valid when a driver's identify routine is
called.
2009-11-06 20:23:16 +00:00
Attilio Rao
dcf9f13772 MFC r197070:
Consolidate CPUID to CPU family/model macros for amd64 and i386 to reduce
unnecessary #ifdef's for shared code between them.

This MFC should unbreak the kernel build breakage introduced by
r198977.

Reported by:	kib
Pointy hat to:	me
2009-11-06 15:24:48 +00:00
Alexander Motin
cf236d24db MFC r198700:
Add support for different request block format used by Gen-IIe Marvell SATA.
This adds support for Marvell 6042/7042 chips and Adaptec 1430SA controller.

MFC r198718:
Allow newly added controllers to use full I/O sizes.
2009-11-06 10:56:43 +00:00
Alexander Motin
cdcdbef48e MFC r198407:
Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.
2009-11-06 10:48:44 +00:00
Alexander Motin
74c174b9a7 MFC r197783:
- Revert r191568 partially.  Forcing AHCI mode by changing device subclass
and progif is evil.  It doesn't work reliably[1] and we should honor BIOS
configuration by the user.
- If the SATA controller is enbled but combined mode is disabled, mask off
the emulated IDE channel on the legacy IDE controller.

Pointed out by:	mav[1]
2009-11-06 10:45:37 +00:00
Attilio Rao
063e246163 MFC r198868, r198950:
Opteron rev E family of processor expose a bug where acq memory barriers
can be broken, resulting in random breakages.
Printout a warning message if affecred family and model are found.
2009-11-06 10:15:15 +00:00
Edward Tomasz Napierala
6451b27464 MFC r197789:
Fix ACL support on sparc64.  Turns out that fuword(9) fetches 64 bits
instead of sizeof(int), and on sparc64 that resulted in fetching wrong
value for acl_maxcnt, which in turn caused __acl_get_link(2) to fail
with EINVAL.

PR:		sparc64/139304
Submitted by:	Dmitry Afanasiev <KOT at MATPOCKuH.Ru>
2009-11-06 09:39:35 +00:00
Christian Brueffer
c4e480716d MFC: r198684
Add support for Adaptec 39320LPE adapters.
2009-11-06 06:50:45 +00:00
Ed Maste
12fbadae8a MFC r198525:
Whitespace fixup: 8 spaces -> tab
2009-11-05 18:34:01 +00:00
Matt Jacob
699050d8d5 Unbreak SBus cards which have been broken (apparently) for a while.
Most of the pieces came from Marius- correct settings for channels
and resource management. The one piece missing was that you cannot
for SBus cards replace 32 bit operations with A64 operations- not
supported. This is an MFC of r198822.
2009-11-05 18:25:26 +00:00
John Baldwin
dad4753c04 MFC 198554:
Fix some problems with effective mmap() offsets > 32 bits.  This was
partially fixed on amd64 earlier.  Rather than forcing linux_mmap_common()
to use a 32-bit offset, have it accept a 64-bit file offset.  This offset
is then passed to the real mmap() call.  Rather than inventing a structure
to hold the normal linux_mmap args that has a 64-bit offset, just pass
each of the arguments individually to linux_mmap_common() since that more
closes matches the existing style of various kern_foo() functions.
2009-11-04 20:49:14 +00:00
Pyun YongHyeon
0b333599d5 MFC r197586:
It seems some 82559ER controllers do not support Rx checksum
  offloading. Datasheet said nothing about the limitation of 82559ER
  except WOL. Explicitly disable Rx checksum offloading for
  controllers that is known to lack the capability.

  PR:	kern/138135
  Tested by:	Gooderum, Mark < mgooderum <> websense dot com >
2009-11-04 18:31:43 +00:00
John Baldwin
6fd3786837 MFC 197772:
When the timeout backoff hits the maximum value, leave it capped at the
maximum value rather than setting it to the result of a boolean expression
that is always true.
2009-11-04 16:58:26 +00:00
Christian Brueffer
a4f93c1075 MFC: r198539
Close a stream file descriptor leak.
2009-11-04 13:30:32 +00:00
Christian Brueffer
e4e76802b8 MFC: r198537
Close a file descriptor leak in an error case.
2009-11-04 13:06:09 +00:00
Christian Brueffer
efab19fed7 MFC: r198546
Remove spurious `)`
2009-11-04 12:35:35 +00:00
Andrew Thompson
b64689e0fb MFC r198775
Fix a corner case where usbd_transfer_drain() can return too early if the
 callback has dropped the mutex, leading to a panic.

Submitted by:	HPS
2009-11-04 01:50:25 +00:00
Rui Paulo
db463c13da MFC r198581:
Update the route's sequence number upon receiving a RANN.
2009-11-03 23:26:31 +00:00
Max Laier
67de44048a MFC r197334,r197433:
Extract svn and git version info from git-svn repos.
2009-11-03 21:57:00 +00:00
Ed Maste
55dd54d73f MFC r197011:
Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious
  "COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages.  Any commands
  that get truly stuck will still trigger the warning and the hardware
  health check, just a little bit later.
2009-11-02 16:54:23 +00:00
Ed Maste
f94d7478f3 MFC r197082:
If the pxe client is told to use / as the root path, honour that rather
of trying to mount /pxeroot instead.

PR:		i386/106493
Submitted by:	Andrey Russev
2009-11-02 16:46:06 +00:00
Ed Maste
b561979f8c MFC r197692:
In fill_kinfo_thread, copy the thread's name into struct kinfo_proc even
  if it is empty.  Otherwise the previous thread's name would remain in the
  struct and then be reported for this thread.

Submitted by:	Ryan Stone
2009-11-02 16:32:32 +00:00
Ed Maste
af8e9d942c MFC r198541:
Do first controller time sync after 1 minute, as in Adaptec's vendor
  driver.
2009-11-02 16:22:59 +00:00
Robert Noland
de546efdad MFC 198696
Cleanup in r600_blit

     - Don't bother to assign vb until we know we have enough space
     - Add variables for sx2, sy2, dx2, dy2 so that these aren't
       calculated over and over, also reduce chance of errors.
     - Use switch to assign color/format
2009-11-02 16:02:16 +00:00
Robert Noland
1a4d349290 MFC 198695
A bit of cleanup work on radeon_freelist_get()

 * Fix the main loop to search all buffers before sleeping.
 * Remove dead code
2009-11-02 15:59:55 +00:00
Robert Noland
6400e3ac8c MFC 198692
Use system specified memory barriers rather than rolling our own.
2009-11-02 15:57:03 +00:00
Robert Noland
1675ae3b86 MFC 198691
Fix blitter support for RS880 chips
2009-11-02 15:53:32 +00:00
Max Khon
fd6bbf0435 MFC: Allow KMOD with hypens and dots. 2009-11-02 09:47:15 +00:00
Alan Cox
588b5e6ee8 MFC r197331, r197394
Add getpagesizes(3).
2009-11-01 19:22:07 +00:00
Andriy Gapon
ea9b1909f6 MFC 197450: number of cleanups in i386 and amd64 pci md code 2009-11-01 18:39:26 +00:00
Andriy Gapon
2df1facbb7 MFC 198279: fix sorting of some amd* entries in some makefiles 2009-11-01 17:56:45 +00:00
Andriy Gapon
fc06d8191e MFC 198271: add amdtemp to i386 NOTES 2009-11-01 17:53:33 +00:00
Andriy Gapon
f13868d206 MFC 197647: cpufunc.h: unify/correct style of c extension names 2009-11-01 17:45:37 +00:00
Andriy Gapon
33b3442f13 MFC 197658: print machine in kernel boot version string
PR:		kern/126926
2009-11-01 17:40:05 +00:00
Andriy Gapon
b8daad66fd MFC 197641: print_caddr_t: drop incorrect __unused from parameter 2009-11-01 17:36:36 +00:00
Andriy Gapon
0406cc12b6 MFC r197128,197325: add support for smbus controller found in AMD SB700 2009-11-01 11:34:13 +00:00
Ed Schouten
f36e7051c7 MFC various commits back to stable/8:
SVN r197174:
  Make sure we never place the cursor outside the screen.

  For some vague reason, it may be possible that scp->cursor_pos exceeds
  scp->ysize * scp->xsize. This means that teken_set_cursor() may get
  called with an invalid position. Just ignore the old cursor position in
  this case.

  Reported by:  Paul B. Mahol <onemda gmail com>

SVN r198213:
  Make lock devices work properly.

  It turned out I did add the code to use the init state devices to set
  the termios structure when opening the device, but it seems I totally
  forgot to add the bits required to force the actual locking of flags
  through the lock state devices.

  Reported by:	ru

SVN r198215, r198217:
  Fix a typo in the jail(8) manpage.

  Submitted by: Jille Timmermans <jille quis cx>

SVN r198216:
  Fix qouting in a comment, to make it look more consistent

  Submitted by: Jille Timmermans <jille quis cx>

SVN r198223:
  Properly set the low watermarks when reducing the baud rate.

  Now that buffers are deallocated lazily, we should not use
  tty*q_getsize() to obtain the buffer size to calculate the low
  watermarks. Doing this may cause the watermark to be placed outside the
  typical buffer size.

  This caused some regressions after my previous commit to the TTY code,
  which allows pseudo-devices to resize the buffers as well.

  Reported by:  yongari, dougb
2009-11-01 10:30:30 +00:00
Alexander Motin
5d933cfd98 MFC rev. 198623:
Add missing ATA kernel options dependencies.
2009-11-01 10:01:39 +00:00
Stacey Son
83613795b2 MFC 197240,197241,197242,197243,197293,197294,197407:
Add EVFILT_USER filter and EV_DISPATCH/EV_RECEIPT flags to kevent(2).

Approved by: rwatson (mentor)
2009-10-31 21:22:18 +00:00
Alan Cox
13529df13b MFC r197317
When superpages are enabled, add the 2 or 4MB page size to the array of
  supported page sizes.
2009-10-31 19:02:08 +00:00
Alan Cox
ebc91405bd MFC r197316
Add a new sysctl for reporting all of the supported page sizes.
2009-10-31 18:54:26 +00:00
Alan Cox
38c15033c7 MFC r198472
Eliminate an unnecessary check from vm_fault_prefault().
2009-10-31 18:18:32 +00:00
Antoine Brodin
5a1c285266 MFC r196891 to stable/8:
Change w_notrunning and w_stillcold from pointer to array so that sizeof
  returns what is expected.

  PR:		kern/138557
  Discussed with:	brucec@
  MFC after:	1 month
2009-10-31 12:26:40 +00:00
Christian Brueffer
ce68852cc2 MFC: r198356
Fix a memory leak in an error case.
2009-10-31 11:08:04 +00:00
Christian Brueffer
b7ef6e29a5 MFC: r198327
Add a missing free() call.
2009-10-31 10:59:53 +00:00
Rui Paulo
e22a16d5d3 MFC r198230, r198242, r198260, r198346, r198369, r198384:
More mesh fixes to comply with latest draft.
2009-10-30 19:59:50 +00:00
Robert Noland
5a3d86c297 MFC r197950
Add pci id's for Intel G41 chipset
2009-10-30 16:43:28 +00:00
Robert Noland
6137518b87 MFC r197951
Add support for Intel G41 chipset
2009-10-30 16:37:58 +00:00
Robert Noland
357a8e800b MFC r196470-196471,197154-197155,197603-197606
Sync radeon drm support

This adds kernel support for r6/7xx 3D.
2009-10-30 16:32:35 +00:00
Robert Noland
d84490b532 MFC r196466
Add a read only sysctl tracking the hw.drm.msi tunable.
2009-10-30 16:14:17 +00:00
Robert Noland
1587b7fc87 MFC r196465
Clean up the handling of device minors
2009-10-30 16:12:28 +00:00
Robert Noland
e7d8e24d0a MFC r196464
Clean up the locking in drm_alloc_resource()
2009-10-30 16:06:32 +00:00
Robert Noland
713444a957 MFC r198097
Set the active flag in the PMBR when we install bootcode on a GPT
partitioned disk.  Some BIOS require this to be set before they will
boot the device.
2009-10-30 15:45:00 +00:00
Andrew Thompson
bfa1f203df MFC r198373
Allow dumping the USB mouse reports via 'sysctl -b dev.ums.N.parseinfo',
 previously only available via bootverbose.

PR:		usb/137191
2009-10-29 23:28:48 +00:00
Andrew Thompson
fbcc87cbbc MFC r198258
Add opt_gdb.h which is now needed by ucom.
2009-10-29 23:28:21 +00:00
Andrew Thompson
906c96039d MFC r198257
Add support for newer WinChipHead CH341 chips, previously in the uch341 driver.
2009-10-29 23:27:40 +00:00
Andrew Thompson
83c0f67853 MFC r198153
Correct offset calcluation for the NCM implementation.
2009-10-29 23:27:00 +00:00
Andrew Thompson
6a8d0ac969 MFC r198152
Only poll ukbd if KDB is active.
2009-10-29 23:26:29 +00:00
Andrew Thompson
1ea6a20c73 MFC r198151
Workaround buggy BIOS code in USB regard. By doing the BIOS to OS handover for
 all host controllers at the same time, we avoid problems where the BIOS will
 actually write to the USB registers of all the USB host controllers every time
 we handover one of them, and consequently reset the OS programmed values.
2009-10-29 23:25:52 +00:00
Andrew Thompson
b0deb9099b MFC r197999 (hrs)
Fix the 106/109 USB Japanese keyboard "underscore" issue.
 Sun Type 6 USB keyboard support added in rev 1.46 conflicted with
 some scan codes used in Japanese keyboards because the scan code
 conversion routine was ambiguous for the overlapped codes.

PR:		ports/134005
2009-10-29 23:25:13 +00:00
Andrew Thompson
48bd741396 MFC r197573
Add back endpoint swap detection that was disabled in an earlier driver
 conversion.
2009-10-29 23:24:41 +00:00
Andrew Thompson
b56d97e2af MFC r197572
Add new FTDI IDs.
2009-10-29 23:24:10 +00:00
Andrew Thompson
e792954dba MFC r197570
Add experimental support for usb serial console and polled mode during DDB.
2009-10-29 23:23:34 +00:00
Andrew Thompson
6b48cd2444 MFC r197569
Add a config number quirk for the ELSA_MODEM1
2009-10-29 23:22:54 +00:00
Andrew Thompson
589c414bdf MFC r197568
add more device IDs
2009-10-29 23:22:23 +00:00
Andrew Thompson
9d2344fb86 MFC r197567
Allow setting of MAC address for AXE based ethernet adapters.
2009-10-29 23:21:52 +00:00
Andrew Thompson
381882bf15 MFC r197566
Increase the rx buffer size to 16384 bytes, this increases RX performance from
 50Mbps to 220Mbps on PLANEX GU-1000T.
2009-10-29 23:21:20 +00:00
Andrew Thompson
c21bee0c36 MFC r197565
- Remove SAMSUNG_YP_U2 now that it is in the cam layer
 - Add quirk from Tobias Grosser for Western Mypassword
2009-10-29 23:20:47 +00:00
Andrew Thompson
078da83100 MFC r197564
Add new usbdev entries for Marvell, FTDI, Option and Western.
2009-10-29 23:20:15 +00:00
Andrew Thompson
d66897e03e MFC r197563
Add basic support for USB Network Control Model (NCM) v1.0 to if_cdce.c.
2009-10-29 23:19:41 +00:00
Andrew Thompson
57866e6c93 MFC r197562
Add extra safety locking when clobbering xfer->flags_int.started in start and
 stop functions, because xfer->flags_int is also updated by the USB controller,
 under the controller lock.
2009-10-29 23:18:59 +00:00
Andrew Thompson
d81c7ac0fa MFC r197561
Correct buffer sizes used so that they match. The old code could give the
 impression that a overflow situation existed but was not possible.
2009-10-29 23:18:27 +00:00
Andrew Thompson
88f788a6c5 MFC r197559
Add support for USB language selection.

PR:		usb/138563
2009-10-29 23:17:54 +00:00
Andrew Thompson
9d168176f5 MFC r197558
Fix NULL-pointer dereference in usb_endpoint_foreach().

PR:		usb/138389
2009-10-29 23:17:23 +00:00
Andrew Thompson
f23c09d0b0 MFC r197556
Clear all interrupts rather than just SETUP packet.
2009-10-29 23:16:39 +00:00
Andrew Thompson
320dbc0942 MFC r197555
Simplify logic around setting EHCI_QH_DTC and expand some htohc32(temp.sc, 0)
 statements to zero.
2009-10-29 23:16:00 +00:00
Andrew Thompson
ffa540b752 MFC r197554
Import two PCI quirks from Linux

  - Add quirk for ATI SB600 and SB700 to free SMB controller
  - Correct schedule sleep time to 10us on the VIA ehci controller
2009-10-29 23:15:26 +00:00
Andrew Thompson
1063b450cd MFC r197553
- clean up USB detach logic. There seems to be some problems detaching multiple
   USB HUBs connected in series from the root.
2009-10-29 23:14:39 +00:00
Andrew Thompson
6333b36c43 MFC r196826
Make umass(4) pass device USB serial number to CAM, making it possible
 to e.g. retrieve it using camcontrol(8).
2009-10-29 23:14:06 +00:00
Andrew Thompson
6536a23656 MFC r196497
Remove redundant locking.
2009-10-29 23:13:36 +00:00
Andrew Thompson
f18778a473 MFC r196496
Add a reminder comment to optimize bus_dmamap_sync calls.
2009-10-29 23:13:02 +00:00
Andrew Thompson
edd4ee99cf MFC r196495
Add mass storage quirks.

PR:             usb/137138,usb/137226,usb/137789,usb/135372
2009-10-29 23:12:29 +00:00
Andrew Thompson
d92f7ea655 MFC r196494
- fix uvisor support, mostly correct buffer sizes used.
 - correct device info flag for SONY Cli NR70V
2009-10-29 23:11:48 +00:00
Andrew Thompson
d51a8c13ea MFC r196493
- Fix false positive uipaq probe
2009-10-29 23:11:13 +00:00
Andrew Thompson
2bb2691018 MFC r196492
- fix CDC ethernet matching order so that the match flags get correct.
2009-10-29 23:10:41 +00:00
Andrew Thompson
0627fc1870 MFC r196491
We used force all of the GPIO pins low first and then
 enable the ones we want. This has been changed to better
 match the ADMtek's reference design to avoid setting the
 power-down configuration line of the PHY at the same time
 it is reset.
2009-10-29 23:10:11 +00:00
Andrew Thompson
9fd6caea70 MFC r196490
- FIFO's are always opened separately in read and write direction even if the
   actual device is opened for read and write. Fix fflags check so that the UFM
   and URIO drivers work.
2009-10-29 23:09:37 +00:00
Andrew Thompson
61908699b5 MFC r196488
- allow disabling "root_mount_hold()" by setting a sysctl/tunable at boot
 - remove some redundant initial explore code
2009-10-29 23:09:02 +00:00
Konstantin Belousov
5984920662 MFC r197930:
Postpone dropping fp till both kq_global and kqueue mutexes are
unlocked.
2009-10-29 16:28:21 +00:00
Konstantin Belousov
c2204c03c8 MFC r197389:
Do panic regardeless of execution mode at the moment of T_RESERVED trap.
2009-10-29 16:24:39 +00:00
Konstantin Belousov
ce8e32de5c MFC r197428:
Add per-process osrel node to the procfs, to allow read and set p_osrel
value for the process.
2009-10-29 16:19:58 +00:00
John Baldwin
ff5bfa3ef6 MFC 197439:
Extract the code to find and map the MADT ACPI table during early kernel
startup and genericize it so it can be reused to map other tables as well:
- Add a routine to walk a list of ACPI subtables such as those used in the
  APIC and SRAT tables in the MI acpi(4) driver.
- Move the routines for mapping and unmapping an ACPI table as well as
  mapping the RSDT or XSDT and searching for a table with a given signature
  out into acpica_machdep.c for both amd64 and i386.
2009-10-29 16:00:27 +00:00
John Baldwin
983998573b MFC 197649:
Do not hold the ACPI A/C adapter lock when changing the power profile.
2009-10-29 15:28:05 +00:00
John Baldwin
9ad4b9fbd2 MFC 197648:
Split the 'video' ACPI lock up into two locks to resolve a LOR with the
sysctl lock.  The 'video' lock now protects the 'bus' of video output
devices attached to a graphics adapter.  It is used when iterating over
the list of outputs, etc.  The 'video_output' lock is used to lock the
output-specific data similar to a driver lock for the individual video
outputs.
2009-10-29 15:24:57 +00:00
John Baldwin
9e14139d9b MFC 196840:
Fill the reverse RSS map with 0xff's so that the subsequent loop to
calculate the values will work properly.
2009-10-29 15:17:59 +00:00
John Baldwin
50d356311a MFC 197460:
Remove unnecessary locking from attach().  This fixes a LOR between the
acpi_ibm lock and the sysctl lock.
2009-10-29 15:13:36 +00:00
John Baldwin
a6fb726860 MFC 196615:
Extend the device pager to support different memory attributes on different
pages in an object.
- Add a new variant of d_mmap() currently called d_mmap2() which accepts
  an additional in/out parameter that is the memory attribute to use for
  the requested page.
- A driver either uses d_mmap() or d_mmap2() for all requests but not both.
  The current implementation uses a flag in the cdevsw (D_MMAP2) to indicate
  that the driver provides a d_mmap2() handler instead of d_mmap().  This
  is done to make the change ABI compatible with existing drivers and
  MFC'able to 7 and 8.
2009-10-29 15:09:54 +00:00
Alexander Motin
f39d3da87e MFC rev. 198487:
Round timeout up when converting CAM milliseconds to ATA seconds.
2009-10-29 10:38:17 +00:00