Commit Graph

18655 Commits

Author SHA1 Message Date
Sam Leffler
7bed4560f3 choose the size of the last region for d_stripsize instead of the first;
this fixes geom_redboot on boards that have multiple parts/regions as it
uses the value to locate the FIS directory which is in the last erase
region of flash
2009-03-10 22:29:42 +00:00
Warner Losh
41f0c91517 Restore blank line removed when fixing my earlier botch. Never do
just one last change before bed...

Pointy had to: imp
2009-03-10 22:04:52 +00:00
Andrew Thompson
b1e14b53e3 Make sure HID has a default usage, this fixes recent mouse problems.
Tested by:	Renato Botelho
Tested by:	beech (earlier version)
Submitted by:	Hans Petter Selasky
2009-03-10 19:35:41 +00:00
George V. Neville-Neil
f2d8ff04fe Update the Chelsio driver to the latest bits from Chelsio
Firmware upgraded to 7.1.0 (from 5.0.0).
T3C EEPROM and SRAM added; Code to update eeprom/sram fixed.
fl_empty and rx_fifo_ovfl counters can be observed via sysctl.
Two new cxgbtool commands to get uP logic analyzer info and uP IOQs
Synced up with Chelsio's "common code" (as of 03/03/09)

Submitted by:	 Navdeep Parhar at Chelsio
Reviewed by:	gnn
MFC after:	2 weeks
2009-03-10 19:22:45 +00:00
George V. Neville-Neil
7b77311219 Complete removal of cardbus_write_ivar which was left hanging. 2009-03-10 17:54:04 +00:00
Warner Losh
161832a1cf When freeing all the resources of the card, it is better to turn off
the PORTEN and MEMEN bits in the command register than to zero the
bars.

Use pci_write_ivar directly instead of a one-line wrapper that adds no
value.

Track verbosity changes in pci.

Remove a stray blank line.
2009-03-10 12:10:50 +00:00
Ed Schouten
630b9bf23f Make a 1:1 mapping between syscons stats and terminal emulators.
After I imported libteken into the source tree, I noticed syscons didn't
store the cursor position inside the terminal emulator, but inside the
virtual terminal stat. This is not very useful, because when you
implement more complex forms of line wrapping, you need to keep track of
more state than just the cursor position.

Because the kernel messages didn't share the same terminal emulator as
ttyv0, this caused a lot of strange things, like kernel messages being
misplaced and a missing notification to resize the terminal emulator for
kernel messages never to be resized when using vidcontrol.

This patch just removes kernel_console_ts and adds a special parameter
to te_puts to determine whether messages should be printed using regular
colors or the ones for kernel messages.

Reported by:	ache
Tested by:	nyan, garga (older version)
2009-03-10 11:28:54 +00:00
Marcel Moolenaar
d175be464e Fix a buglet in revision 189401: when restoring a 64-bit BAR,
write the upper 32-bits in the adjacent bar. The consequences
of the buglet were severe enough though: a machine check.
2009-03-10 06:21:52 +00:00
Sam Leffler
f2c6781bfd Add cfid, a disk interface to CFI flash devices; this enables construction
of flash-based filesystems.

Note this is not interlocked against the raw CFI device.
2009-03-09 23:16:02 +00:00
Sam Leffler
2e986da5f1 replace if_watchdog w/ private callout; probably can merge this with the
calibration work sometime in the future
2009-03-09 23:10:19 +00:00
Sam Leffler
dfc86af7d7 remove ar9160Detach; it does nothing 2009-03-09 23:04:06 +00:00
Alexander Motin
79ca9100fd Add type specific suspend/resume ata channel functions. Add checks to avoid
crash on detached channel resume. Add placeholder for possible type-specific
suspend/resume routines.
2009-03-09 20:48:57 +00:00
Andrew Thompson
0f6e8f934f MFp4 //depot/projects/usb 158942,158948
Allow USB to be compiled without ugen support.

Submitted by:	Hans Petter Selasky
2009-03-09 20:08:08 +00:00
Andrew Thompson
07bf38d7cf Fix musb_otg.h include filename.
Submitted by:	Hans Petter Selasky
2009-03-09 20:05:46 +00:00
Ed Schouten
8ddd1f723d Don't call into the TTY layer when inside kdb.
We should just leave the underlying TTY objects alone when scrolling
around in KDB. It should be handled by Syscons exclusively.

Reported by:	pluknet gmail com
2009-03-09 19:46:19 +00:00
Andrew Thompson
bf87f556ac MFp4 //depot/projects/usb@158916
USB mouse patch to address complicated data reporting descriptors.

Reported by:	Boris Kotzev
Submitted by:	Hans Petter Selasky
2009-03-09 15:25:46 +00:00
Warner Losh
b29df1b26d Make generic_intr routines match prototype. 2009-03-09 13:30:00 +00:00
Warner Losh
d3ec8e547e __LP64__ is what's defined, not _LP64_, according to the manual (and
also experience).
2009-03-09 13:29:13 +00:00
Warner Losh
cd6d5177a7 Fix prototypes to be consistent. 2009-03-09 13:27:33 +00:00
Warner Losh
aa11a83ce3 remove now-redunant cardbus attachment lines. 2009-03-09 13:25:34 +00:00
Warner Losh
155a83e87a remove now-redunant cardbus attachment. 2009-03-09 13:23:54 +00:00
Pyun YongHyeon
8fc8651306 For IP1001 PHYs, read auto-negotiation advertisement register to
get default next page configuration. While I'm here explicitly set
IP1000PHY_ANAR_CSMA bit. This bit is read-only and always set
by hardware so setting it has no effect but it would clear the
intention. With this change controllers that couldn't establish
1000baseT link should work.

PR:	kern/130846
2009-03-09 08:17:46 +00:00
Pyun YongHyeon
34e4a32dc0 Use mii_phy_add_media() and remove setting each media type.
While I'm here, don't set mii_anegticks as it's set by
mii_phy_add_media().
2009-03-09 08:09:06 +00:00
Pyun YongHyeon
dba0afd605 For unknown speed, explicitly set IFM_NONE. 2009-03-09 08:01:40 +00:00
Pyun YongHyeon
cf9becf1f6 Report current link state while auto-negotiation is in progress. 2009-03-09 07:56:40 +00:00
Robert Noland
f0eb29f4a6 Consistently use kdev for the kernel device.
Submitted by:	vehemens <vehemens@verizon.net>
MFC after:	3 days
2009-03-09 07:55:18 +00:00
Robert Noland
4d4420bda8 Clean up the printing on amd64. Should also be consistent on i386.
MFC after:	3 days
2009-03-09 07:50:27 +00:00
Robert Noland
d3f8d87d33 There is no need to sync these buffers to swap.
MFC after:	3 days
2009-03-09 07:49:13 +00:00
Robert Noland
254c58f9fd Change the flags to bus_dmamem around to allow it to sleep waiting for
resources during allocation, but not during map load.  Also, zero the
buffers here.

MFC after:	3 days
2009-03-09 07:47:03 +00:00
Robert Noland
00a55e42d6 Fix the flags to bus_dmamem_* to allow the allocation to sleep while
waiting for resources.  It is really the load that we can't defer.
BUS_DMA_NOCACHE belongs on bus_dmamap_load() as well.

MFC after:	3 days
2009-03-09 07:38:22 +00:00
Robert Noland
bf32f93e11 -Make the PCI(E)/AGP calculations consistent
-Calculate the scratch address correctly

MFC after:	10 days
2009-03-09 07:33:35 +00:00
Robert Noland
566be5d4e1 Call the right function for the right chipset.
MFC after:	10 days
2009-03-09 07:24:32 +00:00
Pyun YongHyeon
2c21710b27 Add a new tunable hw.re.prefer_iomap which disables memory register
mapping. The tunable is OFF for all controllers except RTL8169SC
family. RTL8169SC seems to require more magic to use memory
register mapping. r187483 added a fix for RTL8169SCe controller but
it does not looke like fix other variants of RTL8169SC.

Tested by:	Gavin Stone-Tolcher g.stone-tolcher <> its dot uq dot edu dot au
2009-03-09 06:02:55 +00:00
Sam Leffler
f11fe89814 Fix TXPMGT handling:
o correct dBm<->mW conversion logic
o set net80211 TXPMGT capability only if driver reports it is capable

PR:		kern/132342
Submitted by:	"Paul B. Mahol" <onemda@gmail.com>
2009-03-09 02:37:52 +00:00
Andrew Thompson
da6c1373fa MFp4 //depot/projects/usb@158868
Fix bugs and improve HID parsing.
- fix possible memory leak found
- fix possible NULL pointer access
- fix possible invalid memory read
- parsing improvements
- reset item data position when a new report ID is detected.

Submitted by:	Hans Petter Selasky
2009-03-08 22:58:19 +00:00
Andrew Thompson
4309a3fb19 MFp4 //depot/projects/usb@158869
Fix sael init code.

Reported by:	Alberto Mijares
Submitted by:	Hans Petter Selasky
2009-03-08 22:55:17 +00:00
Andrew Thompson
75fd0939b4 Move m_getcl() into its own function. This also fixes a bug where the m_adj for
ETHER_ALIGN was having no effect since m_len had not been set.
2009-03-08 06:56:13 +00:00
Andrew Thompson
36002e92e9 Fix endian conversion from htole16 to htole32.
Tested with:	ARM xscale
2009-03-08 06:03:28 +00:00
Robert Noland
4fcda8938e Import support for ATI Radeon R600 and R700 series chips.
Tested on an HD3850 (RV670) on loan from Warren Block.

Currently, you need one of the following for this to be useful:

	x11-drivers/xf86-video-radeonhd-devel (not tested)
	xf86-video-ati from git (EXA works, xv is too fast)
	xf86-video-radeonhd from git (EXA works, xv works)

There is no 3d support available from dri just yet.

MFC after:	2 weeks
2009-03-07 21:36:57 +00:00
Andrew Thompson
e55e1ebc35 (re)merge r186415,186416 from the old usb stack;
o add Transaction Translator support (still missing ISOC xfers)
o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be
  set in USBMODE
o split reset work into new public routine ehci_reset so bus shim drivers
  can force big-endian byte-select before ehci_init
o enable TT and big-endian MMIO
o force a reset before ehci_init to get byte-select setup

Also go back to using USB_EHCI_BIG_ENDIAN_DESC at compile time to enable the
byteswapping and reduce diffs to the original commits.

This fixes the new USB stack on the Cambria board.
2009-03-07 19:49:47 +00:00
Andrew Thompson
5f1286689c Fix some missed htole32 conversions to htoehci32.
Reviewed by:	hps
2009-03-07 18:08:59 +00:00
Weongyo Jeong
6affafd098 o port NDIS USB support from USB1 to the new usb(USB2).
o implement URB_FUNCTION_ABORT_PIPE handling.
o remove unused code related with canceling the timer list for USB
  drivers.
o whitespace cleanup and style(9)

Obtained from:	hps's original patch
2009-03-07 07:26:22 +00:00
Andrew Thompson
d1864afbac MFp4 //depot/projects/usb@158692
Workaround a EHCI performance problem by issuing a doorbell after queueing a
bulk xfer.

Submitted by:	Hans Petter Selasky
2009-03-06 17:13:12 +00:00
Andrew Thompson
d953f72075 Ensure the cached rq pointer is still valid before waking up the address, the
zyd_cmd function may have timed out. It wouldnt cause a panic but could wakeup
someone.

Spotted by:	HPS
2009-03-06 17:04:47 +00:00
Joerg Wunsch
bbb39ba587 Add a couple of more things to the FTDI driver I came across:
. Dresden Elektronik "Wireless Handheld Terminal"
. Atmel STK541 "Zigbee Controller"

MFC after:	1 week
2009-03-06 14:53:51 +00:00
Robert Noland
41b3a23249 Invert the logic error for the MSI/MSIX vs INTx case.
Pointyhat to:	me

MFC after:	3 days
2009-03-06 11:24:42 +00:00
Andrew Thompson
8a93629e41 Fix usb2_poll not to return an error number as the function return value is a
bitmask of events.

Pointed out by:	HPS
2009-03-05 19:20:17 +00:00
John Baldwin
843994aee1 Add support for the single-port NetMos NM9835 serial adapter. The puc(4)
entry is a specific entry to override the generic NetMos entry so that
puc(4) will leave this device alone and let uart(4) claim it.

Submitted by:	Navdeep Parhar  nparhar @ gmail
Reviewed by:	marcel
MFC after:	1 week
2009-03-05 16:43:33 +00:00
Andrew Thompson
c3beab6ac5 Add support for the UNION interface descriptor, used by Nokia phones.
PR:		usb/117185
2009-03-05 16:15:07 +00:00
John Baldwin
c4e8c9df9e Always read/write the full 64-bit value of 64-bit BARs. Specifically,
when determining the size of a BAR by writing all 1's to the BAR and
reading back the result, always operate on the full 64-bit size.

Reviewed by:	imp
MFC after:	1 month
2009-03-05 15:33:04 +00:00
John Baldwin
d004885d3a Honor the prefetchable flag in memory BARs by setting the RF_PREFETCHABLE
flag when calling bus_alloc_resource() to allocate resources from a parent
PCI bridge.  For PCI-PCI bridges this asks the bridge to satisfy the
request using the prefetchable memory range rather than the normal
memory range.

Reviewed by:	imp
Reported by:	scottl
MFC after:	1 week
2009-03-05 15:28:46 +00:00
Sam Leffler
9c859a041a add a sysctl to ena/dis frobbing cca 2009-03-05 00:15:43 +00:00
Pyun YongHyeon
59f72548f6 Now pci(4) handles PCIM_CMD_INTxDIS so there is no need to poke
this bit in driver.
2009-03-05 00:04:32 +00:00
John Baldwin
e8b145c2ba The recent PCI resource allocation fixes exposed a bug where the same
BAR could be allocated twice by different children of a vgapci0 device.
To fix this, change the vgapci0 device to track references on its associated
resources so that they are only allocated once from the parent PCI bus and
released when no children are using them.  Previously this leaked a small
amount of KVA on at least some architectures.
2009-03-04 21:04:52 +00:00
Robert Noland
9373e7bb61 Remove the local management of INTx as this is now taken care of by pci.
Reviewed by:	jhb
MFC after:	3 days
2009-03-04 18:25:39 +00:00
Robert Noland
a9f33b974a Extend the management of PCIM_CMD_INTxDIS.
We now explicitly enable INTx during bus_setup_intr() if it is needed.
Several of the ata drivers were managing this bit internally.  This is
better handled in pci and it should work for all drivers now.

We also mask INTx during bus_teardown_intr() by setting this bit.

Reviewed by:	jhb
MFC after:	3 days
2009-03-04 18:23:48 +00:00
Andrew Thompson
dc4b1d1662 Add Mobile Action MA-620 Infrared Adapter.
PR:		usb/125072
Submitted by:	Alexander Logvinov
MFC after:	1 week
2009-03-04 03:47:57 +00:00
David Christensen
725e9bc78c - Updated firmware to latest 4.6.X release.
- Added missing firmware for 5709 A1 controllers.
- Changed some debug statistic variable names to be more consistent.

Submitted by:	davidch
MFC after:	Two weeks
2009-03-04 00:05:40 +00:00
Warner Losh
96a31ac3e8 Add in parsing of the disk FUNCE tuples. 2009-03-03 18:57:59 +00:00
John Baldwin
6b0ff427a5 Further refine the handling of resources for BARs in the PCI bus driver.
A while back, Warner changed the PCI bus code to reserve resources when
enumerating devices and simply give devices the previously allocated
resources when they call bus_alloc_resource().  This ensures that address
ranges being decoded by a BAR are always allocated in the nexus0 device
(or whatever device the PCI bus gets its address space from) even if a
device driver is not attached to the device.  This patch extends this
behavior further:
- To let the PCI bus distinguish between a resource being allocated by
  a device driver vs. merely being allocated by the bus, use
  rman_set_device() to assign the device to the bus when it is owned
  by the bus and to the child device when it is allocated by the child
  device's driver.  We can now prevent a device driver from allocating
  the same device twice.  Doing so could result in odd things like
  allocating duplicate virtual memory to map the resource on some
  archs and leaking the original mapping.
- When a PCI device driver releases a resource, don't pass the request
  all the way up the tree and release it in the nexus (or similar device)
  since the BAR is still active and decoding.  Otherwise, another device
  could later allocate the same range even though it is still in use.
  Instead, deactivate the resource and assign it back to the PCI bus
  using rman_set_device().
- pci_delete_resource() will actually completely free a BAR including
  attemping to disable it.
- Disable BAR decoding via the command register when sizing a BAR in
  pci_alloc_map() which is used to allocate resources for a BAR when
  the BIOS/firmware did not assign a usable resource range during boot.
  This mirrors an earlier fix to pci_add_map() which is used when to
  size BARs during boot.
- Move the activation of I/O decoding in the PCI command register into
  pci_activate_resource() instead of doing it in pci_alloc_resource().
  Previously we could actually enable decoding before a BAR was
  initialized via pci_alloc_map().

Glanced at by:	bsdimp
2009-03-03 16:38:59 +00:00
Andriy Gapon
d38d0090c0 ichwd: correct range check for timeout value
Approved by:	jhb (mentor)
2009-03-03 15:50:24 +00:00
Alexander Motin
3a51cb7912 Set PortMultiplier port only for SATA2 channels, where it is applicable.
Doing it on old SATA controllers like Promise PDC20375 SATA150 breaks
their operation.

Tested by:	marcus on PDC20375
2009-03-03 06:39:38 +00:00
Robert Noland
5884a846e7 Disable INTx when enabling MSI/MSIX
This addresses interrupt storms that were noticed after enabling MSI
in drm.  I think this is due to a loose interpretation of the PCI 2.3
spec, which states that a function using MSI is prohibitted from using
INTx.  It appears that some vendors interpretted that to mean that they
should handle it in hardware, while others felt it was the drivers
responsibility.

This fix will also likely resolve interrupt storm related issues with
devices other than drm.

Reviewed by:	jhb@
MFC after:	3 days
2009-03-02 19:00:41 +00:00
Nathan Whitehorn
e2c10e7d4a Some Apple I2C buses give the device's I2C address in a property with the
name i2c-address instead of reg. Change the OFW I2C probe to check both
locations for the address.

Submitted by:	Marco Trillo
Reported by:	Justin Hibbits
2009-03-02 15:22:01 +00:00
Andrew Thompson
9aef556d71 Rename the ushub device class back to uhub as it was in the old usb stack,
moused(8) looks for "uhub/ums" to decide if needs to load the module.

Reported by:	Garrett Cooper
2009-03-02 05:37:05 +00:00
Andrew Thompson
deefe58337 Move the serial drivers from Giant to using their own mutexs.
Tested with:	u3g, ubser, uplcom
2009-03-02 02:44:10 +00:00
Alexander Motin
bb237e0c30 Give controller a chance to issue Soft Reset clear command before checking
ready status. Most of controllers managed to issue coommand and set BUSY
bit almost simultaneously, before we will read it, but at least JMicron JMB363
don't. Ignore timeout errors to keep old behavior when error there was
impossible.

For me this fixes timeout errors on the first command after channel attach
or reinit. Boot in my case is not affected, as there is much time passing
between reset and next command giving reset time to complete.
2009-03-01 22:50:14 +00:00
Alexander Motin
413de0293b Comment out enabling FIS Based Switching inside ata_ahci_issue_cmd() as it
done in other places. Until we have no support for command queueing we have
no any benefit from FBS, while enabling it only here somehow leads to
"port not ready" errors on Intel 63XXESB2 controller.

Tested by:	Larry Rosenman <ler AT lerctr.org>
2009-03-01 16:47:49 +00:00
Alexander Motin
ea74abd5f5 Revert my ata_identify()/ata_reinit() related changes: r189166, r189091
and partially r188903. Revert breaks new drives detection on reinit to the
state as it was before me, but fixes series of new bugs reported by some
people.

Unconditional queueing of ata_completed() calls can lead to deadlock if
due to timeout ata_reinit() was called at the same thread by previous
ata_completed(). Calling of ata_identify() on ata_reinit() in current
implementation opens numerous races and deadlocks.

Problems I was touching here are still exist and should be addresed, but
probably in different way.
2009-02-28 22:07:15 +00:00
Andrew Thompson
f35aaff035 A couple of style nits in the last commit
- unwrap short lines
 - move variable initialisation out of the declaration.
2009-02-28 17:20:00 +00:00
Andrew Thompson
f5f145ba07 - Remove the usb interface number from the device nodes as it is not needed.
- Do not recreate the device nodes in set_alt_interface as the endpoints do not
  change.

Submitted by:	Hans Petter Selasky
2009-02-28 17:14:03 +00:00
Alexander Motin
84b59262f1 Rework device probing by moving ata_getparam() call from ata_identify() to
drivers' probe routines. It allows not to sleep and so not drop Giant inside
ata_identify() critical section and so avoid crash if it reentered on
request timeout. Reentering of probe call checked inside of it.

Give device own knowledge about it's type (ata/atapi/atapicam). It is not
a good idea to ask channel status for device type inside ata_getparam().

Add softc memory deallocation on device destruction.
2009-02-28 11:25:05 +00:00
Robert Noland
51e39089c9 Initialize the vblank structures at load time. Previously we did this
at irq install/uninstall time, but when we vt switch, we uninstall the
irq handler.  When the irq handler is reinstalled, the modeset ioctl
happens first.  The modeset ioctl is supposed to tell us that we can
disable vblank interrupts if there are no active consumers.  This will
fail after a vt switch until another modeset ioctl is called via dpms
or xrandr.  Leading to cases where either interrupts are on and can't
be disabled, or worse, no interrupts at all.

MFC after:	2 weeks
2009-02-28 02:37:55 +00:00
Robert Noland
45de2347c4 Add a tuneable to allow disabling msi on drm at runtime.
Suggested by:	jhb@

MFC after:	2 weeks
2009-02-27 23:50:55 +00:00
Alexander Motin
8363eacca1 Copy/paste bug fix for previos commit. 2009-02-27 23:49:26 +00:00
Andrew Thompson
50230f983b Change the last references to PRIV_ROOT. /dev/usb used to be world writable so
further root checks were needed, this isnt the case anymore but just change it
to PRIV_DRIVER until it can be investigated later.

Spotted by:	rwatson
2009-02-27 22:12:15 +00:00
Andrew Thompson
a09d8d7315 Remove ic_update_mcast calls that are not implemented.
Spotted by:	sam
Pointy hat:	me
2009-02-27 21:50:15 +00:00
Andrew Thompson
77ddf3d34a Partial sync to //depot/projects/usb
- Reissue the ctrl request on failure
- Ensure Tx and ctrl requests are not interleaved
- Add promisc callbacks

Obtained from:	Hans Petter Selasky
2009-02-27 21:14:29 +00:00
Alexander Motin
2c4c54b7a8 Merge rev. 188615, 188812 changes from old-USB to USB2 driver. 2009-02-27 19:27:33 +00:00
David Christensen
0e38e31f49 - Update copyright to 2009.
- Only enable split header operation when ZERO_COPY_SOCKETS is enabled in
  the kernel.

Submitted by:	davidch
MFC after:	1 week
2009-02-27 19:25:06 +00:00
Andrew Thompson
ee3e3ff5c2 Change USB over to make_dev() for all device nodes, previously it hooked into
the devfs clone handler to open the (invisible) devices on the fly.

The /dev entries are layed out as follows,

 /dev/usbctl      = master device
 /dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>)
 /dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint

This also removes the custom permissions model from USB.  Bump
__FreeBSD_version to 800066.

Submitted by:	rink (earlier version)
2009-02-27 17:27:16 +00:00
Bjoern A. Zeeb
33553d6e99 For all files including net/vnet.h directly include opt_route.h and
net/route.h.

Remove the hidden include of opt_route.h and net/route.h from net/vnet.h.

We need to make sure that both opt_route.h and net/route.h are included
before net/vnet.h because of the way MRT figures out the number of FIBs
from the kernel option. If we do not, we end up with the default number
of 1 when including net/vnet.h and array sizes are wrong.

This does not change the list of files which depend on opt_route.h
but we can identify them now more easily.
2009-02-27 14:12:05 +00:00
Robert Noland
2a4f4fc196 Fix up some ioctl permissions issues long overlooked.
Submitted by:	jkim@
MFC after:	2 weeks
2009-02-27 06:01:42 +00:00
Alexander Motin
2ef522c17f Rollback rev. 189093.
mtx_lock() is not needed there as callout initialized with callout_init_mtx().
Sorry.

Submitted by:	Ian Dowse
2009-02-26 23:21:32 +00:00
Alexander Motin
77de503bfa Unhide IDENTIFY command timeouts when verbose messages enabled.
I think it should be suitable for debugging.
2009-02-26 23:07:40 +00:00
Alexander Motin
7a3a39cc64 Restore mtx_lock() call on ata_timeout(), dropped (I think accidentally)
during commit 3 years ago.
2009-02-26 22:26:07 +00:00
Alexander Motin
69328334a6 Remove direct ata_completed() call options from ata_finish(), except for the
kernel dumping case.

ata_completed() may initiate ata_reinit() on error, that may lead to drives
attach or detach. Attach and detach are sending requests to drives and sleep
waiting for results. But ata_finish() can be called directly from
interrupt handler where sleeping is prohibited, so we must break this chain
somewhere. This place seems to fit best.
2009-02-26 21:33:48 +00:00
Alexander Motin
edce9c994e Add MSI blacklisting support.
Disable MSI for nVidia MCP51 controller. Enabling MSI there leads to
unexpected errors and timeouts, that should not happen even if interrupts
are not working completely.
2009-02-26 20:00:14 +00:00
John Baldwin
34a839f108 Don't throw away upper 32-bits of the HT MSI address window. In practice
this is harmless since the address window for MSI on x86 is in the lower
4 GB.

Submitted by:	mav
MFC after:	1 week
2009-02-26 14:32:14 +00:00
Ed Schouten
1356a0807f Remove unneeded variable assignment.
The ts variable is always initialized a few lines below.

Found by:	LLVM scan-build
2009-02-26 12:02:38 +00:00
Robert Noland
23b90efbcf The GM45 handles vblank differently. Pull the changes from Intel in.
MFC after:	2 Weeks
2009-02-25 20:24:13 +00:00
Robert Noland
cc27cbe330 Remove D_NEEDGIANT.
MFC after:	2 weeks
2009-02-25 18:56:49 +00:00
Robert Noland
bbc33a7d31 Turn on MSI if the card supports it. There is a blacklist for chips
which report that they are capable of MSI, but don't work correctly.

MFC after:	2 weeks
2009-02-25 18:54:35 +00:00
Robert Noland
5493c70e90 Prepare the radeon driver for MSI support.
MFC after:	2 weeks
2009-02-25 18:50:35 +00:00
Robert Noland
82369f9166 Add some vblank related debugging and replace the DRM_WAIT_ON macro
with a localized version.

MFC after:	2 weeks
2009-02-25 18:48:33 +00:00
Robert Noland
dc5c632deb This was part of a sync to the code that Intel is shipping in linux.
- Remove the old TTM interface
	- Move register definitions to i915_reg.h
	- Overhaul the irq handler

MFC after:	2 weeks
2009-02-25 18:44:50 +00:00
Robert Noland
67f435f03e The i915 driver was the only consumer of locked task support.
Now that it doesn't use it anymore, get right of the taskqueue
and locked task support.

MFC after:	2 weeks
2009-02-25 18:25:47 +00:00
Robert Noland
c148ca706e The vblank_swap ioctl was fundamentally race prone. Get rid of it.
MFC after:	2 weeks
2009-02-25 18:22:57 +00:00
Robert Noland
a87b4f7293 There is no reason to hold the lock here.
When I was LOCK_PROFILING this was pretty high up and there is no
reason for it.

MFC after:	2 weeks
2009-02-25 18:19:16 +00:00
Robert Noland
4f02999996 Remove the PZERO priority from mtx_sleep.
MFC after:	2 weeks
2009-02-25 18:16:50 +00:00