Commit Graph

21059 Commits

Author SHA1 Message Date
Pyun YongHyeon
d199ef7e0d Avoid controller reinitialization which could be triggered by
dhclient(8) or alias addresses are added.

PR:	kern/87506
2010-09-01 22:16:25 +00:00
Pyun YongHyeon
ae9e8d4935 Do not reinitialize controller whenever promiscuous mode or
allmulti is toggled. Controller does not require reinitialization.
This removes unnecessary controller reinitialization whenever
tcpdump is used.
While I'm here remove unnecessary variable reinitialization.
2010-09-01 22:08:23 +00:00
Pyun YongHyeon
fc58ee15ff Report result of link state change to caller. Previously it always
returned success.
2010-09-01 21:44:36 +00:00
Pyun YongHyeon
d7b57e79e5 Overhaul link state change handling. Previously sis(4) blindly
configured TX/RX MACs before getting a valid link. After that, when
link state change callback is called, it called device
initialization again to reconfigure TX/RX MACs depending on
resolved link state. This hack created several bad side effects and
it required more hacks to not collide with sis_tick callback as
well as disabling switching to currently selected media in device
initialization. Also it seems sis(4) was used to be a template
driver for long time so other drivers which was modeled after
sis(4) also should be changed.

TX/RX MACs are now reconfigured after getting a valid link. Fix for
short cable error is also applied after getting a link because it's
only valid when the resolved speed is 100Mbps.

While I'm here slightly reorganize interrupt handler such that
sis(4) always read SIS_ISR register to see whether the interrupt is
ours or not. This change removes another hack and make it possible
to nuke sis_stopped variable in softc.
2010-09-01 21:42:19 +00:00
Pyun YongHyeon
91c265b83d s/u_intXX_t/uintXX_t/g 2010-09-01 19:53:15 +00:00
Pyun YongHyeon
a629f2b183 bus_dma(9) cleanup.
o Enforce TX/RX descriptor ring alignment. NS data sheet says the
   controller needs 4 bytes alignment but use 16 to cover both SiS
   and NS controllers. I don't have SiS data sheet so I'm not sure
   what is alignment restriction of SiS controller but 16 would be
   enough because it's larger than the size of a TX/RX descriptor.
   Previously sis(4) ignored the alignment restriction.
 o Enforce RX buffer alignment, 4.
   Previously sis(4) ignored RX buffer alignment restriction.
 o Limit number of TX DMA segment to be used to 16. It seems
   controller has no restriction on number of DMA segments but
   using more than 16 looks resource waste.
 o Collapse long mbuf chains with m_collapse(9) instead of calling
   expensive m_defrag(9).
 o TX/RX side bus_dmamap_load_mbuf_sg(9) support and remove
   unnecessary callbacks.
 o Initial endianness support.
 o Prefer local alignment fixup code to m_devget(9).
 o Pre-allocate TX/RX mbuf DMA maps instead of creating/destroying
   these maps in fast TX/RX path. On non-x86 architectures, this is
   very expensive operation and there is no need to do that.
 o Add missing bus_dmamap_sync(9) in TX/RX path.
 o watchdog is now unarmed only when there are no pending frames
   on controller. Previously sis(4) blindly unarmed watchdog
   without checking the number of queued frames.
 o For efficiency, loaded DMA map is reused for error frames.
 o DMA map loading failure is now gracefully handled. Previously
   sis(4) ignored any DMA map loading errors.
 o Nuke unused macros which are not appropriate for endianness
   operation.
 o Stop embedding driver maintained structures into descriptor
   rings. Because TX/RX descriptor structures are shared between
   host and controller, frequent bus_dmamap_sync(9) operations are
   required in fast path. Embedding driver structures will increase
   the size of DMA map which in turn will slow down performance.
2010-09-01 19:33:40 +00:00
Pyun YongHyeon
1d885b48c1 Nuke unnecessary return at the end of function. 2010-09-01 18:41:59 +00:00
Pyun YongHyeon
cc26c0fd68 style(9) - space after keywords. 2010-09-01 18:39:35 +00:00
Pyun YongHyeon
8eca70be71 Remove leading and trailing white spaces.
No functional changes.
2010-09-01 18:28:08 +00:00
Alexander Motin
901c71c704 Increase device reset timeout from 10 to 15 seconds, same as in ahci(4).
Some devices found need about 10-12 seconds to spinup.
2010-09-01 06:43:41 +00:00
Pyun YongHyeon
175f87424f Remove unnecessary atomic operation in bge_poll. bge(4) always
holds a driver lock in the function entry and
memory synchronization is handled by bus_dmamap_sync(9).
2010-08-31 20:56:18 +00:00
Jung-uk Kim
c74dea9cc1 Make sure the interrupt entry point is within the video ROM range. We must
not change interrupt vector if it is not pointing the ROM itself.  Actually,
we just fail shadowing altogether if that is the case because the shadowed
copy will be useless for sure and POST may not be relocatable or useful.
While I'm here, fix a debugging message under bootverbose, really.  r211829
fixed one case but broke another.  Mea Culpa.
2010-08-31 20:21:52 +00:00
Pyun YongHyeon
95a0a340f4 bge_txeof() already checks whether it has to free transmitted mbufs
or not by comparing reported TX consumer index with saved index. So
remove unnecessary check done after freeing transmitted mbufs.
While I'm here nuke unnecessary variable initializations.
2010-08-31 19:59:18 +00:00
Pyun YongHyeon
38cc61518b Handle PAE case correctly. You cannot effectively specify a 4GB
boundary in PAE case so use a 2GB boundary for PAE as suggested by
jhb.

Pointed out by:	jhb
Reviewed by:	jhb
2010-08-31 18:48:09 +00:00
Pyun YongHyeon
5b610048ec Split common parent DMA tag into ring DMA tag and TX/RX mbuf DMA
tag. All controllers that are not BCM5755 or higher have 4GB
boundary DMA bug. Previously bge(4) used 32bit DMA address to
workaround the bug(r199670). However this caused the use of bounce
buffers such that it resulted in poor performance for systems which
have more than 4GB memory. Because bus_dma(9) honors boundary
restriction requirement of DMA tag for dynamic buffers, having a
separate TX/RX mbuf DMA tag will greatly reduce the possibility of
using bounce buffers. For DMA buffers allocated with
bus_dmamem_alloc(9), now bge(4) explicitly checks whether the
requested memory region crossed the boundary or not.
With this change, only the DMA buffer that crossed the boundary
will use 32bit DMA address. Other DMA buffers are not affected as
separate DMA tag is created for each DMA buffer.
Even if 32bit DMA address space is used for a buffer, the chance to
use bounce buffer is still very low as the size of buffer is small.
This change should eliminate most usage of bounce buffers on
systems that have more than 4GB memory.

More correct fix would be teaching bus_dma(9) to honor boundary
restriction for buffers created with bus_dmamem_alloc(9) but it
seems that is not easy.

While I'm here cleanup bge_dma_map_addr() and remove unnecessary
member variables in bge_dmamap_arg structure.

Tested by:	marcel
2010-08-31 17:33:48 +00:00
Xin LI
08390ba4c9 Drain watchdog callouts before detaching. This prevents a panic while
unloading the kernel module.

Submitted by:	Tom Cough
2010-08-30 21:33:33 +00:00
Xin LI
a806ad4021 Vendor update to version 3.80.06.003 to fix a panic with ZFS when under
heavy I/O load.

Many thanks to LSI for continuing to support FreeBSD.

PR:		kern/149968
Submitted by:	LSI (Tom Couch)
Reported by:	Kai Kockro <kkockro web de>
Tested by:	Kai Kockro, jpaetzel
MFC after:	7 days
2010-08-30 19:15:04 +00:00
Alexander Motin
90400bed63 MFata(4):
Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.
2010-08-28 07:24:45 +00:00
Alexander Motin
bfc8500c34 Add Intel Cougar Point PCH SATA Controller DeviceIDs. Correct some existing
entries for Intel Ibex Peak (5 Series/3400 Series) PCH SATA controllers.

Submitted by:	jfv@
MFC after:	1 week
2010-08-28 07:10:51 +00:00
Pyun YongHyeon
dd20cce19a Do not allocate multicast array memory in multicast filter
configuration function. For failed memory allocations, em(4)/lem(4)
called panic(9) which is not acceptable on production box.
igb(4)/ixgb(4)/ix(4) allocated the required memory in stack which
consumed 768 bytes of stack memory which looks too big.

To address these issues, allocate multicast array memory in device
attach time and make multicast configuration success under any
conditions. This change also removes the excessive use of memory in
stack.

Reviewed by:	jfv
2010-08-28 00:34:22 +00:00
Jack F Vogel
f0d5a975b3 Add Intel Cougar Point PCH HD Audio Controller ID
MFC in a week
2010-08-28 00:23:13 +00:00
Pyun YongHyeon
880a50b513 If em(4) failed to allocate RX buffers, do not call panic(9).
Just showing some buffer allocation error is more appropriate
action for drivers. This should fix occasional panic reported on
em(4) when driver encountered resource shortage.

Reviewed by:	jfv
2010-08-28 00:16:49 +00:00
Jack F Vogel
6d23f8741b Add Intel Cougar Point PCH LPC Controller Device IDs
for watchdog support. Also add additional Intel Ibex
Peak (5 Series/3400 Series) PCH IDs.

MFC after a week
2010-08-28 00:09:46 +00:00
Pyun YongHyeon
ad1917be37 Do not call voluntary panic(9) in case of if_alloc() failure.
Reviewed by:	jfv
2010-08-28 00:09:19 +00:00
Pyun YongHyeon
5c8080f0d9 Make sure not to access unallocated stats memory.
Reviewed by:	jfv
2010-08-27 23:50:13 +00:00
Jack F Vogel
dce8a362df Add support for Intel Cougar Point SMBus controller.
MFC afer 1 week
2010-08-27 23:24:08 +00:00
Jung-uk Kim
2b13785931 Fix a debugging message under bootverbose. This address is not linear. 2010-08-25 22:48:18 +00:00
Jung-uk Kim
a73f383ee9 Add an experimental feature to shadow video BIOS. Long ago, this trick was
supported by many BIOSes to improve performance of VESA BIOS calls for real
mode OSes but it is not our intention here.  However, this may help some
platforms where the video ROMs are inaccessible after suspend, for example.
Note it may consume up to 64K bytes of contiguous memory depending on video
controller model when it is enabled.  This feature can be disabled by
setting zero to 'debug.vesa.shadow_rom' loader tunable via loader(8) or
loader.conf(5).  The default is 1 (enabled), for now.
2010-08-25 22:09:02 +00:00
Warner Losh
253953cd5b On second thought, we need to force 16-bit mode 2010-08-25 02:09:07 +00:00
Warner Losh
e94b9f21a8 Prodded by Yongari, add support for Holtek HT80232. Add the device
ID, plus the ability to force '16-bit mode' which really means NE-2000
mode.  Other open source drivers suggest that the Holtek misbehaves if
you allow the 8-bit probe.  Also, all of the PCI chips emulate
NE-2000ish cards, so always force 16-bit mode for memory transfers.

PR:		84202 (patch not used)
2010-08-25 02:03:48 +00:00
Pyun YongHyeon
3ca447da3d Remove unnecessary controller reinitialization.
PR:	kern/87506
2010-08-24 19:41:15 +00:00
Pyun YongHyeon
6a085e6341 vr_init_locked() will stop and reset the controller. Remove
unnecessary vr_stop()/vr_reset() calls.
2010-08-24 18:44:12 +00:00
Pyun YongHyeon
9fb40e0a9b Remove unnecessary controller reinitialization.
CAM filter handling was rewritten long time ago so it should not
require controller reinitialization.

PR:	kern/87506
2010-08-24 18:40:11 +00:00
Pyun YongHyeon
7c45b43651 Add PNP id for Compex RL2000.
I'm not sure whether adding this logical id is correct or not
because Compex RL2000 is in the list of supported hardware list.
I guess the Compex RL2000 could be PCI variant while the controller
in question is ISA controller. It seems PNP compat id didn't match
or it had multiple compat ids so isa_pnp_probe() seemed to return
ENOENT.

PR:	kern/80853
2010-08-24 18:17:40 +00:00
Pyun YongHyeon
820b53e152 Fix a possible unaligned access to savebyte array.
PR:	kern/122195
2010-08-23 21:40:03 +00:00
Pyun YongHyeon
9ae11bbaa6 Implement basic WOL support. Note, not all xl(4) controllers
support WOL. Some controllers require additional 3-wire auxiliary
remote wakeup connector to draw power. More recent xl(4)
controllers may not need the wakeup connector though.
2010-08-23 19:18:50 +00:00
Pyun YongHyeon
ac68109179 Move xl_reset() to xl_init_locked(). This will make driver
initialize controller from a known good state. Previously driver
used to issue controller reset while TX/RX DMA are in progress.
I guess resetting controller in active TX/RX DMA cycle is to ensure
stopping I/Os in xl_shutdown(). I remember some buggy controllers
didn't respond with stop command if controller is under high
network load at the time of shutdown so resetting controller was
the only safe way to stop the I/Os. However, from my experiments,
controller always responded with stop command under high network
load so I think it's okay to remove the xl_reset() in
device_shutdown handler.
Resetting controller also will clear configured RX filter which
in turn will make WOL support hard because driver have to reprogram
RX filter in WOL handler as well as setting station address.
2010-08-23 18:51:31 +00:00
Pyun YongHyeon
27b031a9ad Remove unnecessary controller reinitialization by checking
IFF_DRV_RUNNING flag.
2010-08-23 00:31:55 +00:00
Pyun YongHyeon
a3835274a4 Clean up SIOCSIFCAP handler and allow RX checksum offloading could
be controlled by user.
2010-08-23 00:24:12 +00:00
Pyun YongHyeon
35f945cd62 It seems all Broadcom controllers have a bug that can generate UDP
datagrams with checksum value 0 when TX UDP checksum offloading is
enabled.  Generating UDP checksum value 0 is RFC 768 violation.
Even though the probability of generating such UDP datagrams is
low, I don't want to see FreeBSD boxes to inject such datagrams
into network so disable UDP checksum offloading by default.  Users
still override this behavior by setting a sysctl variable or loader
tunable, dev.bge.%d.forced_udpcsum.

I have no idea why this issue was not reported so far given that
bge(4) is one of the most commonly used controller on high-end
server class systems. Thanks to andre@ who passed the PR to me.

PR:	kern/104826
2010-08-22 01:39:09 +00:00
Pyun YongHyeon
7e32f79a44 Load tunable from loader.conf(5) instead of device.hints(5). 2010-08-21 23:13:16 +00:00
Jack F Vogel
1ed622958d Eliminate the ambiguous queue setting logic for
the VF, it made it possible to have 2 queues which
we don't want, the HOST is unable to handle it.
2010-08-19 17:00:33 +00:00
Rui Paulo
187278cadc For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' in
Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename
of the compiler command (excluding any arguments) is considered.

This allows you to use, for example, CC="/nondefault/path/clang -xxx",
and still have the various tests in bsd.*.mk identify your compiler as
clang correctly.

ICC if cases were also changed.

Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-08-17 20:39:28 +00:00
Adrian Chadd
a122fea4ff Add s25sl064a, an 8mb SPI flash part. 2010-08-17 16:27:13 +00:00
John Baldwin
62508c531e Add a new method to the PCI bridge interface, PCIB_POWER_FOR_SLEEP(). This
method is used by the PCI bus driver to query the power management system
to determine the proper device state to be used for a device during suspend
and resume.  For the ACPI PCI bridge drivers this calls
acpi_device_pwr_for_sleep().  This removes ACPI-specific knowledge from
the PCI and PCI-PCI bridge drivers.

Reviewed by:	jkim
2010-08-17 15:44:52 +00:00
Navdeep Parhar
21d68a68bf Fix tx pause quanta and timer calculations.
MFC after:	3 days
2010-08-15 20:52:15 +00:00
Navdeep Parhar
3dd6d7570f Always reset the XGMAC's XAUI PCS on a link up.
MFC after:	3 days
2010-08-15 20:45:16 +00:00
Navdeep Parhar
61cb6c9076 wakeup is required if the adapter lock is released anywhere during
init and not just for the may_sleep case.

Pointed out by:	Isilon
MFC after:	3 days
2010-08-15 20:34:51 +00:00
Adrian Chadd
f70c72aa0c Fix indenting/whitespace issues introduced by me. 2010-08-15 11:40:53 +00:00
Adrian Chadd
5674f4a799 The comment is misleading - that register setting seems to kick off the
initial chip NF cal.
2010-08-15 11:32:05 +00:00
Bernhard Schmidt
ad8e331bf2 Introduce IEEE80211_C_RATECTL, drivers which use the ratectl framework
should set this capability.

MFC after:	2 weeks
2010-08-14 20:12:10 +00:00
Adrian Chadd
627e7864f1 A local addition, not imported from ath9k.
AR_PHY_CALMODE is explicitly reset on interface reset for other chipsets;
this commit also sets it for the AR9160.
2010-08-14 15:48:18 +00:00
Adrian Chadd
6a0c1a60c0 * Merge in AR9160 initval updates from Linux-2.6.34.
* Grab the AR_PHY_CCA and AR_PHY_EXT_CCA initvals from Linux wireless-testing.

Obtained from: Linux-2.6.34
2010-08-14 15:46:18 +00:00
Adrian Chadd
49d2d79b7a Merge in a fix for the power/(gain?) calculation. Apply it to both
the 5416/9160 and 9285 code paths.

Obtained from:	OpenWRT r22123, 522-ath9k_pwrcal_fix.patch
2010-08-14 15:29:21 +00:00
Adrian Chadd
8f279cf6e7 Fix the calibration logic to correctly clamp the calculated coefficient.
Obtained from:	OpenWRT r22123, 521-ath9k_iqcal_fix.patch
2010-08-14 15:28:15 +00:00
Adrian Chadd
e8dabfbea9 Export ath stats via snmp, rather than requiring a debugging interface
and "athstats".
2010-08-14 14:18:02 +00:00
Adrian Chadd
7ec4e6b83b Add a global counter of missed beacons.
The existing missed beacon count is reset once a beacon isn't missed.
2010-08-14 14:01:12 +00:00
Pyun YongHyeon
5bec76e720 Make sure to disable RX MAC in alc_stop_mac(). Previously there
was a logic error which it always enabled RX MAC.
2010-08-13 19:39:33 +00:00
Adrian Chadd
d86cdfe4b0 * Fix indentation
* Restore comment erroneously deleted from the previous commit
2010-08-12 08:39:54 +00:00
Adrian Chadd
52f81b679a Loading the NF CCA values may take longer than expected to occur.
If it does, don't then try reprogramming the NF "cap" values (ie
what values are the "maximum" value the NF can be) - instead,
just leave the current CCA value as the NF cap.

This was inspired by some similar work from ath9k. It isn't
a 100% complete solution (as there may be some reason where a
high NF CCA/cap is written, causing the baseband to stop thinking it
is able to transmit, leading to stuck beacon and interface reset)
which I'll investigate and look at fixing in a later commit.

Obtained from:	Linux
2010-08-12 06:20:54 +00:00
Adrian Chadd
5215ce1038 Use ar5212IsNFCalInProgress() to check for NF calibration progress. 2010-08-12 06:14:26 +00:00
Adrian Chadd
245f553a78 Fix indentation. 2010-08-12 06:12:39 +00:00
Adrian Chadd
ccf98f5d9d Ensure that the correct rxchainmask is used when doing calibration in the
AR5416 and later chipsets.

ath_hal_calibrateN() calls the HAL calibrateN function with rxchainmask=0x1.
This is not necessarily the case for AR5416 and later chipsets.
2010-08-12 06:11:44 +00:00
Adrian Chadd
43ff2d6aec Internal NF calibration should not occur in parallel with any other
calibration. Ensure that the NF calibration completes before continuing
with the rest of the calibration setup process.
2010-08-12 06:08:36 +00:00
Adrian Chadd
85b035b335 Add a couple of functions to check NF calibration progress / completion. 2010-08-12 06:06:14 +00:00
Takanori Watanabe
97f24f666f Add tpm(4) driver for Trusted Platform Module.
You may want to look at http://bsssd.sourceforge.net/ .

Submitted by: Hans-Joerg Hoexer <Hans-Joerg_Hoexer@genua.de>
2010-08-12 00:16:18 +00:00
John Baldwin
9f6eb14c88 Do not use %z to print a time_t. Fixes build on architectures where time_t
and size_t are different types.
2010-08-11 16:56:38 +00:00
Neel Natu
5f7eb1ff54 Start using the 'init_static_kenv()' API provided by r198561 to initialize
CFE environment variables.
2010-08-11 02:13:50 +00:00
Gavin Atkinson
f5113df97d Now that the uplcom(4) driver can autodetect the chipset type, sync the
list of devices supported by uplcom(4) with the following sources:

NetBSD  src/sys/dev/usb/uplcom.c 1.70
OpenBSD src/sys/dev/usb/uplcom.c 1.52
Linux   drivers/usb/serial/pl2303.h from kernel 2.6.35
BeOS    usb_serial/driver.c 1.32

Give several devices better descriptions, and rename
PROLIFIC2 -> NETINDEX while here to match everybody else.

MFC after:	6 weeks (after r211111)
2010-08-10 19:13:11 +00:00
Adrian Chadd
8197f57e6a Don't delay updating the longcal timer - instead, update the longcal
flag immediately so it's only set once per longcal interval.

Without this, the current AR5416 code will continuously spam NF
calibrations during a periodic calibration if the longcal flag
is set. The longcal flag wouldn't be cleared until the calibration
method indicates that calibrations are "complete".

This drops the rate of NF calibration updates down from "once every
shortcal" (ie, every 100ms) during a periodic calibration, to only
once per "longcal" interval. Spamming NF calibrations every 100ms
caused some potentially horrific issues in noisy environments as
NF calibrations can take longer than 100ms and this spamming can
cause invalid NF calibration results to be read back - leading to
missed beacons, and thus leading to a stuck beacon situation.

Stuck beacons cause interface resets, which restart calibrations.
This means that the longcal calibration runs every 100ms (shortcal)
until all initial calibrations are completed. This spamming can then
cause the above issues which leads to stuck beacons, leading to
interface resets, etc, etc. Quite annoying.
2010-08-10 07:56:56 +00:00
Adrian Chadd
8b9cd503d2 Bring over ar5416 inivals from Linux-2.6.34.
Reviewed by:	rpaulo@
Obtained from:	Linux
2010-08-10 07:48:13 +00:00
Adrian Chadd
329e425acd Re-format the ar5416 inivals to be consistent with what
Linux ath9k uses.
2010-08-10 07:47:43 +00:00
Gavin Atkinson
bc65068d4a Attempt to autodetect the cype of chipset, rather than storing this
within the device table.  This code uses the same algorithm as used in the
Linux, NetBSD and DragonflyBSD driver.

While investigating this, it became apparent that the Linux driver always
initialises the device, and not just in the PL2303HX case.  Change
uplcom(4) to do the same.

This change allows us to synchronize our device ID list with Linux and
NetBSD, without requiring knowledge of the chipset in use.

Reviewed by:	hselasky
MFC after:	6 weeks
2010-08-09 17:42:05 +00:00
Pyun YongHyeon
2f70ccea9f Add support for Atheros AR8151/AR8152 PCIe gigabit/fast ethernet
controller. These controllers are known as L1D(AR8151) and
L2CB/B2(AR8152). This change adds supports for the following
controllers.
 o AR8151 v1.0(L1D) gigabit ethernet controller
 o AR8151 v2.0(L1D) gigabit ethernet controller
 o AR8152 v1.1(L2CB) fast ethernet controller
 o AR8152 v2.0(L2CB2) fast ethernet controller
These controllers have the same feature of AR8131/AR8132 and
support improved power saving control. The user visible change at
this moment is reduced jumbo frame size from 9KB to 6KB. Many
thanks to Atheros for continuing to support FreeBSD.

HW donated by:	Atheros Communications, Inc.
2010-08-09 17:28:08 +00:00
Gavin Atkinson
4bb3183d46 Add entries for some devices I have locally. 2010-08-09 17:27:27 +00:00
Pyun YongHyeon
af1f79ce84 Add F1 PHY found on Atheros AR8151 v2.0 PCIe gigabit ethernet
controller.
2010-08-09 17:22:14 +00:00
Dag-Erling Smørgrav
c201d4532c - Add full support for header / data digests.
- Increase target limit from 4 to 64; this limit will be removed entirely
  at a later time.
- Improve recovery from lost network connections.
- Fix some potential deadlocks and a serious memory leak.
- Fix incorrect use of MH_ALIGN (instead of M_ALIGN), which makes no
  practical difference, but triggers a KASSERT with INVARIANTS.
- Fix some warnings in iscontrol(8) and improve the man page somewhat.

Submitted by:	Daniel Braniss <danny@cs.huji.ac.il>
Sponsored by:	Dansk Scanning A/S, Data Robotics Inc.
2010-08-09 12:36:36 +00:00
Pyun YongHyeon
497ffa52ef It seems some old Sundace(now IC Plus Corp.) controllers do not
like memory mapped register access. Typical problem from the issue
was MII access returned unreliable values. I'm not sure this comes
from lack of register flushing in MII access after accessing
STE_PHYCTL register though.
To address the issue, read hints data that controls which type of
memory mapping should be used in driver. ste(4) still prefers
memory mapping to io mapping but honor hints entered by user except
for controllers that have problems with memory mapping.
The hint to use iomapping could be given by adding the following
line to /boot/device.hints file.

hint.ste.0.prefer_iomap="1"

PR:	kern/149285
MFC after:	5 days
2010-08-09 01:47:09 +00:00
Gavin Atkinson
fe0f636233 The PL2302X can support any baud rate <= 6Mbps, allow any rate to be set.
PR:		usb/128324
Submitted by:	Mike Durian <durian shadetreesoftware.com> (original patch)
MFC after:	2 weeks
2010-08-08 20:53:00 +00:00
Pyun YongHyeon
a4d3574ccf Cache PCIY_PMG and PCIY_EXPRESS capability pointer to softc and use
it instead of calling pci_find_extcap().
2010-08-08 00:43:41 +00:00
Pyun YongHyeon
d62fc5de93 Remove unnecessary assignment. 2010-08-08 00:23:36 +00:00
Pyun YongHyeon
47ae892c85 Always disable ASPM L0s and enable L1 before entering into WOL
suspend state.  Also disable master clock after PHY power down,
this is supposed to save more power. The master clock should be
enabled if WOL is active.
2010-08-08 00:12:31 +00:00
Pyun YongHyeon
a0bca95502 Do not touch CMB TX threshold register when CMB is not used.
Note, alc(4) does not use CMB at all due to silicon bug.
2010-08-07 23:41:46 +00:00
Pyun YongHyeon
1e77baed0d Controller does not seem to support more than 1024 bytes DMA burst.
Limit DMA burst size to be less than or equal to 1024 bytes.
2010-08-07 23:33:06 +00:00
Pyun YongHyeon
e7a28130c4 Marvell model number 0x06 is 88E1101 PHY. 2010-08-07 23:16:21 +00:00
Gavin Atkinson
ce617aca0a Sync the list of devices supported by uslcom(4) with NetBSD, Linux, OpenBSD
and BeOS.  The devices supported by uslcom(4) are now in sync with:

NetBSD  src/sys/dev/usb/uslsa.c 1.11
OpenBSD src/sys/dev/usb/uslcom.c 1.20
Linux   source/drivers/usb/serial/cp210x.c from kernel 2.6.35
BeOS    usb_serial/driver.c 1.32

Two vendor/product IDs from Linux have not been added to uslcom(4):
  SILABS SAEL - This device has special code in u3g to support it
  SILABS GSM2228 - I suspect this should also be covered by u3g(4).

MFC after:	1 week
2010-08-07 16:14:40 +00:00
Gavin Atkinson
01a8caf18e Sort this file a little better: the vendors are supposed to be sorted by
vendor ID in the vendor section, and by symbolic name in the product
section.  Products are sorted by product ID.  While here, get rid of a
duplicate Microsoft Mouse entry, revealed by sorting.

MFC after:	1 week
2010-08-07 16:08:37 +00:00
Joel Dahl
7f22a6d334 Fix typo in comment. 2010-08-07 08:31:32 +00:00
Jung-uk Kim
90f06c5eae Protect shared palette and state buffer with a mutex. Remove defunct
spltty() calls while I am here.
2010-08-07 05:46:04 +00:00
Jung-uk Kim
34622ff1ab When EC burst mode is activated and multiple bytes are accessed, do not
disable and enable repeatedly, just do it once per call.  It also reduces
code duplication.  Check all parameters early and fail immediately.
2010-08-06 23:35:33 +00:00
Jung-uk Kim
709fac0616 Merge ACPICA 20100806. 2010-08-06 23:11:19 +00:00
Jack F Vogel
3b9b3fc3bf Put the early setting of the MAC type back, its
removal resulted in broken code in MSIX setup.
2010-08-06 20:55:49 +00:00
Matt Jacob
c97bb67a70 Figure which is the IO and MEM bars- do not assume that they are in
a fixed order.

PR:		149220
Obtained from:	John Baldwin
MFC after:	1 month
2010-08-06 17:27:00 +00:00
Konstantin Belousov
6aeff67cd8 Disable sync cache for the Transcend Jetflash V90. It is more specific
quirk over the general one for transcend sticks.

Submitted by:	Mykola Dzham <i levsha me>
MFC after:	1 week
2010-08-06 13:45:16 +00:00
Konstantin Belousov
f53444bc4d Mark /dev/zero and /dev/null as eternal.
In collaboration with:	pho
MFC after:	1 month
2010-08-06 09:47:48 +00:00
Pyun YongHyeon
7ee9ed98c6 Reduce Tx interrupt moderation timer from 50ms to 1ms. The default
value resulted in poor performance for UDP packets. With this
change, UDP bulk transfer performance is more than 940Mbps.

While I'm here fix a wrong register definition.
2010-08-06 00:50:16 +00:00
John Baldwin
7d23a9b3d5 - Retire acpi_pcib_resume(). It is has just been an alias for
bus_generic_resume() since the pci_link(4) driver was added.
- Change the ACPI PCI-PCI bridge driver to inherit most of its methods
  from the generic PCI-PCI bridge driver.  In particular, this will now
  restore PCI config registers for ACPI PCI-PCI bridges.

Tested by:	Oleg Sharoyko  osharoiko of gmail
2010-08-05 16:10:12 +00:00
Gavin Atkinson
af9800150c Do not free sc if attach failed, as it was allocated by the bus
infrastructure, not us.  This appears to be a leftover from an older
version of the driver.

Submitted by:	avg
Tested by:	Anton Shterenlikht <mexas bristol.ac.uk>
MFC after:	1 week
X-MFC-Note:	To stable/8 and stable/7 only
2010-08-04 07:49:40 +00:00
Xin LI
28a54cacee Catch known CPUs before using IA32_TEMPERATURE_TARGET.
This way we would have an opportunity to hide the
Tj(target) value doesn't seem right stuff if we know
it's not working there.

Add temperature value for Core2 Duo Extreme Mobile that
I have access to.
2010-08-04 00:25:13 +00:00
Oliver Fromme
d191ee22b1 Add support for ATI Radeon HD 4250.
PR:		kern/149041
Submitted by:	olli
Reviewed by:	rnoland
Approved by:	des (mentor)
MFC after:	1 week
2010-08-03 16:30:56 +00:00