Commit Graph

19341 Commits

Author SHA1 Message Date
Stanislav Sedov
b0f642ad44 - Don't zero data field in case of MSR write operation. Before this change
the value written to MSR register was always 0 regardless of value passed
  by user.
- Use proper data pointer when performing AMD microcode update.  Previously,
  the pointer to user-space data has been provided instead, which is totally
  incorrect.

Approved by:	re (kib)
MFC after:	1 week
2009-06-26 22:13:15 +00:00
Xin LI
8c9d12305b Add quirks for Actions MP4 player.
Submitted by:	John Hixson <john ixsystems com>
Approved by:	re (kib)
MFC after:	2 weeks
2009-06-26 21:47:37 +00:00
Robert Watson
5157862aa2 Use if_maddr_rlock() instead of IF_ADDR_LOCK() to protect access to
if_multiaddrs in if_cxgb.

Approved by:	re (kib)
MFC after:	6 weeks
2009-06-26 19:04:08 +00:00
Robert Watson
eb956cd041 Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/
IF_ADDR_UNLOCK() across network device drivers when accessing the
per-interface multicast address list, if_multiaddrs.  This will
allow us to change the locking strategy without affecting our driver
programming interface or binary interface.

For two wireless drivers, remove unnecessary locking, since they
don't actually access the multicast address list.

Approved by:	re (kib)
MFC after:	6 weeks
2009-06-26 11:45:06 +00:00
Rui Paulo
be80e49a01 Add support for MacBook4,1.
Submitted by:	Christoph Langguth <christoph at rosenkeller.org>
MFC after:	2 weeks
Approved by:	re (kib)
2009-06-26 10:23:17 +00:00
Navdeep Parhar
fd3e790228 mvec routines should have no knowledge of the SG engine.
Reviewed by:	kmacy
Approved by:	gnn (mentor)
2009-06-25 21:50:15 +00:00
Attilio Rao
ca2d94bef7 Fix a LOR between pmc_sx and proctree/allproc when creating a new thread
for the pmclog.

Reported by:	Ryan Stone <rstone at sandvine dot com>
Tested by:	Ryan Stone <rstone at sandvine dot com>
Sponsored by:	Sandvine Incorporated
2009-06-25 20:59:37 +00:00
Robert Noland
3db57ca311 We shouldn't need to drop and reaquire the lock here.
MFC after:	3 days
2009-06-25 19:23:25 +00:00
Konstantin Belousov
9f80ce043d Change the type of uio_resid member of struct uio from int to ssize_t.
Note that this does not actually enable full-range i/o requests for
64 architectures, and is done now to update KBI only.

Tested by:	pho
Reviewed by:	jhb, bde (as part of the review of the bigger patch)
2009-06-25 18:46:30 +00:00
Jack F Vogel
29af53f006 Decided to limit the interrupt bind to multiqueue
config as done in igb.
2009-06-25 18:40:27 +00:00
Robert Noland
a84a56f28b Some more cleanups for vblank code on Intel.
The Intel 2d driver calls modeset before reinstalling the handler on
a vt switch.  This means that vblank status ends up getting cleared
after it has been setup.  Restore saved values for the pipestat registers
rather than just wiping them out.

MFC after:	3 days
2009-06-25 18:27:08 +00:00
Jack F Vogel
100121ebab Change intr_bind to bus_bind_intr, also limit this to
multiqueue setup which is not the shipping default for
igb (its set to 1).
2009-06-25 17:21:12 +00:00
Jack F Vogel
a55b6155c8 Change intr_bind to bus_bind_intr, thanks to John Baldwin
for pointing out this simplification.
2009-06-25 17:16:26 +00:00
Marius Strobl
fe2e5c4d36 Don't use the preprocessor while inside function-like macro
invocations as doing so violates the C specification. This
fixes the build with Clang.

Submitted by:	ed
2009-06-25 16:38:16 +00:00
Robert Noland
a2cc8f993b Initialize max_vblank_count earlier.
Small cleanup of the error paths while I'm here.

MFC after:	3 days
2009-06-25 16:17:07 +00:00
Robert Noland
2642e635f2 Keep track of the hardware counter more aggressively while interrupts
are enabled.  This should help to reduce cases where the hardware
counter reference jumps by large amounts.

MFC after:	3 days
2009-06-25 15:47:32 +00:00
Robert Noland
a429bdf087 Fix one use of atomic for refcount missed in last commit.
MFC after:	3 days
2009-06-25 15:36:11 +00:00
Robert Noland
1f3c8cf88f Additional vblank cleanups.
Use the vbl_lock when maniputlating the refcount.  Eventually I want to
convert this to use our internal refcount code.  Continue to use atomic
ops for manipulating vblank count since we access it often just for
reading.

MFC after:	3 days
2009-06-25 15:30:25 +00:00
Robert Noland
a708803975 Ensure that we always hold the lock when calling vblank_disable_fn()
MFC after:	3 days
2009-06-25 14:15:45 +00:00
Weongyo Jeong
90cbee43d6 updates AMRR statistics with tx complete status that if not the tx rate
always would be reduced.
2009-06-25 02:28:12 +00:00
Weongyo Jeong
7f97ca0347 uses ZYD_NOTIF_RETRYSTATUS info to count the number of retries. 2009-06-25 02:14:47 +00:00
Jack F Vogel
de0f04d1ef Make CPU bind call architecture specific to satisfy LINT 2009-06-24 22:17:40 +00:00
Jack F Vogel
84720033f0 need to make intr_bind call architecture specific for
global builds (failing sun4v lint build)
2009-06-24 22:16:02 +00:00
Navdeep Parhar
2975f78738 Various ifmedia related fixes in cxgb(4), including:
- build ifmedia list based on phy->caps, not string comparisons.
- rebuild media list when a transceiver change is detected.
- return EOPNOTSUPP instead of ENXIO in cxgb_media_status.

Approved by:	gnn (mentor)
MFC after:	2 weeks.
2009-06-24 21:56:05 +00:00
Jack F Vogel
e33ee9237e Fix lint issue. 2009-06-24 21:32:51 +00:00
Andrew Gallatin
8c5d766cd7 Add a dying flag to prevent races at detach.
I tried re-ordering ether_ifdetach(), but this created a new race
where sometimes, when under heavy receive load (>1Mpps) and running
tcpdump, the machine would panic.  At panic, the ithread was still in
the original (not dead) if_input() path, and was accessing stale BPF
data structs.  By using a dying flag, I can close the interface prior
to if_detach() to be certain the interface cannot send packets up in
the middle of ether_ifdetach.
2009-06-24 21:09:56 +00:00
Marius Strobl
73591c462d - Change this driver to do taskqueue(9) based TX and interrupt
handling in order to reduce interrupt overhead which results in
  better performance.
- Call ether_ifdetach(9) before stopping the controller and the
  callouts detach in order to prevent active BPF listeners to clear
  promiscuous mode which may lead to the tick callout being restarted
  which will trigger a panic once it's actually gone.
- Add explicit IFF_DRV_RUNNING checking in order to prevent extra
  link up/down events when using dhclient(8).
- Use the correct macro for deciding whether 2/3 of the available TX
  descriptors are used.
- Wrap the RX fault printing in #ifdef CAS_DEBUG in order to not
  unnecessarily frighten users and as debugging was the actual
  intention. Real errors caused by these faults still will be
  accumulated as input errors. It might be a good idea to later on
  add driver specific counters for the faults though.

Submitted by:	yongari (original patch)
2009-06-24 20:56:06 +00:00
Marius Strobl
23f7f783f8 - Remove unused variables. [1]
- Remove redundant zeroing of tmf_req which Coverity Prevent(tm) complains
  about. [2]

Submitted by:	Christoph Mallon [1]
Found with:     Coverity Prevent(tm) [2]
CID:            2496 [2]
MFC after:	2 weeks
2009-06-24 20:52:59 +00:00
Alexander Motin
6fca500004 MFp4:
Remove unused ATAPI definitions, conflicting with ata.h.

Submitted by:	scottl
2009-06-24 20:43:51 +00:00
Alexander Motin
f95dcaae42 MFp4:
Reduce default PCI ATA drivers priorities from absolute to default,
to allow them been overriden. It was so before modularization.
2009-06-24 19:49:18 +00:00
Joerg Wunsch
3fdc1d5c48 With the fdc control device disappearing some 5 years ago, it is no
longer useful for the FD_STYPE and FD_SOPTS ioctls to insist on being
issued on a writable file descriptor.  Otherwise, there's no longer a
chance to set the drive type or options when a read-only medium is
present in the drive, as there is no way to obtain a writable fd then.
2009-06-24 19:30:31 +00:00
Marius Strobl
b3a1f860fa Revert the part of r194763 which added a dying flag and instead
call ether_ifdetach(9) before stopping the controller and the
callouts. The consensus is that the latter is now safe to do and
should also solve the problem of active BPF listeners clearing
promiscuous mode can result in the tick callout being restarted
which in turn will trigger a panic once it's actually gone.
2009-06-24 19:04:08 +00:00
Jack F Vogel
d8602bb9a7 Update for the Intel 10G driver, this adds support for
newest hardware, adds multiqueue tx interface, infrastructure
cleanup to allow up to 32 MSIX vectors on newer Nehalem systems.
Bug fixes, etc.
2009-06-24 18:27:07 +00:00
Jack F Vogel
9d81738f8f Updates for both the em and igb drivers, add support
for multiqueue tx, shared code updates, new device
support, and some bug fixes.
2009-06-24 17:41:29 +00:00
Alexander Motin
8380c28e5a Some DMA related changes:
- honor parent DMA tag limitations, as man page requires,
 - allow data buffer to be allocated within full 64bit address range, when
   support is announced by hardware,
 - add quirk, disabling 64bit addresses for broken chips, use it for MCP78.
2009-06-24 17:03:06 +00:00
Scott Long
cadd4fa0b4 fw_state ad cur_state are holding unsigned bitfields, so declare then
as unsigned as well.

Submitted by:	rdivacky
2009-06-24 16:11:29 +00:00
Rafal Jaworowski
93588d5c28 Move non-PCI prototypes from ata-pci.h -> ata-all.h.
This removes unnecessary PCI #includes dependency for systems with ATA
controllers living at non-PCI buses.

Submitted by:	Piotr Ziecik
Obtained from:	Semihalf
2009-06-24 15:38:17 +00:00
Andrew Gallatin
f945302517 Allow admin to specify the initial mtu upon driver load
for mxge.
2009-06-24 14:47:32 +00:00
Ariff Abdullah
f3bf5def20 Slight comment fix. 2009-06-24 02:01:16 +00:00
David Christensen
d037d7aed6 - Added code to read bootcode firwmare version.
- Created dedicated shared memory access routines.

MFC after:	One week
2009-06-23 22:19:27 +00:00
Konstantin Belousov
3364c323e6 Implement global and per-uid accounting of the anonymous memory. Add
rlimit RLIMIT_SWAP that limits the amount of swap that may be reserved
for the uid.

The accounting information (charge) is associated with either map entry,
or vm object backing the entry, assuming the object is the first one
in the shadow chain and entry does not require COW. Charge is moved
from entry to object on allocation of the object, e.g. during the mmap,
assuming the object is allocated, or on the first page fault on the
entry. It moves back to the entry on forks due to COW setup.

The per-entry granularity of accounting makes the charge process fair
for processes that change uid during lifetime, and decrements charge
for proper uid when region is unmapped.

The interface of vm_pager_allocate(9) is extended by adding struct ucred *,
that is used to charge appropriate uid when allocation if performed by
kernel, e.g. md(4).

Several syscalls, among them is fork(2), may now return ENOMEM when
global or per-uid limits are enforced.

In collaboration with:	pho
Reviewed by:	alc
Approved by:	re (kensmith)
2009-06-23 20:45:22 +00:00
Marius Strobl
9ba2b298df - Initialize the ifnet structure, especially if_dname, before probing
the PHYs as some PHY drivers use it (but probably shouldn't). How
  gem(4) has worked with brgphy(4) on powerpc without this so far is
  unclear to me.
- Introduce a dying flag which is set during detach and checked in
  gem_ioctl() in order to prevent active BPF listeners to clear
  promiscuous mode which may lead to the tick callout being restarted
  which will trigger a panic once it's actually gone.
- In gem_stop() reset rather than just disable the transmitter and
  receiver in order to ensure we're not unloading DMA maps still in
  use by the hardware. [1]
- The blanking time is specified in PCI clocks so we should use twice
  the value when operating at 66MHz.
- Spell some 2 as ETHER_ALIGN and a 19 as GEM_STATUS_TX_COMPLETION_SHFT
  to make the actual intentions clear.
- As we don't unload the peak attempts counter ignore its overflow
  interrupts.
- Remove a stale setting of a variable to GEM_TD_INTERRUPT_ME which
  isn't used afterwards.
- For optimum performance increment the TX kick register in multiples
  of 4 if possible as suggested by the documentation.
- Partially revert r164931; drivers should only clear the watchdog
  timer if all outstanding TX descriptors are done.
- Fix some debugging strings.
- Add a missing BUS_DMASYNC_POSTWRITE in gem_rint().
- As the error paths in the interrupt handler are generally unlikely
  predict them as false.
- Add support for the SBus version of the GEM controller. [2]
- Add some lock assertions.
- Improve some comments.
- Fix some more or less cosmetic issues in the code of the PCI front-end.
- Change some softc members to be unsigned where more appropriate and
  remove unused ones.

Approved by:	re (kib)
Obtained from:	NetBSD (partially) [2], OpenBSD [1]
MFC after:	2 weeks
2009-06-23 20:36:59 +00:00
Andrew Gallatin
bb8ddc66ea - Fix bug where device would loose promisc setting when reset.
- Allow all rss hash modes to be chosen
2009-06-23 20:22:34 +00:00
Robert Noland
abcd328be6 Add some sysctl info so that we can see what is going on with vblanks.
MFC after:	3 days
2009-06-23 20:19:02 +00:00
Andrew Gallatin
710328322a Revert most of 193311 so as to track mxge transmit stats
on a per-ring basis and avoid racy (and costly) updates
to the ifp stats via drbr by defining NO_SLOW_STATS

Discussed with: kmacy
2009-06-23 19:04:25 +00:00
Robert Noland
128512d705 Only release irq resources if we were actually using them.
MFC after:	3 days
2009-06-23 18:24:09 +00:00
Robert Noland
179ab71fdd Using signals for vblank events is prone to issues. There have never
been any consumers and likely will never be.  Furthermore, we have
never enabled the code for it, so just get rid of it.

MFC after:	3 days
2009-06-23 18:09:35 +00:00
Andrew Gallatin
f9298d3901 Update mxge firmware from 1.4.39 to 1.4.43. Changes include:
- Support for 10G-PCIE*-8B*-C (dual-port CX4)  NICs
- For dual-port NICs, f/w failover is now a few microsecs
    instead of a few millisecs.
-  On failover, f/w sends RARP broadcast to make the change
   immediately known to the network
- Fixed a bug observed on IBM X3 architecture where
   some spurious ecrc errors would be reported when OS enabled
   ecrc support.

Sponsored by: Myricom Inc.
2009-06-23 18:00:43 +00:00
Robert Noland
a2d33c4900 Given that vblanks generally occur 60 times a second, waiting 3 seconds
seems rather excessive.

MFC after:	3 days
2009-06-23 17:52:41 +00:00
Robert Noland
3a5185e13a vblank[crtc].last represents the hardware counter while request.sequence
represents the software counter.  Don't currupt things here.

MFC after:	3 days
2009-06-23 17:50:35 +00:00