Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118978
b: refs/heads/master
c: d73b7af
h: refs/heads/master
v: v3
  • Loading branch information
Pete Zaitcev authored and Greg Kroah-Hartman committed Nov 13, 2008
1 parent 1adff5a commit 729bd9e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 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: 859ff4072027ea7741121b902c59763f090e00c2
refs/heads/master: d73b7aff28bc53c04e1f2e5ccaa5ea43089fb4a4
20 changes: 18 additions & 2 deletions trunk/drivers/block/ub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,8 +1546,6 @@ static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd)

/*
* Reset management
* XXX Move usb_reset_device to khubd. Hogging kevent is not a good thing.
* XXX Make usb_sync_reset asynchronous.
*/

static void ub_reset_enter(struct ub_dev *sc, int try)
Expand Down Expand Up @@ -1632,6 +1630,22 @@ static void ub_reset_task(struct work_struct *work)
spin_unlock_irqrestore(sc->lock, flags);
}

/*
* XXX Reset brackets are too much hassle to implement, so just stub them
* in order to prevent forced unbinding (which deadlocks solid when our
* ->disconnect method waits for the reset to complete and this kills keventd).
*
* XXX Tell Alan to move usb_unlock_device inside of usb_reset_device,
* or else the post_reset is invoked, and restats I/O on a locked device.
*/
static int ub_pre_reset(struct usb_interface *iface) {
return 0;
}

static int ub_post_reset(struct usb_interface *iface) {
return 0;
}

/*
* This is called from a process context.
*/
Expand Down Expand Up @@ -2446,6 +2460,8 @@ static struct usb_driver ub_driver = {
.probe = ub_probe,
.disconnect = ub_disconnect,
.id_table = ub_usb_ids,
.pre_reset = ub_pre_reset,
.post_reset = ub_post_reset,
};

static int __init ub_init(void)
Expand Down

0 comments on commit 729bd9e

Please sign in to comment.