Commit Graph

16050 Commits

Author SHA1 Message Date
Maxim Konovalov
b274ce9ef2 o Extend the list of supported CDMA-2000 terminals.
Submitted by:	R.Mahmatkhanov
MFC after:	10 days
2007-04-13 18:15:07 +00:00
Kip Macy
aa84193acf restore sense to get_imm_packet
MFC after: 3 days
2007-04-12 04:48:54 +00:00
Kip Macy
98d6fba71d switch over to per-txq dma tag to facilitate parallelism on TX
MFC after: 3 days
2007-04-12 04:31:44 +00:00
Kip Macy
dd782506d8 explicitly check TSO flag
don't clear and then set M_PKTHDR, m_gethdr sets it correctly
improve error handling on m_gethdr failure

MFC after: 3 days
2007-04-12 03:33:30 +00:00
Kip Macy
23ed7b513f Add ETHER_HDR_LEN to hardware accepted mtu
MFC after: 3 days
2007-04-12 03:07:24 +00:00
John Baldwin
e403490aa6 Fix m_freem_vec() to actually traverse the mbuf chain. This avoids
double free's and an infinite loop.

CID:		1834
Found by:	Coverity Prevent (tm)
2007-04-11 13:47:24 +00:00
Pyun YongHyeon
b5898b804f Add work around for hardware Tx checksum offload bug in Yukon II.
Yukon II generated corrupted TCP checksum for short TCP packets
that's less than 60 bytes in size(e.g. window probe packet, pure ACK
packet etc). Padding the frame with zeros to make the frame minimum
ethernet frame size didn't work at all. Instead of dropping Tx
checksum offload support we calculate TCP checksum with S/W method
when we encounter short TCP frames.
Fortunately it seems that short UDP datagrams appear to be handled
correctly by Yukon II.

While I'm here simplify ethernet/VLAN header size calculation logic.

PR:	111384
2007-04-11 00:47:29 +00:00
Marius Strobl
5abeece6ab Let brgphy(4) attach for the Broadcom BCM5755 ASIC based chipsets
as well.

Obtained from:	OpenBSD
MFC after:	1 week
2007-04-10 20:43:23 +00:00
Robert Watson
cc807dbd0a Remove unnecessary suser() check in the sysctl to set up ath_hal
logging: the sysctl framework will already have checked for privilege
if a sysctl value is being set.

Discussed a long time ago with:	sam
2007-04-10 15:48:45 +00:00
Kip Macy
a53b1c1753 throw sun4v into the check while we're at it 2007-04-09 17:05:54 +00:00
Kip Macy
3a0a4ac13d busdma tags are opaque on all architectures except sparc64
for now simply don't compile/use on sparc64
2007-04-09 17:01:23 +00:00
Kip Macy
dc5a36e241 Add missing paren 2007-04-08 22:56:18 +00:00
Søren Schmidt
ae4ce3ceef OK, this is not my day, fix the former fix :/ 2007-04-08 21:53:52 +00:00
Søren Schmidt
f27a14650f Hopefully unbreak the 64bit DMA support this time. 2007-04-08 19:18:51 +00:00
Kip Macy
cae1990513 remove stale variable reference 2007-04-08 18:02:37 +00:00
Kip Macy
db2faf119f add busdma function for mapping mbuf iovecs
change m_collapse to return an error code
2007-04-08 15:59:07 +00:00
Søren Schmidt
cd945eed47 Dont zero out 64BIT flag on DMA ops. 2007-04-08 15:31:39 +00:00
Kip Macy
c0a24dd4aa Convert driver RX path over to using mbuf iovec 2007-04-08 15:04:19 +00:00
Kip Macy
a8d9a363f5 Add driver private mbuf iovec support routines 2007-04-08 14:56:16 +00:00
Ariff Abdullah
319276aac0 Disable cmi_midiattach(). The implementation is incomplete, and causing
various interesting memory leak issues.
2007-04-08 07:52:27 +00:00
Matt Jacob
7b88fb86e3 Hide bus reset announcements within bootverbose.
MFC after:	3 days
2007-04-07 18:15:52 +00:00
Søren Schmidt
fe2fb53542 Add 64bit addressing support to SiI 3132/3124 2007-04-06 17:36:35 +00:00
Søren Schmidt
2cfcfef1fc Remove debug gunk. 2007-04-06 16:21:34 +00:00
Søren Schmidt
16194fc40b Add support for 64bit addressing to AHCI and Marvell controllers.
Munged into ATA shape and Marvell specifics my yours truely.

Submitted by: jhb
2007-04-06 16:18:59 +00:00
Pawel Jakub Dawidek
93caf77f95 Use strcasecmp() from libkern. 2007-04-06 11:21:01 +00:00
Pyun YongHyeon
ad6d01d151 If we've encountered unrecognized chipset don't access hardware
anymore. Previously it tried to access interrupt register to disable
interrupts which could result in hang if the hardware was not
properly initialized by system BIOS/ACPI.

Tested by:	Benjamin Hansmann (benjamin.hansmann AT rub dot de)
MFC after:	3 days
2007-04-06 02:02:07 +00:00
Marcel Moolenaar
9760f68ca0 Add PCI IDs for the HP RMP3 serial port. This is often used as
the serial console.

MFC after: 1 week
2007-04-05 19:15:46 +00:00
Robert Watson
5e3f7694b1 Replace custom file descriptor array sleep lock constructed using a mutex
and flags with an sxlock.  This leads to a significant and measurable
performance improvement as a result of access to shared locking for
frequent lookup operations, reduced general overhead, and reduced overhead
in the event of contention.  All of these are imported for threaded
applications where simultaneous access to a shared file descriptor array
occurs frequently.  Kris has reported 2x-4x transaction rate improvements
on 8-core MySQL benchmarks; smaller improvements can be expected for many
workloads as a result of reduced overhead.

- Generally eliminate the distinction between "fast" and regular
  acquisisition of the filedesc lock; the plan is that they will now all
  be fast.  Change all locking instances to either shared or exclusive
  locks.

- Correct a bug (pointed out by kib) in fdfree() where previously msleep()
  was called without the mutex held; sx_sleep() is now always called with
  the sxlock held exclusively.

- Universally hold the struct file lock over changes to struct file,
  rather than the filedesc lock or no lock.  Always update the f_ops
  field last. A further memory barrier is required here in the future
  (discussed with jhb).

- Improve locking and reference management in linux_at(), which fails to
  properly acquire vnode references before using vnode pointers.  Annotate
  improper use of vn_fullpath(), which will be replaced at a future date.

In fcntl(), we conservatively acquire an exclusive lock, even though in
some cases a shared lock may be sufficient, which should be revisited.
The dropping of the filedesc lock in fdgrowtable() is no longer required
as the sxlock can be held over the sleep operation; we should consider
removing that (pointed out by attilio).

Tested by:	kris
Discussed with:	jhb, kris, attilio, jeff
2007-04-04 09:11:34 +00:00
Kip Macy
fa0521c0e9 Make DMA tags per-queue to facilate parallel mappings
Defer mbuf allocation and initialization until after data has already been
received in a cluster

This reduces cpu utilization somewhat, but it only improves the rx path.
Recent changes to TCP appear to make us rate limited by the TX path.

This is the first step in reducing mbuf management overhead for manipulating
clusters.

MFC after: 3 days
2007-04-04 05:29:18 +00:00
Andrew Gallatin
e39a0a37cf - Fix a bug in the TSO transmit routine where frames which had
been defragged and had their headers in the same cluster as their
payload would be fed to the NIC in header-sized chunks, and would
likely exceed the number of available transmit descriptors.

- If a TSO frame exceeds the number of available transmit descriptors,
don't leak busdmma resources when freeing it.

Sponsored by: Myricom Inc.
2007-04-03 10:41:33 +00:00
Kevin Lo
6d361569d5 Since the driver uses mutexes, remove splusb() and splx(). 2007-04-03 05:59:17 +00:00
Marcel Moolenaar
35777a2a79 Don't use a time-limiting loop that's defined in terms of the baudrate
in the putc() method.  Likewise, in the getc() method, don't check for
received characters with an interval defined in terms of the baudrate.
In both cases it works equally well to implement a fixed delay.  More
importantly, it avoids calculating a delay that's roughly 1/10th the
time it takes to send/receive a character. The calculation is costly
and happens for every character sent or received, affecting low-level
console or debug port performance significantly. Secondly, when the
RCLK is not available or unreliable, the delays could disrupt normal
operation.

The fixed delay is 1/10th the time it takes to send a character at
230400 bps.
2007-04-03 01:21:10 +00:00
Marcel Moolenaar
f8100ce2a7 Don't expose the uart_ops structure directly, but instead have
it obtained through the uart_class structure. This allows us
to declare the uart_class structure as weak and as such allows
us to reference it even when it's not compiled-in.
It also allows is to get the uart_ops structure by name, which
makes it possible to implement the dt tag handling in uart_getenv().
The side-effect of all this is that we're using the uart_class
structure more consistently which means that we now also have
access to the size of the bus space block needed by the hardware
when we map the bus space, eliminating any hardcoding.
2007-04-02 22:00:22 +00:00
Jung-uk Kim
0a55a034ba Enable MSI support on RELENG_6.
MFC after:	3 days
2007-04-02 19:09:06 +00:00
Ariff Abdullah
f505e02090 Revert busy refcount back to int. As a side note, multiple open
is still (and always) possible and does not change previous behaviour.

Requested by:	netchild
2007-04-02 10:24:15 +00:00
Ariff Abdullah
ff7499570c Disable seq_modevent(). The implementation is incomplete, and causing
memory leak during unload.
2007-04-02 06:03:47 +00:00
Pyun YongHyeon
75a1d5a086 Use our own timer for watchdog instead of if_watchdog/if_timer
interface.
2007-04-02 04:43:41 +00:00
Ariff Abdullah
3627e77dfa No need to track every closing instance, and put busy counter to rest
in its single bit coffin.
2007-04-02 03:46:25 +00:00
Scott Long
15735bec61 Freeze the simq, not the devq, if we run out of command slots. This fixes
the last round of reported instability in the rev 13/14 driver.

Approved by: Erich Chen
2007-04-02 03:31:37 +00:00
Ariff Abdullah
a9be51acfe Provide hint / tunable for possible asynchronous USB execution. Async
execution should help us avoiding potential deadlock and illegal locking
while sleeping in various mixer -> usb calls. To enable it, use
hint.uaudio.%d.async="1" or sysctl dev.uaudio.%d.async=1. Default is
disable, to remain compatible with old behaviour (with slight risk of
potential deadlock).
2007-04-02 03:25:39 +00:00
Ariff Abdullah
72e9d07fbf - Don't wakeup() unnecessarily, so the behavior of dead interrupt or
stalled DMA engine can be observed and predicted.
- Minor sysctl/tunable cleanup.
2007-04-02 03:03:06 +00:00
Matt Jacob
9a1b0d43c2 Temporarily desupport simultaneous target and initiator mode.
When the linux port changes were imported which split the
target command list to be separate from the initiator command
list and the handle format changed to encode a type in the handle
the implications to the function isp_handle_index (which only
the NetBSD/OpenBSD/FreeBSD ports use) were overlooked.

The fault is twofold: first, the index into the DMA maps
in  isp_pci is wrong because a target command handle with
the type bit left in place caused a bad index (and panic)
into dma map. Secondly, the assumption of the array
of DMA maps in either PCS or SBUS attachment structures is
that there is a linear mapping between handle index and
DMA map index. This can no longer be true if there are
overlapping index spaces for initiator mode and target
mode commands.

These changes bandaid around the problem by forcing us
to not have simultaneous dual roles and doing the appropriate
masking to make sure things are indexed correctly. A longer
term fix is being devloped.
2007-04-02 01:04:20 +00:00
Alexander Leidinger
02da6fa190 Handle errors from bus_setup_intr().
Found by:	Coverity Prevent (tm)
CID:		1066
2007-04-01 16:55:31 +00:00
Alexander Leidinger
c9be0e5d4d Tell a statistic checker that not checking the return value of the probing
of the mii phy is intended for this chip.

Found by:	Coverity Prevent (tm)
CID:		43
2007-04-01 14:15:26 +00:00
Alexander Leidinger
2acfcc2d4c Make it obvious that we don't care about the return value of
usbd_endpoint_count(), the failure case is handled implicit in the
following code.

Found by:	Coverity Prevent (tm)
CID:		56
2007-04-01 13:46:39 +00:00
John Baldwin
4e7f640dfb Optimize sx locks to use simple atomic operations for the common cases of
obtaining and releasing shared and exclusive locks.  The algorithms for
manipulating the lock cookie are very similar to that rwlocks.  This patch
also adds support for exclusive locks using the same algorithm as mutexes.

A new sx_init_flags() function has been added so that optional flags can be
specified to alter a given locks behavior.  The flags include SX_DUPOK,
SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature
to the similar flags for mutexes.

Adaptive spinning on select locks may be enabled by enabling the
ADAPTIVE_SX kernel option.  Only locks initialized with the SX_ADAPTIVESPIN
flag via sx_init_flags() will adaptively spin.

The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock()
are now performed inline in non-debug kernels.  As a result, <sys/sx.h> now
requires <sys/lock.h> to be included prior to <sys/sx.h>.

The new kernel option SX_NOINLINE can be used to disable the aforementioned
inlining in non-debug kernels.

The size of struct sx has changed, so the kernel ABI is probably greatly
disturbed.

MFC after:	1 month
Submitted by:	attilio
Tested by:	kris, pjd
2007-03-31 23:23:42 +00:00
John Baldwin
4dc5078f81 Add constants for the fields in a BAR. Also, add two new macros
PCI_BAR_(IO|MEM)() that return true if the passed in value from a BAR
is for an IO or memory BAR, respectively.

Reviewed by:	imp
2007-03-31 21:39:02 +00:00
Matt Jacob
9f9e9ae3a7 Fix compilation problem (add a const) for pre-7.0 compiles. 2007-03-31 21:01:35 +00:00
John Baldwin
657d9f9f55 - Add missing constants for subclasses.
- Add a few progif constants as well.
2007-03-31 20:41:00 +00:00
Alexander Leidinger
c2bb6a54ef Tell interested readers of the source that the return value is not
checked by intend.

Found by:	Coverity Prevent (tm)
CID:		55
Reviewed by:	ariff
2007-03-31 13:38:12 +00:00