Commit Graph

27132 Commits

Author SHA1 Message Date
Hans Petter Selasky
119aeb7241 - Make pointer easier to control when moving slowly.
- Increase chance of vertical scrolling as vertical scrolling is used more often.

Submitted by:	Huang Wen Hui <huanghwh@gmail.com>
MFC after:	2 weeks
2014-03-01 18:56:50 +00:00
Adrian Chadd
03b5d8277b (I think!) make the AR8327 switch correctly handle traffic.
This patch does four things:

* it globally disables mirroring;
* it globally sets the mirroring on each port to be disabled;
* the initial port setup now programs a portmask for the port to allow
  transmission (forwarding) to all other ports bar itself;
* the vlan setup path now programs the portmask for the port to
  allow transmission (forwarding) to all other ports bar itself.

Before this, I hard-coded the portmask to 0x3f which would mean all
ports (bar port 6, which currently isn't hooked up to anything.)
This means that traffic would be duplicated back out the port it
received it.  I bet this wasn't .. optimal.

In any case, this _seems_ to make DHCP from my macosx laptop
work through this access point.  I'll do some further testing
to ensure it's actually working correctly on all my devices.

Tested:

* DB120, AR8327 switch
2014-03-01 10:04:31 +00:00
Adrian Chadd
0840bbcdf3 Add the bluetooth information structs to the firmware RX statistics message.
It turns out that there's a variant format of the RX statisitcs notification
from the intel firmware.  It's even more whacked - the non-BT variant has
bluetooth fields; apparently some later NICs return even _more_ bluetooth
related fields.

I'll commit the statistics structure changes here - it's a no-op for the
driver.  I'll later teach the driver code to populate a statistics structure
from the received message after reformatting things correctly.

I don't _think_ it's going to fix anything related to sensitivity programming
as the CCK/OFDM (non-11n) fields are in the same place for both formats.
But the HT structure and the general statistics aren't in the same place.

I'll go find some NIC(s) that spit out the other format and when I find one,
I'll go and update the driver to handle things correctly.

Tested:

* Intel 5100 (which returns the legacy, non-BT format)

Obtained from:	Linux iwlwifi
2014-03-01 02:57:22 +00:00
Adrian Chadd
ddea319180 Be paranoid about bit operations here. 2014-03-01 00:11:45 +00:00
Adrian Chadd
093c756e0e Remove now dead code. 2014-03-01 00:02:09 +00:00
Dimitry Andric
e40a3fc365 Merge from head up to r262611. 2014-02-28 17:46:56 +00:00
Warner Losh
c04f8bc023 Add device and gadget bindings for fdt. These are preliminary and will
need work before they work, especially the gadget bindings.
2014-02-28 03:00:31 +00:00
Warner Losh
97eb0c3c6a Add fdt binding for nand for Atmel parts. This does little more than
match the device. Pinctrl will need to be added before this will work,
in addition to migrating the current board_foo.c method of configuring
these pins to something else. Non-FDT systems won't be affected, yet.
2014-02-28 02:38:04 +00:00
Alexander Motin
37b8d8c41c Restore SIM freeze/release match, broken at r253549.
This fixes problem with SIM left in frozen state after reinit, for example,
after firmware update.

MFC after:	1 week
2014-02-27 21:48:34 +00:00
Xin LI
def7eaf147 Get rid of the 'chan' from softc structure and use the latter
directly as sleep channel.

PR:		kern/174684
Submitted by:	jmg
MFC after:	2 weeks
2014-02-27 21:41:52 +00:00
Christian Brueffer
4170452de3 Add missing includes and remove two unused ones.
Reviewed by:	loos
MFC after:	1 week
2014-02-27 21:01:10 +00:00
Hans Petter Selasky
a6609003d4 Clear the knote list before destroying it.
Add seldrain() to wakeup any pollers.

Submitted by:	Kohji Okuno <okuno.kohji@jp.panasonic.com>
MFC after:	2 weeks
2014-02-27 12:11:43 +00:00
Alexander Motin
ec3dd42625 Pass proper pointer to bus_dmamem_free() in mps_iocfacts_free().
Passing there pointer into the middle of allocated area caused kernel
panic during reinit, for example, after firmware upgrade.

MFC after:	1 week
2014-02-27 11:34:26 +00:00
Hans Petter Selasky
e2723934d6 Add missing call to "knlist_destroy()".
Found by:	John-Mark Gurney <jmg@funkthat.com>
MFC after:	2 weeks
2014-02-27 09:15:58 +00:00
Hans Petter Selasky
0b6d54d450 Add support for kqfilter to USB character devices.
Submitted by:	Kohji Okuno <okuno.kohji@jp.panasonic.com>
MFC after:	2 weeks
2014-02-27 08:57:37 +00:00
Warner Losh
c0159aff30 Don't complain about missing prototypes to ease bootstrap issues. 2014-02-27 08:21:28 +00:00
Justin Hibbits
5c0761ba72 Fix callchain capture for hwpmc(4). While here, some style(9) fixes, too.
MFC after:	2 weeks
2014-02-27 04:45:29 +00:00
Dimitry Andric
bdc74e2bc0 Merge from head up to r262536. 2014-02-26 22:26:40 +00:00
Adrian Chadd
b67ba111e9 Add LED setup support for the AR8327.
Tested:

* DB120

Obtained from:	OpenWRT
2014-02-26 02:00:37 +00:00
Adrian Chadd
810bdedd75 Add in the SGMII configuration code. The DB120 doesn't use it, so I
have no way to evaluate it.

Obtained from:	OpenWRT
2014-02-26 01:46:42 +00:00
Adrian Chadd
f9950f9ac8 Undo the DB120 hard-coded values in the AR8327 code and fetch it from
the hints environment.

Tested:

* DB120
2014-02-26 01:32:06 +00:00
Julio Merino
50b9fb4657 Fix comment introduced in r262480: it's 1920x1200, not 1980x1200.
PR:		kern/180558
MFC after:	5 days
2014-02-25 23:04:39 +00:00
Julio Merino
478b27042c Increase maximum number of columns to support 1980x1200 displays.
In my specific case, this fixes the problem of my PowerMac G5 displaying a
4:3 console on a 16:10 display with black bars on the left and right.

PR:		kern/180558
Reviewed by:	nwhitehorn
MFC after:	5 days
2014-02-25 13:48:05 +00:00
Hans Petter Selasky
358e903857 Don't generate devd rules for WSP device ID's found in the ATP driver yet.
MFC after:	2 weeks
2014-02-25 09:34:30 +00:00
Hans Petter Selasky
eaef7dbdab Updates for WSP driver:
1) Add support for page back/forward.
2) While doing HOR scrolling, disable VER scrolling.
3) Checking dx_sum and dy_sum before emulate right button, this can
avoids unexpected right button press.
4) Fix stable pointer operation when emulating middle button.

Submitted by:	Huang Wen Hui <huanghwh@gmail.com>
MFC after:	2 weeks
2014-02-25 08:37:06 +00:00
Dimitry Andric
c3bb517174 Merge from head up to r262472. 2014-02-25 07:40:37 +00:00
Kevin Lo
5c5e99d273 Add a flag to run's device list which uses a standard scsi eject.
The flag indicates that the mcu doesn't need to load firmware.

Tested by:	Alex Deiter <alex dot deiter at gmail.com>, myself
Tested on:	ASUS USB-N66
2014-02-25 01:42:02 +00:00
Hans Petter Selasky
973650a472 Fix compiler warning.
Reported by:	David Wolfskill <david@catwhisker.org>
MFC after:	2 weeks
2014-02-24 19:19:35 +00:00
Hans Petter Selasky
266ffc1f40 Update ATP driver:
- Add support for emulating a mouse wheel, Z-axis.

Submitted by:	Rohit Grover <rgrover1@gmail.com>
MFC after:	2 weeks
2014-02-24 10:44:42 +00:00
Adrian Chadd
9ab21e32fb Add in port0/port6 configuration as part of the platform data code path.
It's still hardcoded (for db120) but it is now hardcoded in all the
same place (ie, the pdata path.)  The port config/status code now checks
port0/port6 as appropriate to configure things.

Tested:

* Qualcomm Atheros DB120, AR8327 switch.
2014-02-24 05:55:00 +00:00
Adrian Chadd
482d268d49 Link the AR8327 to the build. 2014-02-24 04:47:27 +00:00
Adrian Chadd
7330dd0bb4 Add initial AR8327 support.
This is (almost!) enough to actually probe, attach, configure a default
port group and do some basic work.  It's also totally hard-coded for
the Qualcomm Atheros DB120 board - it doesn't yet have any of the code
from OpenWRT which parses extra configuration data to know how to program
the switch.  The LED stuff is also missing.

But, it's enough to facilitate board, PHY, switch and VLAN bringup,
so I am committing it now.

Tested:

* Qualcomm Atheros DB120

Obtained from:	OpenWRT
2014-02-24 04:47:16 +00:00
Adrian Chadd
6dcbabd7d6 Methodize the arswitch VLAN routines.
These differ per chipset family in subtle and evil ways.

It becomes very noticable on the AR8327 where the layout is just plain
wrong.
2014-02-24 04:44:28 +00:00
Adrian Chadd
570c21252c * Ensure enough ports/phys are available for both the AR8327 and previous
switches.

* Add some new VLAN HAL methods that will be used by the VLAN configuration
  code.  The AR933x and later switches use slightly different register
  layouts (even though the driver currently doesn't support it.)
2014-02-24 04:43:23 +00:00
Adrian Chadd
49f79cfd5f Track and expose the latest statistics from the firmware.
Tested:

* Intel Centrino 6205
2014-02-24 02:37:04 +00:00
Adrian Chadd
892ebbbd84 Reserve a bit for statistics debugging. I'll hopefully use it soon. 2014-02-24 02:13:20 +00:00
Hans Petter Selasky
37247d72eb Update ATP driver:
- Support for double-tap and drag.
- Support for 2-finger horizontal scrolling which translates to page-back/forward events.
- Single finger tap is equivalent to a left-button press.
- Two-finger taps are mapped to the right-button click.
- Three fingers are mapped to middle button.
- Add sysctl to disable single finger tapping.
- Fix for multiple open of /dev/atp0
- Enhanced support for the Fountain/Geyser family by adding Geyser4.
- Update manual page.

Submitted by:	Rohit Grover <rgrover1@gmail.com>
MFC after:	2 weeks
2014-02-23 23:36:32 +00:00
Dimitry Andric
892620150f Merge from head up to r262415. 2014-02-23 23:33:11 +00:00
Adrian Chadd
2e9afe9597 Fix a typo. 2014-02-23 23:13:53 +00:00
Adrian Chadd
d31cb7480b Fix indentation. 2014-02-23 21:43:15 +00:00
Dimitry Andric
2994da7d3c Remove more superfluous const specifiers. 2014-02-23 18:36:45 +00:00
Hiren Panchasara
92389b2759 PicoStation M2HP presents reg domain 0x2a which is not found in atheros or linux
reference code. Add this workaround for now.

Reviewed by:	adrian
2014-02-23 18:07:17 +00:00
Luigi Rizzo
5a067ae187 compile with NOINET 2014-02-20 04:56:55 +00:00
Adrian Chadd
a9ad42220a Extract out the port VLAN flags/setup code and throw it into two new
HAL methods.

This allows the AR8327 code to override it as appropriate.

Tested:

* DB120 - AR8327 and AR9340 on-board switch; only running 'etherswitchcfg'
  to check configs.  The actual VLAN programming wasn't tested.
2014-02-19 06:43:52 +00:00
Adrian Chadd
2bddba6a60 Add methods for the VLAN port set/get routines.
The registers (and perhaps the flags) are different for the AR8327, so
I'll stub those out until they're written.

Tested:

* DB120 - both on-chip AR9340 and AR8327 switches.
2014-02-19 06:35:17 +00:00
Adrian Chadd
ddbc44200a Turn the port init function into a HAL method and initialise it to the
default port init code.

This needs to be overridden for the AR8327.
2014-02-19 06:03:58 +00:00
Adrian Chadd
e765499eed Teach the PHY register path about the different MDIO bus address
for the AR8327.

Tested:

* AR8327, DB120
2014-02-19 06:02:47 +00:00
Adrian Chadd
e3ba3a89ab Add a new method to set up the individual port in question.
The AR8327 requires some different setup code.
2014-02-19 06:01:40 +00:00
Adrian Chadd
df892897a2 Change arswitch_ports_init() to arswitch_port_init(), and teach it to take
a single port to setup.

This may end up later being used as part of some logic to program
the PHY for a single port, rather than having to reinitialise them
all at once.

Tested:

* DB120
2014-02-19 05:35:41 +00:00
Adrian Chadd
0e67bf94fc Add in the AR8327 probe/attach code and switch type.
It detects fine, but (as expected) it won't attach just yet, let alone
pass traffic.

Tested:

* DB120, AR8327 switch
2014-02-19 05:09:47 +00:00