Commit Graph

19694 Commits

Author SHA1 Message Date
Christian Brueffer
a452248814 Add support for Adaptec 39320LPE adapters.
PR:		124202
Submitted by:	Andre Albsmeier <Andre.Albsmeier@siemens.com>
Reviewed by:	gibbs
MFC after:	1 week
2009-10-30 16:23:56 +00:00
John Baldwin
62ec4c19c4 - Numerous whitespace and style fixes.
- More descriptive error messages when failing to parse components during
  attach.
2009-10-29 18:03:16 +00:00
Ed Maste
c89d07b9f5 Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver. 2009-10-29 17:14:18 +00:00
Ed Maste
e46b9eeada Rename aac_fast_intr to aac_filter to reflect its current use. Eliminate
the fallback of using the filter as an interrupt handler, as it is no
longer needed.

Discussed with:	scottl, jhb
2009-10-29 14:53:45 +00:00
Nathan Whitehorn
e5310f3310 Add some magic taken from OS X and Linux to support early revision K2
SATA controllers, like those found on the G5 Xserve.

Reviewed by:	mav
2009-10-29 13:28:37 +00:00
Nathan Whitehorn
f3755df16d Turn off use of ATA_A_4BIT on modern hardware. This flag was already
obsoleted in 1996 by ATA-2, and crashes some modern hardware like some
revisions of the Serverworks K2 SATA controller. Even very ancient
hardware seems not to require it. In the unlikely event this causes
problems, the previous behavior can be re-enabled by defining
ATA_LEGACY_SUPPORT at the top of this file.

Reviewed by:	Alexander Motin <mav@freebsd.org>
2009-10-29 13:27:14 +00:00
Christian Brueffer
af57883569 Remove spurious )
PR:		137758
Submitted by:	Henning Petersen <henning.petersen@t-online.de>
MFC after:	1 week
2009-10-28 15:22:58 +00:00
Ed Maste
867b1d3431 Do first controller time sync after 1 minute, as in Adaptec's vendor
driver.
2009-10-28 13:50:28 +00:00
Ed Maste
b69a64e9c8 Whitespace fixup: 8 spaces -> tab 2009-10-27 19:37:37 +00:00
Jaakko Heinonen
0c73f68bb6 Don't ignore the return value of g_modevent() in fdc_modevent().
Approved by:	trasz (mentor)
2009-10-27 17:14:22 +00:00
Jaakko Heinonen
e4bd91445e Don't ignore the return value of g_modevent() in acd_modevent().
Approved by:	trasz (mentor)
2009-10-27 17:12:59 +00:00
Andrew Thompson
c2e8b89ce4 Revert r198500 for now, this will break situations when
hw.pci.usb_early_takeover is set to zero and the SMM release
is never done.

Pointed out by:	marcel
2009-10-26 21:47:16 +00:00
Andrew Thompson
77cbe30ea9 Remove usb controller takeover code now that it is handled by the pci code.
Reminded by:	jhb
Reviewed by:	HPS
2009-10-26 20:23:15 +00:00
Alexander Motin
84f620d3e2 Report SATA speeds to CAM, to not confuse users with low numbers logged. 2009-10-26 11:26:49 +00:00
Alexander Motin
e8579543e8 Round timeout up when converting CAM milliseconds to ATA seconds. 2009-10-26 11:23:41 +00:00
Alexander Motin
cc0daebb53 Increase ATA command timeouts. Some drives need more then 5s to spin-up.
PR:		kern/111023
2009-10-26 11:20:14 +00:00
Alexander Motin
3663f8041b Add IDs for PATA part also. 2009-10-26 10:07:52 +00:00
Alexander Motin
6d3af67b23 Add two more VIA SATA chip IDs.
PR:		kern/135057
2009-10-26 10:00:59 +00:00
Alexander Motin
55944f2a75 Fix SATA on nVidia MCP55 chipset. It needs some short time to allow BAR(5)
memory access.

PR:		amd64/128686, amd64/132372, amd64/139156
MFC after:	3 days
2009-10-26 08:41:10 +00:00
Ulf Lilleengen
0e0ed74fcc - Add support for Marvell Yukon 88E8042 device.
Submitted by:	Mario Lobo <mlobo -at- digiart.art.br>
Approved by:	yongari
2009-10-25 21:46:38 +00:00
Rui Paulo
e7e0fcbea8 Updates to the iwn driver:
* iwnfw has now been split into individual modules so autoloading of
  firmware module(s) does work again.
* Changes have been made to RUN -> AUTH transition, this should fix the
  issue reported by Glen and others.
* Brandon reported issues in iwn_cmd() with large commands, those have
  been fixed to.
* DEAUTH is now handled correctly.

Submitted by:	Bernhard Schmidt <bschmidt at techwires.net>
2009-10-24 09:55:11 +00:00
Joseph Koshy
27be5d5888 Only claim that the PMC_CLASS_IAF PMCs are supported by a CPU if
there are PMCs on the CPU that belong to the class.

Review and testing by:	fabient
2009-10-24 01:58:10 +00:00
Marcel Moolenaar
d6eb44c8b0 BIOSes, buggy or otherwise, are i386 or amd64 specific.
Have the early USB takeover enabled for i386 and amd64
by default.
This also avoids a panic on PowerPC where the resource
isn't released properly and we find a busy resource
when the USB host controller wants to allocate it...
2009-10-23 22:53:01 +00:00
Rui Paulo
8f30200753 Updated iwn(4) driver supporting the newer series, 5000, 5150 and 5300.
Submitted by:	Bernhard Schmidt <bschmidt at techwires.net>
2009-10-23 22:04:18 +00:00
Alexander Motin
27acd6ea1f Reimplement device reset sequence in more controller-specific way. 2009-10-23 21:33:26 +00:00
Jung-uk Kim
9871fde43f Remove a redundant byte swapping in the previous commit. 2009-10-23 19:02:53 +00:00
Jung-uk Kim
974f3534c0 Search for default 800x600 graphics mode from supported VESA mode list.
Many video controllers do not support 800x600x24 mode any more.
2009-10-23 18:53:21 +00:00
Jung-uk Kim
a0ce33465f - When we restore VESA state, try BIOS POST earlier. VESA restore state
function may not work properly if we don't.  Turn off hardware cursor as
vesa_set_mode() does.
- Add VBE 3.0 specific fields in VESA mode structure and pack it.  Note
the padding is 190 bytes although VBE 3.0 says 189 bytes.  It must be wrong
because the size of structure becomes 255 bytes and the specification says
it must be 256 bytes in total.  In fact, an example code in the spec. does
it right, though.  While we are at it, fix some i386-isms.
- Remove state buffer size limitation.  It is no longer necessary since
sys/compat/x86bios/x86bios.c r198251.
- Move int 0x10 vector test into vesa_bios_post() as we always do it anyway.
2009-10-23 18:41:00 +00:00
Alexander Motin
90759b0021 MFp4:
Do not differentiate 12/16 bytes ATAPI CCB formats when it is not needed.
2009-10-23 14:56:29 +00:00
Alexander Motin
c269e21049 Revert interrupt reason check order back.
ATAPI errors may set IF bit together with TFE.
2009-10-23 13:07:22 +00:00
Andrew Thompson
4ed0304c97 Allow dumping the USB mouse reports via 'sysctl -b dev.ums.N.parseinfo',
previously only available via bootverbose.

PR:		usb/137191
Submitted by:	Eygene Ryabinkin
2009-10-22 20:54:01 +00:00
Rui Paulo
bcda02c3e4 Don't use BUS_DMA_ALLOCNOW as that causes the attachment to fail on
Cambria boards.

MFC after:	2 months
2009-10-22 12:48:17 +00:00
Christian Brueffer
ef1be3b042 Check pointer for NULL before dereferencing it, not after.
PR:		138387, 138388
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
MFC after:	1 week
2009-10-22 06:51:29 +00:00
Fabien Thomas
fa630f3569 Handle the case where there is only one PMC in the system.
Approved by: jkoshy (mentor)
MFC after: 3 days
2009-10-21 18:46:36 +00:00
Christian Brueffer
41d7d5932e Check pointer for NULL before dereferencing it, not after.
PR:		138383
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
Reviewed by:	rnoland
MFC after:	1 week
2009-10-21 15:54:45 +00:00
Christian Brueffer
022ad82222 Check pointer for NULL before dereferencing it, not after.
PR:		138384
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
MFC after:	1 week
2009-10-21 15:04:50 +00:00
Christian Brueffer
56d7cd7cf1 Add a missing free() call.
PR:		138379
Submitted by:	Patroklos Argyroudis <argp@census-labs.com>
Reviewed by:	gibbs
MFC after:	1 week
2009-10-21 14:09:06 +00:00
Alexander Motin
8e7cccb3bd MFp4:
Report real max_target = 15. SIM doesn't need to know that target 15 is PMP.
It is XPT business.
2009-10-21 13:00:01 +00:00
Alexander Motin
e06db1922d MFp4:
Freeze device queue on error to permit periph driver to do proper recovery.
2009-10-21 12:47:39 +00:00
Stanislav Sedov
a0d600845e - Introduce new option BCE_JUMBO_HDRSPLIT that allows user to enable header
splitting in bce(4) instead of (ab)using ZERO_COPY_SOCKETS that was not
  propagated into if_bce.c anyway.  It is disabled by default.

Approved by:	davidch
MFC after:	3 days
2009-10-21 12:47:09 +00:00
Alexander Motin
a1aa38dedf MFp4:
On error, freeze device queue, to allow periph driver to do proper recovery.
Freeze SIM queue only in some cases, when it is needed to protect SIM.

Implement better command timeout detection logic for non-queued commands.
This fixes false positives when command with short timeout waiting for the
long one. For example, when hald tastes CD during burning process.

Read and clear SERR register on interrupt.
2009-10-21 12:42:25 +00:00
Stanislav Sedov
15eda8010b - On entrance to the rx_eof sync RX rings maps with POSTWRITE flag
instead of POSTREAD: the hardware do not touch this memory (CPU
  updates it).  It is already synchronized as PREWRITE after the
  processing is done.

- Synchronize RX return ring memory in rx_eof.  This is needed
  as the deviced updates this memory when receives packets.

- Decouple the synchronization of BGE status block in the interrupt
  service routine: perfrom PREREAD synchronization only all accesses
  to this block are finished.  This seems to be more natural.

Reviewed by:	yongari, marius
MFC after:	2 weeks
2009-10-21 11:50:18 +00:00
Andrew Thompson
11cf5c2f81 Change from CAM_TID_INVALID to CAM_SEL_TIMEOUT error code when the usb device
has been yanked, this works around a cam recounting bug when
CAM_DEV_UNCONFIGURED is set late in the detach. In certain conditions the
reference to the XPT device would not be released which would cause the usb
explore thread to sleep forever on "simfree", preventing any new usb devices to
be found/ejected on the bus.

This is intended to be a quick workaround to the problem without touching CAM
so it can be merged to 8.0.

Suggested by:	mav
MFC after:	3 days
2009-10-20 21:29:46 +00:00
Andrew Gallatin
6b484a49cd Make mxge do a better job recovering from NIC h/w faults
by checking PCI config space when the NIC is not
transmitting.  Previously, a h/w fault would not have been
detected if the NIC was down, or handling an RX only
workload.
2009-10-20 18:58:28 +00:00
Alexander Kabaev
363b8ed74f Use callout_init_mtx on FreeBSD versions recent enough. This closes
the race where interrupt thread can complete the request for which
timeout has fired and while mpt_timeout has blocked on mpt_lock.

Do a best effort to keep 4.x ang Giant-locked configurartions
compiling still.

Reported by: ups
Reviewed by: scottl
2009-10-20 02:35:12 +00:00
Jung-uk Kim
494d4d251b Remove a redundant option ROM check, which was never meant to be committed. 2009-10-19 23:09:39 +00:00
Andrew Thompson
11f35cfaa7 Add support for newer WinChipHead CH341 chips, previously in the uch341 driver.
Submitted by:	HPS
2009-10-19 21:52:02 +00:00
Andrew Thompson
b20adc2b5a Remove the newly added uch341 driver, it will be merged into uchcom instead.
Suggested by:	takawata
Submitted by:	HPS
2009-10-19 21:43:59 +00:00
Jung-uk Kim
3219f535d9 Rewrite x86bios and update its dependent drivers.
- Do not map entire real mode memory (1MB).  Instead, we map IVT/BDA and
ROM area separately.  Most notably, ROM area is mapped as device memory
(uncacheable) as it should be.  User memory is dynamically allocated and
free'ed with contigmalloc(9) and contigfree(9).  Remove now redundant and
potentially dangerous x86bios_alloc.c.  If this emulator ever grows to
support non-PC hardware, we may implement it with rman(9) later.
- Move all host-specific initializations from x86emu_util.c to x86bios.c and
remove now unnecessary x86emu_util.c.  Currently, non-PC hardware is not
supported.  We may use bus_space(9) later when the KPI is fixed.
- Replace all bzero() calls for emulated registers with more obviously named
x86bios_init_regs().  This function also initializes DS and SS properly.
- Add x86bios_get_intr().  This function checks if the interrupt vector is
available for the platform.  It is not necessary for PC-compatible hardware
but it may be needed later. ;-)
- Do not try turning off monitor if DPMS does not support the state.
- Allocate stable memory for VESA OEM strings instead of just holding
pointers to them.  They may or may not be accessible always.  Fix a memory
leak of video mode table while I am here.
- Add (experimental) BIOS POST call for vesa(4).  This function calls VGA
BIOS POST code from the current VGA option ROM.  Some video controllers
cannot save and restore the state properly even if it is claimed to be
supported.  Usually the symptom is blank display after resuming from suspend
state.  If the video mode does not match the previous mode after restoring,
we try BIOS POST and force the known good initial state.  Some magic was
taken from NetBSD (and it was taken from vbetool, I believe.)
- Add a loader tunable for vgapci(4) to give a hint to dpms(4) and vesa(4)
to identify who owns the VESA BIOS.  This is very useful for multi-display
adapter setup.  By default, the POST video controller is automatically
probed and the tunable "hw.pci.default_vgapci_unit" is set to corresponding
vgapci unit number.  You may override it from loader but it is very unlikely
to be necessary.  Unfortunately only AGP/PCI/PCI-E controllers can be
matched because ISA controller does not have necessary device IDs.
- Fix a long standing bug in state save/restore function.  The state buffer
pointer should be ES:BX, not ES:DI according to VBE 3.0.  If it ever worked,
that's because BX was always zero. :-)
- Clean up register initializations more clearer per VBE 3.0.
- Fix a lot of style issues with vesa(4).
2009-10-19 20:58:10 +00:00
Andrew Gallatin
72c042dfb5 Move mxge(4)'s NIC watchdog reset handler from
a callout to a taskqueue
2009-10-19 20:51:27 +00:00