diff options
Diffstat (limited to 'drivers/block/ub.c')
-rw-r--r-- | drivers/block/ub.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/block/ub.c b/drivers/block/ub.c index fccac18d3111..048d71d244d7 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c | |||
@@ -1546,8 +1546,6 @@ static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd) | |||
1546 | 1546 | ||
1547 | /* | 1547 | /* |
1548 | * Reset management | 1548 | * Reset management |
1549 | * XXX Move usb_reset_device to khubd. Hogging kevent is not a good thing. | ||
1550 | * XXX Make usb_sync_reset asynchronous. | ||
1551 | */ | 1549 | */ |
1552 | 1550 | ||
1553 | static void ub_reset_enter(struct ub_dev *sc, int try) | 1551 | static void ub_reset_enter(struct ub_dev *sc, int try) |
@@ -1633,6 +1631,22 @@ static void ub_reset_task(struct work_struct *work) | |||
1633 | } | 1631 | } |
1634 | 1632 | ||
1635 | /* | 1633 | /* |
1634 | * XXX Reset brackets are too much hassle to implement, so just stub them | ||
1635 | * in order to prevent forced unbinding (which deadlocks solid when our | ||
1636 | * ->disconnect method waits for the reset to complete and this kills keventd). | ||
1637 | * | ||
1638 | * XXX Tell Alan to move usb_unlock_device inside of usb_reset_device, | ||
1639 | * or else the post_reset is invoked, and restats I/O on a locked device. | ||
1640 | */ | ||
1641 | static int ub_pre_reset(struct usb_interface *iface) { | ||
1642 | return 0; | ||
1643 | } | ||
1644 | |||
1645 | static int ub_post_reset(struct usb_interface *iface) { | ||
1646 | return 0; | ||
1647 | } | ||
1648 | |||
1649 | /* | ||
1636 | * This is called from a process context. | 1650 | * This is called from a process context. |
1637 | */ | 1651 | */ |
1638 | static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun) | 1652 | static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun) |
@@ -2446,6 +2460,8 @@ static struct usb_driver ub_driver = { | |||
2446 | .probe = ub_probe, | 2460 | .probe = ub_probe, |
2447 | .disconnect = ub_disconnect, | 2461 | .disconnect = ub_disconnect, |
2448 | .id_table = ub_usb_ids, | 2462 | .id_table = ub_usb_ids, |
2463 | .pre_reset = ub_pre_reset, | ||
2464 | .post_reset = ub_post_reset, | ||
2449 | }; | 2465 | }; |
2450 | 2466 | ||
2451 | static int __init ub_init(void) | 2467 | static int __init ub_init(void) |