Commit Graph

17971 Commits

Author SHA1 Message Date
Alexander Motin
69c43a238b Restore AHCI suspend/resume support,
broken with modularization commit (rev 183724).
2008-12-01 01:34:18 +00:00
Sam Leffler
fe7432d7f0 cover up sun4v namespace pollution 2008-11-30 21:59:44 +00:00
Sam Leffler
e0a11d8bec hookup mcast and promisc callbacks
Submitted by:	"Paul B. Mahol" <onemda@gmail.com>
2008-11-30 20:48:57 +00:00
Sam Leffler
c1565b61d0 Major overhaul:
o eliminate private state indexed by 802.11 rate codes; use the hal's
  rate tables directly to get the same info
o calculate a mask of operational rates to optimize lookups and checks
  (instead of using for loops and similar)
o optimize size bin operations
o ignore rates marked as "do not use" in the hal phy tables
o fix bug that caused upshifting to break in 11g once the rate dropped
  below 11Mb/s
o add more intelligent multi-rate tx schedules
o add support for 1/2 and 1/4 width channels
o add dev.ath.X.sample_stats sysctl to dump runtime statistics to the console
  (needs to go up to a user app)
o export more tuning knobs via sysctls (still a couple of magic constants)
2008-11-30 19:06:35 +00:00
Sam Leffler
a7ace8438c sync w/ p4 branch 2008-11-30 18:56:41 +00:00
Sam Leffler
459bc4f0dd some of the 11n parts can hang under certain conditions without
necessary workarounds, add code to detect these hangs and distinguish
them from other events; note this code is only invoked for anomalous
conditions and (at the moment) is a noop because the hang detection
code is in a new hal that's coming shortly
2008-11-30 18:34:27 +00:00
Sam Leffler
1b15625c19 add frequency mapping for the Zcomax GZ-901 2008-11-30 18:27:10 +00:00
Doug Rabson
499062187b Don't call ether_ioctl() with locks held. Loop in xn_rxeof() until the backend
stops adding stuff to the ring otherwise we miss RX interrupts which kills
performance.
2008-11-30 12:21:46 +00:00
Joseph Koshy
cb2394085d Improve a comment. 2008-11-30 05:10:14 +00:00
Konstantin Belousov
a001bdc71d Third argument to the vi_mmap_t function is vm_paddr_t *.
MFC after:	3 days
2008-11-29 20:16:53 +00:00
Rui Paulo
f0f4475a13 Check the return value of config_intrhook_establish().
Found with:	Coverity Prevent(tm)
CID:		2115
2008-11-29 14:26:22 +00:00
Rui Paulo
4710587722 Check for non-existing model DMI string.
Submitted by:	ganbold
Found with:	Coverity Prevent(tm)
CID:         	2434
MFC after:	1 week
2008-11-29 14:20:36 +00:00
Bjoern A. Zeeb
1e7d7466b7 Renamed the FRAMELEN macro to TRUEPHY_FRAMELEN as for powerpc
it seems to be possible to collide with FRAMELEN from machine/frame.h.

Found by:	zec
2008-11-28 23:44:13 +00:00
Ed Maste
241804a5c8 Remove duplicate 2610SA entry.
Submitted by:	jkim
2008-11-27 20:26:02 +00:00
Joseph Koshy
0cfab8ddc1 - Add support for PMCs in Intel CPUs of Family 6, model 0xE (Core Solo
and Core Duo), models 0xF (Core2), model 0x17 (Core2Extreme) and
  model 0x1C (Atom).

  In these CPUs, the actual numbers, kinds and widths of PMCs present
  need to queried at run time.  Support for specific "architectural"
  events also needs to be queried at run time.

  Model 0xE CPUs support programmable PMCs, subsequent CPUs
  additionally support "fixed-function" counters.

- Use event names that are close to vendor documentation, taking in
  account that:
  - events with identical semantics on two or more CPUs in this family
    can have differing names in vendor documentation,
  - identical vendor event names may map to differing events across
    CPUs,
  - each type of CPU supports a different subset of measurable
    events.

  Fixed-function and programmable counters both use the same vendor
  names for events.  The use of a class name prefix ("iaf-" or
  "iap-" respectively) permits these to be distinguished.

- In libpmc, refactor pmc_name_of_event() into a public interface
  and an internal helper function, for use by log handling code.

- Minor code tweaks: staticize a global, freshen a few comments.

Tested by:	gnn
2008-11-27 09:00:47 +00:00
Peter Wemm
475a75abe5 Don't let ata_completed() dereference a null request->dma pointer to
print dma status after a media error.
2008-11-27 03:37:46 +00:00
Jack F Vogel
7dd492e17c Small nit I just noticed, a pre-decrement should be post. 2008-11-27 02:19:44 +00:00
Jack F Vogel
f0b1d25ff6 Thanks to the reminder from Ganbold, small fix in the RX failure
path for an infinite loop. Problem originally noticed in ixgbe
by Jeff Roberson and fixed there. Thanks to everyone involved.
2008-11-27 02:18:43 +00:00
Pyun YongHyeon
7137cea0c7 Add basic WOL support for 82550/82551/82558 and 82559 based
controllers. ICH based controllers are treated as 82559. 82557,
earlier revision of 82558 and 82559ER have no WOL capability.
 o WOL support requires help of a firmware so add check whether
   hardware is capable of handling magic frames by reading EEPROM.
 o Enable accepting WOL frames only when hardware is about to
   suspend or shutdown. Previously fxp(4) used to allow receipt of
   magic frame under normal operation mode which could cause
   hardware hang if magic frame is received by hardware. Datasheet
   clearly states driver should not allow WOL frames under normal
   operation mode.
 o Disable WOL frame reception in device attach so have fxp(4)
   immunize against system hang which can be triggered by magic
   packets when the hardware is not in fully initialized state.
 o Don't reset all hardware configuration data in fxp_stop()
   otherwise important configuration data is lost and this would
   reset WOL configuration to default state which in turn cause
   hardware hang on receipt of magic frames. To fix the issue,
   preserve hardware configuration data by issuing a selective
   reset.
 o Explicitly disable interrupts after issuing selective reset as
   reset may unmask interrupts.

Tested by:	Alexey Shuvaev < shuvaev <> physik DOT uni-wuerzburg DOT de >
2008-11-27 01:57:23 +00:00
Jack F Vogel
daf9197cff This delta is primarily a fix for es2lan devices that
will sometimes fail to initialize problem due to a lock
contention with management hardware. However, in order to
deliver that fix it was necessary to take a shared code
update as a whole, and this required scattered changes in
the core code to be compatible.

The em driver now has VLAN HW support added as the igb
driver had previously.

MFC after:  ASAP - in time for 7.1 RELEASE
2008-11-26 23:57:23 +00:00
Jack F Vogel
1b6e0dba04 Updated ixgbe driver - version 1.6.2
-This version has header split, and as a result a number of
 aspects of the code have been improved/simplified.
- Interrupt handling refined for performance
- Many small bugs fixed along the way

MFC after: ASAP - in time for 7.1
2008-11-26 23:41:18 +00:00
Jung-uk Kim
5113aa0af3 Introduce cpu_vendor_id and replace a lot of strcmp(cpu_vendor, "...").
Reviewed by:	jhb, peter (early amd64 version)
2008-11-26 19:25:13 +00:00
Nick Hibma
a11e5ead6e - Add the device ID for the HP HS2300 MC8775 clone (michael)
- Bugfix: Don't excede static number of ports allowed when iterating
  over endpoints within an interface.
- u3g_speeds contains speeds in baud, not bytes per second, so divide
  the buffer size by 10.
2008-11-26 17:16:54 +00:00
Ganbold Tsagaankhuu
ec5e25f237 Remove unused variable.
Found with:     Coverity Prevent(tm)
CID: 3695,3696

Approved by: harti
2008-11-26 13:44:11 +00:00
Pyun YongHyeon
c21e84e4db Implement TSO for 82550/82551 controllers.
o Configure controller to use dynamic TBD as TSO requires that
   operation mode.
 o Add a dummy TBD to tx_cb_u as TSO can access one more TBD in TSO
   operation.
 o Increase a DMA segment size to 4096 to hold a full IP segment
   with link layer header.
 o Unlike other TSO capable controllers, 82550/82551 does not
   modify the first IP packet in TSO operation so driver should
   create an IP packet with proper header. Subsequent IP packets
   are generated from the header information in the first IP packet
   header. Likewise pseudo checksum also should be computed by
   driver for the first packet.
 o TSO requires one more TBD to hold total TCP payload. To make
   code simple for TSO/non-TSO case, increase the index of the
   first available TBD array.
 o Remove KASSERT that checks the size of a DMA segment should be
   less than or equal to MCLBYTES as it's no longer valid in TSO.
 o Tx threshold and number of TBDs field is used to store MSS in
   TSO. So don't set the Tx threshold in TSO case.
2008-11-26 07:36:17 +00:00
Pyun YongHyeon
f13075af2d Implement Rx checksum offload for 82559 or later controllers.
82559 or later controllers added simple checksum calculation logic
in RU. For backward compatibility the computed checksum is appended
at the end of the data posted to Rx buffer. This type of simple
checksum calculation support had been used on several vendors such
as Sun HME/GEM, SysKonnect GENESIS and Marvell Yukon controllers.
Because this type of checksum offload support requires parsing of
received frame and pseudo checksum calculation with software
routine it still consumes more CPU cycles than that of full-fledged
checksum offload controller. But it's still better than software
checksum calculation.
2008-11-26 06:36:53 +00:00
Pyun YongHyeon
8505042178 o Introduce a new function, fxp_new_rfabuf which allocates a new
Rx buffer and loads DMA map. Also add a function
   fxp_discard_rfabuf that handles reusing Rx buffer/DMA map. With
   this change fxp_add_rfabuf just handles appending a new RFA to
   existing chain.
 o Initialize mbuf length in fxp_new_rfabuf.
 o Don't reset rnr and have fxp(4) handle received frames even if
   it couldn't allocate new Rx buffer. This will make fxp(4) reload
   updated RFA under rnr case. The rnr would still be reset to 0 if
   polling is active and fxp(4) processed number of allowed Rx
   events.
 o Update if_iqdrops if fxp(4) couldn't allocate Rx buffer.

Previously fxp(4) used to try to reuse Rx buffer when new buffer
allocation is failed. But fxp(4) didn't take into account loaded
DMA map such that the same DMA map was loaded again without
unloading the map. There is no reason to unload the loaded map and
reload the same map again, just reusing the map is enough. I
believe the spare DMA map in softc was introduced to implement this
behaviour. Also fxp(4) used to stop Rx processing if once Rx buffer
allocation or DMA map load fails which in turn resulted in losing
incoming frames under heavy network load. With this change fxp(4)
should survive from resource shortage condition.
2008-11-26 05:51:49 +00:00
Ganbold Tsagaankhuu
d78d9a64cf Remove unused variable.
Found with:     Coverity Prevent(tm)
CID: 3678

Approved by: njl
2008-11-25 19:06:20 +00:00
Alfred Perlstein
6fda742dfe src/lib/libusb20/libusb20_compat01.c
Fix some issues about re-scanning of the devices.

src/lib/libusb20/libusb20_ugen20.c

Fix issue about libusb20 having to release the
USB transfers before doing a SET_CONFIG, else
the kernel will kill the file handle.

src/sys/dev/usb2/core/usb2_device.
src/sys/dev/usb2/core/usb2_generic.c
src/sys/dev/usb2/core/usb2_generic.h

Add support for U3G devices.
Improve and cleanup FIFO free handling.
Improve device re-enumeration.

src/sys/dev/usb2/core/usb2_msctest.c
src/sys/dev/usb2/core/usb2_msctest.h

Fix some problems in the USB Mass Storage Test.
Add Huawei vendor specific quirks.

src/sys/dev/usb2/core/usb2_request.c

Improve device re-enumeration.

src/sys/dev/usb2/ethernet/if_aue2.c
src/sys/dev/usb2/include/usb2_devid.h
src/sys/dev/usb2/include/usb2_devtable.h
src/sys/dev/usb2/quirk/usb2_quirk.c

Integrate changes from the old USB driver.

src/sys/dev/usb2/include/usb2_standard.h

Add definition of USB3.0 structures from USB.org.

src/sys/dev/usb2/serial/u3g2.c
src/sys/dev/usb2/serial/ugensa2.c
src/sys/modules/usb2/Makefile
src/sys/modules/usb2/serial_3g/Makefile

Import U3G driver.

Submitted by:	Hans Petter Selasky (usb4bsd)
2008-11-25 08:04:40 +00:00
Scott Long
3f3137fee5 Big update to the iSCSI initiator code. Highlights include IPv6 support,
many bugs fixes, many more performance improvements.

Submitted by:	Danny Braniss

M    sbin/iscontrol/iscsi.conf.5
M    sbin/iscontrol/iscontrol.8
M    sbin/iscontrol/iscontrol.h
M    sbin/iscontrol/config.c
M    sbin/iscontrol/fsm.c
M    sbin/iscontrol/login.c
M    sbin/iscontrol/pdu.c
M    sbin/iscontrol/misc.c
M    sbin/iscontrol/auth_subr.c
M    sbin/iscontrol/iscontrol.c
M    sys/dev/iscsi/initiator/isc_cam.c
M    sys/dev/iscsi/initiator/iscsi.h
M    sys/dev/iscsi/initiator/isc_soc.c
M    sys/dev/iscsi/initiator/iscsi_subr.c
M    sys/dev/iscsi/initiator/iscsivar.h
M    sys/dev/iscsi/initiator/isc_subr.c
M    sys/dev/iscsi/initiator/iscsi.c
M    sys/dev/iscsi/initiator/isc_sm.c
2008-11-25 07:17:11 +00:00
Pyun YongHyeon
c583cc04ef Simplify Tx checksum offload configuration. Also clear CSUM_IP if
we've computed IP checksum with software method.
2008-11-25 04:33:02 +00:00
Pyun YongHyeon
4e53f83744 - Allow fxp_encap() enqueue failed transmissions and set
IFF_DRV_OACTIVE to note resource shortage to upper stack.
- Don't count number of mbuf chains. Default 32 DMA segments for a
  frame is enough for most cases. If bus_dmamap_mbuf_sg fails use
  m_collapse(9) to collapse the mbuf chain instead of relying on
  expensive m_defrag(9).
- Move bpf handling to fxp_start_body() which is supposed to be
  more appropriate place.
- Always arm watchdog timer whenever a new Tx request is made.
  Previously fxp(4) used to arm watchdog timer only when
  FXP_CXINT_THRESH-th Tx request is made. Because fxp(4) does not
  rely on Tx interrupt to reclaim transmitted mbufs it's better to
  arm watchdog timer to detect potential lockups.
- Add more aggresive Tx buffer reclaiming in fxp_start_body to make
  room for new Tx requests. Since fxp(4) does not request Tx
  completion interrupt for every frames it's necessary to clean
  TXCBs in advance to saturate link.
- Make fxp(4) try to start more packets transmitting regardless of
  interrupt type in fxp_intr_body.
2008-11-25 04:16:16 +00:00
Weongyo Jeong
c3d6943244 - improve AL2230 RF handling when the device type is zd1211. After this
patch the RX/TX performance becomes about 17~18 Mbps comparing with
  the previous whose values were RX 7~8Mbps and TX 13~14Mbps.
- improve AL2230 RF handling in zd1211b
- support AL2230S RF that PV2000 is renamed to AL2230S
- use register ZYD_CR244, ZYD_CR243, ZYD_CR242 when the driver writes
  values on RF.  This routine is more faster than the original one
- use private TX lock to avoid LOR at zyd_raw_xmit()
- increase TX slots from 1 to 5
- needs to set the channel at IEEE80211_S_AUTH not IEEE80211_S_RUN
- detailed error handling.  In previous the next command was sent to the
  device even if there was errors
- setting ZYD_MAC_RX_THRESHOLD value should be different between 1211
  and 1211b
- only try to stop the device at zyd_init_locked() if the device is
  UPed
- do not use MTX_RECURSE
- do not try to grap Giant lock when the channel is changing
- move the device initialization routines from zyd_attach to zyd_init to
  give a device full-reset chance to the driver.
- code cleanup at zyd_raw_xmit()
- simplify zyd_attach() routines
- resort functions and clean up variables
- DPRINTF style change.
- style(9)

Reviewed by:	sam
2008-11-25 02:19:02 +00:00
Pyun YongHyeon
2593534403 Move unarming watchdog timer and pending multicast configuration
check to fxp_txeof(). While I'm here unarm watchdog timer only if
there are no pending queued Tx requests.
Previously the watchdog timer was unarmed whenever Tx interrupt is
raised. This could be resulted in hiding root cause of watchdog
timeouts.
2008-11-25 02:05:01 +00:00
Pyun YongHyeon
60bb79ebaa Fix Tx/Rx checksum offload ioctl handling and make Rx handler honor
checksum offload configuration. Now checksum offload can be
controlled by ifconfig(8).
While I'm here add an additional check for interface capabilities
before applying user's request.
2008-11-25 01:33:16 +00:00
Pyun YongHyeon
b23d6be952 Make fxp(4) build with FXP_IP_CSUM_WAR. 2008-11-25 01:01:48 +00:00
Pyun YongHyeon
8fae3bd4f1 Sort head files and removed ununsed header file. 2008-11-25 00:59:11 +00:00
Pyun YongHyeon
f56e7f7490 Whitespace fix. 2008-11-25 00:48:05 +00:00
Rui Paulo
5941227fcc Add support for Marvell PATA M88SX6121.
PR:		129154
Submitted by:	João Barros <joao.barros at gmail.com>
MFC after:	1 month
2008-11-25 00:39:03 +00:00
Andrew Gallatin
73c7c83f1e Restore sfence semantics in mxge after the introduction
of a global mfence based mb() in r185162
2008-11-24 19:00:57 +00:00
Colin Percival
8c85a7fb78 Make sure arc4random(9) is properly seeded when /etc/rc.d/initrandom returns.
Approved by:	so (cperciva)
Approved by:	re (kensmith)
Security:	FreeBSD-SA-08:11.arc4random
2008-11-24 17:39:39 +00:00
Pyun YongHyeon
e48163252e Save the value read from TX queue CSR, so we don't test against a
stale one.

Submitted by:	sephe
2008-11-24 02:21:50 +00:00
Sam Leffler
6902009e2a print the extended tx/rx descriptor for 5416 and later parts 2008-11-24 01:34:56 +00:00
Sam Leffler
9c4fc1e8a2 nuke special handling of RXORN interrupt; the hal marks the FATAL
bit in the interrupt status when RXORN is hit and the chip requires
a reset so our special handling was causing useless resets
2008-11-24 01:31:10 +00:00
Alexander Motin
b6562075bb Remove DELAY() on hdac_audio_commit().
I don't see the reason why it is needed.
2008-11-23 23:19:31 +00:00
Warner Losh
eed55f0644 Eliminate an unused variable reported by coverity
Submitted by:	Ganbold
2008-11-23 23:04:28 +00:00
Alexander Motin
1f925d9161 Do not use soft PCM volume for digital outputs to allow SPDIF AC3 bypass
to work. Soft PCM volume (and vchans) unable to bypass AC3 stream now.
2008-11-23 20:19:35 +00:00
Alexander Motin
3a7a3fc203 Strictly differentiate digital and analog PCM devices according to codec
nodes capabilities. Add "Analog"/"Digital" marks to the pcm device names.

I hope it will help new users easier accept concept of several PCM devices
and understand exact purposes of that devices.
2008-11-23 20:03:58 +00:00
Alexander Motin
2262a5197a Report card erase sector size as disk stripe size. 2008-11-23 14:32:40 +00:00
Alexander Motin
249b0e8586 Improve detach handling: close races, flush queue. 2008-11-23 14:02:06 +00:00