Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
1c9c5bc5
Commit
1c9c5bc5
authored
Nov 01, 2019
by
Mika Westerberg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'thunderbolt/fixes' into thunderbolt/next
parents
b406357c
747125db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
18 deletions
+11
-18
drivers/thunderbolt/nhi_ops.c
drivers/thunderbolt/nhi_ops.c
+0
-1
drivers/thunderbolt/switch.c
drivers/thunderbolt/switch.c
+11
-17
No files found.
drivers/thunderbolt/nhi_ops.c
View file @
1c9c5bc5
...
...
@@ -80,7 +80,6 @@ static void icl_nhi_lc_mailbox_cmd(struct tb_nhi *nhi, enum icl_lc_mailbox_cmd c
{
u32
data
;
pci_read_config_dword
(
nhi
->
pdev
,
VS_CAP_19
,
&
data
);
data
=
(
cmd
<<
VS_CAP_19_CMD_SHIFT
)
&
VS_CAP_19_CMD_MASK
;
pci_write_config_dword
(
nhi
->
pdev
,
VS_CAP_19
,
data
|
VS_CAP_19_VALID
);
}
...
...
drivers/thunderbolt/switch.c
View file @
1c9c5bc5
...
...
@@ -896,12 +896,13 @@ int tb_dp_port_set_hops(struct tb_port *port, unsigned int video,
*/
bool
tb_dp_port_is_enabled
(
struct
tb_port
*
port
)
{
u32
data
;
u32
data
[
2
]
;
if
(
tb_port_read
(
port
,
&
data
,
TB_CFG_PORT
,
port
->
cap_adap
,
1
))
if
(
tb_port_read
(
port
,
data
,
TB_CFG_PORT
,
port
->
cap_adap
,
ARRAY_SIZE
(
data
)))
return
false
;
return
!!
(
data
&
(
TB_DP_VIDEO_EN
|
TB_DP_AUX_EN
));
return
!!
(
data
[
0
]
&
(
TB_DP_VIDEO_EN
|
TB_DP_AUX_EN
));
}
/**
...
...
@@ -914,19 +915,21 @@ bool tb_dp_port_is_enabled(struct tb_port *port)
*/
int
tb_dp_port_enable
(
struct
tb_port
*
port
,
bool
enable
)
{
u32
data
;
u32
data
[
2
]
;
int
ret
;
ret
=
tb_port_read
(
port
,
&
data
,
TB_CFG_PORT
,
port
->
cap_adap
,
1
);
ret
=
tb_port_read
(
port
,
data
,
TB_CFG_PORT
,
port
->
cap_adap
,
ARRAY_SIZE
(
data
));
if
(
ret
)
return
ret
;
if
(
enable
)
data
|=
TB_DP_VIDEO_EN
|
TB_DP_AUX_EN
;
data
[
0
]
|=
TB_DP_VIDEO_EN
|
TB_DP_AUX_EN
;
else
data
&=
~
(
TB_DP_VIDEO_EN
|
TB_DP_AUX_EN
);
data
[
0
]
&=
~
(
TB_DP_VIDEO_EN
|
TB_DP_AUX_EN
);
return
tb_port_write
(
port
,
&
data
,
TB_CFG_PORT
,
port
->
cap_adap
,
1
);
return
tb_port_write
(
port
,
data
,
TB_CFG_PORT
,
port
->
cap_adap
,
ARRAY_SIZE
(
data
));
}
/* switch utility functions */
...
...
@@ -1031,13 +1034,6 @@ static int tb_switch_set_authorized(struct tb_switch *sw, unsigned int val)
if
(
sw
->
authorized
)
goto
unlock
;
/*
* Make sure there is no PCIe rescan ongoing when a new PCIe
* tunnel is created. Otherwise the PCIe rescan code might find
* the new tunnel too early.
*/
pci_lock_rescan_remove
();
switch
(
val
)
{
/* Approve switch */
case
1
:
...
...
@@ -1057,8 +1053,6 @@ static int tb_switch_set_authorized(struct tb_switch *sw, unsigned int val)
break
;
}
pci_unlock_rescan_remove
();
if
(
!
ret
)
{
sw
->
authorized
=
val
;
/* Notify status change to the userspace */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment