Commit Graph

19552 Commits

Author SHA1 Message Date
Roman Divacky
fd3c9374ff Change the command argument to ioctl routines to u_long to avoid
truncating the command to 32bit on 64bit archs where int is 32bit
(ie. amd64).

Approved by:	scottl
Approved by:	ed (mentor, implicit)
2009-09-22 16:28:07 +00:00
John Baldwin
ce95033db7 Don't reread the command register to see if enabling I/O or memory
decoding "took".  Other OS's that I checked do not do this and it breaks
some amdpm(4) devices.  Prior to 7.2 we did not honor the error returned
when this failed anyway, so this in effect restores previous behavior.

PR:		kern/137668
Tested by:	Aurelien Mere  aurelien.mere  amc-os.com
MFC after:	3 days
2009-09-22 15:43:03 +00:00
Joel Dahl
2ee4e98c7e Move es137x.c and es137x.h to a 2-clause BSD license. Also move a few
comments.

Submitted by:	Joachim Kuebart
Approved by:	core, Russell Cattelan <cattelan@thebarn.com>
2009-09-22 13:23:59 +00:00
Coleman Kane
52d75a271f The ndis_scan function may be started after ndis vap have been destroyed
PR:		kern/138632
Submitted by:	Paul B. Mahol <onemda at gmail.com>
MFC after:	3 days
2009-09-22 12:36:51 +00:00
Marius Strobl
4640348546 - Add missing bus_dmamap_sync(9) calls for the work DMA map. Previously
the work area was totally unsynchronized which means this driver only
  had a chance of working on x86 when no bounce buffers were involved,
  which isn't that likely given that support for 64-bit DMA is currently
  broken throughout ata(4).
- Add necessary little-endian conversion of accesses to the work area,
  making this driver work on big-endian hosts. While at it, use the
  alignment-agnostic byte order encoders in order to be on the safe side.
- Clear the reserved member of the SG list entries in order to be on the
  safe side. [1]

Submitted by:	yongari [1]
Reviewed by:	yongari
MFC after:	3 days
2009-09-22 11:47:21 +00:00
Marius Strobl
eb811915d2 - According to Linux, the ALi M5451 can do 31-bit DMA instead of just
30-bit like the reset of the controllers supported by this driver.
  Actually ALi M5451 can be setup up to generate 32-bit addresses by
  setting the 31st bit via the accompanying ISA bridge, which allows
  it to work in sparc64 machines whose IOMMU require at least 32-bit
  DMA. Even though other architectures would also benefit from 32-bit
  DMA, enabling this bit is limited to sparc64 as bus_dma(9) doesn't
  generally guarantee that a low address of BUS_SPACE_MAXADDR_32BIT
  results in a buffer in the 32-bit range.
- According to Tatsuo YOKOGAWA's ali(4), the the DMA transfer size of
  ALi M5451 is fixed to 64k and in fact using the default size of 4k
- The 4DWAVE DX and NX require the recording buffer to be 8-byte
  aligned so adjust the bus_dma_tag_create(9) accordingly.
- Unlike the rest of the controllers supported by this driver, the
  ALi M5451 only has 32 hardware channels instead of 64 so limit the
  loop in tr_intr() accordingly. [1]

Submitted by:	yongari [1]
Reviewed by:	yongari (superset of what is committed)
MFC after:	3 days
2009-09-22 11:38:45 +00:00
Ed Schouten
052002e6f2 Use an unsigned integer for storing the key code.
It seems Clang breaks when checking for SPCLKEY, which is now
0x80000000. Using an unsigned integer fixes this. This is also
consistent with other pieces of kbd/syscons code, because these also use
u_int.

Submitted by:	rdivacky
2009-09-22 11:29:11 +00:00
Andrew Gallatin
a393336b87 Improve mxge watchdog routine's ability to reliably reset a failed NIC:
- Mark the link as down, so if watchdog reset fails, link watching
    failover software can notice it
- Don't send MXGEFW_CMD_ETHERNET_DOWN if the NIC has been reset, it is
    not needed, and will fail on a freshly reset NIC.
- Ensure the transmit routines aren't attempting to PIO write to doorbells
    while the NIC is being reset.
- Download the correct f/w, rather than using the EEPROM f/w after reset.
- Export a count of the number of watchdog resets via sysctl
- Zero all f/w stats at reset.  This will lead to less confusing
    diagnostic output when investigating NIC failures.

MFC after:	3 days
2009-09-21 20:16:10 +00:00
Andrew Gallatin
65c690668b Add support for throttling transmit bandwidth. This is most commonly
used to reduce packet loss on high delay (WAN) paths with a
slow link.
2009-09-21 14:41:07 +00:00
Xin LI
65553dd979 To be safe, make this module initialize earlier by specifying SI_SUB_CPU
instead of SI_SUB_KLD.  Note that we don't believe that there is any
consumers of x86bios that would be triggered in the early stage of boot,
so this is more or less just a safebelt.

Submitted by:	swell.k at gmail.com
2009-09-21 09:09:55 +00:00
Xin LI
13c937f899 Style(9) fixes.
Submitted by:	swell.k at gmail.com
2009-09-21 08:53:26 +00:00
Xin LI
8b1620e069 Allow atkbd to obtain keyboard repeat rate from BIOS on amd64.
Submitted by:	swell.k at gmail.com
2009-09-21 08:24:22 +00:00
Xin LI
205d67b00d Collapase interrupt supporting functions to a new module, and switch from
x86emu to this new module.

This changeset also brings a fix for bugs introduced with the initial
x86emu commit, which prevents the user from using some display mode or
cause instant reboots during mode switch.

Submitted by:	paradox <ddkprog yahoo com>
2009-09-21 08:17:57 +00:00
Xin LI
372c733759 Enable s3pci on amd64 which works on top of VESA, and allow
static building it into kernel on i386 and amd64.

Submitted by:	swell.k at gmail.com
2009-09-21 07:05:48 +00:00
Matt Jacob
cb8461c836 (semiforced commit to add comment missed in last delta)
Add a maximum response length for FCP RSPNS IUs.

Clarify some of the FC option words for setting parameters
and try and disable automatic PRLI when in target mode- this
should correct some cases of N-port topologies with 23XX cards
where we put out an illegal PRLI (in target mode only we're
not supposed to put out a PRLI).
2009-09-21 01:41:19 +00:00
Matt Jacob
e3ec25e2aa Remove file unused in freebsd. 2009-09-21 01:38:22 +00:00
John Baldwin
5c84347532 Re-remove the IBM0057 ID used for PS/2 mouse controllers. The asl for the
61p includes the hotkey device as IBM0068 and the mouse as IBM0057 similar
to other systems.

Submitted by:	marius
MFC after:	3 days
2009-09-20 13:28:19 +00:00
Ed Schouten
b05f9c86d1 Make the keyboard layer Unicode aware.
Just take keyent_t to use an u_int to store the Unicode codepoints.
Unfortunately the keymap is now too big to be loaded using an ioctl
argument, so change the ioctl to pick a pointer.

This change breaks kbdcontrol ABI. It doesn't break X11, because X11
doesn't do anything with syscons keymaps. It just switches the device
out of K_XLATE.

Obtained from:	//depot/user/ed/newcons/...
2009-09-19 17:56:26 +00:00
Jung-uk Kim
afb9e5cf2e Change cache attribute for VESA frame buffer from UC to write-combining.
This improves scrolling speed for high resolution graphics mode console.
2009-09-19 04:36:38 +00:00
Ed Schouten
790dd1b5af Just use ttydisc_rint_simple() instead of doing it ourselves.
This code seems to do exactly the same as ttydisc_rint_simple() does
nowadays. Just remove it.

Obtained from:	//depot/user/ed/newcons/sys/dev/syscons/syscons.c
2009-09-18 15:39:09 +00:00
Rui Paulo
16d452b4bc Call mwl_rxdma_cleanup() if there was an error setting up the RX DMA. 2009-09-18 12:25:31 +00:00
Scott Long
2fdaa90df8 Sync driver with Yahoo:
- Implement MSI support (MSIX support was already there)
- Use a table to drive MSI/MSIX exceptions
- Pre-calculate the command address instead of wasting cycles doing the
  calculation on every i/o.
2009-09-16 23:27:14 +00:00
Scott Long
744c0d23ea Fix locking around copyout() operations. 2009-09-16 23:17:22 +00:00
Scott Long
b23be3e0a6 Make MSI and PERFORMANT interrupts work correctly. Only require the minimum
number of MSIX interrupts that are needed, and don't strictly check for 4.
Enable enough interrupt mask bits so that the controller will generate
interrupts in PERFORMANT mode.  This fixes the hang-on-boot issues that
people were seeing with newer controllers.
2009-09-16 23:10:10 +00:00
Scott Long
c7241f65ad Increase CISS_MAX_PHYSTGT to 256 so that it matches what the controller might
give us.  Without this, certain data structures get sized incorrectly, leading
to a panic on certain cards that want to use high-value target numbers.
2009-09-16 22:52:20 +00:00
Matt Jacob
ae5db1186f Accomodate old style XPT_IMMED_NOTIFY and XPT_NOTIFY_ACK so that
we at least don't panic.

We don't really support dual role mode (INITIATOR/TARGET) any more. We
should but it's broken and will take a fair amount of effort to fix
and correctly manage both initiator and target roles sharing the port
database. So, for now, disallow it.
2009-09-15 02:25:03 +00:00
Jung-uk Kim
fdfa6079a2 Restore (undocumented) support for early revisions and add more comments.
Reported by:	kris
2009-09-14 23:08:19 +00:00
Rui Paulo
f17bca8261 Use %zu for size_t.
Fix printf format string (again)

Pointed out by:	bde, ed
2009-09-14 21:33:00 +00:00
Rui Paulo
b660846ed8 Fix previous commit. I got it backwards.
MFC after:	1 week
2009-09-14 16:16:07 +00:00
Rui Paulo
e1311070b0 Fix printf format string in asmc_key_dump().
Spotted by:	tinderbox
MFC after:	1 week
2009-09-14 15:53:30 +00:00
Nick Hibma
c1a293abfc John Baldwin suggested that 'stolen memory' only happens in the case of
i810 and therefore is useful info there. Aperture size and stolen memory
are now printed on one line.

Submitted by:	jhb
2009-09-14 13:16:16 +00:00
Rui Paulo
1269f4d431 Make the sudden motion sensor work on older models and add a bit of
debugging.

Submitted by:	Christoph Langguth <christoph at rosenkeller.org>
MFC after:	1 week
2009-09-14 11:46:43 +00:00
Xin LI
b53c4efaa1 Enable BIOS modes on amd64.
Submitted by:	paradox <ddkprog at yahoo com>
2009-09-14 05:38:03 +00:00
Ed Schouten
94dc815e34 Make sure we never place the cursor outside the screen.
For some vague reason, it may be possible that scp->cursor_pos exceeds
scp->ysize * scp->xsize. This means that teken_set_cursor() may get
called with an invalid position. Just ignore the old cursor position in
this case.

Reported by:	Paul B. Mahol <onemda gmail com>
MFC after:	1 month
2009-09-13 18:45:59 +00:00
Robert Noland
14928dda5c Add a couple of small fixes from the AMD folks.
- max tex height is 8192
	- increment src/dst by the full transfer amount

MFC after:	3 days
2009-09-13 11:10:38 +00:00
Robert Noland
199e206513 Add missing pci id for Radeon 4850 X2
MFC after:	3 days
2009-09-13 11:08:06 +00:00
Ed Schouten
87da28e914 Commit a change that I missed in the previous commit.
I ran `svn commit' in sys/teken/, instead of sys/.
2009-09-12 14:46:22 +00:00
Ed Schouten
e06d84fc49 Make 8-bit support run-time configurable.
Now to do the same for xterm support. This means people can eventually
toy around with xterm+UTF-8 without recompiling their kernel.
2009-09-12 10:34:34 +00:00
Xin LI
7ec7f6d5ed Make use of the more flexable device hints by adding a new field,
vesa_mode to specify VESA mode, as suggested by jhb@.
2009-09-12 00:12:47 +00:00
Jung-uk Kim
92488a5703 Catch up with ACPICA 20090903. 2009-09-11 22:49:34 +00:00
Jung-uk Kim
7ca2d97bbd Fix typos in comments from the previous commit. 2009-09-11 22:05:59 +00:00
Jung-uk Kim
a4165bba6f Improve amdtemp(4) significantly:
- Improve newer AMD processor support (Family 0Fh Revision F and later).
- Adjust offset if DiodeOffet is set and valid.  Note it is experimental
but it seems to give us more realistic temperatures.  Newer Linux driver
blindly adds 21C for Family 0Fh desktop processors, however.
- Always populate dev.cpu and dev.amdtemp sysctl trees regardless of probe
order for consistency.  Previously, dev.cpu.N.temperature was not populated
if amdtemp was loaded later than ACPI CPU driver and temperatures were not
accessible from dev.amdtemp.N.sensor0 tree for Family 10h/11h processors.
- Read the CPUID from PCI register instead of CPUID instruction to prevent
possible revision mismatches on multi-socket system.
- Change macros and variables to make them closer to AMD documents.
- Fix style(9) nits and improve comments.
2009-09-11 21:47:44 +00:00
Andriy Gapon
d16d35fd54 pci(4): don't perform maximum register number check
Different sub-kinds of PCI buses may have different rules and
thus it is up for the bus backends to do proper input checks.
For example, PCIe allows configuration register numbers < 0x1000,
while for PCI proper the limit is 0x100.
And, in fact, the buses already do the checks.

Reviewed by:	jhb
MFC after:	1 week
X-ToDo:		add check for negative value to bus backends
X-ToDo:		use named constant for maximum PCIe register
2009-09-11 18:48:49 +00:00
Xin LI
493d6f54bc Extend the usage of sc(4)'s hint variable 'flag'. Bit 0x80 now means
"set vesa mode" and higher 16bits of the flag would be the desired mode.

One can now set, for instance, hint.sc.0.flags=0x01680180, which means
that the system should set VESA mode 0x168 upon boot.

Submitted by:	paradox <ddkprog yahoo com>, swell k at gmail.com with
		some minor changes.
2009-09-11 02:07:24 +00:00
Jack F Vogel
ac54649762 Stats missed packet handling was still not quite
right, thanks to Dmitrij Tejblum for the correction,
need a variable with scope only within the for loop
for all queues.

MFC: 3 days
2009-09-11 00:00:23 +00:00
Jack F Vogel
7d21b9c117 Fix build issue with last commit. 2009-09-10 21:16:26 +00:00
Jack F Vogel
b53aa98e18 Fix build complaint from previous checkin 2009-09-10 21:14:55 +00:00
Andriy Gapon
f778af723b pci: remove definitions of duplicate constants
Suggested by:	jhb
Reviewed by:	jhb
MFC after:	1 week
2009-09-10 19:27:53 +00:00
Nick Hibma
3e3a2c6062 Move the printing of aperture size and stolen memory behind bootverbose.
None of the other AGP drivers actually displays this information at all,

MFC after:	1 week
2009-09-10 19:24:46 +00:00
Jack F Vogel
7f9960edcb Fix an xmit mbuf leak, when transmit failed but you
still have an mbuf it was not being requeued.

MFC: 3 days
2009-09-10 18:56:45 +00:00