[go: nahoru, domu]

History log of /drivers/thunderbolt/switch.c
Revision Date Author Comments
c9c2deef457c766a33c4862c9c198c20854d5fb6 20-Jun-2014 Sachin Kamat <sachin.kamat@samsung.com> thunderbolt: Use NULL instead of 0 in switch.c

The function returns a pointer. Hence return NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10fefe56bba413fb0525207c65cf50cf2a5afaff 20-Jun-2014 Sachin Kamat <sachin.kamat@samsung.com> thunderbolt: Fix build error in switch.c

Fixes the below error:
drivers/thunderbolt/switch.c:347:2: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration]
drivers/thunderbolt/switch.c:381:2: error: implicit declaration of function ‘kcalloc’ [-Werror=implicit-function-declaration]

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
343fcb8c70d76967ba64493ca984e40baad9d0f6 12-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Fix nontrivial endpoint devices.

Fix issues observed with the Startech docking station:

Fix the type of the route parameter in tb_ctl_rx. It should be u64 and not
u8 (which only worked for short routes).

A thunderbolt cable contains two lanes. If both endpoints support it a
connection will be established on both lanes. Previously we tried to
scan below both "dual link ports". Use the information extracted from
the drom to only scan behind ports with lane_nr == 0.

Endpoints with more complex thunderbolt controllers have some of their
ports disabled (for example the NHI port or one of the HDMI/DP ports).
Accessing them results in an error so we now ignore ports which are
marked as disabled in the drom.

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
cd22e73bdf5eff7e68a0f8bdfbce123ad43651f6 12-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Read port configuration from eeprom.

All Thunderbolt switches (except the root switch) contain a drom which
contains information about the device. Right now we only read the UID.

Add code to read and parse this drom. For now we are only interested in
which ports are disabled and which ports are "dual link ports" (a
physical thunderbolt port/socket contains two such ports).

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23dd5bb49d986f37977ed80dd2ca65040ead4392 03-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Add suspend/hibernate support

We use _noirq since we have to restore the pci tunnels before the pci
core wakes the tunneled devices.

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c90553b3c4ac2389a71a5c012b6e5bb1160d48a7 03-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Read switch uid from EEPROM

Add eeprom access code and read the uid during switch initialization.
The UID will be used to check device identity after suspend.

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
520b670216a15fb949e6ec6a1af9b5dd55d219c7 03-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Add path setup code.

A thunderbolt path is a unidirectional channel between two thunderbolt
ports. Two such paths are needed to establish a pci tunnel.

This patch introduces struct tb_path as well as a set of tb_path_*
methods which are used to activate & deactivate paths.

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
053596d9e26c86352c4b2b372f43f2746b97de45 03-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Handle hotplug events

We receive a plug event callback whenever a thunderbolt device is added
or removed. This patch fills in the tb_handle_hotplug method and starts
reacting to these events by adding/removing switches from the hierarchy.

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9da672a42878c58af5c50d7389dbae17bea9df38 03-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Scan for downstream switches

Add utility methods tb_port_state and tb_wait_for_port. Add
tb_scan_switch which recursively checks for downstream switches.

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ca389f716f6140d5349583a716bc629d63b06b1f 03-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Enable plug events

Thunderbolt switches have a plug events capability. This patch adds the
tb_plug_events_active method and uses it to activate plug events during
switch allocation.

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a25c8b2fc9636aaf29d9d9d89f92cdfd27a2a23d 03-Jun-2014 Andreas Noever <andreas.noever@gmail.com> thunderbolt: Initialize root switch and ports

This patch adds the structures tb_switch and tb_port as well as code to
initialize the root switch.

Signed-off-by: Andreas Noever <andreas.noever@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>