Commit Graph

20656 Commits

Author SHA1 Message Date
Andrew Gallatin
70020d8129 Update mxge firmware to latest available from Myricom. 2010-05-19 19:44:00 +00:00
Jack F Vogel
3f13ffab71 A few changes:
When not defining header split do not allocate mbufs,
  this can be a BIG savings in the mbuf memory pool.

  Also keep seperate dma maps for the header and
  payload pieces when doing header split. The basis
  of this code was a patch done a while ago by
  yongari, thank you :)

  A number of white space changes.

MFC: in a few days
2010-05-19 00:03:48 +00:00
Jung-uk Kim
a46dd0b9e2 Restore the previous VESA mode after BIOS POST, just in case. 2010-05-18 22:30:55 +00:00
Jung-uk Kim
842795abcc Remove unnecessary pointer increment. A wrong pointer may be passed to
free(9) and it can cause kernel panic when there are multiple graphics
controllers in the system.

Tested by:	Brandon Gooch (jamesbrandongooch at gmail dot com)
MFC after:	3 days
2010-05-18 18:28:17 +00:00
Nathan Whitehorn
4a26780b9a Pull OF_quiesce() out of the MI Open Firmware layer and entirely into
PPC ofw_machdep.c, in recognition of its state as a machine specific hack.

Requested by:	marius
2010-05-16 22:01:43 +00:00
Nathan Whitehorn
4dea0435b5 Relocate interrupt sense setting for K2 SATA from the ATA driver to the
OFW PCI layer and read the sense directly from the device tree instead
of guessing.

MFC after:	1 week
2010-05-16 17:55:09 +00:00
Nathan Whitehorn
79bf3fcd18 On PowerMac11,2 and (presumably) PowerMac12,1, we need to quiesce the
firmware in order to take over control of the SMU. Without doing this,
the firmware background process doing fan control will run amok as we
take over the system and crash the management chip.

This is limited to these two machines because our kernel is heavily
dependent on firmware accesses, and so quiescing firmware can cause
nasty problems.
2010-05-16 15:56:59 +00:00
Nathan Whitehorn
ca2c19312e Add support for the U4 PCI-Express bridge chipset used in late-generation
Powermac G5 systems. MSI and several other things are not presently
supported.

The U3/U4 internal device support portions of this change were contributed
by Andreas Tobler.

MFC after:	1 week
2010-05-16 15:18:25 +00:00
Matt Jacob
a6119ff634 Correct compilation error introduced in last commit.
X-MFC:		208119
MFC after:      1 week
Sponsored By:   Panasas
Pointy Hat to:	Me
Noticed by:	Rob
2010-05-16 06:40:05 +00:00
Weongyo Jeong
f5101b5382 - fixes a bug that it didn't initialize the ratectl after association;
so ni_txrate returned 0 which is a invalid result.
- The fourth argument of ieee80211_ratectl_tx_complete() could be not
  NULL.

Reported by:	Gustau P?rez <gperez at entel.upc.edu>
Tested by:	Gustau P?rez <gperez at entel.upc.edu>,
		Ian FREISLICH <ianf at clue.co.za>
MFC after:	3 days
2010-05-15 21:18:15 +00:00
Matt Jacob
427fa8f9fe Whap. Hook up some wires that were forgotten a few months ago and restore
the zombie device timeout code and the loop down time code and the fabric
hysteresis code.
MFC after:	1 week
Sponsored By:	Panasas
2010-05-15 20:26:10 +00:00
Marius Strobl
876ab8b5e4 Fix a mismerge in r206001.
PR:		146614
Approved by:	jfv (implicit)
MFC afer:	3 days
2010-05-15 19:46:16 +00:00
Jack F Vogel
46168c5453 Small changes preparing for MFC, need to conditionalize
the buf_ring_free call, and lem is missing the WOL change
put into em.
2010-05-14 22:18:34 +00:00
Jack F Vogel
245c81a9ea A few minor fixes:
- add a moderation value to the Link vector
   - allow disabling HW RSC on the 82599 if LRO
     is not enabled.
   - correct error in the stats code
   - change optic type on the 82598 DA device

Thanks to Andrew Boyer for the changes.
2010-05-14 22:00:37 +00:00
Pyun YongHyeon
f7a5f7371a If controller received bad frames make sure to update newly added
RFA. Also drop frames that have either CRC error or alignment
error. Normally bad frames are not received at all. But controllers
running in promiscuous mode will receive bad frames. 82557 will
also receive bad frames to receive VLAN oversized frames.

While I'm here mark RNR condition if driver happen to see RNR in
RFA status and restart RU to receive frames again. Because driver
checks all received frames in RX loop, RNR condition could be set
in the middle of RX processing. Just relying on RNR interrupt was
not enough.

This change fixes "Memory modified after free" issue when fxp(4)
is running as a member of if_bridge(4).

Tested by:	Larry Baird <lab <> gta dot com>
MFC after:	5 days
2010-05-14 17:39:28 +00:00
Pyun YongHyeon
01e3ef82d1 Dont' allow dma map load deferring. fxp(4) is not able to handle
EINPROGRESS.
2010-05-14 16:58:37 +00:00
Pyun YongHyeon
4812aef510 Controller updates RFA via DMA so driver needs synchronization.
Add missing BUS_DMASYNC_POSTWRITE and BUS_DMASYNC_PREREAD.
2010-05-14 16:55:13 +00:00
Andrew Thompson
85e7bb81e9 Sync run(4) driver from author's site.
Submitted by:	Akinori Furukoshi
Obtained from:	git://gitorious.org/run/run.git
2010-05-13 00:19:03 +00:00
Andrew Thompson
f6980be8db Reduce diffs to p4.
Add test code for delaying or failing usb control requests, disabled by
 default under ifdef USB_REQ_DEBUG.

Submitted by:	Hans Petter Selasky
2010-05-12 23:40:44 +00:00
Andrew Thompson
9429d9dbb4 Fix possibly wrong bit masking.
Reported by:	n_hibma
Submitted by:	Hans Petter Selasky
2010-05-12 23:00:36 +00:00
Andrew Thompson
bc77ef90aa Add new FTDI USB device ID.
PR:		kern/146483
Submitted by:	Andre Albsmeier
2010-05-12 22:58:59 +00:00
Andrew Thompson
6057aa350b Increase the max ports to 12, 3G devices exist where the ppp endpoint is #9.
Requested by:	n_hibma
2010-05-12 22:57:16 +00:00
Andrew Thompson
d1f7c4baa1 Back out r203140 which was causing problems when the first and the last
microframe slot was not in the smask. The problem was that the EHCI driver was
then thinking that the transfer was immediately complete in some cases. Which
could lead to freeze-like situations, which can be recovered by unplugging the
USB device.

Reported by:	Richard Kolkovich
Submitted by:	Hans Petter Selasky
2010-05-12 22:55:45 +00:00
Andrew Thompson
e727a16cf1 Add missing ifdefs for usb power saving support.
Submitted by:	Hans Petter Selasky
2010-05-12 22:51:45 +00:00
Andrew Thompson
5fdb3a67ac Support getting signed and unsigned HID data.
Submitted by:	Alex Deiter
Reviewed by:	Hans Petter Selaksy
2010-05-12 22:50:23 +00:00
Andrew Thompson
c68e91c3a4 Add the ASUS MyPal A730W device id.
Submitted by:	Dmitry Luhtionov
2010-05-12 22:45:44 +00:00
Andrew Thompson
79838e2387 Provide more information about the device location in the USB system.
Submitted by:	Hans Petter Sekasky
2010-05-12 22:44:57 +00:00
Andrew Thompson
300f96f1f0 Enable support for mouse panning wheels.
Submitted by:	Henry Hu
2010-05-12 22:43:33 +00:00
Andrew Thompson
2df1e9a62a If a USB device is suspended and a USB set config request is issued when the
USB enumeration lock is locked, then the USB stack fails to resume the device
because locking the USB enumeration lock is part of the resume procedure. To
solve this issue a new lock is introduced which only protects the suspend and
resume callbacks, which can be dropped inside the usbd_do_request_flags()
function, to allow suspend and resume during so-called enumeration operations.

Submitted by:	Hans Petter Selasky
2010-05-12 22:42:35 +00:00
Andrew Thompson
8019e7e723 Staticise usb_ref_device and usb_unref_device.
Submitted by:	Hans Petter Selasky
2010-05-12 22:28:40 +00:00
Andrew Thompson
9f2d3fc5f3 Add quirks for the Alcor SDCR_6362 Card Reader, Freecom HDD storage device and
Samsung YP_U4 music player.

PR:		usb/145265, usb/146104
Submitted by:	Dmitry Luhtionov, Urankar Mikael, Peter Toth
2010-05-12 22:26:23 +00:00
Bernhard Schmidt
227901e1a2 Enable 5.5 and 11Mbit TX rates.
Reviewed by:	sam
Approved by:	rpaulo (mentor)
MFC after:	3 days
2010-05-11 17:14:17 +00:00
Marius Strobl
d9898229f5 Include <machine/ofw_machdep.h> for OF_getscsinitid(). 2010-05-10 20:02:39 +00:00
Pyun YongHyeon
8775710a1d SiS190 supports RX 10 bytes padding, CRC stripping as well as VLAN
hardware tag insertion/stripping. Remove conditional code that
disables these hardware features on SiS190. Also nuke RX fixup code
which is no more required on strict-alignment architectures because
SiS190 supports RX 10 bytes padding.
Now all hardware features except jumbo frame and WOL are supported.
Thanks to Masa Murayama who confirmed SiS190 also has the same
hardware features of SiS191.
I guess the only difference between SiS191 and SiS190 would be
jumbo frame support. It will be implemented in near future.
2010-05-10 17:35:17 +00:00
Pyun YongHyeon
65329b3111 Implement TSO and TSO over VLAN. Increase number of allowed
fragmentation of mbuf chain to 32 from 16 because TSO can send 64KB
sized packet which in turn requires long list of mbuf chain. Due to
lack of documentation, I'm not sure whether driver have to pull up
ethernet/IP/TCP header with options to make controller work but
driver have to parse TCP header to update pseudo TCP checksum
anyway. The controller expects pseudo TCP checksum computed by
upper stack and the checksum should follow the MS NDIS
specification to make TSO work.

Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-05-10 17:14:14 +00:00
Pyun YongHyeon
8da9c50775 Export hardware MAC statistics through sysctl node. Previously
fxp(4) already used to extract most hardware MAC statistics but it
didn't show them. With this change, all MAC statistics counters
are exported. Because there are a couple of new counters for 82558
and 82559, enable extended MAC statistics functionality to get
these counters. Accoring to public data sheet, 82559 MAC statistics
return 24 DWORD counters(3 counters are unknown at this moment) so
increase MAC counter structure to meet the MAC statistics block size.
The completion of MAC counter dump is now checked against
FXP_STATS_DR_COMPLETE status code which is appended at the end of
status block. Previously fxp(4) ignored the status of the
FXP_SCB_COMMAND_CU_DUMPRESET command. fxp(4) does not wait for the
completion of pending command before issuing
FXP_SCB_COMMAND_CU_DUMPRESET. Instead it skips the command and try
it next time. This scheme may show better performance but there is
chance to loose updated counters after stopping controller. So make
sure to update MAC statistics in fxp_stop().
While I'm here move sysctl node creation to fxp_sysctl_node().

Tested by:	Larry Baird < lab <> gta dot com >
2010-05-09 22:16:15 +00:00
Ed Maste
6dd8e071f0 Add dummy function for ic_update_mcast (a la if_urtw) to avoid console
spam.
2010-05-08 11:56:00 +00:00
Pyun YongHyeon
485d41c0a7 Don't change PCIe maximum read request size to 2048 on RTL810x
controllers. It caused device timeouts.

Reported by:	McLone < mclone <> gmail dot com >
Tested by:	McLone < mclone <> gmail dot com >
MFC after:	5 days
2010-05-07 23:05:27 +00:00
Fabien Thomas
b92990ef88 Add a fastpath to allocate from packet zone when using m_getjcl.
This will add support for packet zone for at least igb and ixgbe
and will avoid to check for that in bce and mxge.

MFC after: 1 week
2010-05-07 22:09:17 +00:00
Pyun YongHyeon
7251782989 8255x configure command requires number of bytes of configuration
table. The default size of the configuration table was 22 bytes. To
use extended feature of 82550/82551 the configuration table size
was expanded to 32 bytes. The added configuration for 82550/82551
specifies VLAN hardware tagging and IPSec configuration as well as
TCO.
To make configuration easier fxp(4) used a configuration template
and the template was copied to configuration table. After that,
some parameters of the configuration table was changed depending on
controller type and operation mode. However the size of template
was 22 bytes so some configuration parameters were not properly
initialized on 82550/82551.
Fix this by increasing the template size. For 82557, 82558 and
82559 the size of the configuration is still 22 bytes.
2010-05-07 18:03:35 +00:00
Pyun YongHyeon
a026a25b1d It seems controller has two types of promiscuous control, one for
unicast and the other for multicast. To receive multicast frames
that host didn't join in promiscuous mode, driver have to set
promiscuous mode for multicast frames as well.
The Open Source Software Developer Manual for i8255x was not clear
how to handle promiscuous mode.

PR:		kern/145905
MFC after:	5 days
2010-05-07 16:43:00 +00:00
Bernhard Schmidt
2e3a546047 Add a workaround for a bug in the firmware regarding the transition
from passive to active scans. Basicly disable it by increasing the
amount packets to be received to an amount which can't be reached
during dwell times.

Approved by:	rpaulo (mentor)
MFC after:	3 days
2010-05-06 17:53:04 +00:00
Alexander Motin
14496931b0 Fix polled operation. Now it is possible to dump kernel via mvs(4). 2010-05-06 06:44:26 +00:00
Navdeep Parhar
1d4942f42f Don't ring the tx doorbell for every frame when we know more frames
will follow.  Adjust the freelist and response queue doorbells too.

Discussed with:	kmacy
2010-05-05 22:52:06 +00:00
Navdeep Parhar
b85998cb48 Do not hold the T3 firmware in memory all the time. firmware(9) can
load/unload it as needed.
2010-05-05 22:29:54 +00:00
Joel Dahl
8e0ad55abb Switch to our preferred 2-clause BSD license.
Approved by:	kmacy
2010-05-05 20:39:02 +00:00
Alan Cox
28a50a192f Push down the acquisition of the page queues lock into vm_page_unwire(). 2010-05-05 07:40:54 +00:00
Alan Cox
e3ef0d2fcf Push down the acquisition of the page queues lock into vm_page_unwire().
Update the comment describing which lock should be held on entry to
vm_page_wire().

Reviewed by:	kib
2010-05-05 03:45:46 +00:00
Navdeep Parhar
d6da836201 Add support for hardware filters to cxgb(4). The T3 chip can inspect
L2/3/4 headers and can drop or steer packets as instructed.  Filtering
based on src ip, dst ip, src port, dst port, 802.1q, udp/tcp, and mac
addr is possible.  Add support in cxgbtool to program these filters.
Some simple examples:

Drop all tcp/80 traffic coming from the subnet specified.
# cxgbtool cxgb2 filter 0 sip 192.168.1.0/24 dport 80 type tcp action drop

Steer all incoming UDP traffic to qset 0.
# cxgbtool cxgb2 filter 1 type udp queue 0 action pass

Steer all tcp traffic from 192.168.1.1 to qset 1.
# cxgbtool cxgb2 filter 2 sip 192.168.1.1 type tcp queue 1 action pass

Drop fragments.
# cxgbtool cxgb2 filter 3 type frag action drop

List all filters.
# cxgbtool cxgb2 filter list
index         SIP                DIP     sport dport VLAN PRI P/MAC type Q
    0     192.168.1.0/24         0.0.0.0     *    80    0 0/1 */*    tcp -
    1         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*    udp 0
    2     192.168.1.1/32         0.0.0.0     *     *    0 0/1 */*    tcp 1
    3         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*   frag -
16367         0.0.0.0/0          0.0.0.0     *     *    0 0/1 */*      * *

MFC after:	2 weeks
2010-05-05 00:41:40 +00:00
Navdeep Parhar
2caefebb07 Add IFCAP_LINKSTATE to cxgb's capabilities.
MFC after:	3 days
2010-05-04 23:55:08 +00:00