in preparation for the 5300 3x3 NIC.
During this particular adventure, I did indeed discover that a whole
swath of things made little to no sense.
Those included, and are fixed here:
* A lot of the antenna configuration bits assume the NIC has two receive
chains. That's blatantly untrue for NICs that don't.
* There was some disconnect between the antenna configuration when
forming a PLCP rate DWORD (which includes the transmit antenna
configuration), separate to the link quality antenna configuration.
So now there's helper functions to return which antenna configurations
to use and those are used wherever an antenna config is required.
* The 5300 does up to three stream TX/RX (so MCS0->23), however
the link quality table has only 16 slots. This means all of the
rate entries are .. well, dual-stream rates. If this is the case,
the "last MIMO" parameter can't be 16 or it panics the firmware.
Set it to 15.
* .. and since yes it has 16 slots, it only would try retransmitting
from MCS8->MCS23, which can be quite .. terrible. Hard-code the last
two retry slots to be the lowest configured rate.
* I noticed some transmit configuration command stuff is different
based on firmware API version, so I lifted that code from Linux.
* Add / augment some more logging to make it easier to capture this
stuff.
Now, 3x3 is still terrible because the link quality configuration is
plainly not good enough. I'll have to think about that.
However, the original goal of this - 3x3 operation on the Intel
5300 NIC - actually worked.
There are also rate control bugs in the way this driver handles
notifying the net80211 rate control code when AMPDU is enabled.
It always steps the rate up to the maximum rate possible - and
this eventually ends in much sadness. I'll fix that later.
As a side note - 2GHz HT40 now works on all the NICs I have tested.
As a second side note - this exposed some bad 3x3 behaviour in
the ath(4) rate control code where it starts off at a 3-stream rate
and doesn't downgrade quickly enough. This makes the initial
dhcp exchange take a long time. I'll fix the ath(4) rate code
to start at a low fixed 1x1 MCS rate and step up if everything
works out.
Tested:
* Intel 2200
* Intel 2230
* Intel 5300
* Intel 5100
* Intel 6205
* Intel 100
TODO:
* Test the other NICs more thoroughly!
Thank you to Michael Kosarev <russiane39@gmail.com> for donating the
Intel 5300 NIC and pestering me about it since last year to try and
make it all work.
There were two issues:
1. The area given to vt_is_cursor_in_area() was adding the drawable
area offset, something already handled by this function.
2. The cursor was shifted on the screen by the offset of this area
and thus was misplaced or not erased. Furthermore, when reaching
the bottom or right borders, the cursor was either totally
removed or not erased correctly.
MFC after: 1 week
hardware driver update from Mellanox Technologies.
- Remove empty files from the OFED Linux Emulation layer.
- Fix compile warnings related to printf() and the "%lld" and "%llx"
format specifiers.
- Add some missing 2-clause BSD copyrights.
- Add "Mellanox Technologies, Ltd." to list of copyright holders.
- Add some new compatibility files.
- Fix order of uninit in the mlx4ib module to avoid crash at unload
using the new module_exit_order() function.
MFC after: 1 week
Sponsored by: Mellanox Technologies
The timer is restarted whenever a window buffer is marked as dirty or
the mouse cursor moves.
There's still room for improvement. For instance, we should not mark a
window buffer as dirty when this window isn't displayed.
Review: https://reviews.freebsd.org/D683
Reviewed by: ray@
Approved by: ray@
MFC after: 1 week
If DDB is active, we can't use a taskqueue thread to switch away from
the X window, because this thread can't run.
Reviewed by: ray@
Approved by: ray@
MFC after: 1 week
They are used when a panic occurs or when entering a DDB session for
instance.
cngrab() forces a vt-switch to the console window, no matter if the
original window is another terminal or an X session. However, cnungrab()
doesn't vt-switch back to the original window currently.
MFC after: 1 week
With the current implementation, this allows an X11 server to tell
the console it switches a particular window in "graphics mode". This
information is used by the mouse handling code to ignore sysmouse events
in the window taken by the X server: only him should receive those
events.
Reported by: flo@, glebius@, kan@
Tested by: flo@
Reviewed by: kan@
MFC after: 1 week
... not just the visible part.
This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie. the
resolution goes up), the originally hidden, uninitialized area of the
buffer is displayed on the screen. This leads to a missing text cursor
when it's over an unitialized area.
This was also visible when selecting text: the uninitialized area was
not highlighted.
Internally, this area was zeroed: characters were all 0x00000000,
meaning the foreground and background color was black. Now, everything
is filled with a space with a gray foreground color, like the visible
area.
While here, remove the check for the mute flag and always use
TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground,
black background).
MFC after: 1 week
This allows backends to verify they do not draw outside of this area.
This fixes a bug in vt_vga where the text was happily drawn over the
right and bottom margins, when using the Gallant font.
MFC after: 1 week
... not the whole screen. Don't use font offsets in
vt_mark_mouse_position_as_dirty().
This fixes a bug where the mouse position wasn't marked as dirty when
approaching the borders of the drawn area.
MFC after: 1 week
This fixes a "General protection fault" in vt_vga, where
vt_is_cursor_in_area() erroneously reported that the cursor was over the
text. This led to negative integers stored in "unsigned int" and chaos.
MFC after: 1 week
add opregion handling for drm2 - which exposes some ACPI video configuration
pieces that some Lenovo laptop models use to flesh out which video device
to speak to. This enables the brightness control in ACPI to work these models.
The CADL bits are also important - it's used to figure out which ACPI
events to hook the brightness buttons into. It doesn't yet seem to work
for me, but it does for the OP.
Tested:
* Lenovo X230 (mine)
* OP: ASUS UX51VZ
PR: 190186
Submitted by: Henry Hu <henry.hu.sh@gmail.com>
Reviewed by: dumbbell
It's replaced by vd_bitblt_text_t, which gives more context to the
backend and allows it to perform more efficiently when redrawing a given
area.
MFC after: 1 week
to get upset.
The Qualcomm Atheros reference design code goes through significant
hacks to shut down RX before TX. It doesn't even try do do it in the
driver - it actually makes the DMA stop routines in the HAL shut down
RX before shutting down TX.
So, to make this work for chips that aren't the AR9380 and later, do
it in the driver. Shuffle the TX stop/drain HAL calls to be called
*after* the RX stop HAL call.
Tested:
* AR5413 (STA)
* AR5212 (STA)
* AR5416 (STA)
* AR9380 (STA)
* AR9331 (AP)
* AR9341 (AP)
TODO:
* test ar92xx series NIC and the AR5210/AR5211, in case there's something
even odder about those.
There were situations where the cursor was not erased/redrawn or its
position was marked as dirty even though it's not displayed. The code is
now more straightforward.
At the same, add a function to determine if the cursor covers a given
area. This is used by backends to know if they need to draw the cursor.
This new function should be paired with a new state in struct vt_device,
called vd_mshown, which indicates if the cursor should be displayed.
This again simplifies vd_bitblt_text_t callback's API.
MFC after: 1 week
In textmode, no font is loaded, thus the page fault in
vt_mark_mouse_position_as_dirty() when it wants the font width/height.
For now, create a fake area for the textmode. This needs to be modified
if vt_vga gains mouse support in textmode.
While here, fix a build failure when SC_NO_CUTPASTE is defined:
vt_mark_mouse_position_as_dirty() must not be included in this case.
MFC after: 1 week
This fixes a bug where vga_get_cp437() was called with an invalid
argument. The screen was then filled with '?' instead of the actual
character.
MFC after: 1 week
v1.0.1 2014-8-19
* Do not retry the command and reset the disk when failed to enable or
disable spin up feature.
* Fix up a bug that disk failed to probe if driver failed to access the
10th LBA.
* Fix a bug that request timeout but it has been completed in certain
cases.
* Support smartmontool for R750.
Many thanks to HighPoint for continued support of FreeBSD!
MFC after: 3 days
- It was decided to change the driver name to if_ixl for FreeBSD
- This release adds the VF Driver to the tree, it can be built into
the kernel or as the if_ixlv module
- The VF driver is independent for the first time, this will be
desireable when full SRIOV capability is added to the OS.
- Thanks to my new coworker Eric Joyner for his superb work in
both the core and vf driver code.
Enjoy everyone!
Submitted by: jack.vogel@intel.com and eric.joyner@intel.com
MFC after: 3 days (hoping to make 10.1)
After some testing, it appears that acquiring the lock once and keeping
it longer is slower than taking it multiple times.
While here, fix a typo in another comment.
MFC after: 1 week
Fix some frees incorrectly assigned to M_XENBUS when the memory is
allocated with M_XENSTORE.
Sponsored by: Citrix Systems R&D
MFC after: 1 week
dev/xen/blkback/blkback.c:
- Fix incorrect frees.
The previous global offset, based on the last loaded font, had no
meaning for other windows. This caused a shifted text area, often partly
out-of-screen.
MFC after: 1 week
This patch contains the following fixes for netback:
- Only unbind the evtchn if it has been bound.
- Set xnb->bridge to NULL after free to prevent double-freeing it.
- Set the MAC address for the host-facing interface to a dummy value.
Sponsored by: Citrix Systems R&D
dev/xen/netback/netback.c:
- Prevent trying to unbind if the evtchn has not been bounded.
- Prevent double-freeing xnb->bridge.
- Set the MAC address of the host-facing interface to a dummy value,
so it can work when the interface is added to a bridge.
This is needed so when running under Xen the calls to pci_child_added
can be intercepted and a custom Xen method can be used to register
those devices with Xen. This should not include any functional
change, since the Xen implementation will be added in a following
patch and the native implementation is a noop.
Sponsored by: Citrix Systems R&D
Reviewed by: jhb
dev/pci/pci.c:
dev/pci/pci_if.m:
dev/pci/pci_private.h:
dev/pci/pcivar.h:
- Add the pci_child_added newbus method.
This fixes a bug when two windows use different fonts, but a longer-term
solution is required. The dirty area should be stored as pixels, not
character cells, because such coordinates don't have the same meaning in
all windows, when using different fonts.
MFC after: 1 week
Compared to the deprecated vd_bitbltchr_t callback, vd_bitblt_text_t
receives:
o the whole text buffer
o the dirty area
o the mouse cursor (map, position, colors)
This allows the backend to perform optimization on how to draw things.
The goal is to remove vd_bitbltchr_t and vd_putchar_t, once all driver
are converted (only vt_vga is included in this commit).
In vt_vga, this allows to draw the text and the cursor in one pass,
without ever reading from video memory (because it has all the context).
The main benefit is the speed improvement: no more slideshow during
boot!
Other bugs fixed in vt_vga are:
o left-most characters are drawn properly (the left-most pixels were
missing with bold characters and some wide letters such as 'm')
o no more black square around the cursor
o no cursor flickering when the text is scrolling
There are still many problems to fix: the known issues are marked with
"FIXME" inside the code.
MFC after: 1 week
The goal is to clear the video memory, in case an application drew to
it. So the content shouldn't be loaded in the latches, it can't be
trusted anyway.
This improves a bit the window switch speed.
MFC after: 1 week
At the same time, "w" and "h" members are now called "width" and
"height". The goal is to have a more "public" structure, because it will
soon be passed as argument to a new callback, replacing vd_bitbltchr_t.
MFC after: 1 week
Later, we just see if the "struct mouse_cursor" pointer is set. This
avoids the need to mess with all the conditions several times; this has
been error prone.
While here, rename the variable "m" to a more meaningful "cursor", like
it's done elsewhere in the code.
MFC after: 1 week