Commit Graph

20832 Commits

Author SHA1 Message Date
Rui Paulo
bf59e055db Due to the way HALDEBUG() is defined, we need to add curly brackets
when using it as a sole if clause instruction.
While there, fix 'const static' typo.

Submitted by:	Arnaud Lacombe <alc@FreeBSD.org>
MFC after:	1 week
2010-05-29 16:14:02 +00:00
Rui Paulo
3a4a144128 Due to the way HALDEBUG() is defined, we need to add curly brackets when
using it as a sole if clause instruction.

Submitted by:	Arnaud Lacombe <alc@FreeBSD.org>
MFC after:	1 week
2010-05-29 16:11:51 +00:00
Rui Paulo
efe604e56b Don't shadow the global variable 'version'.
Submitted by:	Arnaud Lacombe <alc@NetBSD.org>
MFC after:	1 week
2010-05-29 16:10:07 +00:00
Rafal Jaworowski
6365985dfc Initial implementation of the OFW i/f methods for FDT back-end.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-05-28 10:51:44 +00:00
Rafal Jaworowski
8297758a22 Prepare and extend OFW layer for FDT support.
o Let OFW_INIT() and OF_init() return status value.

o Provide helper routines for 'compatible' property handling.

o Only compile OF and OFW code, which is relevant in FDT scenario.

o Other minor cosmetics

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-05-28 10:43:56 +00:00
Matt Jacob
0e85f214e3 Add a new primitive, XPT_SCAN_TGT, to cover the range between scanning a
whole bus (XPT_SCAN_BUS) and a single lun on that bus (XPT_SCAN_LUN).

It's less resource comsumptive than scanning a whole bus when the
caller knows only one target has changes.

Reviewed by:	scsi@
Sponsored by:	Panasas
MFC after:	1 month
2010-05-26 22:49:42 +00:00
Gleb Smirnoff
f25a8a0150 Add uep(4), driver for USB onscreen touch panel from eGalax.
The driver is stub. It just creates device entry and feeds
reassembled packets from hardware into it.

If in future we would port wsmouse(4) from NetBSD, or make
sysmouse(4) to support absolute motion events, then the driver
can be extended to act as system mouse. Meanwhile, it just
presents a /dev/uep0, that can be utilized by X driver, that
I am going to commit to ports tree soon.

The name for the driver is chosen to be the same as in NetBSD,
however, due to different USB stacks this driver isn't a port.
2010-05-25 21:20:56 +00:00
Matt Jacob
1c0a1eb299 Don't leak CCBs for every ABORT.
Submitted by:	Ken Merry
MFC after:	One week
2010-05-25 20:19:45 +00:00
Matt Jacob
331c6a355a Remove extra break left by hand editing.
X-MFC: 208542
MFC after:	One Month
2010-05-25 16:50:35 +00:00
Matt Jacob
dad286235e Treat PRLI the same as PLOGI and make a database entry for it (target mode).
Obtained from:	Ken Merry
MFC after:	One Month
2010-05-25 16:46:29 +00:00
Pyun YongHyeon
2eae4d808a sge_encap() can sometimes return an error with m_head set to NULL.
Make sure not to requeue freed mbuf in sge_start_locked(). This
should fix NULL pointer dereference panic.

Reported by:	Nikolay Denev <ndenev <> gmail dot com>
Submitted by:	jhb
2010-05-24 17:12:44 +00:00
Alexander Motin
b5bc46d8d5 Report relative card address to NewBus as location string. 2010-05-23 09:44:48 +00:00
Alexander Motin
b169c85e20 Oops, HPET ID optionally stored in _UID, not in _ADR. 2010-05-23 08:31:15 +00:00
Alexander Motin
3c4c08dce7 Make table-based HPET identification more clever. Before creating fake
device, make sure we have no real HPET device entry with same ID.
As side effect, it potentially allows several HPETs to be attached.
Use first of them for timecounting, rest (if ever present) could later
be used as event sources.
2010-05-23 07:53:22 +00:00
Alexander Motin
cc6b610bea Fill rman range start/end values. It makes devinfo output more readable. 2010-05-22 08:30:47 +00:00
Jung-uk Kim
dd962f5b8a Suspend screen updates when the video controller is powered down. 2010-05-22 07:35:17 +00:00
Alexander Motin
445cc79ca9 Report ATA/SATA channel number to NewBus at location string. 2010-05-22 07:32:47 +00:00
Alexander Motin
75f5385157 Honor hw.pci.do_power_nodriver on resume. Power-down devices without
driver attached.
2010-05-22 03:19:30 +00:00
Alexander Motin
243e0fb9a0 Improve suspend/resume support. Make sure controller is idle on suspend
and reset it on resume.
2010-05-21 17:26:16 +00:00
Andrew Gallatin
2108913743 Add interrupt descriptions for mxge's msi-x vectors 2010-05-21 15:57:24 +00:00
Alexander Motin
6533cd198d Improve suspend/resume support. Make sure controller is idle on suspend
and reset it on resume.
2010-05-21 13:29:28 +00:00
John Baldwin
c29ae5520a Restore part of 200671 which was lost in previous driver changes:
- Add interrupt descriptions when using mulitple MSI-X interrupts.
2010-05-20 20:01:54 +00:00
Navdeep Parhar
cb958aba98 Remove invalid assertion.
Holding the adapter lock while changing the LRO settings is sufficient.

PR:		kern/146759
MFC after:	3 days
2010-05-20 18:22:45 +00:00
John Baldwin
f09d9fba89 Add support for the Perle Speed4 LE.
Submitted by:	Douglas K. Rand  rand of meridian-enviro com
MFC after:	3 days
2010-05-20 13:16:42 +00:00
Marius Strobl
4461491b3e Change ad_firmware_geom_adjust() to operate on a struct disk * only and
hook it up to ada(4) also. While at it, rename *ad_firmware_geom_adjust()
to *ata_disk_firmware_geom_adjust() etc now that these are no longer
limited to ad(4).

Reviewed by:	mav
MFC after:	3 days
2010-05-20 12:46:19 +00:00
Andrew Gallatin
56b6785885 Correctly identify some twinax cables, which report
a media type of 1.
2010-05-19 20:00:15 +00:00
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
Pyun YongHyeon
3edfecaa37 When VLAN hardware tagging is disabled, make sure to disable VLAN
checksum offloading as well as TSO over VLAN.

Reported by:	jhb
2010-05-04 22:24:19 +00:00
Pyun YongHyeon
f648f6bb0c Free entire mbuf chain instead of the first mbuf. 2010-05-04 21:23:59 +00:00
Pyun YongHyeon
55c978ba9d Enable multi-descriptor transmisstion for fragmented mbufs. There
is no more need to defragment mbufs. After transmitting the
multi-fragmented frame, the controller updates only the first
descriptor of multi-descriptor transmission so it's driver's
responsibility to clear OWN bits of remaining descriptor of
multi-descriptor transmission. It seems the controller behaves much
like jme(4) controllers in descriptor handling.

Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-05-04 19:04:51 +00:00
Pyun YongHyeon
7135e11ef9 Remove clearing RxHashTable2 register. The register is reprogrammed
in sge_rxfilter().
2010-05-04 17:34:00 +00:00
Pyun YongHyeon
31fefd0d5d Make sure to check whether driver is running before processing
received frames. Also check driver has valid ifp pointer before
calling msk_stop() in device_shutdown handler. While I'm here
remove unnecessary accesses to interrupt mask registers in
device_shutdown handler because driver puts the controller into
reset state.
With these changes, msk(4) now survive from heavy RX traffic(1byte
UDP frame) while reboot is in progress.

Reported by:	Mark Atkinson < atkin901 <> gmail dot com >
2010-05-04 17:12:36 +00:00
Pyun YongHyeon
3d763c3133 Drop driver lock before exiting from interrupt handler.
Submitted by:	jhb
MFC after:	3 days
2010-05-04 17:02:34 +00:00
Jung-uk Kim
c909aebcbb - Remove more dead code[1]. Since r207330, we only need to check division
by zero of the second argument 'from'.
- Prefer u_int32_t over unsigned int to make its intention more clearer.
- Move the function to a header file and make it a static inline function.

Pointed out by:	Andrew Reilly (areilly at bigpond dot net dot au)[1]
MFC after:	3 days
2010-05-04 16:56:59 +00:00
Alan Cox
a7283d3213 Add page locking to the vm_page_cow* functions.
Push down the acquisition and release of the page queues lock into
vm_page_wire().

Reviewed by:	kib
2010-05-04 15:55:41 +00:00
Marius Strobl
917825acb9 - Don't set CAS_PCS_DATAPATH to anything except CAS_PCS_DATAPATH_SERDES
on Cassini using the external PCS SERDES otherwise unaligned access
  traps and other strange effects happen with some machines. Don't touch
  the MIF which is unused in that case either. These changes require the
  PHY type to use to be determined via the OFW device tree or from the
  VPD in machines without the former.
- Disable the SERDES pins of Saturn when not used in order to save power
  and ensure they are enabled otherwise.
- In cas_attach() use the correct register offset for CAS_PCS_CONF_EN.
- Add some bus space barriers missing in the PCS code path.

These changes make the Sun GigaSwift Ethernet 1.0 MMF cards as well as
the on-board interfaces found in Sun Fire B100s Blade Server work.

PR:	144867
2010-05-03 20:57:16 +00:00
Konstantin Belousov
fc0c3802f0 Lock the page around vm_page_activate() and vm_page_deactivate() calls
where it was missed. The wrapped fragments now protect wire_count with
page lock.

Reviewed by:	alc
2010-05-03 20:31:13 +00:00
Marius Strobl
17bc427d0b On sparc64 obtain the initiator ID from the Open Firmware device tree
in order to match what the PROM built-in driver uses.

Approved by:	mjacob
2010-05-03 18:39:40 +00:00
Alan Cox
5fdd0a335f Acquire the page lock around vm_page_unwire(). For consistency, extend the
scope of the object lock in agp_i810.c.  (In this specific case, the scope
of the object lock shouldn't matter, but I don't want to create a bad
example that might be copied to a case where it did matter.)

Reviewed by:	kib
2010-05-03 16:55:50 +00:00
Alan Cox
492d01762f Neither the page lock nor the page queues lock is required to unwire and
free a VM_ALLOC_NOOBJ page.  (Such pages are unmanaged.)
2010-05-03 15:51:59 +00:00
Maxim Sobolev
e50d35e6c6 Add new tunable 'net.link.ifqmaxlen' to set default send interface
queue length. The default value for this parameter is 50, which is
quite low for many of today's uses and the only way to modify this
parameter right now is to edit if_var.h file. Also add read-only
sysctl with the same name, so that it's possible to retrieve the
current value.

MFC after:	1 month
2010-05-03 07:32:50 +00:00
Pyun YongHyeon
464aa6d5fb Fix wrong dma tag usage. Previously it used TX descriptor ring dma
tag which should be TX mbuf dma tag.

Reported by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-05-03 00:56:26 +00:00
Matt Jacob
5eb6cd0263 Print IR_RESYNC updates informatively.
Obtained from:	pluknet
MFC after:	1 week
2010-05-02 22:48:27 +00:00
Alexander Motin
dd48af360f Import mvs(4) - Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA controllers
driver for CAM ATA subsystem. This driver supports same hardware as
atamarvell, ataadaptec and atamvsata drivers from ata(4), but provides
many additional features, such as NCQ, PMP, etc.
2010-05-02 19:28:30 +00:00
Marius Strobl
f6ffc3c26b Remove redundant checking of sc_leaving (uart_intr() already handles this).
Approved by:	marcel
2010-05-02 19:07:19 +00:00
Marius Strobl
a9ef85b792 Remove a soft member which was never used.
Approved by:	marcel
2010-05-02 19:05:57 +00:00
Alexander Motin
205367f9bc Enable PCI busmastering explicitly to be sure. 2010-05-02 14:46:05 +00:00
Alexander Motin
da6808c111 Make SATA XPT negotiate and enable some additional SATA features, such as:
- device initiated power management (some devices support only this way);
 - Automatic Partial to Slumber Transition (more power saving);
 - DMA auto-activation (expected to slightly improve performance).
More features could be added later, when hardware supports.
2010-05-02 12:07:47 +00:00
Ryan Stone
04001891bb When configuring a system-wide couting PMC, hwpmc was incorrectly logging process mappings for that PMC. Nothing ever reads pmc logs out of a counting PMC, so the log buffers were leaked when the PMC was deconfigured. The process mappings are only useful for sampling PMCs anyway, so only log the mappings if the PMC is a sampling PMC.
This bug would cause allocating sample-mode PMCs to fail with ENOMEM after allocating several counting-mode PMCs.

Approved by:	jkoshy (mentor)
MFC after:	2 weeks
2010-05-01 22:04:58 +00:00
Warner Losh
bc391cb2ce The Atheros AR71xx CPUs, when paired with the AR5212 parts, has a bug
that generates a fatal bus trap.  Normally, the chips are setup to do
128 byte DMA bursts, but when on this CPU, they can only safely due
4-byte DMA bursts due to this bug.  Details of the exact nature of the
bug are sketchy, but some can be found at
https://forum.openwrt.org/viewtopic.php?pid=70060 on pages 4, 5 and 6.
There's a small performance penalty associated with this workaround,
so it is only enabled when needed on the Atheros AR71xx platforms.

Unfortunately, this condition is impossible to detect at runtime
without MIPS specific ifdefs.  Rather than cast an overly-broad net
like Linux/OpenWRT dues (which enables this workaround all the time on
MIPS32 platforms), we put this option in the kernel for just the
affected machines.  Sam didn't like this aspect of the patch when he
reviewed it, and I'd love to hear sane proposals on how to fix it :)

Reviewed by:	sam@
2010-05-01 16:36:14 +00:00
Pyun YongHyeon
b9ddb8695d Add Marvell PHYG65G Gigabit PHY which is found on 88E8059 Yukon Optima.
Tested by:	James LaLagna < jameslalagna <> gmail dot com >
MFC after:	5 days
2010-04-30 19:01:55 +00:00
Pyun YongHyeon
e19bd6ee55 Add basic support for Marvell 88E8059 Yukon Optima.
Tested by:	James LaLagna < jameslalagna <> gmail dot com >
MFC after:	5 days
2010-04-30 18:58:55 +00:00
Pyun YongHyeon
7c8db6fd16 Disable non-ASF packet flushing on Yukon Extreme as vendor's driver
does. Without this change, Yukon Extreme seems to generate lots of
RX FIFO overruns even though controller has available RX buffers.
These excessive RX FIFO overruns generated lots of pause frames
which in turn killed devices plugged into switch. It seems there is
still occasional RX frame corruption on Yukon Extreme but this
change seems to fix the pause frame storm.

Reported by:	jhb
Tested by:	jhb
MFC after:	5 days
2010-04-30 18:04:46 +00:00
Alexander Motin
5b228a7a86 Add Target/LUN ID checks. 2010-04-30 08:37:00 +00:00
Alexander Motin
81a75ae365 Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent. 2010-04-30 08:22:47 +00:00
Alexander Motin
89f2835fc9 Add Target/LUN ID checks and deny access to targets 1-14 when PMP absent.
Enforce PMA bit clearing when PMP detached to avoid further scan timeouts.
2010-04-30 08:02:12 +00:00
David Christensen
7c409214bf - Enable flow control.
- Print device details only when verbose boot is enabled.
- Add debug output for shared memory access.
- Add debug statistics (checksum offload & VLAN frame counters).
- Modify TX path to update consumer index for each frame completed
  rather than updating the consumer index only once for a group of
  frames to improve small packet performance.
- Print driver/firmware pulse messages only when verbose boot
  is enabled.
- Add debug sysctl to clear statistics.
- Fix more style(9) violations.

MFC after:	2 weeks
2010-04-30 02:35:46 +00:00
Kip Macy
2965a45315 On Alan's advice, rather than do a wholesale conversion on a single
architecture from page queue lock to a hashed array of page locks
(based on a patch by Jeff Roberson), I've implemented page lock
support in the MI code and have only moved vm_page's hold_count
out from under page queue mutex to page lock. This changes
pmap_extract_and_hold on all pmaps.

Supported by: Bitgravity Inc.

Discussed with: alc, jeffr, and kib
2010-04-30 00:46:43 +00:00
Pyun YongHyeon
106b2e2ff2 Both RX_GMF_LP_THR and RX_GMF_UP_THR must be 16 bits register. If
it is 8bits register then RX FIFO size can't exceed 2KB which is
not true for almost all Yukon II controller.
2010-04-30 00:34:00 +00:00
David Christensen
ae575eab2c - Pass flow control settings back to bce(4).
MFC after:	Two weeks
2010-04-29 22:00:57 +00:00
Pyun YongHyeon
c186cf13eb Enable VLAN hardware tag insertion/stripping. Due to lack of SiS190
controller, I'm not sure whether this is also applicable to SiS190
so this feature is only activated on SiS191 controller.
In theory, controller reinitialization is not needed when VLAN tag
configuration is changed, but xclin said controller was not stable
whenever toggling VLAN tag bit. To address that, sge(4)
reinitialize controller for VLAN configuration which seems to work
as expected. VLAN tag information for TX/RX descriptor and
configure bit of RxMacControl register was found by xclin.

Submitted by:	xclin <xclin <> cs dot nctu dot edu dot tw > (initial version)
Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-04-29 18:14:14 +00:00
Pyun YongHyeon
d1c5ee8030 Enable FCS stripping and padding 10 bytes bit of RX MAC control
register. Due to lack of SiS190 controller, I'm not sure whether
this is also applicable to SiS190 so this feature is only activated
on SiS191 controller.
The controller can pad 10 bytes before DMAing a received frame to
RX buffer and received bytes include the padded bytes. This padding
is very useful on strict-alignment architectures because driver
does not have to copy received frame to align IP header on 4 bytes
boundary. It also gives better RX performance on non-strict
alignment architectures. Special thanks to xclin to give me
valuable register information. Without his enthusiastic trial and
errors this wouldn't be even possible.

While I'm here tighten validity check of received frame. Controller
clears RDS_CRCOK bit when it received bad CRC frames. xclin found
that using loop back testing.

Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-04-29 18:00:42 +00:00
Pyun YongHyeon
7f20f021e1 Explicitly marks SiS190 to differentiate it from SiS191. 2010-04-29 17:34:01 +00:00
Pyun YongHyeon
60a1a1542e Remove wrong link state chage. 2010-04-29 17:30:21 +00:00
Pyun YongHyeon
9c2851d29a Preserve unknown bits of RX MAC control register when driver
programs RX filter configuration. It seems RX MAC control register
is one of key registers to get various offloading features as well
as performance. Blindly clearing unrelated bits can result in
unexpected results.

Tested by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-04-29 17:28:07 +00:00
Maxim Sobolev
ff605594dd On certain chipsets AT keyboard controller isn't present and is
emulated by BIOS using SMI interrupt. On those chipsets reading
from the status port may be thousand times slower than usually.
Sometimes this emilation is not working properly resulting in
commands timing out and since we assume that inb() operation
takes very little time to complete we need to adjust number of
retries to keep waiting time within a designed limits (100ms).
Measure time it takes to make read_status() call and adjust
number of retries accordingly.

To keep it simple, use TSC to measure inb() performance and
keep it to amd64-only, since TSC may not available on older
CPUs.

Also enable detection of the AT controller absence on amd64.

Reviewed by:	jhb
MFC after:	1 month
2010-04-29 06:16:00 +00:00
Jung-uk Kim
3f5e024c14 Merge ACPICA 20100428. 2010-04-28 22:25:27 +00:00
Jack F Vogel
beef45ff88 Address the LOD that some are seeing, put the RX lock
back in rxeof (I could see little point in taking it out),
and now release it before the stack entry.

Also, make it so the 82574 does not configure for multiqueue
when its not used in the stack.
2010-04-28 19:22:52 +00:00
John Baldwin
aa1385cd7b Initialize the callout structure earlier in attach before calling any
routines that can fail since ciss_free() always tries to stop and drain
the callout.
2010-04-28 18:49:45 +00:00
Jack F Vogel
1655af0a72 Change default WOL back to MAGIC only, having
multicast enabled causes problems in man environments.
2010-04-28 17:37:30 +00:00
Jung-uk Kim
8c975e70af Remove dead code. Calculated greatest common divisor was not used at all.
On top of that, LLVM+Clang mis-compiles this code because of its register
allocator bug.

Analyzed by:	Andrew Reilly (areilly at bigpond dot net dot au)
Reviewed by:	ariff, rdivacky
MFC after:	3 days
2010-04-28 17:26:05 +00:00
Attilio Rao
d8b878873e - Extract the IODEV_PIO interface from ia64 and make it MI.
In the end, it does help fixing /dev/io usage from multithreaded
  processes.
- On i386 and amd64 the old behaviour is kept but multithreaded
  processes must use the new interface in order to work well.
- Support for the other architectures is greatly improved, where
  necessary, by the necessity to define very small things now.

Manpage update will happen shortly.

Sponsored by:	Sandvine Incorporated
PR:		threads/116181
Reviewed by:	emaste, marcel
MFC after:	3 weeks
2010-04-28 15:38:01 +00:00
Robert Noland
e7699af0af fx->lock is used as an index, correct test case.
MFC after:	1 week
2010-04-28 10:33:41 +00:00
Marius Strobl
8ba5efbd6f On sparc64 obtain the initiator ID to be used for SPI HBAs from the
Open Firmware device tree in order to match what the PROM built-in
driver uses. This is especially important when netbooting Fujitsu
Siemens PRIMEPOWER250 as in that case the built-in driver isn't used
and the port facts PortSCSIID defaults to 0, conflicting with the
disk at the same address.
2010-04-27 18:41:16 +00:00
Marius Strobl
a8217f5c2e Replace a magic value with the appropriate macro. 2010-04-27 18:06:54 +00:00
Marius Strobl
699346fc8b - On sparc64 obtain the initiator ID from the Open Firmware device tree
in order to match what the PROM built-in driver uses.
- Remove some no longer used includes.
2010-04-27 18:05:33 +00:00
Marius Strobl
45191d2588 Take advantage of OF_getscsinitid(). 2010-04-27 15:50:25 +00:00
Pyun YongHyeon
4c7421aadb It seems ale(4) controllers do not like to see TCP payload in the
first descriptor in TSO case. Otherwise controller can generate bad
frames during TSO. To address it, make sure to pull up ethernet +
IP + TCP header with options in first buffer. Also ensure the
buffer length of the first descriptor for TSO covers entire ethernet
+ IP + TCP with options and setup additional Tx descriptor if the
first buffer includes TCP payload.

Tested by:	Amar Takhar <verm <> darkbeer dot org >
MFC after:	1 week
2010-04-26 21:08:15 +00:00
Marius Strobl
2d857b9b19 For the on-board interfaces found in Fujitsu SPARC64 machines obtain the
MAC address via OFW as well.
2010-04-26 18:56:06 +00:00
Alexander Motin
22b9488310 Mark ATA channel as idle on timeout in non-ATA_CAM mode.
This should fix possible duplicate request completion.

Submitted by:	mjacob
2010-04-26 11:58:15 +00:00
Weongyo Jeong
7d04a6be12 ifp->if_ipackets++ when RX packet interrupts are occurred.
MFC after:	3 days
2010-04-24 23:32:24 +00:00
Robert Noland
1f4aef21da remove vm obect tracker that slipped in from prior work.
MFC after:	2 weeks
2010-04-24 18:13:12 +00:00
Robert Noland
05d841b38b Address some WITNESS panics that occur when using the via driver.
Some of these cases should be safe in a non-atomic fashion, however
since all of the driver ioctls are locked, a lot of work is required to
fix it correctly.  Just don't sleep now.

MFC after:	2 weeks
2010-04-23 14:48:30 +00:00
Andrew Thompson
5b3bb704f7 Use a more obvious prefix for the USB control (endpoint 0) transfers rather
than default_*.
2010-04-22 22:15:08 +00:00
Andrew Thompson
91cd92400f Properly name the sxlocks, mutexes and condvars. 2010-04-22 22:00:16 +00:00
Andrew Thompson
0d92ac2a92 Use SX_DUPOK rather than making the string unique. 2010-04-22 21:41:50 +00:00
Andrew Thompson
b850ecc180 Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had
the illusion of a tunable setting but was always turned on regardless.

MFC after:	1 week
2010-04-22 21:31:34 +00:00
Pyun YongHyeon
a1a667ecf1 Intialize interrupt moderation control register. The magic value
was chosen by lots of trial and errors. The chosen value shows
good interrupt moderation without additional latency.
Without this change, controller can generate more than 140k
interrupts per second under high network load.

Submitted by:	xclin <xclin <> cs dot nctu dot edu dot tw >
2010-04-22 20:25:07 +00:00
Robert Noland
a003741e38 Now that we properly set write-combining on the pages that back the GART,
disable snooping on radeons.

MFC after:	2 weeks
2010-04-22 18:47:30 +00:00
Robert Noland
2ee6488c02 re-write scatter gather memory allocation yet again...
This time, abandon the use of busdma and start interacting with the VM
system directly.  Make use of the new kmem_alloc_attr() which allows us
to easily allocate non-contiguous pages to back the GART table.  This
should help a lot when starting or restarting X after the system has
been running for a while and memory has become fragmented.

MFC after:	2 weeks
2010-04-22 18:44:23 +00:00
Robert Noland
9c03c0d88c Rework how drm maps are handled.
* On 32 bit platforms we steal the upper 4 bits of the map handle
   to store a unique map id.
 * On 64 bit platforms we steal the upper 24 bits.

Resolves issues where the offsets that are handed to mmap may overlap the VRAM on some cards.

Tested on: radeon, intel, mga, and via.

This will break nouveau.  I will spin new patches shortly.
2010-04-22 18:21:25 +00:00
Andrew Thompson
6639021699 Also add the usb mode to the devd string as the usb controller can work in both
host or device (gadget) modes.

Suggested by:	HPS
2010-04-21 23:03:26 +00:00
Andrew Thompson
3acd904d85 Change usb devd events from fake attach to a notify. The ugen device is not a
proper device_t so it faked the devctl event to appear like one, this is now a
notify which allows more information to be passed.

We notify for both the device attach/detach and for each usb interface. A devd
rule can now match on the interface properties, including composite devices
which may have a uvideo interface and also usound and possibly uhid too.

An example to match a umass device with a scsi subclass and BBB protocol would be

notify 100 {
	match "system"          "USB";
	match "subsystem"       "INTERFACE";
	match "type"            "ATTACH";
	match "intclass"        "0x08";
	match "intsubclass"     "0x06";
	match "intprotocol"     "0x50";
	action ...
};

The old attach devctl event has been retained for the moment to make merging to
8.1 easier. This was never compatible with 7.x or earlier due to the ugen regex
change needed.

Reviewed by:	warner
MFC after:	1 week
2010-04-21 21:51:14 +00:00
Bernhard Schmidt
698de07abb Use correct bus_dma_tag_t for TX frames.
Reported by:	Andreas Nilsson <andrnils at gmail.com>
Approved by:	rpaulo (mentor)
MFC after:	3 days
2010-04-21 17:38:16 +00:00
Rebecca Cran
62592d9173 It's not necessary to reset the chip every time an input overflow event
occurs. In addition, the delay when programming the short cable fix
should be 100us, not 100ms.

PR:	kern/64556
Submitted by:	Thomas Hurst <tom at hur.st>
Approved by:	rrs (mentor)
MFC after:	1 week
2010-04-20 19:30:12 +00:00
Pyun YongHyeon
6da6d0a9e3 With r206844, CSUM_TCP is also set for CSUM_TSO case. Modify
drivers to take into account for the change. Basically CSUM_TSO
should be checked before checking CSUM_TCP.
2010-04-19 22:10:40 +00:00
Rui Paulo
0ff2943ecb Revert r206755. It causes some laptops to stop booting. 2010-04-19 14:07:33 +00:00
Bernhard Schmidt
82ff07c047 Remove IPW_LOCK_DECL and fix various LORs.
Approved by:	rpaulo (mentor)
2010-04-17 18:18:46 +00:00
Bernhard Schmidt
6e4c30c9cd Use iv_appie_wpa, with this commit WPA works again.
Approved by:	rpaulo (mentor)
2010-04-17 18:17:25 +00:00
Bernhard Schmidt
557c25b48f - Make ipw usable again by moving directly into ASSOC state.
- No need to manually switch to RUN state, assoc response takes care
  of that.

Approved by:	rpaulo (mentor)
2010-04-17 18:16:14 +00:00
Bernhard Schmidt
892d2e9d9b Pass correct RSSI to ieee80211_input*().
Approved by:	rpaulo (mentor)
2010-04-17 18:14:49 +00:00
Bernhard Schmidt
d02ae91a4c Fix comment about ipw_assoc and remove some whitespaces; no functional
changes.

Approved by:	rpaulo (mentor)
2010-04-17 18:13:52 +00:00
Rui Paulo
25eb6a7d87 Add another ICH7M chipset that works.
MFC after:	1 week
2010-04-17 11:40:39 +00:00
Jack F Vogel
c99cdece4e Remove the tx queue selection based on the cpu whe
no flowid is present, this was causing some bad
reordering, now just use 0.

Also, add a few watchdog bits, and tx handler bits
that were corrected in igb.
2010-04-16 16:33:05 +00:00
Fabien Thomas
5d0848e9c6 - Fix a typo OFFCORE_REQUESTS.ANY.RFO is B0H10H and not 80H10H.
- Enable missing PARTIAL_ADDRESS_ALIAS for Core i7.

MFC after: 3 days
2010-04-15 19:45:03 +00:00
Pyun YongHyeon
c6491946d8 Fix include path. 2010-04-15 17:24:21 +00:00
Andrew Gallatin
2a29e09f38 Add missing IFCAP_LINKSTATE to mxge
Submitted by: yongari
2010-04-15 14:26:52 +00:00
Andrew Gallatin
c406ad2ecc Cleanup if_media handling in mxge(4)
- Re-probe xfp / sfp+ socket on link events, in case user
    has changed transceiver
- correctly report current media to avoid confusing lagg (reported by Panasas)
- Report link speed  (submitted by yongari)

Reviewed by: yongari (earlier version)

MFC after: 7 days
2010-04-15 13:50:55 +00:00
Alexander Motin
94410af774 Explicitly enable PCI busmastering on attach.
Now SiI3124 with siis(4) successfully works on sparc64 (SunBlade 100).

H/W donated by:	Gheorghe Ardelean
2010-04-15 11:17:33 +00:00
Gavin Atkinson
2d8d6ee437 Use the UIPROTO_BOOT_KEYBOARD #define from usb.h rather than a local
(almost identically named) local #define.

Reviewed by:	hselasky
2010-04-14 22:03:48 +00:00
Jack F Vogel
d43a118797 Add a missing fragment in the tx msix handler to invoke
another if all work is not done.

Sync the igb driver with changes suggested by yongari and
made in em, these made sense to be in both drivers.
2010-04-14 20:55:33 +00:00
Pyun YongHyeon
d193ed0bed Add driver for Silicon Integrated Systems SiS190/191 Fast/Gigabit Ethernet.
This driver was written by Alexander Pohoyda and greatly enhanced
by Nikolay Denev. I don't have these hardwares but this driver was
tested by Nikolay Denev and xclin.

Because SiS didn't release data sheet for this controller, programming
information came from Linux driver and OpenSolaris. Unlike other open
source driver for SiS190/191, sge(4) takes full advantage of TX/RX
checksum offloading and does not require additional copy operation in
RX handler.
The controller seems to have advanced offloading features like VLAN
hardware tag insertion/stripping, TCP segmentation offload(TSO) as
well as jumbo frame support but these features are not available
yet. Special thanks to xclin <xclin<> cs dot nctu dot edu dot tw>
who sent fix for receiving VLAN oversized frames.
2010-04-14 20:45:33 +00:00
Jack F Vogel
7ea05bb9a5 Remove multiqueue stack related stuff form lem, it is
unneeded for legacy hardware.
Also remove some TSO related cruft.
Add some watchdog_time setting that was missing, thanks
to Mikolaj Golub for pointing that out.
2010-04-14 18:29:01 +00:00
Alexander Motin
b9f59cca0d For early ALI chips do not announce I/O sizes that require unsupported
48bit DMA commands.
2010-04-14 15:29:32 +00:00
Kevin Lo
547f27959b Eliminate duplicate comment 2010-04-14 07:07:43 +00:00
Pyun YongHyeon
500a4ded5d Add Agere ET1011 PHY which is found on Belkin F5D5055 USB
controller. Unlike Agere ET1011C, Agere ET1011 does not seem to
need special DSP programming to workaround silicon bug.
2010-04-13 20:07:52 +00:00
Ed Maste
6352e2e20a Use enums in the aac_command_status_table rather than duplicating the same
values in two places.

Suggested by: Garrett Cooper
2010-04-13 12:10:55 +00:00
Kevin Lo
cc552e7ed9 The Quanta Q101 modem has a different type of cdrom driver disk,
add the product id and use a standard scsi eject.

Reviewed by:	thompsa
MFC after:	3 days
2010-04-13 06:27:02 +00:00
Ed Maste
e71d3b9c19 Sync some minor items with the upstream driver. Should have no functional
change.
2010-04-13 01:16:15 +00:00
Ed Maste
94c0fd90f2 Whitespace cleanup, in advance of next sync with Adaptec's driver. No
functional change.
2010-04-13 00:33:07 +00:00
Rui Paulo
e6d4e3c661 Remove svn:executable prop. 2010-04-12 13:46:20 +00:00
Bernhard Schmidt
b4e52cf880 Declare all functions as static.
Approved by:	rpaulo (mentor)
MFC after:	2 weeks
2010-04-11 13:51:20 +00:00
Bernhard Schmidt
0a9125c9d6 Hook ieee80211_media_change() to ieee80211_vap_attach().
Approved by:	rpaulo (mentor)
MFC after:	2 weeks
2010-04-11 13:48:52 +00:00
Bernhard Schmidt
036be13d96 iwn5000_reset_sched() is not used; #ifdef it.
Approved by:	rpaulo (mentor)
MFC after:	2 weeks
2010-04-11 13:47:46 +00:00
Bernhard Schmidt
7cf1dd521b Add some missing protoypes.
Approved by:	rpaulo (mentor)
MFC after:	2 weeks
2010-04-11 13:46:42 +00:00
Jack F Vogel
3b4e5df82c The lock move in rxeof necessitated a couple
more places to do the locking, fixes a panic.
2010-04-10 19:25:55 +00:00
Bernhard Schmidt
632ee7e3a4 Add WPA-None support:
* WPA-None requires ap_scan=2:
  The major difference between ap_scan=1 (default) and 2 is, that no
  IEEE80211_IOC_SCAN* ioctls/functions are called, though, there is a
  dependency on those. For example the call to wpa_driver_bsd_scan()
  sets the interface UP, this never happens, therefore the interface
  must be marked up in wpa_driver_bsd_associate(). IEEE80211_IOC_SSID
  also is not called, which means that the SSID has not been set prior
  to the IEEE80211_MLME_ASSOC call.
* WPA-None has no support for sequence number updates, it doesn't make
  sense to check for replay violations..
* I had some crashes right after the switch to RUN state, issue is
  that sc->sc_lastrs was not yet defined.

Approved by:	rpaulo (mentor)
MFC after:	3 weeks
2010-04-10 13:54:00 +00:00
Marius Strobl
d5dba21cf6 Add sbbc(4), a driver for the BootBus controller found in Serengeti and
StarCat systems which provides time-of-day services for both as well as
console service for Serengeti, i.e. Sun Fire V1280. While the latter is
described with a device type of serial in the OFW device tree, it isn't
actually an UART. Nevertheless the console service is handled by uart(4)
as this allowed to re-use quite a bit of MD and MI code. Actually, this
idea is stolen from Linux which interfaces the sun4v hypervisor console
with the Linux counterpart of uart(4).
2010-04-10 11:52:12 +00:00
Jack F Vogel
b4ab02b842 Correct broken build. 2010-04-10 07:26:51 +00:00
Bernhard Schmidt
0c4de0fe4e iwn4965_set_txpower() uses maxpwr from EEPROM to calculate the power to
set, it make sense to actually initialize that array.  This fixes some
issues with 4965 adapters where the TX power is crucial.

This got lost somewhere while merging with the OpenBSD code.

Approved by:	rpaulo (mentor)
Obtained from:	OpenBSD
MFC after:	2 weeks
2010-04-10 07:00:26 +00:00
Bernhard Schmidt
7373959eb1 * Rename bluetooth coexistence flags, no binary change.
* Enable DC calibration and crystal calibration on Centrino Advanced-N
  6250 parts.
* Workaround for a HW bug (does not affect 4965AGN) that may sporadically
  affect latency under some rare circumstances. From a similar commit to
  iwlwifi.
* Update sensitivity settings for 5000 series to workaround a performance
  bug in the DSP (1000 is not affected so we keep the old values for 5000).
* Update sensitivity settings for 6000 series.
* Set differential gains on 6250 too (but use a 1.0 factor, not 1.5).
* Init OFDM sensitivity with min value (which depends on the chip)
  instead of hardcoding it to 90.
* Read calibration version from ROM and set IWN_GP_DRIVER_CALIB_VER6
  bit on 6x50 if version >= 6.

Approved by:	rpaulo (mentor)
Obtained from:	OpenBSD
MFC after:	2 weeks
2010-04-10 06:58:24 +00:00
Bernhard Schmidt
4e5c1ca1fc Small whitespace cleanup.
Approved by:	rpaulo (mentor)
MFC after:	2 weeks
2010-04-10 06:55:29 +00:00
Jack F Vogel
91ce5735bf A few more changes from yongari:
- code flow in handler could let interrupt be
	  reenabled when not wanted.
	- change where the RX lock is taken to improve
	  performance.
	- adapter->msix is true for MSI systems also,
	  it needs to explicitly test for 82574, good one :)
2010-04-09 23:15:37 +00:00
Pyun YongHyeon
d0c4515667 Add preliminary support for 8168E/8111E PCIe controller.
While I'm here simplify device description string.

Tested by:	Michael Beckmann < michael <> apfel dot de >
MFC after:	5 days
2010-04-09 22:50:28 +00:00
Jack F Vogel
99f8e467e8 DUH, must be tired, I missed the second instance...
time for the weekend :)
2010-04-09 21:18:46 +00:00
Jack F Vogel
af8a24c8d0 Thanks to Michael Tuexen for catching this, bit set that
keeps the clock from being reset when writing to EITR was
incorrect, also there is a shared code #define for it anyway.
2010-04-09 21:16:45 +00:00
Jack F Vogel
681ac9c018 Incorporate suggested improvements from yongari.
Also, from feedback, make the multiqueue code an
option (EM_MULTIQUEUE) that is off by default.
Problems have been seen with UDP when its on.
2010-04-09 18:42:15 +00:00
Rui Paulo
a1d99827dd Setup the correct RX/TX chainmask when we play with the antenna
settings.

MFC after:	1 week
Sponsored by:	iXsystems, inc
2010-04-09 13:58:54 +00:00
Rui Paulo
ddc7073258 Remove previously added if 0's.
MFC after:	1 month
2010-04-09 11:56:38 +00:00
Rui Paulo
c9cacb2d3c Fix recent breakage: wpi_newassoc() wasn't supposed to be removed and
it needs to call ieee80211_ratectl_node_init().

Submitted by:	bschmidt
MFC after:	1 month
2010-04-09 11:47:03 +00:00
Jack F Vogel
476310d371 Three changes:
- add CRC stripping to the RX side, this was handled
	  by some obscure code in rxeof previously, its easier
	  to simply have the hardware strip it now.
	- Add back an ALTQ change that slipped between the cracks
	- Add an update to the watchdog_time in the xmit code, not
	  doing this in ixgbe caused problems, think its needed here
	  as well.
2010-04-08 19:13:42 +00:00
Jack F Vogel
500e8f26d7 Important fix got clobbered in the em driver, keeping
VLAN HWFILTER from being used by default, this breaks
stacked pseudo devices, and as it turns out, also breaks
virtual machines that happen to use VLANS (didn't know that
before :). Put the fix back into the em driver, and for good
measure add the same code to the igb driver where it should
have been anyway.
2010-04-08 00:50:43 +00:00
Jung-uk Kim
004e8bae43 Allocate memory for VBE info block with malloc(9), not as static local. 2010-04-07 21:38:42 +00:00
Jung-uk Kim
3504769505 Correct beastie_saver module name. 2010-04-07 18:42:21 +00:00
Rui Paulo
52c28f2383 Remove unnecessary assignment.
Submitted by:	gavin
MFC after:	1 month
2010-04-07 17:52:32 +00:00
Rui Paulo
e313b3e882 Avoid NULL deref.
Submitted by:	gavin
MFC after:	1 month
2010-04-07 17:51:06 +00:00
Rui Paulo
4a67d9e8b1 Avoid NULL deref.
Submitted by:	gavin
MFC after:	1 month
2010-04-07 17:49:47 +00:00
Rui Paulo
a31532b4ad Remove debugging code that snuck in. 2010-04-07 17:48:13 +00:00
Pyun YongHyeon
07fa07514b Partial revert r204545.
Just relying on status LE ownership of status block seems to cause
poor performance. Always read current status index register first
and then check status ownership as we had before. Accessing status
index register seems to trigger immediate status update if
controller have pending status updates.

MFC after:	1 week
Reported by:	Andre Albsmeier <Andre.Albsmeier <> siemens dot com>
Tested by:	Andre Albsmeier <Andre.Albsmeier <> siemens dot com>
2010-04-07 17:12:57 +00:00
Jung-uk Kim
3cab2f6db9 Add the official FreeBSD logo image file for logo_saver. 2010-04-07 17:07:06 +00:00
Jung-uk Kim
f989dcca3e Copy Beastie image file to prepare for an official logo image. 2010-04-07 17:03:05 +00:00