Commit Graph

20383 Commits

Author SHA1 Message Date
Pyun YongHyeon
d896b3fe8d Fix typo in r204975.
Pointed out by:	marius
2010-03-10 20:55:55 +00:00
Pyun YongHyeon
cbb2b2fe3e Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
Also disable relaxed ordering as recommended by data sheet for
PCI-X devices. For PCI-X BCM5704, set maximum outstanding split
transactions to 0 as indicated by data sheet.
For BCM5703 in PCI-X mode, DMA read watermark should be less than
or equal to maximum read byte count configuration. Enforce this
limitation in DMA read watermark configuration.
2010-03-10 20:54:08 +00:00
Pyun YongHyeon
fbc374af79 Enable hardware fixes for BCM5704 B0 as recommended by data sheet. 2010-03-10 20:22:57 +00:00
Jung-uk Kim
9c98a9acdd Fix white spaces. 2010-03-10 18:30:55 +00:00
Maxim Sobolev
6b07566596 Provide workaround for the ages old bug affecting certain BCM5708S
chip revision often found in the blades and resulting in interfaces
not sensing carrier signal. Looking at all problem reports it
appears that it only affects some very specific silicon revision
(ASIC (0x57081021); Rev (B2)) and version of the PHY that
supports 1000baseSX-FDX media only. Therefore, narrow the scope of
workaround to combination of that revision and media type. Given
that the first report on this issue is dated back to 2007, there is
not much hope that this issue will ever be properly resolved.

Among affected systems are IBM HS21, Intel SBXD132 and HP BL460c.

PR:		118238, 122551, 140970
MFC after:	1 month
2010-03-10 05:19:14 +00:00
Weongyo Jeong
5a646f0eca uses KOBJMETHOD_END macro to indicate the end of method table.
Submitted by:	yongari
2010-03-09 20:07:41 +00:00
Weongyo Jeong
b9b64aa5b2 o uses bus accessor macros to read values from ivar so no more values
are referenced directly from ivar pointer.  It's to do like what other
  buses do. [1]
o changes exported prototypes.  It doesn't use struct siba_* structures
  anymore that instead of it it uses only device_t.
o removes duplicate code and debug messages.
o style(9)

Pointed out by:	imp [1]
2010-03-09 19:58:00 +00:00
Navdeep Parhar
cd5c70b2ba Better TwinAx transceiver detection.
Originally submitted by: <Bruno dot Bittner at isilon dot com>
(This is a rewritten, corrected version of that patch)

MFC after:    1 week
2010-03-09 19:57:44 +00:00
Jung-uk Kim
2a18c71d03 - Allow users to enable dumping Debug objects without ACPI debugger.
Setting the new sysctl MIB "debug.acpi.enable_debug_objects" to a non-zero
value enables us to print Debug object when something is written to it.
- Allow users to disable interpreter slack mode.  Setting the new tunable
"debug.acpi.interpreter_slack" to zero disables some workarounds for common
BIOS mistakes and enables strict ACPI implementations by the specification.
2010-03-09 19:02:02 +00:00
Fabien Thomas
b44906e506 Change the way shutdown is handled for log file.
pmc_flush_logfile is now non-blocking and just ask the kernel
to shutdown the file. From that point, no more data is
accepted by the log thread and when the last buffer is flushed
the file is closed.

This will remove a deadlock between pmcstat asking for
flush while it cannot flush the pipe itself.

MFC after: 3 days
2010-03-08 19:58:00 +00:00
Joel Dahl
4260c12796 Looks like I forgot to add half of the copyright text when we switched to
our preferred license.
2010-03-08 18:51:28 +00:00
Jung-uk Kim
ca3cf4fa2c Merge ACPICA 20100304. 2010-03-05 21:39:16 +00:00
Maxim Sobolev
e9f3a15d63 Don't spam dmesg with "registered firmware ..." when module is compiled
into kernel, unless there is a verbose boot flag set.  There is no real
need to have this information printed.

MFC after:	1 week
2010-03-05 03:37:42 +00:00
Weongyo Jeong
37fb01d6c1 fixes an attached-at-boot issue that bwn(4) using device_identify
interface didn't be attached automatically at boot time so changes a
approach to attach children based on leveraging some newbus niceties.

Submitted by:	nwhitehorn
2010-03-03 20:06:09 +00:00
Alexander Motin
95dab4f2e0 Several changes to fix livelock under high load, introduced by r203489:
- change the way in which command queue overflow is handled;
- do not expose to CAM two command slots, used for driver's internal purposes;
- allow driver to use up to 1024 command slots, instead of 256 before.
2010-03-03 17:58:41 +00:00
Pyun YongHyeon
2c4d092861 Remove programming LED register and enable 25MHz TX clock for
88E1149 PHY. This will fix intermittent watchdog timeouts as well
as very slow network performance on 88E8072 Yukon Extreme.

PR:	kern/144148
MFC after:	1 week
2010-03-03 17:56:52 +00:00
Joel Dahl
1edcf74de7 The NetBSD Foundation has granted permission to remove clause 3 and 4 from
the software.

Obtained from:	NetBSD
2010-03-03 17:55:51 +00:00
Rui Paulo
d4aef82b99 Introduce ath_hal_setInterrupts(), a macro for ah_setInterrupts().
Pointed out by:	sam
2010-03-03 17:42:39 +00:00
Rui Paulo
3e9c59558d Replace Id keyword with FreeBSD keyword and set the svn props correctly.
No functional change.
2010-03-03 17:32:32 +00:00
George V. Neville-Neil
660df75e8b Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor.
Add macros for properly accessing coprocessor 0 registers that
support performance counters.

Reviewed by:	jkoshy rpaulo fabien imp
MFC after:	1 month
2010-03-03 15:05:58 +00:00
Joel Dahl
7e4b1c0608 The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-03 10:18:03 +00:00
Konstantin Belousov
7765cff706 Correct mfip module dependency on mfi. This allows mfip to be loaded as
module when mfi is a module itself.

Reviewed by:	jhb, scottl
MFC after:	1 week
2010-03-02 17:34:11 +00:00
Rui Paulo
256796db58 Couple of suggestions from Sam regarding latest commit:
o rename the new variables to comply with the naming scheme
o move the new variables to an AR5212 specific struct
o use ahp when available
o revert to previous ts_flags check
2010-03-02 12:59:42 +00:00
Pyun YongHyeon
c876b43f42 Remove taskqueue based interrupt handling. After r204541 msk(4)
does not generate excessive interrupts any more so we don't need
to have two copies of interrupt handler.
While I'm here remove two STAT_PUT_IDX register accesses in LE
status event handler. After r204539 msk(4) always sync status LEs
so there is no need to resort to reading STAT_PUT_IDX register to
know the end of status LE processing. Just trust status LE's
ownership bit.
2010-03-02 01:45:02 +00:00
Weongyo Jeong
ae5e95fa23 calculates the integer square root if a positive integer X is larger
than 256 instead of using sqrt_table.

Reported by:	Joe Marcus Clarke <marcus at freebsd dot org>
2010-03-01 23:51:13 +00:00
Pyun YongHyeon
cf570c1f34 Implement rudimentary interrupt moderation with programmable
countdown timer register. The timer resolution may vary among
controllers but the value would be represented by core clock
cycles. msk(4) will automatically computes number of required clock
cycles from given micro-seconds unit.
The default interrupt holdoff timer value is 100us which will
ensure less than 10k interrupts under load. The timer value can be
changed with dev.mskc.0.int_holdoff sysctl node.

Note, the interrupt moderation is shared resource on dual-port
controllers so you can't use separate interrupt moderation value
for each port. This means we can't stop interrupt moderation in
driver stop routine. Also have msk_tick() reclaim transmitted Tx
buffers as safety belt. With this change there is no need to check
missing Tx completion interrupt in watchdog handler, so remove it.
2010-03-01 23:39:43 +00:00
Pyun YongHyeon
42f3ea9fc2 Make sure to enable flow-control only if established link is
full-duplex. Previously msk(4) used to allow flow-control on
1000baseT half-duplex media. Also GMAC pause is enabled if link
partner is capable of handling it.
While I'm here use IFM_OPTIONS instead of using IFM_GMASK to check
optional flags of link.
2010-03-01 22:55:35 +00:00
Pyun YongHyeon
17f6f326e9 Properly sync status LEs after processing. 2010-03-01 22:43:22 +00:00
Xin LI
506b3c39b8 Add PCI ID for MCS9901.
Submitted by:	gcooper
PR:		kern/144397
MFC after:	1 month
2010-03-01 20:41:27 +00:00
Rui Paulo
9425e26b82 Properly setup the TX FIFO threshold for AR5416 based chipsets,
including the AR9285. This seems to fix some users's problems.

Submitted by:	Jorge Boncompte [DTI2] <jorge at dti2.net>
2010-03-01 17:04:19 +00:00
Joel Dahl
eac073cde2 The NetBSD Foundation has granted permission to remove clause 3 and 4 from
their software.

Obtained from:	NetBSD
2010-03-01 16:52:11 +00:00
Alexander Motin
f60d46f99a - Add ALI M5228 PATA ID.
- Add missed DMA initialization for ALI SATA chips.
2010-03-01 07:32:49 +00:00
Weongyo Jeong
8600d13245 fixes a bug to load firmware images for LP PHY. For LP PHY always,
`lp_' string is contained in its full image names.
2010-02-27 23:42:32 +00:00
Weongyo Jeong
7478ae9730 supports the adhoc demo mode that it's tested on modified aircrack-ng
suite and worked.

Submitted by:	Paul B Mahol <onemda at gmail dot com>
2010-02-27 23:04:29 +00:00
Edward Tomasz Napierala
5ed1eb2bb0 Fix panic on invalid 'mdconfig -at preload' usage.
PR:		kern/80136
2010-02-27 10:41:30 +00:00
Matt Jacob
443e752d97 Revamp the pieces of some of the stuff I forgot to do when shifting to
32 bit handles. The RIO (reduced interrupt operation) and fast posting
for the parallel SCSI cards were all 16 bit handles. Furthermore,
target mode parallel SCSI only can have 16 bit handles.

Use part of a supplied patch to switch over to using 32 bit handles.
Be a bit more conservative here and only do this for parallel SCSI
for the 12160 (Ultra3) cards. There were a lot of marginal Ultra2
cards, and, frankly, few are findable now for testing.

Fix the target handle routine to only do 16 bit handles for parallel
SCSI cards. This is okay because the upper sixteen bits of the new
32 bit handles is a sequence number to help protect against duplicate
completions. This would be very unlikely to happen with parallel
SCSI target mode, and wasn't present before, so we're no worse off
than we used to be.

While we're at it, finally split the async mailbox completion handlers
into FC and parallel SCSI functions. This makes it much cleaner and
easier to figure out what is or isn't a legal async mailbox completion
code for different card classes.

PR:		kern/144250
Submitted partially by:	Charles D
MFC after:	1 week
2010-02-27 05:41:23 +00:00
Weongyo Jeong
5fb654dcd1 don't need to check BWN_RX_PHYST0_SHORTPRMBL flag because it's already
handled in later.

Reported from:	imp, nwhitehorn
2010-02-27 02:20:38 +00:00
Matt Jacob
32b3ec7df1 Fix misallocation error in target mode.
MFC after:	1 day
2010-02-27 01:58:41 +00:00
Pyun YongHyeon
5b8b73f675 Add TSO support on VLANs. While I'm here remove unnecessary check
of VLAN hardware checksum offloading. vlan(4) already takes care of
this.
2010-02-26 22:46:36 +00:00
Pyun YongHyeon
0fe060a8f5 Add TSO support on VLANs. While I'm here remove unnecessary check
of VLAN hardware checksum offloading. vlan(4) already takes care of
this.
2010-02-26 22:43:23 +00:00
Pyun YongHyeon
be95548d86 Disable TSO on BCM5755M controller until I understand better for
the issue. I still have no idea why TSO does not work on this
controller. davidch@ also confirmed there is no known TSO related
issues for this controller.
2010-02-26 22:29:42 +00:00
Pyun YongHyeon
6401cf0ccc Add TSO support on VLANs. bce(4) controllers require VLAN hardware
tagging to make TSO work on VLANs so explicitly disable TSO on VLAN
if VLAN hardware tagging is disabled.

Reviewed by:	davidch
2010-02-26 21:26:07 +00:00
Pyun YongHyeon
c3b399103c Move TSO setup to new function bce_tso_setup(). Also remove VLAN
parsing code in TSO path as the controller requires VLAN hardware
tagging to make TSO work over VLANs.
While parsing the mbuf in TSO patch, always perform check for
writable mbuf as bce(4) have to reset IP length and IP checksum
field of IP header and make sure to ensure contiguous buffer before
accessing IP/TCP headers. While I'm here replace magic number 40 to
more readable sizeof(struct ip) + sizeof(struct tcphdr).

Reviewed by:	davidch
2010-02-26 21:19:46 +00:00
Pyun YongHyeon
80a48895fc Prefer m_collapse(9) over m_defrag(9).
Reviewed by:	davidch
2010-02-26 20:41:28 +00:00
Pyun YongHyeon
b2ec4a73f5 Make toggling TSO, VLAN hardware checksum offloading work. Also fix
TX/RX checksum handler to set/clear relavant assist bits which was
used to cause unexpected results.
With this change, bce(4) can be bridged with other interfaces that
lack TSO, VLAN checksum offloading.

Reviewed by:	davidch
2010-02-26 20:39:07 +00:00
Pyun YongHyeon
03c28f4ef5 Make sure to stop controller first before changing MTU. And if
interface is not running don't initialize controller.
While here remove unnecessary update of error variable.

Reviewed by:	davidch
2010-02-26 20:26:17 +00:00
Pyun YongHyeon
e89abed364 Allow disabling VLAN hardware tag stripping with software work
around. Management firmware(ASF/IPMI/UMP) requires the VLAN
hardware tag stripping so don't actually disable VLAN hardware tag
stripping. If VLAN hardware tag stripping was disabled, bce(4)
manually reconstruct VLAN frame by appending stripped VLAN tag.
Also remove unnecessary IFCAP_VLAN_MTU message.

Reviewed by:	davidch
2010-02-26 20:17:17 +00:00
Pyun YongHyeon
8c1643b6db Remove trailing white spaces. 2010-02-26 19:38:12 +00:00
Pyun YongHyeon
c72f075a24 Allocate single MSI message. msk(4) used to allocate 2 MSI messages
for controllers like 88E8053 which reports two MSI messages.
Because we don't get anything useful things with 2 MSI messages,
allocating 1 MSI message would be more sane approach.
While I'm here, enable MSI for dual-port controllers too. Because
status block is shared for dual-port controllers, I don't think
msk(4) will encounter problem for using MSI on dual-port
controllers.
2010-02-26 19:37:03 +00:00
Pyun YongHyeon
7420e9dc9d Don't hardcod register offset to set PCIe max read request size.
The register offset is not valid on 88E8072 controller. Also don't
blindly increase max read request size to 4096, instead, use 2048
which seems to be more sane value and only change the value if the
hardware default size(512) was used on that register.
For PCIX controllers, use system defined constant rather than using
magic value.
While I'm here stop showing negotiated link width.
2010-02-26 19:18:29 +00:00