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
b4b7f2a6
Commit
b4b7f2a6
authored
Apr 25, 2022
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/firewire' into for-linus
Pull FireWire fixes Signed-off-by:
Takashi Iwai
<
tiwai@suse.de
>
parents
5f5d8890
a7ecbe92
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
27 deletions
+32
-27
drivers/firewire/core-card.c
drivers/firewire/core-card.c
+3
-0
drivers/firewire/core-cdev.c
drivers/firewire/core-cdev.c
+3
-1
drivers/firewire/core-topology.c
drivers/firewire/core-topology.c
+3
-6
drivers/firewire/core-transaction.c
drivers/firewire/core-transaction.c
+16
-14
drivers/firewire/sbp2.c
drivers/firewire/sbp2.c
+7
-6
No files found.
drivers/firewire/core-card.c
View file @
b4b7f2a6
...
...
@@ -668,6 +668,7 @@ EXPORT_SYMBOL_GPL(fw_card_release);
void
fw_core_remove_card
(
struct
fw_card
*
card
)
{
struct
fw_card_driver
dummy_driver
=
dummy_driver_template
;
unsigned
long
flags
;
card
->
driver
->
update_phy_reg
(
card
,
4
,
PHY_LINK_ACTIVE
|
PHY_CONTENDER
,
0
);
...
...
@@ -682,7 +683,9 @@ void fw_core_remove_card(struct fw_card *card)
dummy_driver
.
stop_iso
=
card
->
driver
->
stop_iso
;
card
->
driver
=
&
dummy_driver
;
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
fw_destroy_nodes
(
card
);
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
/* Wait for all users, especially device workqueue jobs, to finish. */
fw_card_put
(
card
);
...
...
drivers/firewire/core-cdev.c
View file @
b4b7f2a6
...
...
@@ -1500,6 +1500,7 @@ static void outbound_phy_packet_callback(struct fw_packet *packet,
{
struct
outbound_phy_packet_event
*
e
=
container_of
(
packet
,
struct
outbound_phy_packet_event
,
p
);
struct
client
*
e_client
;
switch
(
status
)
{
/* expected: */
...
...
@@ -1516,9 +1517,10 @@ static void outbound_phy_packet_callback(struct fw_packet *packet,
}
e
->
phy_packet
.
data
[
0
]
=
packet
->
timestamp
;
e_client
=
e
->
client
;
queue_event
(
e
->
client
,
&
e
->
event
,
&
e
->
phy_packet
,
sizeof
(
e
->
phy_packet
)
+
e
->
phy_packet
.
length
,
NULL
,
0
);
client_put
(
e
->
client
);
client_put
(
e
_
client
);
}
static
int
ioctl_send_phy_packet
(
struct
client
*
client
,
union
ioctl_arg
*
arg
)
...
...
drivers/firewire/core-topology.c
View file @
b4b7f2a6
...
...
@@ -375,16 +375,13 @@ static void report_found_node(struct fw_card *card,
card
->
bm_retries
=
0
;
}
/* Must be called with card->lock held */
void
fw_destroy_nodes
(
struct
fw_card
*
card
)
{
unsigned
long
flags
;
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
card
->
color
++
;
if
(
card
->
local_node
!=
NULL
)
for_each_fw_node
(
card
,
card
->
local_node
,
report_lost_node
);
card
->
local_node
=
NULL
;
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
}
static
void
move_tree
(
struct
fw_node
*
node0
,
struct
fw_node
*
node1
,
int
port
)
...
...
@@ -510,6 +507,8 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
struct
fw_node
*
local_node
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
/*
* If the selfID buffer is not the immediate successor of the
* previously processed one, we cannot reliably compare the
...
...
@@ -521,8 +520,6 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
card
->
bm_retries
=
0
;
}
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
card
->
broadcast_channel_allocated
=
card
->
broadcast_channel_auto_allocated
;
card
->
node_id
=
node_id
;
/*
...
...
drivers/firewire/core-transaction.c
View file @
b4b7f2a6
...
...
@@ -73,24 +73,25 @@ static int try_cancel_split_timeout(struct fw_transaction *t)
static
int
close_transaction
(
struct
fw_transaction
*
transaction
,
struct
fw_card
*
card
,
int
rcode
)
{
struct
fw_transaction
*
t
;
struct
fw_transaction
*
t
=
NULL
,
*
iter
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
list_for_each_entry
(
t
,
&
card
->
transaction_list
,
link
)
{
if
(
t
==
transaction
)
{
if
(
!
try_cancel_split_timeout
(
t
))
{
list_for_each_entry
(
iter
,
&
card
->
transaction_list
,
link
)
{
if
(
iter
==
transaction
)
{
if
(
!
try_cancel_split_timeout
(
iter
))
{
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
goto
timed_out
;
}
list_del_init
(
&
t
->
link
);
card
->
tlabel_mask
&=
~
(
1ULL
<<
t
->
tlabel
);
list_del_init
(
&
iter
->
link
);
card
->
tlabel_mask
&=
~
(
1ULL
<<
iter
->
tlabel
);
t
=
iter
;
break
;
}
}
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
if
(
&
t
->
link
!=
&
card
->
transaction_lis
t
)
{
if
(
t
)
{
t
->
callback
(
card
,
rcode
,
NULL
,
0
,
t
->
callback_data
);
return
0
;
}
...
...
@@ -935,7 +936,7 @@ EXPORT_SYMBOL(fw_core_handle_request);
void
fw_core_handle_response
(
struct
fw_card
*
card
,
struct
fw_packet
*
p
)
{
struct
fw_transaction
*
t
;
struct
fw_transaction
*
t
=
NULL
,
*
iter
;
unsigned
long
flags
;
u32
*
data
;
size_t
data_length
;
...
...
@@ -947,20 +948,21 @@ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
rcode
=
HEADER_GET_RCODE
(
p
->
header
[
1
]);
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
list_for_each_entry
(
t
,
&
card
->
transaction_list
,
link
)
{
if
(
t
->
node_id
==
source
&&
t
->
tlabel
==
tlabel
)
{
if
(
!
try_cancel_split_timeout
(
t
))
{
list_for_each_entry
(
iter
,
&
card
->
transaction_list
,
link
)
{
if
(
iter
->
node_id
==
source
&&
iter
->
tlabel
==
tlabel
)
{
if
(
!
try_cancel_split_timeout
(
iter
))
{
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
goto
timed_out
;
}
list_del_init
(
&
t
->
link
);
card
->
tlabel_mask
&=
~
(
1ULL
<<
t
->
tlabel
);
list_del_init
(
&
iter
->
link
);
card
->
tlabel_mask
&=
~
(
1ULL
<<
iter
->
tlabel
);
t
=
iter
;
break
;
}
}
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
if
(
&
t
->
link
==
&
card
->
transaction_lis
t
)
{
if
(
!
t
)
{
timed_out:
fw_notice
(
card
,
"unsolicited response (source %x, tlabel %x)
\n
"
,
source
,
tlabel
);
...
...
drivers/firewire/sbp2.c
View file @
b4b7f2a6
...
...
@@ -408,7 +408,7 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
void
*
payload
,
size_t
length
,
void
*
callback_data
)
{
struct
sbp2_logical_unit
*
lu
=
callback_data
;
struct
sbp2_orb
*
orb
;
struct
sbp2_orb
*
orb
=
NULL
,
*
iter
;
struct
sbp2_status
status
;
unsigned
long
flags
;
...
...
@@ -433,17 +433,18 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
/* Lookup the orb corresponding to this status write. */
spin_lock_irqsave
(
&
lu
->
tgt
->
lock
,
flags
);
list_for_each_entry
(
orb
,
&
lu
->
orb_list
,
link
)
{
list_for_each_entry
(
iter
,
&
lu
->
orb_list
,
link
)
{
if
(
STATUS_GET_ORB_HIGH
(
status
)
==
0
&&
STATUS_GET_ORB_LOW
(
status
)
==
orb
->
request_bus
)
{
orb
->
rcode
=
RCODE_COMPLETE
;
list_del
(
&
orb
->
link
);
STATUS_GET_ORB_LOW
(
status
)
==
iter
->
request_bus
)
{
iter
->
rcode
=
RCODE_COMPLETE
;
list_del
(
&
iter
->
link
);
orb
=
iter
;
break
;
}
}
spin_unlock_irqrestore
(
&
lu
->
tgt
->
lock
,
flags
);
if
(
&
orb
->
link
!=
&
lu
->
orb_list
)
{
if
(
orb
)
{
orb
->
callback
(
orb
,
&
status
);
kref_put
(
&
orb
->
kref
,
free_orb
);
/* orb callback reference */
}
else
{
...
...
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