Commit Graph

71110 Commits

Author SHA1 Message Date
Alexander Motin
26159d4874 Reduce soft-reset assertion time from 5ms to 50us.
ATA specification declares minimal reset time of 5us. SATA keeps it, but
requires devices to handle commands transmitted even one by one without
any gap.
2009-02-20 20:29:32 +00:00
Alexander Motin
53fb2a7ac9 Disable port interrupts before doing PHY reset.
PHY reset causes drive connect/disconnect events, unwanted at this moment.
2009-02-20 20:20:00 +00:00
Nathan Whitehorn
1ac37bcb77 Add Altivec support for supported CPUs. This is derived from the FPU support
code, and also reducing the size of trapcode to fit inside a 32 byte handler
slot.

Reviewed by:	grehan
MFC after:	2 weeks
2009-02-20 17:48:40 +00:00
Alan Cox
9d13a605d4 Eliminate stale comments. 2009-02-20 16:19:34 +00:00
Randall Stewart
ea44232b3a Add the add-stream capability. Still needs more
testing..

MFC after:	1 month
2009-02-20 15:03:54 +00:00
Randall Stewart
186414058a Fix a bug. The sending was being restricted improperly by
the max_burst. It should only be gated by cwnd in the
lower level send.

Obtained from:	Michael Tuexen
MFC after:	1 week.
2009-02-20 14:33:45 +00:00
Alexander Motin
72dc9f05dd Fix pc98 build error due to missing variable.
Submitted by:	avg
2009-02-20 14:10:23 +00:00
Ed Schouten
0eee862a54 Don't make Linux stat() open character devices to resolve its name.
The existing code calls kern_open() to resolve the vnode of a pathname
right after a stat(). This is not correct, because it causes random
character devices to be opened in /dev. This means ls'ing a tape
streamer will cause it to rewind, for example. Changes I have made:

- Add kern_statat_vnhook() to allow binary emulators to `post-process'
  struct stat, using the proper vnode.

- Remove unneeded printf's from stat() and statfs().

- Make the Linuxolator use kern_statat_vnhook(), replacing
  translate_path_major_minor_at().

- Let translate_fd_major_minor() use vp->v_rdev instead of
  vp->v_un.vu_cdev.

Result:

	crw-rw-rw- 1 root root   0, 14 Feb 20 13:54 /dev/ptmx
	crw--w---- 1 root adm  136,  0 Feb 20 14:03 /dev/pts/0
	crw--w---- 1 root adm  136,  1 Feb 20 14:02 /dev/pts/1
	crw--w---- 1 ed   tty  136,  2 Feb 20 14:03 /dev/pts/2

Before this commit, ptmx also had a major number of 136, because it
silently allocated and deallocated a pseudo-terminal. Device nodes that
cannot be opened now have proper major/minor-numbers.

Reviewed by:	kib, netchild, rdivacky (thanks!)
2009-02-20 13:05:29 +00:00
Alexander Motin
53963e588a Handle nForce MCP67 and MCP73 SATA controllers as AHCI. They report itself
as ATA RAID, but generic ATAPCI driver unable to detect drives there. AHCI
driver reported to handle them fine. Linux does the same.

Submitted by:	Andrey V. Elsukov on stable@
2009-02-20 08:49:56 +00:00
Scott Long
63b9228b0b Tell CAM that CISS logical devices support tagged queueing. This fixes
the low "max device openings" count that has led to poor performance in
FreeBSD 7.0 and 7.1
2009-02-20 07:43:43 +00:00
Scott Long
9d98ff4d69 Tell CAM that SPI disconnect works, which in turn will let it use tags.
This fixes the low "max device openings" count that has lead to poor
performance in FreeBSD 7.0 and 7.1.

Extra thanks goes to Mike Tancsa at Sentex for providing a debug system for
this.
2009-02-20 07:40:54 +00:00
Scott Long
934dec8c2f Add basic support for DDF, often found on Adaptec HostRAID controllers.
Spares and rebuilds are not supported, so this code should be considered
for entertainment purposes only.
2009-02-20 06:10:12 +00:00
Marcel Moolenaar
59c532c500 Provide compatibility symlink for logical partitions:
1.  Extend geom_dev by having it create the symlink (i.e. call
    make_dev_alias) based on the DIOCGPROVIDERALIAS ioctl.
    In this way the functionaility is generic and thus usable
    by any geom/provider.
2.  Have g_part handle said ioctl through the devalias method,
    so that it's under control of the scheme itself. By design
    the alias will not be created for newly added partitions.
2009-02-20 04:48:40 +00:00
Marcel Moolenaar
507a0d4a6c Fix an infinite loop created when the last logical partition is
removed.
2009-02-20 04:10:31 +00:00
John Baldwin
03964c8e09 Enable caching of negative pathname lookups in the NFS client. To avoid
stale entries, we save a copy of the directory's modification time when
the first negative cache entry was added in the directory's NFS node.
When a negative cache entry is hit during a pathname lookup, the parent
directory's modification time is checked.  If it has changed, all of the
negative cache entries for that parent are purged and the lookup falls
back to using the RPC.  This required adding a new cache_purge_negative()
method to the name cache to purge only negative cache entries for a given
directory.

Submitted by:	mohans, Rick Macklem, Ricardo Labiaga @ NetApp
Reviewed by:	mohans
2009-02-19 22:28:48 +00:00
John Baldwin
5428c66130 When fetching attributes for a file for NFSv3 mounts, do not perform an
opportunistic ACCESS RPC to populate both the access and attribute caches
of the file and instead always use a GETATTR RPC.  On many modern NFS
servers, an ACCESS RPC is much more expensive to service than a GETATTR
RPC.

Submitted by:	mohans
2009-02-19 22:18:00 +00:00
John Baldwin
3e057a2477 Don't clear the attribute cache of a file when it is closed. A subsequent
open() of the same file will load fresh attributes, so they do not need to
be explicitly flushed in close() to guarantee close to open consistency.
However, other file desciptors may still reference this file and clearing
the attributes in close() forces those other file descriptors to fetch
fresh attributes the next time they need them.

Reviewed by:	mohans
MFC after:	1 week
2009-02-19 22:10:39 +00:00
Warner Losh
7d11259539 Enable building of ficl on MIPS. It compiles, but needs more testing. 2009-02-19 18:53:08 +00:00
Warner Losh
962cd8ffd7 Add basic mips support. This has been compile tested only. 2009-02-19 18:52:31 +00:00
Ed Schouten
40d05103d8 Squash some small bugs in pts(4).
- Don't return a negative errno when using an unknown ioctl() on a
  pseudo-terminal master device. Be sure to convert ENOIOCTL to ENOTTY,
  just like the TTY layer does.

- Even though we should return st_rdev of the master device node when
  emulating pty(4) devices, FIODGNAME should still return the name of
  the slave device. Otherwise ptsname(3) and ttyname(3) return an
  invalid device name.
2009-02-19 17:54:42 +00:00
Sam Leffler
24a07b5b23 use 1/2 and 1/4 rate phy types to simplify txtime calculation 2009-02-19 17:44:23 +00:00
Andriy Gapon
7b1eb68a49 style nit in r188815
Pointed out by:	jhb, rpaulo
Approved by:	jhb (mentor)
2009-02-19 15:37:43 +00:00
Andriy Gapon
84206c741f fs/udf: fix incorrect error return (-1) when reading a large dir
Not enough space in user-land buffer is not an error, userland
will read further until eof is reached. So instead of propagating
-1 to caller we convert it to zero/success.

cd9660 code works exactly the same way.

PR:		kern/78987
Reviewed by:	jhb (mentor)
Approved by:	jhb (mentor)
2009-02-19 15:05:30 +00:00
Andriy Gapon
f1e1ddc3d9 acpi_cpu: fixup for PIIX4E PCI config related to C2
This is triggered only if BIOS configures ACPI_BITREG_BUS_MASTER_RLD
aka BRLD_EN_BM to 1.
Rationale:
1. we do not support C3 on PIIX4E
2. bus master activity need not break out of C2 state
3. because of CPU_QUIRK_NO_BM_CTRL quirk we may reset bus master
   status which would result in immediate break out from C2

So if you have seen
cpu0: too many short sleeps, backing off to C1
with this chipset before you may want to try cx_lowest of C2 again.

Reviewed by: rpaulo (mentor), njl
Approved by: rpaulo (mentor)
2009-02-19 14:39:52 +00:00
Alexander Motin
b50bb79c6a Use channel driver's attach/detach routines instead of ata_attach()/
ata_detach() to implement IOCATAATTACH/IOCATADETACH ioctls.
This will permit channel drivers to properly shutdown port hardware on channel
detach and init it on attach.
2009-02-19 12:47:24 +00:00
Sam Leffler
d497b6a449 remove private support for IEEE80211_MODE_HALF and IEEE80211_MODE_QUARTER
now that net80211 has them
2009-02-19 05:22:40 +00:00
Sam Leffler
6a76ae216e Add modes for 1/2 and 1/4-width channels so we have separate roaming
and xmit parameters.  This makes it possible to use tdma on fractional
channels.
o add IEEE80211_MODE_HALF and IEEE80211_MODE_QUARTER; note these are
  band-agnostic (may need revisiting)
o setup all default rates in ic_sup_rates instead of doing it only
  for active modes; we need these to calculate the default tx parameters
  which are not recalculated after a regulatory update (can't just
  recalculate after installing a new channel list because we might
  clobber user settings)
o remove special case code in ieee80211_get_suprates; this is now
  a candidate for an inline or removal
o add various entries for new modes (roaming+tx params, wme, rate
  mapping, scan set setup, country ie construction, tdma, basic rates)

Note these modes are intentionally not visible through if_media.
2009-02-19 05:21:54 +00:00
Sam Leffler
cbb24c240d o looseen abi dependencies on IEEE80211_MODE_MAX by accepting smaller
parameters for IEEE80211_IOC_ROAM and IEEE80211_IOC_TXPARAMS; this
  lets us add more modes and still have old apps work
o consolidate loops to remote assumptions about mode ordering
2009-02-19 05:03:10 +00:00
Sam Leffler
be0df3e7c0 use c99 initializers 2009-02-19 04:52:03 +00:00
Sam Leffler
047db6b311 o consolidate loops to eliminate assumptions about ordering of modes
o replace 0x80 by IEEE80211_RATE_MCS
2009-02-19 04:46:09 +00:00
Sam Leffler
da92f1598c Change country ie construction to simplify forthcoming changes:
o use c99 initializer for skipflags
o calculate band flags instead of statically listing them in the table
2009-02-19 04:44:18 +00:00
Sam Leffler
59a40225d5 use c99 initializer 2009-02-19 04:40:47 +00:00
Sam Leffler
82c990a4ef simplify setting up the roaming parameters; writing default parameters only
for active modes hasn't turned out to be useful so just define a const table
and copy it in place
2009-02-19 04:37:44 +00:00
Sam Leffler
566d825ba7 check ptr against NULL 2009-02-19 04:34:22 +00:00
Sam Leffler
40432d369a instead of special casing lookups for the 11na/g legacy rate set, just
install the rates once when creating the com structure
2009-02-19 04:33:36 +00:00
Sam Leffler
17e45e1934 Cleanup ath_hal_computetxtime's handling of 1/2 and 1/4-width channels:
o mark phy type to indicate 1/2 or 1/4-rate operation
o use phy type instead of channel attributes to identify 1/2 and 1/4-rate
  operation
o general cleanup of code including move phy constants to ah_internal.h

Eventually this code should go away and we should use the net0211 equivalents.
2009-02-19 04:24:22 +00:00
Sam Leffler
544347253f add phy types for 1/2 and 1/4-rate modes 2009-02-19 04:19:58 +00:00
Sam Leffler
1a15e29ab4 add HAL_DIAG_SETREGS to write registers via the diag api 2009-02-19 04:15:14 +00:00
Sam Leffler
86b3d17f30 whitespace 2009-02-19 04:10:51 +00:00
Alexander Motin
78d154163c Quite mechanical ch_detach implementations for all atapci subdrivers.
Some dmainit call fixes for previous commit.
2009-02-19 00:32:55 +00:00
Robert Watson
8a520db77d if_cx is currently disconnected from the build due to a dependence on
the old TTY implementation; however, take a cut at stripping its
optional Giant-protected code paths enabled using debug.cx.mpsafenet,
which will no longer work once IFF_NEEDSGIANT is removed.
2009-02-19 00:06:01 +00:00
Roman Divacky
1faa4dcb71 Mark these variables as __used too. Fix a style of previous commit.
Noticed by:	Christoph Mallon
Approved by:	kib (mentor)
2009-02-18 22:44:55 +00:00
Alexander Motin
04ff88ceac As soon as they called in only same one place (ata_pcichannel_attach()),
join allocate() and dmainit() atapci subdriver's channel initialization
methods into single ch_attach() method.

As opposite to ch_attach() add new ch_detach() method to deallocate/disable
channel.
2009-02-18 22:17:48 +00:00
Attilio Rao
f8d9048018 - Add a function (fill_kinfo_aggregate()) which aggregates relevant
members for a kinfo entry on a process-wide system.
- Use the newly introduced function in order to fix cases like
  KERN_PROC_PROC where aggregating stats are broken because they just
  consider the first thread in the pool for each process.
  (Note, additively, that KERN_PROC_PROC is rather inaccurate on
  thread-wide informations like the 'state' of the process.  Such
  informations should maybe be invalidated and being forceably discarded
  by the consumers?).
- Simplify the logic of sysctl_out_proc() and adjust the
  fill_kinfo_thread() accordingly.
- Remove checks on the FIRST_THREAD_IN_PROC() being NULL but add
  assertives.

This patch should fix aggregate statistics for KERN_PROC_PROC.
This is one of the reasons why top doesn't use this option and now it
can be use it safely.
ps, when launched in order to display just processes, now should report
correct cpu utilization percentages and times (as opposed by the old
code).

Reviewed by:	jhb, emaste
Sponsored by:	Sandvine Incorporated
2009-02-18 21:52:13 +00:00
Alexander Motin
6340835dfd Make ch->dma.free() called symmetrically to ch->dma.alloc(). 2009-02-18 21:12:48 +00:00
Alexander Motin
6a03316a2d Implement proper attach/detach routines for ISA driver. 2009-02-18 20:42:42 +00:00
Sean Bruno
f541131711 Enhance debugging mode by storing the string "BB:TT:LL" once and use
it instead of overloading sbp_show_sdev_info().

replace calls to printf with calls to device_printf and cleanup debug
messages

Remove a bit of dead, commented out code.

Reviewed by:	scottl(mentor)
MFC after:	2 weeks
2009-02-18 18:41:34 +00:00
Alexander Motin
50b6b9cc54 Remove unused variable.
Submitted by:	ganbold
2009-02-18 18:36:13 +00:00
Roman Divacky
004aa5e7ad Mark these variables as __used as those are used in the asm block.
Approved by:	kib (mentor)
2009-02-18 18:25:16 +00:00
John Baldwin
093e877818 Reindent a small bit of code that was not 8-space indented like the rest
of the nfs_lookup() function.
2009-02-18 16:34:13 +00:00
Konstantin Belousov
99b7f1a10b Adapt linux emulation to use cv for vfork wait.
Submitted by:	Takahiro Kurosawa <takahiro.kurosawa gmail com>
PR:	kern/131506
2009-02-18 16:11:39 +00:00
Andrew Thompson
474bb3ce7b Switch over to usbdevs.h generated at compile time. 2009-02-18 06:33:10 +00:00
Andrew Thompson
90b7094973 Bump __FreeBSD_version to 800063 after GENERIC changed to USB2. 2009-02-18 06:17:13 +00:00
Sam Leffler
f9e1a7df13 use mii instead of miibus so we don't drag in all phy support
(we only need ukphy which is brought in by mii)

MFC after:	1 week
2009-02-18 01:37:57 +00:00
Ed Maste
8d5b55c37f Use outbound message register 0 instead of mailbox 7 in
aac_{rx,rkt}_get_fwstatus, as done in Adaptec's vendor driver as well as
the Linux drivers.

Submitted by:   jkim, from Adaptec's driver
2009-02-18 01:36:20 +00:00
Sam Leffler
30b00c24b0 fix whitespace 2009-02-17 23:43:17 +00:00
Alexander Motin
7b3a8a2730 Adaptively increase control command timeout when drive is spun down.
This should fix, for example, cache flush timeout error on shutdown, if
some drives are not mounted.

PR:		kern/111023
2009-02-17 23:20:04 +00:00
Andrew Gallatin
4ae3322f1a Fix cut/paste error in previous commit and use the
correct value for SFP+ reserved media type.

MFC after:  1 week
2009-02-17 22:25:19 +00:00
Andrew Gallatin
016385508f Better support for recent Myricom 10GbE NICs
- Update to firmware 1.4.39 for dual-chip NIC (10G-PCIE2-xxx)
  support, and SFP+ i2c support

- Identify newer "B" NICs (10G-PCIEx-8B-x) correctly, rather than
  mis-identifying them as "A" NICs (cosmetic only)

- Identify the IFM_10G_LRM ifmedia type, where applicable.

- Identify ifmedia types for SFP+ based NICs

- Update copyright

Sponsored by: Myricom
MFC after: 1 week
2009-02-17 22:15:58 +00:00
Alexander Motin
b3747cb7d6 Remove useless return, that left from previous commit. 2009-02-17 21:35:17 +00:00
Jamie Gritton
3cb55d4ae8 Remove obsolete prison_service declarations.
Approved by:	bz (mentor)
2009-02-17 21:29:39 +00:00
Alexander Motin
46a309e292 ata_interrupt() does not need to return anything. It is not it's business
to report request completion, expecially when it is not reliable.
2009-02-17 21:17:21 +00:00
Sean Bruno
a71c4d427d Introduce 1394a-2000 extended PHY Self ID packets.
Deprecate unused phy_delay Self ID field as it was removed
by 1394a-2000.

Attempt to parse extended Self ID PHY packets if they are detected

Reviewed by:	scottl (mentor)
MFC after:	2 weeks
2009-02-17 19:37:04 +00:00
Alexander Motin
a1fda318a8 Add kernel dumping support. Works fine with sdhci controller driver. 2009-02-17 19:17:25 +00:00
Alexander Motin
bea2dca299 Add support for interruptless kernel dumping. 2009-02-17 19:12:15 +00:00
Marcel Moolenaar
09a278e14d Add a default implementation for pre-check. It should
always succeed if not implemented.

Pointy hat: marcel
2009-02-17 18:24:58 +00:00
Sean Bruno
41fd7057bb Simplify some debugging messages and try to consolodate some of the more
interesting conditional printf's into single device_printf's

Change a couple of variable names so that I don't have to trace what they
acutally do anymore.

Enable the display of the Self ID PHY packet if firewire_debug > 0
Reviewed by:	scottl(mentor)
MFC after:	2 weeks
2009-02-17 17:46:43 +00:00
Rafal Jaworowski
fb20e2aeac tsec(4) cosmetics. 2009-02-17 16:02:45 +00:00
Rafal Jaworowski
371bf7cc81 tsec(4): Always try to resume the receiver.
This helps recover from RX stall under heavy loads.

Submitted by:	Piotr Ziecik kosmo ! semihalf dot com
2009-02-17 15:59:27 +00:00
Rafal Jaworowski
0390701af8 tsec(4): do not clear interrupt events register before use.
Prior to this fix, IEVENT register was always cleared before calling
tsec_error_intr_locked(), which prevented error recovery actions from
happening with polling enabled (and could lead to serious problems, including
controller hang).

Submitted by:	Marcin Ligenza marcinl ! pacomp dot com dot pl
2009-02-17 15:47:13 +00:00
Rafal Jaworowski
ab160495d3 Handle mbuf exhaustion scenario in tsec(4).
Without this fix the system would hang under heavy networking load.

Submitted by:	Leon Theunissen leon ! parsec dot co dot za
2009-02-17 15:39:16 +00:00
Rafal Jaworowski
64f90c9dff tsec(4) style improvements and clean-up. 2009-02-17 14:59:47 +00:00
Rafal Jaworowski
bd37530ee4 Additional features for the tsec(4) Ethernet driver.
- interrupt coalescing
  - polling
  - jumbo frames
  - multicast
  - VLAN tagging

The enhanced version of the chip (eTSEC) can also take advantage of:

  - TCP/IP checksum calculation h/w offloading

Obtained from:	Freescale, Semihalf
2009-02-17 14:57:05 +00:00
Marcel Moolenaar
832cdc2ca7 Remove gpt_offset and related code. It was introduced for use
by the BSD scheme, ended up not to be needed. Remove to avoid
abuse and to keep the bloat to a minimum.
2009-02-17 04:12:10 +00:00
Sean Bruno
ebe234793b Synopsis:
If speed of link between two devices is slower than the reported max
speed of both endpoints, the current driver will fail and be unable to
negotiate.

Summary:
Test negotiated speed by reading the CSRROM into a dummy variable.
If that read fails, decrement our speed and retry.  If all else fails,
go to lowest speed possible(0).

Report speed to the user.
Add display of the Bus Info Block when debug.firewire_debug > 1
Support the Bus Info Block(1394a-2000) method of speed detection.

I also should note that I am moving "hold_count" to 0 for future
releases.

This variable determines how many bus resets to "hold" a removed
firewire device before deletion.  I don't feel this is useful and will
probably drop support for this sysctl in the future.

Reviewed by:    scottl(mentor)
MFC after:      2 weeks
2009-02-17 04:08:08 +00:00
Warner Losh
993b1ae273 Hold off root mounting until we've gone through the loop of our thread
almost once.  After we've configured the devices that were present the
first time through, then we know that we're done.  If the device has
other devices that are deferred, then it must do a similar dance.
This catches both PC Cards and CardBus cards.
2009-02-17 02:14:04 +00:00
Alexander Motin
2e46610e21 Make core dumping to ad not to freeze even if interrupts, not disabled
for some reason, stealing our events.
2009-02-16 22:25:39 +00:00
Marcel Moolenaar
78c0a9c9e2 Include Marvell EHCI HC driver for USB2. 2009-02-16 21:42:41 +00:00
Ed Schouten
55272bd6b4 The streams ptm code is pretty awful and likely incorrect. I don't know
anything about streams, so I'm not going to fix it. Just a small comment
to redirect folks to posix_openpt().
2009-02-16 20:12:28 +00:00
Alexander Motin
9f8919f236 Give atapci knowledge about set of implemented AHCI ports. It is possible
to not allocate them after the recent ata channels enumeration changes.
It allows to save some resources, not bother user with unexisting hardware
and not check unimplemented ports status on every interrupt.
2009-02-16 19:10:07 +00:00
Scott Long
6de67521aa GCC attacks! 2009-02-16 18:02:32 +00:00
Dag-Erling Smørgrav
655fcdaa00 Fix a logic bug that caused the pfs_attr method to be called only for
PFS_PROCDEP nodes.

Submitted by:	Andrew Brampton <brampton@gmail.com>
MFC after:	2 weeks
2009-02-16 15:17:26 +00:00
Luigi Rizzo
d8d42f3f4e correct some #include 2009-02-16 15:10:51 +00:00
Luigi Rizzo
b27b816fc5 we need if_var.h not if.h 2009-02-16 15:10:03 +00:00
Luigi Rizzo
a1d4f19c0d remove unnecessary forward declaration 2009-02-16 15:09:37 +00:00
Luigi Rizzo
35b78b7520 remove dependency on eventhandler.h, we only need a forward declaration 2009-02-16 15:08:41 +00:00
Luigi Rizzo
281c8daea2 remove dependency on net/if.h of this header 2009-02-16 15:07:40 +00:00
Scott Long
daed819b02 Fix parallel SCSI negotiation in the CAM_NEW_TRAN_CODE world order.
Overzealous sanity checks were locking the sync_rate and offset values to
zero, thanks to a twisty maze of recursive code.
2009-02-16 14:57:15 +00:00
Scott Long
5dc642bd9f Instrument the probe state machine so that things like DV can be tracked. 2009-02-16 14:38:52 +00:00
Luigi Rizzo
2eef235973 use a const format string in the log message so we can check the
arguments (if/when we enable those checks)
2009-02-16 12:09:52 +00:00
Robert Watson
d7bf9f090d IFF_NEEDSGIANT will no longer be supported, so remove compatibility code
from if_sppp framework for interfaces requiring Giant.
2009-02-16 10:29:03 +00:00
Marcel Moolenaar
e24c8a3fb8 Add support to add, delete and modify logical partitions, as well
as to create and destroy the extended partitioning scheme. In
other words: full support.
2009-02-16 03:54:28 +00:00
Andrew Thompson
d842ade9a4 Add a helper function for loading geli keys from the loader. 2009-02-16 02:42:17 +00:00
Andrew Thompson
e31a070263 Add uslcom to the build too.
Reminded by:	Michael Butler
2009-02-15 23:40:29 +00:00
Andrew Thompson
4a93759f47 Make uslcom compile, cut'n'paste errors from uplcom. 2009-02-15 23:38:58 +00:00
Robert Watson
cdb31d3351 Remove debug.ce.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
2009-02-15 23:29:13 +00:00
Robert Watson
6b34ab205e Remove debug.ctau.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
2009-02-15 23:21:52 +00:00
Robert Watson
c197427cee Remove debug.cp.mpsafenet: we no longer support running the network
stack with conditional Giant acquisition, and IFF_NEEDSGIANT will
be removed in the near future.
2009-02-15 23:18:29 +00:00
Andrew Thompson
e4edc14efd Switch over GENERIC kernels to USB2 by default.
Tested by:	make universe
2009-02-15 22:33:44 +00:00
Marcel Moolenaar
7ca4fa83ec Add method precheck to the g_part interface. The precheck
method allows schemes to reject the ctl request, pre-check
the parameters and/or modify/set parameters. There are 2
use cases that triggered the addition:
1.  When implementing a R/O scheme, deletes will still
    happen to the in-memory representation. The scheme is
    not involved in that operation. The pre-check method
    can be used to fail the delete up-front. Without this
    the write to disk will typically fail, but at that
    time the delete already happened.
2.  The EBR scheme uses a linked list to record slices.
    There's no index. The EBR scheme defines the index
    as a function of the start LBA of the partition. The
    add verb picks an index for the range and then invokes
    the add method of the scheme to fill in the blanks. It
    is too late for the add method to change the index.
    The pre-check is used to set the index up-front. This
    also (silently) overrides/nullifies any (pointless)
    user-specified index value.
2009-02-15 22:18:16 +00:00
Alexander Motin
1c4dd558d1 Remove unneeded AND operation. We have already checked that bit is set. 2009-02-15 21:54:16 +00:00
Alexander Motin
8f740c4b03 Enable MSI support by default. Still can be disabled using device.hints. 2009-02-15 21:17:21 +00:00
Alexander Motin
a3b7c762ba Add initial single-vector MSI support into atapci driver.
Works fine with AHCI and theoretically other MSI capable devices.

At this moment support disabled by default. To enable it, set
"hint.atapci.X.msi=1" device hint.
2009-02-15 20:37:55 +00:00
Andrew Thompson
719085d9d1 Pull in kbd.c with usb2_input_kbd, just like ukbd. 2009-02-15 20:24:21 +00:00
Warner Losh
7008762a18 It appears that none of the contents of this file are necessary, so
replace the amd64-ish version with a blank version.
2009-02-15 20:05:13 +00:00
Warner Losh
d49107c795 Removal pccard directory requires removing it from the list of things
that get installed too.  <blush>

Submitted by:	Olivier Smedts (identical patches to what I came up
		with before checking email)
2009-02-15 18:19:24 +00:00
Warner Losh
c3661cd0e7 Make dumper_t definition conform more closely to stlye(9). This also
avoid keywords in other languages that may have been present before.

Submitted by:	Andriy Gapon, jkoshy@
2009-02-15 17:56:16 +00:00
Alexander Motin
5690c13d14 Add workaround for some ATI chips, failing to soft-reset
when port multiplicator supported, but absent.
2009-02-15 16:05:48 +00:00
Alexander Motin
b8adaa5549 Add SATA and PCI Advanced Features capabilities constants. 2009-02-15 09:49:21 +00:00
Kip Macy
69f93ab8b5 - fix formatting
- fix types in ticks_to_system_time
2009-02-15 06:36:02 +00:00
Marcel Moolenaar
7310ee19bd Actually include geom_part_ebr.c when options GEOM_PART_EBR is
present.

Pointy hat: marcel
2009-02-15 03:50:27 +00:00
Warner Losh
5515327488 This directory is no logner needed after copy to usr.sbin/dumpcis. 2009-02-15 03:22:15 +00:00
Warner Losh
77bab78951 Remove stray __P() 2009-02-15 01:12:16 +00:00
Luigi Rizzo
ada55ca0b7 remove unnecessary #include from vnet.h and vinet.h
Approved by:	Marko Zec
2009-02-15 00:28:28 +00:00
Andrew Thompson
06d497c1af MFp4 //depot/projects/usb@157699
Add two new functions to the libusb20 API and required kernel ioctls.

- libusb20_dev_get_iface_desc
- libusb20_dev_get_info

New command to usbconfig, "show_ifdrv", which will print out the kernel driver
attached to the given USB device aswell.

See "man libusb20" for a detailed description.

Some minor style corrections long-line wrapping.

Submitted by:	Hans Petter Selasky
2009-02-14 23:20:00 +00:00
Alexander Motin
ce66729032 Tunes to AHCI reset sequences:
- specification claims that 1 second is just a maximum controller reset time;
implement controller reset properly to save almost 1 second of boot, and
about half second of resume time;
- enable channel interrupts only after channel status reset to fix duplicate
device creation on resume due to unwanted device connection event;
- as described in specification, wait for disk ready status after channel
power-up; it is not so important when disk already touched by BIOS, but
solves device not ready problems on resume and probably some other cases.
- uncomment channel stop/start on soft-reset as it is declared mandatory by
specification; it was commented due to some random drive detection problems
on VIA and JMicron controllers, but I hope it is fixed by previous point.
2009-02-14 23:02:59 +00:00
Andrew Thompson
9480550eca - ieee80211_chan2ieee returns an int
- avoid null deref in detach
- update pause timings

Obtained from:	//depot/projects/usb
2009-02-14 22:29:54 +00:00
Alan Cox
2f0b74fb06 Remove unnecessary page queues locking around vm_page_wakeup().
Approved by:	kmacy
2009-02-14 22:07:22 +00:00
Joe Marcus Clarke
0618630015 Remove the printf's when the vnode to be exported for procstat is not a VDIR.
If the file system backing a process' cwd is removed, and procstat -f PID
is called, then these messages would have been printed.  The extra verbosity is
not required in this situation.

Requested by:	kib
Approved by:	kib
2009-02-14 21:55:09 +00:00
Alexander Motin
d7216f5694 DEVICE_PROBE(9) claims that we must not initialize softc on probe stage.
Move channel softc initialization from ata_XXX_probe() to ata_XXX_attach().

Instead of calculating ata channel number as position in child device list,
pass it's real number directly from controller probe routine using ivars.
It is simpler and IMHO more correct.
2009-02-14 21:54:44 +00:00
Joe Marcus Clarke
03fd9c2092 Change two KASSERTS to printfs and simple returns. Stress testing has
revealed that a process' current working directory can be VBAD if the
directory is removed.  This can trigger a panic when procstat -f PID is
run.

Tested by:	pho
Discovered by:	phobot
Reviewed by:	kib
Approved by:	kib
2009-02-14 21:12:24 +00:00
Ed Schouten
a049439079 Remove unneeded execute-permissions from the USB2 device node.
Giving a charactere device execute permissions doesn't have any use.
Right now there isn't a single device node in /dev that has it, except
the USB2 device node, so remove it.

Approved by:	hps, thompsa
2009-02-14 19:46:28 +00:00
Alan Cox
6be00eca3f Remove unnecessary page queues locking around vm_page_busy() and
vm_page_wakeup().  (This change is applicable to RELENG_7 but not
RELENG_6.)

MFC after:	1 week
2009-02-14 18:23:52 +00:00
Randall Stewart
eef9e53e55 This commit fixes the issue with alias_sctp.c. No
longer do we require SCTP to be in the kernel for the
lib to be able to handle SCTP. We do this by moving
the CRC32c checksum into libkern/crc32.c and then adjusting
all routines to use the common methods. Note that this
will improve the performance of iSCSI since they were
using the old single 256 bit table lookup versus the
slicing 8 algorithm (which gives a 4x speed up in
CRC32c calculation :-D)

Reviewed by:rwatson, gnn, scottl, paolo
MFC after:	4 week? (assuming we MFC the alias_sctp changes)
2009-02-14 11:34:57 +00:00
Andrew Thompson
fd66bfec7f Since r188030 the error value for attach is returned, this means if kbdmux
fails to attach (possibly due to disable hints) then we get called back for
unload. Correctly handle the case where the keyboard isnt found rather than
calling panic.
2009-02-13 23:36:08 +00:00
Andrew Thompson
c7a8a2fa92 - ieee80211_chan2ieee returns an int
- set ic_update_promisc to the same callback as mcast
- avoid null deref in zyd_detach

Obtained from:	//depot/projects/usb
2009-02-13 21:45:19 +00:00
Andrew Thompson
7fb3a6349b MFp4 //depot/projects/usb; 157501, 157608, 157609
- Make usb2_transfer_pending() part of the USB core header file.
 - Make usb2_transfer_pending() NULL safe.
 - Make sure that USB process functions return if the process has been drained.
 - Remove two unused functions.

Submitted by:   Hans Petter Selasky
2009-02-13 20:57:43 +00:00
Nick Hibma
63573f79e2 Add support for CMOTECH devices (not sure whether this is the correct
name) (not sure whether this works correctly, but should be close).

Fix the stub attach phase for some Novatel cards. They expect the CSW
(repsonse to CBW, SCSI eject command) to be fetched before switching to
modem mode.

MFC after:	2 weeks
2009-02-13 19:49:51 +00:00
Andrew Thompson
66c84010b4 bridge_delete_member is called via the event handler from if_detach
after the LLADDR is reclaimed which causes a null pointer deref with
inherit_mac enabled. Record the ifnet pointer of the interface and then compare
that to find when to re-assign the bridge address.

Submitted by:	sam
2009-02-13 19:20:25 +00:00
Andrew Thompson
a1797ef6c8 Remove semicolon left in the last commit
Spotted by:	csjp
2009-02-13 18:51:39 +00:00
Andrew Thompson
5f4638f185 Add the Novatel U760. 2009-02-13 18:45:36 +00:00
Randall Stewart
c3b8c73cf1 Have the jail code use the error returned to pass not constant
errors.
Obtained from:	jamie@freebsd.org
2009-02-13 18:44:30 +00:00
John Baldwin
ea77ff0a15 Use shared vnode locks when invoking VOP_READDIR().
MFC after:	1 month
2009-02-13 18:18:14 +00:00
Sean Bruno
f25a08888f Update the Self ID structure to conform to 1394a-2000.
Delete the unused defines.

Reviewed by:	scottl
2009-02-13 17:45:09 +00:00
Sean Bruno
01f312783e Remove redundant while () from loop.
Submitted by:	 Ganbold <ganbold@micom.mng.net>
Reviewed by:	 scottl
2009-02-13 17:44:07 +00:00
Sam Leffler
015ebba0c0 remove references to ic_stats
Spotted by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-02-13 16:17:05 +00:00
Olivier Houchard
0d657eecf3 Oops. ARM_RAS_END is ARM_TP_ADDRESS + 8, not 4.
Spotted out by:	Mark Tinguely <tinguely at casselton d0t net>
2009-02-13 16:00:19 +00:00
Luigi Rizzo
8f2f943e8f remove unnecessary #include, and document some of the others 2009-02-13 15:37:14 +00:00
John Baldwin
3d744ccdd2 Fix a bug in the previous change to the mtab handler: use the path returned
by vn_fullpath() when vn_fullpath() succeeds instead of when it fails.

Submitted by:	Artem Belevich  fbsdlist of src.cx
MFC after:	3 days
2009-02-13 15:32:03 +00:00
Luigi Rizzo
d685b6ee05 Use uint32_t instead of n_long and n_time, and uint16_t instead of n_short.
Add a note next to fields in network format.

The n_* types are not enough for compiler checks on endianness, and their
use often requires an otherwise unnecessary #include <netinet/in_systm.h>

The typedef in in_systm.h are still there.
2009-02-13 15:14:43 +00:00
Randall Stewart
4f6b49338e Move the new rwnd field down to the very end
of the xsctp structure. This is where all new
fields belong (not that we will be ABI compatiable
with 7.x anyway.. sigh).
2009-02-13 14:43:46 +00:00
Maxim Konovalov
96c8ef3a18 o In case of the error do not forget to deallocate a cloned device unit.
PR:		kern/131642
Submitted by:	Dmitrij Tejblum
MFC after:	1 week
2009-02-13 12:59:54 +00:00
Alexander Leidinger
0134f12f7a Fix an edge-case of the linux readdir: We need the size of a linux dirent
structure, not the size of a pointer to it.

PR:		131099
Submitted by:	Andreas Kies <andikies@gmail.com>
MFC after:	2 weeks
2009-02-13 11:55:19 +00:00
Luigi Rizzo
d4619572b4 Clarify and reimplement the bioq API so that bioq_disksort() has
the correct behaviour (sorting by distance from the current head position
in the scan direction) and bioq_insert_head() and bioq_insert_tail()
have a well defined (and useful) behaviour, especially when intermixed
with calls to bioq_disksort().

In particular:
- fix a bug in the existing bioq_disksort() that did not use the
  current head position correctly;
- redefine semantics of bioq_insert_head() and bioq_insert_tail().
  bioq_insert_tail() can now be used as a barrier
  between previous and subsequent calls to bioq_disksort().

The code is heavily documented in the source code so please refer
to that for the details.

Much of this code comes from Fabio Checconi. Also thanks to Kirk
for feedback on the (re)definition of bioq_insert_tail().

NOTE: in the current tree there is only a handful of files which
intermix calls to bioq_disksort() with bioq_insert_head() and
bioq_insert_tail(). The ordering of the queue in these situation
was not specified (nor easy to figure out) before, so I doubt any
of that code could be affected by the specification of the API.

Also note that the current implementation is significantly simpler
than the previous one (also used in ata_sort_queue()).
It would be useful to reimplement ata_sort_queue() using
the same code used in bioq_disksort().

MFC after:	1 week
2009-02-13 11:36:32 +00:00
Scott Long
1b47c9b69d In the case that the probe has determined that it can't query the device for
a serial number, fall through to the next case so that initial negotiation
still happens.  Without this, devices were showing up with only 1 available
tag opening, leading to observations of very poor I/O performance.

This should fix problems reported with VMWare Fusion and ESX.  Early
generation MPT-SAS controllers with SATA disks might also be affected.
HP CISS controllers are also likely affected, as are many other
pseudo-scsi disk subsystems.
2009-02-13 10:04:59 +00:00
Sam Leffler
3fc21fed93 add SIOCZATHSTATS ioctl to zero driver statistics 2009-02-13 05:38:03 +00:00
Sam Leffler
d3f5f855e8 remove ic_stats; it was intended to accumulate stats from vaps as they
were reaped but was never used and is inaccessible
2009-02-13 05:31:18 +00:00
Sam Leffler
36c6be9ab4 add driver stat to count tx drops due to insufficient frag buffers 2009-02-13 05:30:22 +00:00
Sam Leffler
6e05dab14d strip M_FRAG & co mbufs coming down from ip_output, these flags are
re-used within net80211 to mark 802.11 frags so allowing them to
leak through to the driver caused packets to be dropped in ath
2009-02-13 05:26:04 +00:00
Andrew Thompson
4c3179db83 Restore some of the link handling code that was inadvertently removed in
r188412, this broke the GU-1000T adapters.

Submitted by:	yongari
Pointy hat:	me
2009-02-13 03:38:08 +00:00