diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2005-12-21 16:09:45 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-12-21 16:09:45 -0800 |
commit | 6d5ed6dd27445aa3fcc53869ad425d332eda96a5 (patch) | |
tree | 0fa607bfe71cf04fa759896caabf7b0853c7ea14 /usb | |
parent | 8f201a7bdcb0d5b5a2987d01e1433f0a09968d6d (diff) | |
download | patches-6d5ed6dd27445aa3fcc53869ad425d332eda96a5.tar.gz |
refresh after moving into proper places
Diffstat (limited to 'usb')
-rw-r--r-- | usb/remove-usb-private-semaphore.patch | 2 | ||||
-rw-r--r-- | usb/usb-dynamic-id-01.patch | 4 | ||||
-rw-r--r-- | usb/usb-ub-00-implement-retries-and-resets.patch | 70 | ||||
-rw-r--r-- | usb/usb-ub-01-rename.patch | 5 | ||||
-rw-r--r-- | usb/usb-ub-02-removed-unused-variable.patch | 2 | ||||
-rw-r--r-- | usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch | 6 |
6 files changed, 45 insertions, 44 deletions
diff --git a/usb/remove-usb-private-semaphore.patch b/usb/remove-usb-private-semaphore.patch index 3183dd4117bb86..b785abee786ba9 100644 --- a/usb/remove-usb-private-semaphore.patch +++ b/usb/remove-usb-private-semaphore.patch @@ -479,7 +479,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (ret_dev) goto exit; } -@@ -1294,10 +1201,7 @@ EXPORT_SYMBOL(usb_put_dev); +@@ -1297,10 +1204,7 @@ EXPORT_SYMBOL(usb_put_dev); EXPORT_SYMBOL(usb_get_dev); EXPORT_SYMBOL(usb_hub_tt_clear_buffer); diff --git a/usb/usb-dynamic-id-01.patch b/usb/usb-dynamic-id-01.patch index 3addebcb18b554..c23e61fb60d274 100644 --- a/usb/usb-dynamic-id-01.patch +++ b/usb/usb-dynamic-id-01.patch @@ -349,7 +349,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #ifdef CONFIG_HOTPLUG /* -@@ -1591,8 +1284,6 @@ module_exit(usb_exit); +@@ -1594,8 +1287,6 @@ module_exit(usb_exit); * driver modules to use. */ @@ -358,7 +358,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> EXPORT_SYMBOL(usb_disabled); EXPORT_SYMBOL_GPL(usb_get_intf); -@@ -1610,7 +1301,6 @@ EXPORT_SYMBOL(usb_unlock_device); +@@ -1613,7 +1304,6 @@ EXPORT_SYMBOL(usb_unlock_device); EXPORT_SYMBOL(usb_driver_claim_interface); EXPORT_SYMBOL(usb_driver_release_interface); diff --git a/usb/usb-ub-00-implement-retries-and-resets.patch b/usb/usb-ub-00-implement-retries-and-resets.patch index e3c976cac065be..8172a20d3d4e48 100644 --- a/usb/usb-ub-00-implement-retries-and-resets.patch +++ b/usb/usb-ub-00-implement-retries-and-resets.patch @@ -27,7 +27,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * -- set readonly flag for CDs, set removable flag for CF readers * -- do inquiry and verify we got a disk and not a tape (for LUN mismatch) * -- special case some senses, e.g. 3a/0 -> no media present, reduce retries -@@ -234,6 +233,13 @@ struct ub_scsi_cmd { +@@ -236,6 +235,13 @@ struct ub_scsi_cmd { void *back; }; @@ -41,7 +41,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* */ struct ub_capacity { -@@ -329,6 +335,8 @@ struct ub_lun { +@@ -331,6 +337,8 @@ struct ub_lun { int readonly; int first_open; /* Kludge. See ub_bd_open. */ @@ -50,7 +50,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* Use Ingo's mempool if or when we have more than one command. */ /* * Currently we never need more than one command for the whole device. -@@ -349,6 +357,7 @@ struct ub_dev { +@@ -351,6 +359,7 @@ struct ub_dev { atomic_t poison; /* The USB device is disconnected */ int openc; /* protected by ub_lock! */ /* kref is too implicit for our taste */ @@ -58,7 +58,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> unsigned int tagcnt; char name[12]; struct usb_device *dev; -@@ -376,6 +385,9 @@ struct ub_dev { +@@ -378,6 +387,9 @@ struct ub_dev { struct bulk_cs_wrap work_bcs; struct usb_ctrlrequest work_cr; @@ -68,7 +68,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> int sg_stat[6]; struct ub_scsi_trace tr; }; -@@ -384,12 +396,14 @@ struct ub_dev { +@@ -386,12 +398,14 @@ struct ub_dev { */ static void ub_cleanup(struct ub_dev *sc); static int ub_request_fn_1(struct ub_lun *lun, struct request *rq); @@ -87,7 +87,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd); static void ub_urb_complete(struct urb *urb, struct pt_regs *pt); static void ub_scsi_action(unsigned long _dev); -@@ -404,6 +418,8 @@ static void ub_state_sense(struct ub_dev +@@ -406,6 +420,8 @@ static void ub_state_sense(struct ub_dev static int ub_submit_clear_stall(struct ub_dev *sc, struct ub_scsi_cmd *cmd, int stalled_pipe); static void ub_top_sense_done(struct ub_dev *sc, struct ub_scsi_cmd *scmd); @@ -96,7 +96,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> static int ub_sync_tur(struct ub_dev *sc, struct ub_lun *lun); static int ub_sync_read_cap(struct ub_dev *sc, struct ub_lun *lun, struct ub_capacity *ret); -@@ -516,6 +532,9 @@ static ssize_t ub_diag_show(struct devic +@@ -518,6 +534,9 @@ static ssize_t ub_diag_show(struct devic spin_lock_irqsave(&sc->lock, flags); cnt += sprintf(page + cnt, @@ -106,7 +106,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> "qlen %d qmax %d\n", sc->cmd_queue.qlen, sc->cmd_queue.qmax); cnt += sprintf(page + cnt, -@@ -764,7 +783,8 @@ static int ub_request_fn_1(struct ub_lun +@@ -766,7 +785,8 @@ static int ub_request_fn_1(struct ub_lun { struct ub_dev *sc = lun->udev; struct ub_scsi_cmd *cmd; @@ -116,7 +116,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (atomic_read(&sc->poison) || lun->changed) { blkdev_dequeue_request(rq); -@@ -772,65 +792,70 @@ static int ub_request_fn_1(struct ub_lun +@@ -774,65 +794,70 @@ static int ub_request_fn_1(struct ub_lun return 0; } @@ -223,7 +223,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* * build the command -@@ -841,7 +866,7 @@ static int ub_cmd_build_block(struct ub_ +@@ -843,7 +868,7 @@ static int ub_cmd_build_block(struct ub_ block = rq->sector >> lun->capacity.bshift; nblks = rq->nr_sectors >> lun->capacity.bshift; @@ -232,7 +232,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* 10-byte uses 4 bytes of LBA: 2147483648KB, 2097152MB, 2048GB */ cmd->cdb[2] = block >> 24; cmd->cdb[3] = block >> 16; -@@ -852,14 +877,12 @@ static int ub_cmd_build_block(struct ub_ +@@ -854,14 +879,12 @@ static int ub_cmd_build_block(struct ub_ cmd->cdb_len = 10; cmd->len = rq->nr_sectors * 512; @@ -250,7 +250,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (rq->data_len == 0) { cmd->dir = UB_DIR_NONE; -@@ -868,40 +891,26 @@ static int ub_cmd_build_packet(struct ub +@@ -870,40 +893,26 @@ static int ub_cmd_build_packet(struct ub cmd->dir = UB_DIR_WRITE; else cmd->dir = UB_DIR_READ; @@ -297,7 +297,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (cmd->error == 0) { uptodate = 1; -@@ -922,9 +931,16 @@ static void ub_rw_cmd_done(struct ub_dev +@@ -924,9 +933,16 @@ static void ub_rw_cmd_done(struct ub_dev rq->errors = SAM_STAT_CHECK_CONDITION; else rq->errors = DID_ERROR << 16; @@ -314,7 +314,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> ub_put_cmd(lun, cmd); ub_end_rq(rq, uptodate); blk_start_queue(lun->disk->queue); -@@ -939,6 +955,41 @@ static void ub_end_rq(struct request *rq +@@ -941,6 +957,41 @@ static void ub_end_rq(struct request *rq end_that_request_last(rq); } @@ -356,7 +356,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> /* * Submit a regular SCSI operation (not an auto-sense). * -@@ -1069,7 +1120,7 @@ static void ub_scsi_dispatch(struct ub_d +@@ -1071,7 +1122,7 @@ static void ub_scsi_dispatch(struct ub_d struct ub_scsi_cmd *cmd; int rc; @@ -365,7 +365,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (cmd->state == UB_CMDST_DONE) { ub_cmdq_pop(sc); (*cmd->done)(sc, cmd); -@@ -1092,11 +1143,12 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1094,11 +1145,12 @@ static void ub_scsi_urb_compl(struct ub_ { struct urb *urb = &sc->work_urb; struct bulk_cs_wrap *bcs; @@ -380,7 +380,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } if (cmd->state == UB_CMDST_CLEAR) { -@@ -1104,7 +1156,6 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1106,7 +1158,6 @@ static void ub_scsi_urb_compl(struct ub_ /* * STALL while clearning STALL. * The control pipe clears itself - nothing to do. @@ -388,7 +388,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> */ printk(KERN_NOTICE "%s: stall on control pipe\n", sc->name); -@@ -1123,11 +1174,6 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1125,11 +1176,6 @@ static void ub_scsi_urb_compl(struct ub_ } else if (cmd->state == UB_CMDST_CLR2STS) { if (urb->status == -EPIPE) { @@ -400,7 +400,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> printk(KERN_NOTICE "%s: stall on control pipe\n", sc->name); goto Bad_End; -@@ -1145,11 +1191,6 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1147,11 +1193,6 @@ static void ub_scsi_urb_compl(struct ub_ } else if (cmd->state == UB_CMDST_CLRRS) { if (urb->status == -EPIPE) { @@ -412,7 +412,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> printk(KERN_NOTICE "%s: stall on control pipe\n", sc->name); goto Bad_End; -@@ -1166,7 +1207,12 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1168,7 +1209,12 @@ static void ub_scsi_urb_compl(struct ub_ ub_state_stat_counted(sc, cmd); } else if (cmd->state == UB_CMDST_CMD) { @@ -426,7 +426,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> rc = ub_submit_clear_stall(sc, cmd, sc->last_pipe); if (rc != 0) { printk(KERN_NOTICE "%s: " -@@ -1176,17 +1222,20 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1178,17 +1224,20 @@ static void ub_scsi_urb_compl(struct ub_ * This is typically ENOMEM or some other such shit. * Retrying is pointless. Just do Bad End on it... */ @@ -451,7 +451,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> goto Bad_End; } -@@ -1205,11 +1254,8 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1207,11 +1256,8 @@ static void ub_scsi_urb_compl(struct ub_ printk(KERN_NOTICE "%s: " "unable to submit clear (%d)\n", sc->name, rc); @@ -465,7 +465,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } cmd->state = UB_CMDST_CLR2STS; ub_cmdtr_state(sc, cmd); -@@ -1218,14 +1264,50 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1220,14 +1266,50 @@ static void ub_scsi_urb_compl(struct ub_ if (urb->status == -EOVERFLOW) { /* * A babble? Failure, but we must transfer CSW now. @@ -519,7 +519,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> cmd->act_len += urb->actual_length; ub_cmdtr_act_len(sc, cmd); -@@ -1243,11 +1325,8 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1245,11 +1327,8 @@ static void ub_scsi_urb_compl(struct ub_ printk(KERN_NOTICE "%s: " "unable to submit clear (%d)\n", sc->name, rc); @@ -533,7 +533,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* -@@ -1260,14 +1339,8 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1262,14 +1341,8 @@ static void ub_scsi_urb_compl(struct ub_ ub_cmdtr_state(sc, cmd); return; } @@ -550,7 +550,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (urb->status != 0) goto Bad_End; -@@ -1313,15 +1386,15 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1315,15 +1388,15 @@ static void ub_scsi_urb_compl(struct ub_ return; } @@ -569,7 +569,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> goto Bad_End; } -@@ -1332,13 +1405,13 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1334,13 +1407,13 @@ static void ub_scsi_urb_compl(struct ub_ ub_state_sense(sc, cmd); return; case US_BULK_STAT_PHASE: @@ -585,7 +585,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* Not zeroing error to preserve a babble indicator */ -@@ -1358,7 +1431,8 @@ static void ub_scsi_urb_compl(struct ub_ +@@ -1360,7 +1433,8 @@ static void ub_scsi_urb_compl(struct ub_ printk(KERN_WARNING "%s: " "wrong command state %d\n", sc->name, cmd->state); @@ -595,7 +595,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } return; -@@ -1606,6 +1680,93 @@ static void ub_top_sense_done(struct ub_ +@@ -1608,6 +1682,93 @@ static void ub_top_sense_done(struct ub_ } /* @@ -689,7 +689,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * This is called from a process context. */ static void ub_revalidate(struct ub_dev *sc, struct ub_lun *lun) -@@ -2140,7 +2301,7 @@ static int ub_get_pipes(struct ub_dev *s +@@ -2142,7 +2303,7 @@ static int ub_get_pipes(struct ub_dev *s if (ep_in == NULL || ep_out == NULL) { printk(KERN_NOTICE "%s: failed endpoint check\n", sc->name); @@ -698,7 +698,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> } /* Calculate and store the pipe values */ -@@ -2178,6 +2339,8 @@ static int ub_probe(struct usb_interface +@@ -2180,6 +2341,8 @@ static int ub_probe(struct usb_interface usb_init_urb(&sc->work_urb); tasklet_init(&sc->tasklet, ub_scsi_action, (unsigned long)sc); atomic_set(&sc->poison, 0); @@ -707,7 +707,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> init_timer(&sc->work_timer); sc->work_timer.data = (unsigned long) sc; -@@ -2198,7 +2361,8 @@ static int ub_probe(struct usb_interface +@@ -2200,7 +2363,8 @@ static int ub_probe(struct usb_interface /* XXX Verify that we can handle the device (from descriptors) */ @@ -717,7 +717,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> if (device_create_file(&sc->intf->dev, &dev_attr_diag) != 0) goto err_diag; -@@ -2269,6 +2433,7 @@ static int ub_probe(struct usb_interface +@@ -2271,6 +2435,7 @@ static int ub_probe(struct usb_interface /* device_remove_file(&sc->intf->dev, &dev_attr_diag); */ err_diag: @@ -725,7 +725,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> usb_set_intfdata(intf, NULL); // usb_put_intf(sc->intf); usb_put_dev(sc->dev); -@@ -2376,6 +2541,11 @@ static void ub_disconnect(struct usb_int +@@ -2379,6 +2544,11 @@ static void ub_disconnect(struct usb_int atomic_set(&sc->poison, 1); /* @@ -737,7 +737,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * Blow away queued commands. * * Actually, this never works, because before we get here -@@ -2388,7 +2558,7 @@ static void ub_disconnect(struct usb_int +@@ -2391,7 +2561,7 @@ static void ub_disconnect(struct usb_int { struct ub_scsi_cmd *cmd; int cnt = 0; diff --git a/usb/usb-ub-01-rename.patch b/usb/usb-ub-01-rename.patch index b57ba7bb04e5e7..29f5d74374876f 100644 --- a/usb/usb-ub-01-rename.patch +++ b/usb/usb-ub-01-rename.patch @@ -17,7 +17,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/drivers/block/ub.c +++ gregkh-2.6/drivers/block/ub.c -@@ -113,7 +113,7 @@ +@@ -115,7 +115,7 @@ /* */ @@ -26,7 +26,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> #define UB_MAX_CDB_SIZE 16 /* Corresponds to Bulk */ -@@ -2471,13 +2471,13 @@ static int ub_probe_lun(struct ub_dev *s +@@ -2473,14 +2473,14 @@ static int ub_probe_lun(struct ub_dev *s ub_revalidate(sc, lun); rc = -ENOMEM; @@ -36,6 +36,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> lun->disk = disk; sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a'); + sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a'); disk->major = UB_MAJOR; - disk->first_minor = lun->id * UB_MINORS_PER_MAJOR; + disk->first_minor = lun->id * UB_PARTS_PER_LUN; diff --git a/usb/usb-ub-02-removed-unused-variable.patch b/usb/usb-ub-02-removed-unused-variable.patch index 54f0dcea5196df..6de01b4c358a7e 100644 --- a/usb/usb-ub-02-removed-unused-variable.patch +++ b/usb/usb-ub-02-removed-unused-variable.patch @@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/drivers/block/ub.c +++ gregkh-2.6/drivers/block/ub.c -@@ -948,10 +948,7 @@ static void ub_rw_cmd_done(struct ub_dev +@@ -950,10 +950,7 @@ static void ub_rw_cmd_done(struct ub_dev static void ub_end_rq(struct request *rq, int uptodate) { diff --git a/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch b/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch index 79014e0ce82a7e..a7489f33c3a8cb 100644 --- a/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch +++ b/usb/usbcore-allow-suspend-resume-even-if-drivers-don-t-support-it.patch @@ -21,7 +21,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> --- gregkh-2.6.orig/drivers/usb/core/usb.c +++ gregkh-2.6/drivers/usb/core/usb.c -@@ -1432,7 +1432,8 @@ static int usb_generic_suspend(struct de +@@ -1428,7 +1428,8 @@ static int usb_generic_suspend(struct de mark_quiesced(intf); } else { // FIXME else if there's no suspend method, disconnect... @@ -31,7 +31,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> status = 0; } return status; -@@ -1460,8 +1461,10 @@ static int usb_generic_resume(struct dev +@@ -1456,8 +1457,10 @@ static int usb_generic_resume(struct dev } if ((dev->driver == NULL) || @@ -43,7 +43,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> intf = to_usb_interface(dev); driver = to_usb_driver(dev->driver); -@@ -1481,7 +1484,7 @@ static int usb_generic_resume(struct dev +@@ -1477,7 +1480,7 @@ static int usb_generic_resume(struct dev mark_quiesced(intf); } } else |