Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108873
b: refs/heads/master
c: a338406
h: refs/heads/master
i:
  108871: e1bd542
v: v3
  • Loading branch information
Stefan Richter committed Aug 19, 2008
1 parent 668f985 commit fe164cf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c921a9745705ed62a949192ef9128c60d6c63874
refs/heads/master: a3384067fb0df9c58e112ac6a5ec9beb7d169482
25 changes: 18 additions & 7 deletions trunk/drivers/ieee1394/sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,15 +731,26 @@ static int sbp2_update(struct unit_directory *ud)
{
struct sbp2_lu *lu = ud->device.driver_data;

if (sbp2_reconnect_device(lu)) {
/* Reconnect has failed. Perhaps we didn't reconnect fast
* enough. Try a regular login, but first log out just in
* case of any weirdness. */
if (sbp2_reconnect_device(lu) != 0) {
/*
* Reconnect failed. If another bus reset happened,
* let nodemgr proceed and call sbp2_update again later
* (or sbp2_remove if this node went away).
*/
if (!hpsb_node_entry_valid(lu->ne))
return 0;
/*
* Or the target rejected the reconnect because we weren't
* fast enough. Try a regular login, but first log out
* just in case of any weirdness.
*/
sbp2_logout_device(lu);

if (sbp2_login_device(lu)) {
/* Login failed too, just fail, and the backend
* will call our sbp2_remove for us */
if (sbp2_login_device(lu) != 0) {
if (!hpsb_node_entry_valid(lu->ne))
return 0;

/* Maybe another initiator won the login. */
SBP2_ERR("Failed to reconnect to sbp2 device!");
return -EBUSY;
}
Expand Down

0 comments on commit fe164cf

Please sign in to comment.