Commit Graph

20659 Commits

Author SHA1 Message Date
Jack F Vogel
8ec87fc514 Update to igb and em:
em revision 7.0.0:
	- Using driver devclass, seperate legacy (pre-pcie) code
	  into a seperate source file. This will at least help
	  protect against regression issues. It compiles along
	  with em, and is transparent to end use, devices in each
	  appear to be 'emX'. When using em in a modular form this
	  also allows the legacy stuff to be defined out.
	- Add tx and rx rings as in igb, in the 82574 this becomes
	  actual multiqueue for the first time (2 queues) while in
	  other PCIE adapters its just make code cleaner.
	- Add RX mbuf handling logic that matches igb, this will
	  eliminate packet drops due to temporary mbuf shortage.

igb revision 1.9.3:
	- Following the ixgbe code, use a new approach in what
	  was called 'get_buf', the routine now has been made
	  independent of rxeof, it now does the update to the
	  engine TDT register, this design allows temporary
	  mbuf resources to become non-critical, not requiring
	  a packet to be discarded, instead it just returns and
	  does not increment the tail pointer.
	- With the above change it was also unnecessary to keep
	  'spare' maps around, since we do not have the discard
	  issue.
	- Performance tweaks and improvements to the code also.

MFC in a week
2010-03-29 23:36:34 +00:00
Jung-uk Kim
4cc5f38e97 Refine r204265. We want the standard VGA palette for packed pixel mode. 2010-03-29 22:41:30 +00:00
Joel Dahl
b40d342195 Start copyright notices with /*- 2010-03-29 20:27:17 +00:00
Warner Losh
751b0fbd01 Cast the bus_size_t to a intmax_t rather than assuming type-punning to
a size_t.  Switch from %z to %j.
2010-03-29 17:26:24 +00:00
Warner Losh
68d9da9140 Cast bus_space_t to a intmax_t and use %j to print it instead of
assuming it is size_t sized and using %z.
2010-03-29 17:25:06 +00:00
Warner Losh
784ae79476 Cast a bus_size_t to a (size_t) to use %zd specifier. Not quite the
right thing to do, but it is in compat code I don't want to sort out
at the moment.
2010-03-29 17:24:23 +00:00
Andrew Thompson
b4eb1a01cf Do not sync cache for the PL2506
PR:		usb/144915
Submitted by:	Monty Hall
2010-03-28 20:09:04 +00:00
Andrew Thompson
9e5d4aec14 Do not swap Apple keys when detecting Apple-FN keyboards.
Reported by:	Steven Noonan
Submitted by:	Hans Petter Selasky
2010-03-28 20:07:08 +00:00
Andrew Thompson
79491ae837 Make sure the bsd_urb_list gets initialised and that new URB's are queued at
the end of the list.

Submitted by:	Hans Petter Selasky
2010-03-28 20:04:03 +00:00
Andrew Thompson
4a4bd31b44 Add PCI IDs for two more nForce controllers.
Submitted by:	Dmitry Luhtionov @ gmail.com
2010-03-28 20:02:50 +00:00
Andrew Thompson
208f52dae6 Add a couple of usb product IDs.
Submitted by:	Dmitry Luhtionov @ gmail.com
2010-03-28 20:02:13 +00:00
Justin T. Gibbs
3905e20898 Use standard types in preference to BSD types so that these header files
can be used in applications compiled with only POSIX types visible.

MFC after: 2 weeks
2010-03-28 00:10:09 +00:00
Alexander Motin
42d008a11c Fix lock leakage.
PR:		kern/145081
2010-03-27 15:39:19 +00:00
Jack F Vogel
c00148556a Update the driver to Intel version 2.1.6
- add some new hardware support for 82599
	- Big change to interrupt architecture, it now
	  uses a queue which contains an RX/TX pair as
	  the recipient of the interrupt. This will reduce
	  overall system interrupts/msix usage.
	- Improved RX mbuf handling: the old get_buf routine
	  is no longer synchronized with rxeof, this allows
	  the elimination of packet discards due to mbuf
	  allocation failure.
	- Much simplified and improved AIM code, it now
	  happens in the queue interrupt context and takes
	  into account both the traffic on the RX AND TX
	  side.
	- variety of small tweaks, like ring size, that have
	  been seen as performance improvements.
	- Thanks to those that provided feedback or suggested
	  changes, I hope I've caught all of them.
2010-03-27 00:21:40 +00:00
Matt Jacob
739fd8c533 D'oh- isp_handle_index' logic was reversed (not used in FreeBSD).
MFC after:	1 week
2010-03-26 20:22:18 +00:00
Matt Jacob
670508b16a Clean up some printing stuff so that we can have a bit finer control
on debug output. Add a new platform function requirement to allow
for printing based upon the ITL nexus instead of the isp unit plus
channel, target and lun. This allows some printouts and error messages
from the core code to appear in the same format as the platform's
subsystem (in FreeBSD's case, CAM path).

MFC after:	1 week
2010-03-26 15:13:31 +00:00
Fabien Thomas
662cf71968 Handling SIGPIPE will cause deadlock/crash.
Return an error immediatly in case of hard shutdown.

MFC after: 3days
2010-03-26 14:35:48 +00:00
Alexander Leidinger
2ac4d1f92f - add some usb devices (scanner, printer, usb storage)
- add quirks for the usb storage

Reviewed by:	hselasky
2010-03-26 11:02:01 +00:00
Alexander Motin
d542863e48 Use last 16 bytes of serial number in metadata instead of first ones,
same as Intel MatrixRAID does.

PR:		kern/124064
2010-03-26 10:18:19 +00:00
Jung-uk Kim
bb6ba5f6b9 Do not penalize correct or correctable VESA mode tables by calling another
VBE function.  Most problems should be corrected by the mode table sanity
check and we only need the paranoid in extremely rare cases.
2010-03-25 17:51:05 +00:00
Pyun YongHyeon
d2b6e9a0bc Use pci_get_max_read_req() and pci_set_max_read_req() to set maximim
read request size.
2010-03-25 17:17:35 +00:00
Jung-uk Kim
c2bce7cc39 Align memory access of 24-bit pixel renderer to word boundary. 2010-03-24 15:40:18 +00:00
Jung-uk Kim
1e161437f8 Teach VGA framebuffer about 8-bit palette format for VESA. 2010-03-24 15:37:47 +00:00
Jung-uk Kim
b266b96af9 Add my copyright here. It seems I have contributed enough code. :-) 2010-03-23 23:19:23 +00:00
Jung-uk Kim
3b56b13e8e Be extremely careful when we determine bytes per scan line information.
First, we compare mode table data against minimum value.  If the mode table
does not make sense, we set the minimum in the mode info.  When we actually
set the mode, we try VESA BIOS function and compare it against the previous
value.  If it makes more sense, update the information.
2010-03-23 23:10:17 +00:00
Jung-uk Kim
51cb3184fd Fall back to VGA palette functions if VESA function failed and DAC is still
in 6-bit mode.  Although we have to check non-VGA compatibility bit here,
it seems there are too many broken VESA BIOSes out to rely on it.
2010-03-23 22:50:22 +00:00
Jung-uk Kim
5fb3ac06b7 Map entire video memory again. This is a partial backout of r203535.
Although we do not use them all directly, it seems VGA render may access
unmapped memory region and cause kernel panic.
2010-03-23 22:35:52 +00:00
Jung-uk Kim
4d52abfb0c Separate 24-bit pixel draw from 32-bit case. Although it is slower, we do
not want to write a useless zero to inaccessible memory region.
2010-03-23 22:16:57 +00:00
Xin LI
1fc13a00e8 Add PCI ID for MCS9901's parallel port.
PR:		kern/144713
Submitted by:	gcooper
MFC after:	2 weeks
2010-03-23 20:08:18 +00:00
Nathan Whitehorn
d4bccd63a2 Do not declare the various OFW command buffers static. It does not
appear to be necessary on either sparc64 or powerpc, and is a
concurrency nightmare.

Reviewed by:	marius
2010-03-23 01:09:45 +00:00
Alexander Motin
e67afc40da - Spec tells that CCC interrupt is edge triggered. Acknowledge it as such.
- Do not try to enable CCC if it is not supported.
2010-03-21 18:18:58 +00:00
Alexander Motin
b0423064be Add some more codec IDs. 2010-03-21 15:14:21 +00:00
Alexander Motin
f81100fd11 Enable MSI by default for SiI3124. 2010-03-20 04:40:15 +00:00
Warner Losh
30e980f2d1 Add support for the Samsung S3C2xx0 family of ARM SoCs written by
Andrew Turner.  The kernel supports the LN2410SBC evaluation board,
and likely others.  These parts (or similar ones) are in some open
hardware designs for phones.

Submitted by:	Andrew Turner
2010-03-20 03:39:35 +00:00
David Christensen
c8331f5c12 - Added support for 5709S/5716S PHYs.
- Update copyright to 2010.
- Add new debug code for RV2P block.
- Improve output formatting for various debug functions.

MFC after:	2 weeks
2010-03-18 21:00:53 +00:00
David Christensen
b249ff39a4 - Added support for 5709S/5716S PHYs.
Submitted by:	pyunyh
MFC after:	2 weeks
2010-03-18 20:57:57 +00:00
Ed Schouten
ee48488f0b Remove an unneeded variable.
Reported by:	tinderbox
2010-03-18 07:35:20 +00:00
Warner Losh
c0df07cad9 Remove two instances of the evil hack to get the ifnet. mii_ifp is
set early enough that we don't need to do these hacks anymore.
2010-03-17 22:45:53 +00:00
Qing Li
86b330a5f4 Set the device capabilities to include dynamic link-state for
those modern drivers.

Reviewed by:	imp (and suggested by imp)
MFC after:	3 days
2010-03-17 22:12:12 +00:00
Andrew Gallatin
2e08479882 Fix 2 bugs in mxge_attach()
- Don't leak slice resources when mxge_alloc_rings() fails

- Start taskq threads only after we know attach will succeed.  At
  boot time, taskqueue_terminate() will loop infinately, waiting
  for the threads to exit, and hang the system.

Submitted by: Panasas
MFC After: 3 days
2010-03-17 20:13:09 +00:00
Matt Jacob
4ecb1d4aa1 Put gone device timer into a structure tag that can hold more than 32 seconds. Oops.
Untangle some of the confusion about what role means when it's in the FCPARAM/SDPARAM
or isp_fc/isp_spi structures. This fixed a problem about seeing targets appear if you've
turned off autologin and find them, or rather don't, via camcontrol rescan.

MFC after:	1 month
2010-03-17 02:48:14 +00:00
Pyun YongHyeon
f584dfd113 Revert r205090.
It's hard to know when the mail box register write will get flushed to
the hardware and it may take longer.

Pointed out by:	scottl
2010-03-16 17:45:16 +00:00
Attilio Rao
6eafba267e Make the code more readable and compiling on 64-bits arch different
than amd64.

Sponsored by:	Sandvine Incorporated
Submitted by:	emaste
MFC:		2 weeks
X-MFC:		r205160
2010-03-15 14:20:16 +00:00
Pyun YongHyeon
b45923a62d It seems PCI_OUR_REG_[1-5] registers are not mapped on PCI
configuration space on Yukon Ultra(88E8056) such that accesses to
these registers were NOPs which in turn make msk(4) instable on
this controller. Use indirect access method to access
PCI_OUR_REG_[1-5] registers. This should fix a long standing
instability bug which prevented msk(4) working on Yukon Ultra.
Special thanks to koitsu who gave me remote access to his system.

PR:	kern/114631, kern/116853
MFC after:	1 week
2010-03-14 23:23:57 +00:00
Attilio Rao
7b90e5ec95 Checkin a facility for specifying a passthrough FIB from userland.
arcconf tool by Adaptec already seems to use for identifying the
Serial Number of the devices.
Some simple things (like FIB setup and bound checks) are retrieved
from the Adaptec's driver, but this implementation is quite different
because it does use the normal buffer dmat area for loading segments
and not a special one (like the Adaptec's one does).

Sponsored by:	Sandvine Incorporated
Discussed with:	emaste, scottl
Reviewed by:	emaste, scottl
MFC:		2 weeks
2010-03-14 22:38:18 +00:00
Weongyo Jeong
2fe9b8d454 enables S/W beacon miss handler.
Reported by:	imp
2010-03-14 02:13:11 +00:00
Robert Noland
c5af82e517 Fix build after typo.
Reported by:	Sergey V. Dyatko <sergey.dyatko@gmail.com>
MFC after:	3 days
2010-03-13 18:14:51 +00:00
Robert Noland
b8da61ada5 Add support for Intel Pineview chips, aka IGD
Slightly modified version of the submitted patch.

PR:		143427
Submitted by:	Mamoru Sumida <msumida@mvc.biglobe.ne.jp>
MFC after:	3 days
2010-03-13 11:51:18 +00:00
Randall Stewart
1966e5b5a1 The proper fix for the delayed SCTP checksum is to
have the delayed function take an argument as to the offset
to the SCTP header. This allows it to work for V4 and V6.
This of course means changing all callers of the function
to either pass the header len, if they have it, or create
it (ip_hl << 2 or sizeof(ip6_hdr)).
PR:		144529
MFC after:	2 weeks
2010-03-12 22:58:52 +00:00
Robert Noland
c7bbe8bdaf Add support of Intel Pineview chips, aka IGD.
MFC after:	3 days
2010-03-12 21:34:23 +00:00
Robert Noland
9ccf1d6a0b Add pci ids for Intel Ironlake chipsets.
These behave just like g45 for agp.

Tested by:	Torfinn Ingolfsen

MFC after:	3 days
2010-03-12 19:43:39 +00:00
Pyun YongHyeon
388214e4f2 Implement Rx checksum offloading for Yukon EC, Yukon Ultra,
Yukon FE and Yukon Ultra2. These controllers provide very simple
checksum computation mechanism and it requires additional pseudo
header checksum computation in upper stack. Even though I couldn't
see much performance difference with/without Rx checksum offloading
it may help notebook based controllers.

Actually controller can compute two checksum value by giving
different starting position of checksum computation on received
frame. However, for long time, Marvell's checksum offloading engine
have been known to have several silicon bugs so don't blindly trust
computed partial checksum value. Instead, compute partial checksum
twice by giving the same checksum computation position and compare
the result. If the value is different it's clear indication of
hardware bug. This configuration lose IP checksum offloading
capability but I think it's better to take safe route.
Note, Rx checksum offloading for Yukon XL was still disabled due to
known silicon bug.
2010-03-12 18:41:41 +00:00
Pyun YongHyeon
5e243d9a49 Reorder interrupt handler a bit such that producer/consumer
index of status block is read first before acknowledging the
interrupts. Otherwise bge(4) may get stale status block as
acknowledging an interrupt may yield another status block update.

Reviewed by:	marius
2010-03-12 18:18:04 +00:00
Alexander Motin
2d6d3b6d73 Mask disk_idx to avoid panic because of extra bits set.
PR:		kern/102211
Submitted by:	yoichi
2010-03-12 07:49:10 +00:00
Andrew Thompson
f03fdead6f Add device ID for the NATURAL4000 keyboard 2010-03-11 22:09:21 +00:00
Andrew Thompson
3707a5e930 - Integrate latest driver code from OpenBSD
- Drain our tasks from the ieee80211 taskqueue
- Add more IDs

Submitted by:	Akinori Furukoshi
2010-03-11 22:05:12 +00:00
Andrew Thompson
abaa9bfe96 extend search for Apple Function Key.
PR:		usb/144414
Submitted by:	Hans Petter Selasky
2010-03-11 21:57:01 +00:00
Andrew Thompson
3fed7cb2bd Add new device ID for the SMC 2514HUB
Submitted by:	Alexander Best
2010-03-11 21:55:25 +00:00
Andrew Thompson
5914c5bf3a add new vendor ID for APACER
Submitted by:	Paul B Mahol
2010-03-11 21:54:23 +00:00
Andrew Thompson
a7aca4cd92 Implement USB kernel driver detach from userland.
Submitted by:	Hans Petter Selasky
2010-03-11 21:50:36 +00:00
Andrew Thompson
3f6c7805b4 Make sure there is a way to reset the endpoint FIFO on transfer errors for
ISOCHRONOUS transfers

Submitted by:	Hans Petter Selasky
2010-03-11 21:49:43 +00:00
Andrew Thompson
6703f98c02 For USS820 driver we need to manually reset TX FIFO at each SETUP transaction
because the chip doesn't do this by itself.

Submitted by:	Hans Petter Selasky
2010-03-11 21:49:00 +00:00
Andrew Thompson
6a268418dc isochronous endpoint descriptors should have two more bytes which are zero by
default.

Submitted by:	Hans Petter Selasky
2010-03-11 21:48:10 +00:00
Andrew Thompson
3e4af77774 Add new uvisor(4) device ID.
PR:		usb/144201
2010-03-11 21:47:25 +00:00
Andrew Thompson
8366b369e4 It appears that some UVISOR devices do not handle when the clear stall command
is issued at the beginning of the initial IN/OUT data transfers.  Reason
unknown, probably firmware fault. Now the stall is only cleared on data
transfer errors.

PR:		usb/144199
Submitted by:	Hans Petter Selasky
2010-03-11 21:46:33 +00:00
Andrew Thompson
9a8e0122d2 - make the usb_temp_setup() and usb_temp_unsetup() functions public so that
other modules can generate USB descriptors.
- extend the vendor specific request function by one length pointer argument,
  because not all descriptors store the length in the first byte. For example
  HID descriptors.

Submitted by:	Hans Petter Selasky
2010-03-11 21:45:31 +00:00
Andrew Thompson
8817f29901 Use wMaxPacketSize for the uftdi input buffer size.
Submitted by:	Hans Petter Selasky
2010-03-11 21:42:09 +00:00
Andrew Thompson
ea67d33c62 Reapply r185998 which was overwritten at some point. 2010-03-11 20:41:21 +00:00
John Baldwin
5d82e6d067 Small whitespace fixes. 2010-03-11 15:25:47 +00:00
Andrew Thompson
f0c078e6e0 Wrap the proc wakeup special case for ddb in ifdef DDB.
Submitted by:	Giovanni Trematerra
2010-03-11 08:33:39 +00:00
Andrew Thompson
5bbc70dde9 Revert r204992 and just wrap it all in ifdef INVARIANTS to fix the debug and
non-debug cases.
2010-03-11 08:03:56 +00:00
Weongyo Jeong
8833bb3072 fixes a compile error if INVARIANTS is disabled.
Pointy hat to:	me
Submitted by:	Michael Butler <imb at protected-networks dot net>
2010-03-11 01:35:38 +00:00
Maxim Sobolev
503969d196 Fix style(9) bugs in the previous revision. 2010-03-10 23:02:06 +00:00
Maxim Sobolev
5d25cf29e2 further narrow down no carrier workaround, since it appears to only affect
very specific IBM hardware and other machines with the same BCM ASIC chip id
0x57081021 are just fine.

MFC after:	1 month
2010-03-10 23:00:15 +00:00
Pyun YongHyeon
3c7703ea8b Fix build breakage introduced in r204922. 2010-03-10 21:45:40 +00:00
Pyun YongHyeon
fa8b4d63db Fix typo in r204978.
Pointed out by:	marius
2010-03-10 21:37:19 +00:00
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
Pyun YongHyeon
1b7757c024 Optimize inserting LE for TX checksum computation. Controller does
not require checksum LE configuration if checksum start and write
position is the same as before. So keep track last checksum start
and write position and insert new LE whenever the position is
changed. This reduces number of LEs used in TX path as well as
slightly enhance TX performance.
2010-02-26 18:18:02 +00:00
Pyun YongHyeon
4858893b6e Add TSO support on VLANs. Controller requires VLAN hardware tagging
to make TSO work over VLANs.
2010-02-26 17:33:43 +00:00
Pyun YongHyeon
d06930af52 Reuse the configured LE for VLAN if new LE was created for TSO.
Only old controllers need to create new LE for TSO. This change
makes TSO work over VLANs.
2010-02-26 17:27:16 +00:00
Alexander Motin
2dc59e87e6 Store path for rescan to the right place. This should fix panic on boot,
introduced by r203108.
2010-02-26 12:31:16 +00:00
Alexander Motin
28889a0022 Fix bug in headphones audio redirection using separate DAC. It was exposed
by removing channel duplication during multichannel audio implementation.
2010-02-26 09:31:50 +00:00
Navdeep Parhar
f9c6e16451 Support IFCAP_VLANHWTSO in cxgb(4). It works with or without vlanhwtag.
While here, remove old DPRINTFs and tidy up the capability code a bit.
2010-02-26 07:08:44 +00:00
Jung-uk Kim
4a9b63a454 Improve VESA mode switching via loader tunable `hint.sc.0.vesa_mode'.
The most notable change is history buffer is fully saved/restored now.
2010-02-24 20:13:34 +00:00
Navdeep Parhar
e83ec3e5c3 There is no need to test __FreeBSD_version for features that have
been around for a long time now (7.1-ish or even earlier); assume
they are present.  These includes MSI, TSO, LRO, VLAN, INTR_FILTERS,
FIRMWARE, etc.

Also, eliminate some dead code and clean up in other places as part
of this quick once-over.

MFC after:	1 week
2010-02-24 10:16:18 +00:00
Navdeep Parhar
be688bde90 Accessing an mbuf after it has been handed off to the hardware is a bad
race as it could already have been tx'd and freed by that time.  Place
the bpf tap just _before_ writing the gen bit.

This fixes a panic when running tcpdump on a cxgb interface.
2010-02-24 01:44:39 +00:00
Jung-uk Kim
8d521790d0 Yet another attempt to make palette loading more safer:
- Add a separate palette data for 8-bit DAC mode when SC_PIXEL_MODE is set
and fill it up with default gray-scale palette data for text.  Now we don't
have to set `hint.sc.0.vesa_mode' to get the default palette data.
- Add a new adapter flag, V_ADP_DAC8 to track whether the controller is
using 8-bit palette format and load correct palette when switching modes.
- Set 8-bit DAC mode only for non-VGA compatible graphics mode.
2010-02-23 21:51:14 +00:00
Ed Maste
dbfc596084 Minor diff reduction with Adaptec's driver: in aac_release_command() set
cm_queue to AAC_ADAP_NORM_CMD_QUEUE by default.  In every place it was set,
it was set to AAC_ADAP_NORM_CMD_QUEUE anyhow.
2010-02-23 21:41:13 +00:00
Weongyo Jeong
d2ee7771f1 o adds sysctl variables to show device statistics.
o records RTS success/fail statistics.

Pointed by:	imp
2010-02-23 19:55:54 +00:00
Weongyo Jeong
e355ad550c fixes a compile error; invalid type argument of '->'. 2010-02-23 19:44:51 +00:00
Alexander Motin
5261b668c1 Fix recursive lock attempt on hot-plug event in non-ATA_CAM mode. 2010-02-23 16:39:53 +00:00
Ivan Voras
b8bba24e06 The New and Improved snake_server - Service Pack 1: now even more
sensitive to load average variations!
2010-02-23 15:27:07 +00:00
Ivan Voras
c0414ca779 Upgrade the "snake" syscons screensaver to the new, multimedia version!
Now, with color! And system load averages!

Amused by it:	gnn
2010-02-23 15:12:41 +00:00
Matt Jacob
940907907b xpt_rescan only honors a wildcard in the target field. Revert the previous
change and have isp_make_here scan the whole bus which will then scan all
luns.

I think xpt_rescan needs to be fixed, but that's a separable issue.

Suggested by: Alexander
2010-02-23 14:35:44 +00:00
Warner Losh
0d05eee2f9 Fix compilation problems with INVARIANTS.
# also limit RX decryption attempted messages to 50

Reviewed by:	weongyo
2010-02-23 05:02:10 +00:00
Jung-uk Kim
0dc682e029 Re-add accidentally removed pixel format for direct memory model. 2010-02-23 01:02:11 +00:00
Jung-uk Kim
6a6289a2b8 Fix FBIO_ADPINFO ioctl on amd64. 2010-02-23 01:00:19 +00:00
Matt Jacob
75c1db5d67 When we rescan, just scan from logical unit 0. In other words, don't
specify a wildcard lun here.

This unbreaks disk re-arrival.

MFC after:	2 days
2010-02-23 00:34:20 +00:00
Pyun YongHyeon
01d60a6594 Remove Tx mbuf parsing code for VLAN in TSO path. Controller does
not support TSO over VLAN if VLAN hardware tagging is disabled so
there is no need to check VLAN here.
2010-02-22 23:35:35 +00:00
Pyun YongHyeon
e67344a3be Add TSO support on VLANs. Also make sure to update TSO capability
whenever jumbo frame is configured.
While I'm here remove unnecessary check of VLAN hardware checksum
offloading. vlan(4) already takes care of this.
2010-02-22 22:41:27 +00:00
Pyun YongHyeon
7bd35300da Add TSO support on VLANs. jme(4) controllers do not require VLAN
hardware tagging to make TSO work over VLANs.
2010-02-22 22:05:49 +00:00
Pyun YongHyeon
5b355c4fb1 Remove Tx mbuf parsing code for VLAN in TSO path. Controller does
not support TSO over VLAN if VLAN hardware tagging is disabled so
there is no need to check VLAN here.
While I'm here make sure to pullup IP/TCP headers in the first
buffer.
2010-02-22 21:03:15 +00:00
Marius Strobl
9e48f1e7a5 According to the Linux sungem driver, in case of Apple (K2) GMACs
GEM_MIF_CONFIG_MDI0 cannot be trusted when the firmware has powered
down the chip so the internal transceiver has to be hardcoded. This
is also in line with the AppleGMACEthernet driver, which just doesn't
distinguish between internal/external transceiver and MDIO/MDI1
respectively in the first place. Tested by: Andreas Tobler

MFC after:	1 week
2010-02-22 21:01:08 +00:00
Pyun YongHyeon
ecafbbb5b9 Add TSO on VLANs. Because re(4) has a TSO limitation for jumbo
frame, make sure to update VLAN capabilities whenever jumbo frame
is configured.
While I'm here rearrange interface capabilities configuration. The
controller requires VLAN hardware tagging to make TSO work on VLANs
so explicitly check this requirement.
2010-02-22 18:51:14 +00:00
Alexander Motin
41a11d8753 Oops! Wrong word order. :( 2010-02-22 17:34:35 +00:00
Andrew Gallatin
0dce6781ae Update mxge to support IFCAP_VLAN_HWTSO.
Note: If/when FreeBSD supports TSO over IPv6, the minimal mxge fw
rev to enable IFCAP_VLAN_HWTSO will need to be increased to 1.4.37
2010-02-22 16:57:03 +00:00
Alexander Motin
6f2c1316f0 Add Intel PCH SATA controller IDs. 2010-02-22 16:27:47 +00:00
Alexander Motin
6a5d28b93a Improve output for controllers that doesn't report SATA speed. 2010-02-22 10:45:40 +00:00
Kip Macy
227ca25786 - make printf conditional
- fix witness warnings by making configuration lock a mutex
2010-02-21 01:11:39 +00:00
Pyun YongHyeon
02d77e455f Increase PCIe maximuim read request size to 2048. Because re(4) uses
Tx DMA burst size 2048, I beleive PCIe maximum read request size
also should match to the value of Tx DMA burst size. With this
change I can get more than 800Mbps for TCP bulk transfers.
Previously I was not able to get more than 700Mbps. If I enable TSO
it now shows 927Mbps.
2010-02-21 00:00:55 +00:00
Pyun YongHyeon
04bde8528b Add TSO support on VLAN. Controller requires VLAN hardware tagging
to make TSO work on VLAN. So if VLAN hardware tagging is disabled
explicitly clear TSO on VLAN. While I'm here remove duplicated
VLAN_CAPABILITIES call.
2010-02-20 23:21:06 +00:00
Pyun YongHyeon
cf5756a6bf Correct inversed programming of ethernet hardware address on
big-endian architecture.

Submitted by:	C. Jayachandran <c.jayachandran at gmail dot com> (initial version)
2010-02-20 22:24:24 +00:00
Marius Strobl
30b9cadca4 Add support for BCM54K2 found in combination with Apple K2 GMAC.
Submitted by:   Andreas Tobler
Obtained from:  OpenBSD
MFC after:      1 week
2010-02-20 22:01:24 +00:00
Ulrich Spörlein
8fa03d08ca Fix common misspelling of hierarchy
Pointed out by:		bf1783 at gmail
Approved by:		np (cxgb), kientzle (tar, etc.), philip (mentor)
2010-02-20 10:19:19 +00:00
Daniel Eischen
4fa8d4eff4 Correct spelling of reseting (found while researching the "bb hang detected"
messages that are plaguing me).  While I'm here, delete trailing whitespace.
2010-02-19 18:23:45 +00:00
Weongyo Jeong
ef0894bfd2 o print msgs with length if the frame is too short to pass to net80211.
o print key index for debugging if the frame is attempted to decrypt for
  WEP, AES or TKIP though currently HW decryption isn't supported.
2010-02-19 03:36:02 +00:00
Matt Jacob
ee3e6d9906 Don't try and re-use a handle, even if the firmware tells you that's what is logged in.
PR:		kern/144026
MFC after:	1 week
2010-02-18 18:35:09 +00:00
Ed Maste
5aa4bb5b49 Include command type in COMMAND TIMEOUT messages to aid in debugging. 2010-02-17 22:28:37 +00:00
Rafal Jaworowski
d6bdd318a3 Assorted fixes for mge(4).
- Use proper map for the busdma sync on mge descriptor.
- Remove unnecesary busdma sync.
- Eliminate redundant locking in mge_reinit_rx() (just assert).
- Kill unused variable.

Submitted by:	Grzegorz Bernacki
Obtained from:	Semihalf
MFC after:	1 week
2010-02-17 17:03:04 +00:00
Rui Paulo
8c53f2f83c Fix Kite and Merlin version check. 2010-02-16 12:43:55 +00:00
Weongyo Jeong
45d9abdbc3 adds bwn(4) driver for supporting Broadcom BCM43xx chipsets.
o uses v4 firmware instead of v3.  A port will be committed to create
    the bwn firmware module.
  o supports B/G and LP(low power) PHYs.
  o supports 32 / 64 bits DMA operations.
  o tested on big / little endian machines so should work on all
    architectures.

It'd not connected to the build until the firmware port is committed.
2010-02-16 01:44:14 +00:00
Weongyo Jeong
5c984ceaf9 supports SPROM rev8 informations properly which are used to support
low-power PHY of bwn(4) and LDO voltage adjustments.
2010-02-16 01:22:33 +00:00
Jung-uk Kim
463537a097 Rename some macros to clarify their intentions and fix style nits. 2010-02-15 20:46:01 +00:00
Jung-uk Kim
aba311e1d4 Add support for cycle' and zero' events for LCD brightness control.
Submitted by:	Daniel Walter (d dot walter at 0x90 dot at) (intial version)
2010-02-15 19:30:28 +00:00
Bernhard Schmidt
ae6fd00faf Fix for the Intel WiFi Link 1000. The EEPROM image is in the OTPROM block
before the last block, not in the last block itself.

Approved by:	rpaulo (mentor)
Obtained from:	OpenBSD
MFC after:	3 weeks
2010-02-15 19:18:46 +00:00
Rui Paulo
1480515a8b Fix KITE version check.
Obtained from:	//depot/user/rpaulo/80211n/...
2010-02-15 18:47:42 +00:00
Rui Paulo
7d4f72b39d Bring back AR9285 support. This fixes most of the issues and should be
pretty usable.

MFC after:	1 month
2010-02-15 17:49:49 +00:00
Andrew Thompson
8bbbf173a2 Add device ID for the FTDI 4232H.
PR:		usb/143832
Submitted by:	UEMURA Tetsuya
2010-02-14 20:10:41 +00:00
Andrew Thompson
2386d71421 Add support for the E1752 3G modem and the required eject command.
Submitted by:	Milan Obuch
2010-02-14 20:05:12 +00:00
Andrew Thompson
3e889e246c Make umodem more tolerant for devices which modem descriptors are misplaced.
Reported by:	Erick Wales
Submitted by:	Hans Petter Selasky
2010-02-14 19:59:19 +00:00
Andrew Thompson
b60541a9ec Add UQ_KBD_BOOTPROTO quirk needed in r203896 2010-02-14 19:56:05 +00:00
Andrew Thompson
1bdb81f124 Detect when we are polling from kernel via cngetc() in the boot process and
reserve the keypresses so they do not get passed to syscons.

Submitted by:	Hans Petter Selasky
2010-02-14 19:53:45 +00:00
Ed Maste
8e7e6335bc Diff reduction with Adaptec's vendor driver.
Driver version 2.1.9 chosen as that Adaptec version roughly corresponds
with the current feature set merged to the in-tree driver.
2010-02-14 17:14:11 +00:00
Rui Paulo
12fefae25c Revert part of the 9285 support because it breaks the 9280 support. I'll
try to do the 9285 support without interfering with any other chipset
revisions support.
2010-02-14 16:26:32 +00:00
Alexander Motin
b41cd53957 MFp4:
With FBS enabled, we have no idea what command caused timeout.
Implement same logic as in siis(4) - wait for other commands
complete or timeout and then give some more time.
2010-02-14 12:30:35 +00:00
Alexander Motin
301c88be98 MFp4:
After last running command completed, give commands in timeout state
second time.
2010-02-14 12:27:49 +00:00
Max Laier
193cbc4d24 Fix drbr and altq interaction:
- introduce drbr_needs_enqueue that returns whether the interface/br needs
   an enqueue operation: returns true if altq is enabled or there are
   already packets in the ring (as we need to maintain packet order)
 - update all drbr consumers
 - fix drbr_flush
 - avoid using the driver queue (IFQ_DRV_*) in the altq case as the
   multiqueue consumer does not provide enough protection, serialize altq
   interaction with the main queue lock
 - make drbr_dequeue_cond work with altq

Discussed with:		kmacy, yongari, jfv
MFC after:		4 weeks
2010-02-13 16:04:58 +00:00
Jung-uk Kim
f29d6f75fa Make sanity check slightly more useful and tweak an error message. 2010-02-13 05:38:21 +00:00
Jung-uk Kim
f67f8ffd43 Prefer correct and simpler backlight control methods for ASUS G2K laptop. 2010-02-13 02:30:43 +00:00
Jung-uk Kim
35dd1ef75c Implement LCD brightness control notify handler.
Submitted by:	Daniel Walter(d dot walter at 0x90 dot at) (intial version)
2010-02-13 02:24:23 +00:00
Ed Maste
2134e2ef57 Garbage collect Falcon/PPC support that has not been used in released
products, based on discussion with Adaptec.
2010-02-12 18:48:18 +00:00
Andriy Gapon
0430ba9e55 acpi: drop the second bus_generic_attach pass
It is belived that that pass s not needed anymore.
Specifically it is not required now for the reasons that were given
in the removed comment.

Discussed with:	jhb
MFC after:	4 weeks
2010-02-11 18:24:00 +00:00
Andriy Gapon
aa83516001 acpi cpu: probe+attach before all other enumerated children on acpi bus
Some current systems dynamically load SSDT(s) when _PDC/_OSC method
of Processor is evaluated.  Other devices in ACPI namespace may access
objects defined in the dynamic SSDT.  Drivers for such devices might
have to have a rather high priority, because of other dependencies.
Good example is acpi_ec driver for EC.
Thus we attach to Processors as early as possible to load the SSDTs
before any other drivers may try to evaluate control methods.
It also seems to be a natural order for a processor in a device
hierarchy.

On the other hand, some child devices on acpi cpu bus need to access
other system resources like PCI configuration space of chipset devices,
so they need to be probed and attached rather late.
For this reason we probe and attach the cpu bus at
SI_SUB_CONFIGURE:SI_ORDER_MIDDLE SYSINIT level.
In the future this could be done more elegantly via multipass.

Please note that acpi drivers that might access ACPI namespace from
device_identify will do that before _PDC/_OSC of Processors are evaluated.

Legacy cpu driver is not affected by this change.

PR:		kern/142561 (in part)
Reviewed by:	jhb
Silence from:	acpi@
MFC after:	5 weeks
2010-02-11 08:50:21 +00:00
Rui Paulo
1ac5dac214 Fix typo in comment.
Pointed out by:	danfe
2010-02-10 11:12:39 +00:00
Rui Paulo
24b509868d 't' stands for Turbo and is a valid mode, so fix previous commit.
Pointed out by:	sam
2010-02-10 11:11:37 +00:00
Pyun YongHyeon
4150ce6f17 Move device specific flag configuration to attach routine.
The softc obtained in device probe wouldn't be the same one used in
device attach. Drivers should not assume any values stored in softc
structure in probe routine will be available for its attach routine.
2010-02-09 19:12:06 +00:00
Tai-hwa Liang
4a97e4f030 Fixing compilation bustage by removing a stray comment fragment. 2010-02-09 04:07:39 +00:00
Andrew Thompson
cf223a88bc Disable the use of the IAAD usb doorbell on NVidia controllers as it can cause
the hardware to stall.

Submitted by:	Hans Petter Selasky
2010-02-09 00:38:40 +00:00
Rebecca Cran
31615ef723 Document the usfs driver and the NO_SYSCTL_DESCR option, and update the comment for umass.
Don't include the sysctl description variables in aic7xxx when NO_SYSCTL_DESCR is used.

Approved by:	rrs (mentor)
2010-02-08 20:57:42 +00:00
Rui Paulo
9ac01d39ad Add multicast key search support. This fixes corrupted mcast packets
when we have more than one hostap vap.

Submitted by:	Russell Yount <russell.yount at gmail.com>
MFC after:	2 weeks
2010-02-08 20:23:20 +00:00
Rui Paulo
21d18f0e20 Fix TX power problems with AR9285. 2010-02-08 20:12:01 +00:00
Rui Paulo
b605438031 Fix typo in comment. 2010-02-08 20:04:02 +00:00
Rebecca Cran
4c21be9b2d Rename usb2_ structures and variables to usb_.
Approved by:	rrs (mentor)
Discussed with:	hps
2010-02-08 19:44:09 +00:00
Gavin Atkinson
b31b20fa02 Add support for a few more Sony-specific ACPI features (default display
brightness, wired LAN power and bass gain), and update the description of
one previously unknown feature (display contrast).  While here, expand on
a comment and remove two defines left over from an old version of the code.

Also update man page to document the above changes, and correct grammar.

PR:		kern/127581
2010-02-07 18:36:30 +00:00
Andriy Gapon
f4ab0cccce acpi_cpu: prefer _OSC over _PDC, just in case
_PDC was deprecated in favor of _OSC long time ago, but it
seems that they still peacefully coexist and in some case
only _PDC is present.
Still _OSC provides a reacher interface and is capable to
report back its status.
If the status is non-zero, then report it, we may find
it useful to understand what firmware expects from OS.
Also clean up some comments that became less useful over time.

Reviewed by:	njl, jhb, rpaulo
MFC after:	3 weeks
2010-02-06 12:48:06 +00:00
Jung-uk Kim
316bcf56a2 Map and report actual video memory we need. 2010-02-06 00:52:42 +00:00
Jung-uk Kim
f801fa102d Replace some homegrown functions with better/correct ones. 2010-02-05 18:00:24 +00:00
Alexander Motin
2622a559a7 Use new helper functions to set PCIe max read request size. 2010-02-05 17:20:48 +00:00
Alexander Motin
24d6a5ed27 Add pci_get|set_max_read_req() helper functions to control maximum PCIe
read request size.

Reviewed by:	jhb@
2010-02-05 17:18:48 +00:00
Alexander Motin
a4271edc11 Report SATA300 chips also as SATA. 2010-02-05 14:41:18 +00:00
Alexander Motin
57ae362c8f When hacking INQUIRY result, make sure that it is right INQUIRY and there
is enough of result to hack.
2010-02-05 12:40:18 +00:00
Andrew Thompson
504cfaf891 The ZTE MF633R modem has a different type of cdrom driver disk, add the product
ID and use a standard scsi eject.

Reported by:	Patrick Lamaiziere
MFC after:	3 days
2010-02-05 01:47:43 +00:00
Andrew Thompson
0988266155 Properly name the 0x0016 ZTE product as MF633R now that its known. 2010-02-04 23:34:35 +00:00
Alexander Motin
0a65b79f42 Return CAM_RELEASE_SIMQ flag only when it is needed, when SIM really
was frozen before and should be released.
2010-02-04 14:40:08 +00:00
Alexander Motin
e28a47de96 Do not release device, when changing number of openings. 2010-02-04 08:54:14 +00:00
Matt Jacob
54e81dece7 Yet another target mode compilation error. 2010-02-04 06:45:14 +00:00
Matt Jacob
97efa6dde8 Fix target mode compilation problem with previous delta 2010-02-04 00:40:12 +00:00
Jung-uk Kim
bfd1f292d4 Remove dead code and fix style(9) bugs. 2010-02-03 22:20:57 +00:00
Jung-uk Kim
c5813a500a Use bytes per scan line from mode table. The previous implementation did
not reflect actual number of bytes when it was not exactly width * bpp * 8.
2010-02-03 22:17:30 +00:00
Jung-uk Kim
a95cde0132 Correct virtual address of frame buffer for non-linear mode.
Reported by:	Marc UBM Bocklet (ubm dot freebsd at googlemail dot com)
2010-02-03 22:07:50 +00:00
Alexander Motin
8c38cd7ceb Implement poll method for atapicam.
It is not perfect, but better then nothing.
2010-02-03 21:45:09 +00:00
Alexander Motin
fff784a8da Report to CAM unit number of underlying ataX bus device, instead of this
atapicamX. It is more apropriate and useful together with "ata" name.
2010-02-03 21:26:54 +00:00
Matt Jacob
c8b8a2c4e6 Redo how commands handles are created and managed and implement sequence
numbers and handle types in rational way. This will better protect from
(unwittingly) dealing with stale handles/commands.

Fix the watchdog timeout code to better protect itself from mistakes.

If we run an abort on a putatively timed out command, the command
may in fact get completed, so check to make sure the command we're
timing it out is still around. If the abort succeeds, btw, the command
should get returned via a different path.
2010-02-03 21:09:32 +00:00
Andriy Gapon
877a6d9994 acpi_cpu: correct capabilities arguments for Processor _OSC evaluation
Populate capabilities buffer according to
Intel Processor Vendor-Specific ACPI Interface Specification.

MFC after:	2 weeks
2010-02-03 14:35:33 +00:00
Alexander Motin
4c9d5e6b0f Disable PHY of unconnected ports when interface power management enabled.
It allows to save a bit more power (about 0.5W on 2 unused ports of ICH8M).
2010-02-03 12:00:57 +00:00
Alexander Motin
4cca153030 - Give ATA/SATA SIMs info about ATAPI packet size, supported by device.
- Make ATA XPT to reject longer SCSI CDBs then supported by device, or
any SCSI CDBs, if device doesn't support ATAPI.
2010-02-02 11:09:28 +00:00
Joerg Wunsch
ac0797c3d1 GPIB overhaul, part #2: make the tnt4882 driver work with the newer
TNT5004 IC.  This involved a major rewrite of a number of things, as
this chip no longer supports the NAT7210 legacy mode but requires the
host to use the (more modern) FIFO mode.

In theory, this also ought to work on the older TNT4882C chip.  I'll
probably add this as optional support (perhaps by a device.hints flag)
later on.  By now, FIFO mode is *only* activates iff a TNT5004 chip
has been detected (where the old code didn't work at all), while
everything else is supposed to use the old code.

MFC after:	2 weeks
2010-02-01 21:21:10 +00:00
Pyun YongHyeon
9a6e301de2 PCI express device status register has W1C feature. Writing 0 has
no effect. Make sure to clear error bits by writing 1. [1]
While I'm here use predefined value instead of hardcodig magic
vlaue.

Submitted by:	msaitoh at NetBSD [1]
2010-02-01 20:58:45 +00:00
Pyun YongHyeon
bde52fe26d Add more bit definitions to PCI express device control and device
status register.

Reviewed by:	jhb
2010-02-01 20:50:49 +00:00
Jack F Vogel
29e1e1a3a7 A few minor changes: add altq option header, add missing conditional
around a buf_ring call that will break 7.3, and thanks to Fabien Thomas
add POLLING support for igb and a minor related fix in the em driver.
2010-02-01 19:28:43 +00:00
Alexander Motin
e024cf2af0 NetCell is a PCI hardware RAID without cable and mode setting. 2010-02-01 15:22:22 +00:00
Weongyo Jeong
1155ca9677 Adds siba_bwn module which is used with bwn(4). Main purpose of this
module is to distinguish parts of Silicon Backplane and of Broadcom
Wireless.
2010-01-31 21:18:22 +00:00
Robert Noland
b1ba33ffbe Welcome drm support for VIA unichrome chips.
MFC after:	2 weeks
2010-01-31 14:30:39 +00:00
Robert Noland
139890fd20 Import simple drm memory manager.
This is required for the VIA driver and at least some parts are needed
for GEM.

MFC after:	2 weeks
2010-01-31 14:25:29 +00:00
Jack F Vogel
146f25649d Fix for kern/141646: when stacking pseudo drivers like
lagg and vlan the vlan attach/detach event is not being
handed down to em, this caused some init code not to run,
and thus VLANs did not work. Ultimately having the event
get propagated would be nice, but for now the solution is
to have HWFILTER off by default, when this is the case
VLANs will work, ifconfig can be used to turn it on and
then get HW tag filtering.
2010-01-30 00:11:44 +00:00
Alexander Motin
ed70cffd35 Reset port on disconnect event, to abort any running requests. 2010-01-29 12:47:04 +00:00
Rui Paulo
f3d3bf8731 Add support for the AR9285 chipset, which is found on many netbooks
available today.

This card is a low power 802.11bgn that only does 11n rates up to MCS 7
(that's 65 Mbps in 20Mhz mode and 135 in 40Mhz mode).
802.11n is  not yet supported, but will be in the future.

The driver still has a problem regarding to the setting of txpower on
the card, so don't expect good performance yet. After fixing this
problem, an MFC is possible.

Special thanks to iXsystems and S Smirnov <tonve at yandex.ru> for help
with the purchase of a netbook with this card.

Sponsored by:	iXsystems, Inc.
2010-01-29 10:10:14 +00:00
Rui Paulo
b0a5caf4f2 Replace Id keyword with the FreeBSD keyword. 2010-01-29 10:07:17 +00:00
Rui Paulo
ed72d9a70b Replace Id keyword with the FreeBSD keyword. 2010-01-29 10:02:50 +00:00
Andrew Thompson
2155c5d814 Rework cam error handling to fix Mitsumi floppy drives.
Submitted by:	mav
2010-01-29 02:38:34 +00:00
Andrew Thompson
c2b2c741a0 Simplify attach for UMASS_PROTO_CBI_I mode and change some switch() returns
into breaks.

Submitted by:	Hans Petter Selesky
2010-01-29 02:35:50 +00:00
Andrew Thompson
4d69093fcc Add null check on quirk lookup and add a couple of umass quirks.
Submitted by:	Hans Petter Selesky
2010-01-29 02:33:50 +00:00
Andrew Thompson
dae1952f93 Add the Netgear WPN111 2010-01-29 02:32:46 +00:00
Andrew Thompson
8fa484e2cc Sync usb products to perforce. 2010-01-29 02:32:18 +00:00
Andrew Thompson
0283fab7f0 Attempt to recover on a TX error rather than stopping all transfers.
Submitted by:	Hans Petter Selesky
2010-01-29 02:31:33 +00:00
Andrew Thompson
89119752d0 Optimise EHCI ISOC HS done check.
Submitted by:	Hans Petter Selasky
2010-01-29 01:30:13 +00:00
Andrew Thompson
031c7388a2 Add device ID.
PR:		usb/142427
2010-01-29 01:27:54 +00:00
Andrew Thompson
97ccc89052 Use device_printf rather than printf + device_get_nameunit. 2010-01-28 22:54:01 +00:00
Andrew Thompson
8b1d9a81e9 Release the firmware after loading to the device. 2010-01-28 22:46:04 +00:00
Andrew Thompson
069f1a8056 Add run(4), a driver for Ralink RT2700U/RT2800U/RT3000U USB 802.11agn devices.
This driver was written for OpenBSD by Damien Bergamini and ported over by
Akinori Furukoshi.
2010-01-28 22:24:54 +00:00
Alexander Motin
0e6eb06168 Add FIS-based switching support. If controller supports FBS, it allows
several devices beyond Port Multiplier to work simultaneously, substantially
increasing performance.
2010-01-28 17:54:47 +00:00