commit e030dbf91a87da7e8be3be3ca781558695bea683 Merge: 12a2296... 3039f07... Author: Linus Torvalds Date: Fri Jul 13 10:52:27 2007 -0700 Merge branch 'ioat-md-accel-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop * 'ioat-md-accel-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop: (28 commits) ioatdma: add the unisys "i/oat" pci vendor/device id ARM: Add drivers/dma to arch/arm/Kconfig iop3xx: surface the iop3xx DMA and AAU units to the iop-adma driver iop13xx: surface the iop13xx adma units to the iop-adma driver dmaengine: driver for the iop32x, iop33x, and iop13xx raid engines md: remove raid5 compute_block and compute_parity5 md: handle_stripe5 - request io processing in raid5_run_ops md: handle_stripe5 - add request/completion logic for async expand ops md: handle_stripe5 - add request/completion logic for async read ops md: handle_stripe5 - add request/completion logic for async check ops md: handle_stripe5 - add request/completion logic for async compute ops md: handle_stripe5 - add request/completion logic for async write ops md: common infrastructure for running operations with raid5_run_ops md: raid5_run_ops - run stripe operations outside sh->lock raid5: replace custom debug PRINTKs with standard pr_debug raid5: refactor handle_stripe5 and handle_stripe6 (v3) async_tx: add the async_tx api xor: make 'xor_blocks' a library routine for use with async_tx dmaengine: make clients responsible for managing channels dmaengine: refactor dmaengine around dma_async_tx_descriptor ... commit 12a22960549979c10a95cc97f8ec63b461c55692 Merge: 31c4ab4... 51a92c0... Author: Linus Torvalds Date: Fri Jul 13 10:51:07 2007 -0700 Merge branch 'splice-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-block * 'splice-2.6.23' of git://git.kernel.dk/data/git/linux-2.6-block: splice: fix offset mangling with direct splicing (sendfile) security: revalidate rw permissions for sys_splice and sys_vmsplice relay: fixup kerneldoc comment relay: fix bogus cast in subbuf_splice_actor() commit 31c4ab430a448cfb13fc88779d8a870c7af9f72b Merge: 8b69ad0... f24ae12... Author: Linus Torvalds Date: Fri Jul 13 10:44:45 2007 -0700 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Workaround for a sparse warning in include/asm-mips/mach-tx4927/ioremap.h [MIPS] Make show_code static and add __user tag [MIPS] Workaround for a sparse warning in include/asm-mips/compat.h [MIPS] Add some __user tags [MIPS] math-emu minor cleanup [MIPS] Kill CONFIG_TX4927BUG_WORKAROUND [MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_FB_XPERT98 [MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1000_SRC_CLK [MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1000_USE32K [MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1XXX_PSC_SPI [CHAR] Delete leftovers of old Alchemy UART driver commit 8b69ad0e690eb5f38c23087247a12e5fde1baeff Author: Linus Torvalds Date: Fri Jul 13 10:43:52 2007 -0700 Revert "[CPUFREQ] powernow-k8: clarify number of cores." This reverts commit 904f7a3f042b5c6aa9e53ce83f2c9de5e33170ff. As noted by Peter Anvin: "It causes build failures on i386. Yet another case of unnecessary divergence between i386 and x86-64 I'm afraid..." Signed-off-by: Linus Torvalds commit aba2da66cfbf7790ad79d4dee95871127d5ddf5e Merge: 7732089... f787a50... Author: Linus Torvalds Date: Fri Jul 13 10:12:21 2007 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched * git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: [PATCH] sched: small topology.h cleanup [PATCH] sched: fix show_task()/show_tasks() output [PATCH] sched: remove stale version info from kernel/sched_debug.c [PATCH] sched: allow larger granularity [PATCH] sched: fix prio_to_wmult[] for nice 1 [ I re-did the commits to get rid of some bogus merge commit that Ingo had. - Linus ] Signed-off-by: Linus Torvalds commit f787a50306680c187cf2896a8017937c1bf6dc7e Author: Ingo Molnar Date: Wed Jul 11 21:21:47 2007 +0200 [PATCH] sched: small topology.h cleanup trivial cleanup: LOCAL_DISTANCE and REMOTE_DISTANCE are only used in topology.h and inside an #ifndef section - limit their existence to that #ifndef. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit 4bd77321a833077c5c9ac7b9d284e261e4a8906e Author: Ingo Molnar Date: Wed Jul 11 21:21:47 2007 +0200 [PATCH] sched: fix show_task()/show_tasks() output fix show_task()/show_tasks() output: - there's no sibling info anymore - the fields were not aligned properly with the description - get rid of the lazy-TLB output: it's been quite some time since we last had a bug there, and when we had a bug it wasnt helped a bit by this debug output. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit 45f384a64f0769bb9a3caf0516de88a629f48e61 Author: Ingo Molnar Date: Wed Jul 11 21:21:47 2007 +0200 [PATCH] sched: remove stale version info from kernel/sched_debug.c kernel/sched_debug.c referred to CFS -v20, but there's no CFS versioning needed within the upstream kernel. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit a5968df8737eda477d9d1038f5428ebd4d0884e1 Author: Ingo Molnar Date: Wed Jul 11 21:21:47 2007 +0200 [PATCH] sched: allow larger granularity Allow granularity up to 100 msecs, instead of 10 msecs. (needed on larger boxes) Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit e127031f4f76dc367c5d2f9d883715730dd82f7d Author: Mike Galbraith Date: Wed Jul 11 21:21:47 2007 +0200 [PATCH] sched: fix prio_to_wmult[] for nice 1 There's a typo in the values in prio_to_wmult[] for nice level 1. While it did not cause bad CPU distribution, but caused more rescheduling between nice-0 and nice-1 tasks than necessary. Signed-off-by: Ingo Molnar Signed-off-by: Linus Torvalds commit f24ae12b3eeb1b956b752d4d5907e311cfa95a1a Author: Atsushi Nemoto Date: Sat Jul 14 00:06:44 2007 +0900 [MIPS] Workaround for a sparse warning in include/asm-mips/mach-tx4927/ioremap.h include2/asm/mach-tx49xx/ioremap.h:39:52: warning: cast truncates bits from constant value (fff000000 becomes ff000000) Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit e1bb828906e54ffb7e8b358516158ffdcf9581b8 Author: Atsushi Nemoto Date: Fri Jul 13 23:51:46 2007 +0900 [MIPS] Make show_code static and add __user tag Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 01bebc66793f2cc65104452dc319a8a99f005934 Author: Atsushi Nemoto Date: Fri Jul 13 23:51:38 2007 +0900 [MIPS] Workaround for a sparse warning in include/asm-mips/compat.h Cast to a __user pointer via "unsigned long" to get rid of this warning: include2/asm/compat.h:135:10: warning: cast adds address space to expression () Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit 5e0373b8e449b0c72495a6d8401c53f678b71988 Author: Atsushi Nemoto Date: Fri Jul 13 23:02:42 2007 +0900 [MIPS] Add some __user tags Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit e70dfc10b99ebffa1f464b1b9290df2589284f70 Author: Atsushi Nemoto Date: Fri Jul 13 23:02:29 2007 +0900 [MIPS] math-emu minor cleanup Declaring emulpc and contpc as "unsigned long" can get rid of some casts. This also get rid of some sparse warnings. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit e50e1c744df20e704441a99eef7c6414e6920712 Author: Atsushi Nemoto Date: Fri Jul 13 02:00:26 2007 +0900 [MIPS] Kill CONFIG_TX4927BUG_WORKAROUND Kill workarounds for very early chip (perhaps pre-TX4927A). Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle commit b58f4b7aaf5ddaf2fdc13dfeb3ce6e61d51c3ac5 Author: Ralf Baechle Date: Fri Jul 13 10:40:23 2007 +0100 [MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_FB_XPERT98 Noticed by Robert P. J. Day (rpjday@mindspring.com). Signed-off-by: Ralf Baechle commit 85a882bc3553636930bef7773201955c0e2fcf99 Author: Ralf Baechle Date: Fri Jul 13 06:45:48 2007 +0100 [MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1000_SRC_CLK Noticed by Robert P. J. Day (rpjday@mindspring.com). Signed-off-by: Ralf Baechle commit 8f597acab2742b7ae9a556613c389ffa914cdbbd Author: Ralf Baechle Date: Fri Jul 13 06:42:36 2007 +0100 [MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1000_USE32K Noticed by Robert P. J. Day (rpjday@mindspring.com). Signed-off-by: Ralf Baechle commit 6fec2e1727049ce6a404f4af61461d860594d5db Author: Ralf Baechle Date: Fri Jul 13 06:33:09 2007 +0100 [MIPS] Alchemy: Remove code wrapped by dead symbol CONFIG_AU1XXX_PSC_SPI Noticed by Robert P. J. Day (rpjday@mindspring.com). Signed-off-by: Ralf Baechle commit 33f60da0dad0884256f888c19303e16c95d2086d Author: Ralf Baechle Date: Fri Jul 13 17:39:59 2007 +0100 [CHAR] Delete leftovers of old Alchemy UART driver Signed-off-by: Ralf Baechle commit 3039f0735a280b54c7364fbfe6a9287f7f0b510a Author: Dan Williams Date: Fri Jul 13 08:06:19 2007 -0700 ioatdma: add the unisys "i/oat" pci vendor/device id Cc: John Magolan Signed-off-by: Shannon Nelson Signed-off-by: Dan Williams commit 5816815f7850509ed51ab94eb4f644e405ccb865 Author: Dan Williams Date: Tue Jan 2 11:10:43 2007 -0700 ARM: Add drivers/dma to arch/arm/Kconfig Cc: Russell King Signed-off-by: Dan Williams commit 2492c845189a961a92d8537a44d233e8e1e45c6d Author: Dan Williams Date: Tue Jan 2 13:52:31 2007 -0700 iop3xx: surface the iop3xx DMA and AAU units to the iop-adma driver Adds the platform device definitions and the architecture specific support routines (i.e. register initialization and descriptor formats) for the iop-adma driver. Changelog: * add support for > 1k zero sum buffer sizes * added dma/aau platform devices to iq80321 and iq80332 setup * fixed the calculation in iop_desc_is_aligned * support xor buffer sizes larger than 16MB * fix places where software descriptors are assumed to be contiguous, only hardware descriptors are contiguous for up to a PAGE_SIZE buffer size * convert to async_tx * add interrupt support * add platform devices for 80219 boards * do not call platform register macros in driver code * remove switch() statements for compatible register offsets/layouts * change over to bitmap based capabilities * remove unnecessary ARM assembly statement * checkpatch.pl fixes * gpl v2 only correction * phys move to dma_async_tx_descriptor Cc: Russell King Signed-off-by: Dan Williams commit 39a8d7d13c113e4a98bfdfc45c7233188e4d715f Author: Dan Williams Date: Tue Jan 2 13:52:31 2007 -0700 iop13xx: surface the iop13xx adma units to the iop-adma driver Adds the platform device definitions and the architecture specific support routines (i.e. register initialization and descriptor formats) for the iop-adma driver. Changelog: * added 'descriptor pool size' to the platform data * add base support for buffer sizes larger than 16MB (hw max) * build error fix from Kirill A. Shutemov * rebase for async_tx changes * add interrupt support * do not call platform register macros in driver code * remove unnecessary ARM assembly statement * checkpatch.pl fixes * gpl v2 only correction Cc: Russell King Signed-off-by: Dan Williams commit c211092313b90f898dec61f35207fc282d1eadc3 Author: Dan Williams Date: Tue Jan 2 13:52:26 2007 -0700 dmaengine: driver for the iop32x, iop33x, and iop13xx raid engines The Intel(R) IOP series of i/o processors integrate an Xscale core with raid acceleration engines. The capabilities per platform are: iop219: (2) copy engines iop321: (2) copy engines (1) xor and block fill engine iop33x: (2) copy and crc32c engines (1) xor, xor zero sum, pq, pq zero sum, and block fill engine iop34x (iop13xx): (2) copy, crc32c, xor, xor zero sum, and block fill engines (1) copy, crc32c, xor, xor zero sum, pq, pq zero sum, and block fill engine The driver supports the features of the async_tx api: * asynchronous notification of operation completion * implicit (interupt triggered) handling of inter-channel transaction dependencies The driver adapts to the platform it is running by two methods. 1/ #include which defines the hardware specific iop_chan_* and iop_desc_* routines as a series of static inline functions 2/ The private platform data attached to the platform_device defines the capabilities of the channels 20070626: Callbacks are run in a tasklet. Given the recent discussion on LKML about killing tasklets in favor of workqueues I did a quick conversion of the driver. Raid5 resync performance dropped from 50MB/s to 30MB/s, so the tasklet implementation remains until a generic softirq interface is available. Changelog: * fixed a slot allocation bug in do_iop13xx_adma_xor that caused too few slots to be requested eventually leading to data corruption * enabled the slot allocation routine to attempt to free slots before returning -ENOMEM * switched the cleanup routine to solely use the software chain and the status register to determine if a descriptor is complete. This is necessary to support other IOP engines that do not have status writeback capability * make the driver iop generic * modified the allocation routines to understand allocating a group of slots for a single operation * added a null xor initialization operation for the xor only channel on iop3xx * support xor operations on buffers larger than the hardware maximum * split the do_* routines into separate prep, src/dest set, submit stages * added async_tx support (dependent operations initiation at cleanup time) * simplified group handling * added interrupt support (callbacks via tasklets) * brought the pending depth inline with ioat (i.e. 4 descriptors) * drop dma mapping methods, suggested by Chris Leech * don't use inline in C files, Adrian Bunk * remove static tasklet declarations * make iop_adma_alloc_slots easier to read and remove chances for a corrupted descriptor chain * fix locking bug in iop_adma_alloc_chan_resources, Benjamin Herrenschmidt * convert capabilities over to dma_cap_mask_t * fixup sparse warnings * add descriptor flush before iop_chan_enable * checkpatch.pl fixes * gpl v2 only correction * move set_src, set_dest, submit to async_tx methods * move group_list and phys to async_tx Cc: Russell King Signed-off-by: Dan Williams commit f6dff381af01006ffae3c23cd2e07e30584de0ec Author: Dan Williams Date: Tue Jan 2 13:52:31 2007 -0700 md: remove raid5 compute_block and compute_parity5 replaced by raid5_run_ops Signed-off-by: Dan Williams Acked-By: NeilBrown commit 830ea01673a397798d1281d2022615559f5001bb Author: Dan Williams Date: Tue Jan 2 13:52:31 2007 -0700 md: handle_stripe5 - request io processing in raid5_run_ops I/O submission requests were already handled outside of the stripe lock in handle_stripe. Now that handle_stripe is only tasked with finding work, this logic belongs in raid5_run_ops. Signed-off-by: Dan Williams Acked-By: NeilBrown commit f0a50d3754c7f1b7f05f45b1c0b35d20445316b5 Author: Dan Williams Date: Tue Jan 2 13:52:31 2007 -0700 md: handle_stripe5 - add request/completion logic for async expand ops When a stripe is being expanded bulk copying takes place to move the data from the old stripe to the new. Since raid5_run_ops only operates on one stripe at a time these bulk copies are handled in-line under the stripe lock. In the dma offload case we poll for the completion of the operation. After the data has been copied into the new stripe the parity needs to be recalculated across the new disks. We reuse the existing postxor functionality to carry out this calculation. By setting STRIPE_OP_POSTXOR without setting STRIPE_OP_BIODRAIN the completion path in handle stripe can differentiate expand operations from normal write operations. Signed-off-by: Dan Williams Acked-By: NeilBrown commit b5e98d65d34a1c11a2135ea8a9b2619dbc7216c8 Author: Dan Williams Date: Tue Jan 2 13:52:31 2007 -0700 md: handle_stripe5 - add request/completion logic for async read ops When a read bio is attached to the stripe and the corresponding block is marked R5_UPTODATE, then a read (biofill) operation is scheduled to copy the data from the stripe cache to the bio buffer. handle_stripe flags the blocks to be operated on with the R5_Wantfill flag. If new read requests arrive while raid5_run_ops is running they will not be handled until handle_stripe is scheduled to run again. Changelog: * cleanup to_read and to_fill accounting * do not fail reads that have reached the cache Signed-off-by: Dan Williams Acked-By: NeilBrown commit e89f89629b5de76e504d1be75c82c4a6b2419583 Author: Dan Williams Date: Tue Jan 2 13:52:31 2007 -0700 md: handle_stripe5 - add request/completion logic for async check ops Check operations are scheduled when the array is being resynced or an explicit 'check/repair' command was sent to the array. Previously check operations would destroy the parity block in the cache such that even if parity turned out to be correct the parity block would be marked !R5_UPTODATE at the completion of the check. When the operation can be carried out by a dma engine the assumption is that it can check parity as a read-only operation. If raid5_run_ops notices that the check was handled by hardware it will preserve the R5_UPTODATE status of the parity disk. When a check operation determines that the parity needs to be repaired we reuse the existing compute block infrastructure to carry out the operation. Repair operations imply an immediate write back of the data, so to differentiate a repair from a normal compute operation the STRIPE_OP_MOD_REPAIR_PD flag is added. Changelog: * remove test_and_set/test_and_clear BUG_ONs, Neil Brown Signed-off-by: Dan Williams Acked-By: NeilBrown commit f38e12199a94ca458e4f03c5a2c984fb80adadc5 Author: Dan Williams Date: Tue Jan 2 13:52:30 2007 -0700 md: handle_stripe5 - add request/completion logic for async compute ops handle_stripe will compute a block when a backing disk has failed, or when it determines it can save a disk read by computing the block from all the other up-to-date blocks. Previously a block would be computed under the lock and subsequent logic in handle_stripe could use the newly up-to-date block. With the raid5_run_ops implementation the compute operation is carried out a later time outside the lock. To preserve the old functionality we take advantage of the dependency chain feature of async_tx to flag the block as R5_Wantcompute and then let other parts of handle_stripe operate on the block as if it were up-to-date. raid5_run_ops guarantees that the block will be ready before it is used in another operation. However, this only works in cases where the compute and the dependent operation are scheduled at the same time. If a previous call to handle_stripe sets the R5_Wantcompute flag there is no facility to pass the async_tx dependency chain across successive calls to raid5_run_ops. The req_compute variable protects against this case. Changelog: * remove the req_compute BUG_ON Signed-off-by: Dan Williams Acked-By: NeilBrown commit e33129d84130459dbb764a1a52a4bfceab3da978 Author: Dan Williams Date: Tue Jan 2 13:52:30 2007 -0700 md: handle_stripe5 - add request/completion logic for async write ops After handle_stripe5 decides whether it wants to perform a read-modify-write, or a reconstruct write it calls handle_write_operations5. A read-modify-write operation will perform an xor subtraction of the blocks marked with the R5_Wantprexor flag, copy the new data into the stripe (biodrain) and perform a postxor operation across all up-to-date blocks to generate the new parity. A reconstruct write is run when all blocks are already up-to-date in the cache so all that is needed is a biodrain and postxor. On the completion path STRIPE_OP_PREXOR will be set if the operation was a read-modify-write. The STRIPE_OP_BIODRAIN flag is used in the completion path to differentiate write-initiated postxor operations versus expansion-initiated postxor operations. Completion of a write triggers i/o to the drives. Changelog: * make the 'rcw' parameter to handle_write_operations5 a simple flag, Neil Brown * remove test_and_set/test_and_clear BUG_ONs, Neil Brown Signed-off-by: Dan Williams Acked-By: NeilBrown commit d84e0f10d38393f617227f0c831a99c69294651f Author: Dan Williams Date: Tue Jan 2 13:52:30 2007 -0700 md: common infrastructure for running operations with raid5_run_ops All the handle_stripe operations that are to be transitioned to use raid5_run_ops need a method to coherently gather work under the stripe-lock and hand that work off to raid5_run_ops. The 'get_stripe_work' routine runs under the lock to read all the bits in sh->ops.pending that do not have the corresponding bit set in sh->ops.ack. This modified 'pending' bitmap is then passed to raid5_run_ops for processing. The transition from 'ack' to 'completion' does not need similar protection as the existing release_stripe infrastructure will guarantee that handle_stripe will run again after a completion bit is set, and handle_stripe can tolerate a sh->ops.completed bit being set while the lock is held. A call to async_tx_issue_pending_all() is added to raid5d to kick the offload engines once all pending stripe operations work has been submitted. This enables batching of the submission and completion of operations. Signed-off-by: Dan Williams Acked-By: NeilBrown commit 91c00924846a0034020451c280c76baa4299f9dc Author: Dan Williams Date: Tue Jan 2 13:52:30 2007 -0700 md: raid5_run_ops - run stripe operations outside sh->lock When the raid acceleration work was proposed, Neil laid out the following attack plan: 1/ move the xor and copy operations outside spin_lock(&sh->lock) 2/ find/implement an asynchronous offload api The raid5_run_ops routine uses the asynchronous offload api (async_tx) and the stripe_operations member of a stripe_head to carry out xor+copy operations asynchronously, outside the lock. To perform operations outside the lock a new set of state flags is needed to track new requests, in-flight requests, and completed requests. In this new model handle_stripe is tasked with scanning the stripe_head for work, updating the stripe_operations structure, and finally dropping the lock and calling raid5_run_ops for processing. The following flags outline the requests that handle_stripe can make of raid5_run_ops: STRIPE_OP_BIOFILL - copy data into request buffers to satisfy a read request STRIPE_OP_COMPUTE_BLK - generate a missing block in the cache from the other blocks STRIPE_OP_PREXOR - subtract existing data as part of the read-modify-write process STRIPE_OP_BIODRAIN - copy data out of request buffers to satisfy a write request STRIPE_OP_POSTXOR - recalculate parity for new data that has entered the cache STRIPE_OP_CHECK - verify that the parity is correct STRIPE_OP_IO - submit i/o to the member disks (note this was already performed outside the stripe lock, but it made sense to add it as an operation type The flow is: 1/ handle_stripe sets STRIPE_OP_* in sh->ops.pending 2/ raid5_run_ops reads sh->ops.pending, sets sh->ops.ack, and submits the operation to the async_tx api 3/ async_tx triggers the completion callback routine to set sh->ops.complete and release the stripe 4/ handle_stripe runs again to finish the operation and optionally submit new operations that were previously blocked Note this patch just defines raid5_run_ops, subsequent commits (one per major operation type) modify handle_stripe to take advantage of this routine. Changelog: * removed ops_complete_biodrain in favor of ops_complete_postxor and ops_complete_write. * removed the raid5_run_ops workqueue * call bi_end_io for reads in ops_complete_biofill, saves a call to handle_stripe * explicitly handle the 2-disk raid5 case (xor becomes memcpy), Neil Brown * fix race between async engines and bi_end_io call for reads, Neil Brown * remove unnecessary spin_lock from ops_complete_biofill * remove test_and_set/test_and_clear BUG_ONs, Neil Brown * remove explicit interrupt handling for channel switching, this feature was absorbed (i.e. it is now implicit) by the async_tx api * use return_io in ops_complete_biofill Signed-off-by: Dan Williams Acked-By: NeilBrown commit 45b4233caac05da0118b608a9fc2a40a9fc580cd Author: Dan Williams Date: Mon Jul 9 11:56:43 2007 -0700 raid5: replace custom debug PRINTKs with standard pr_debug Replaces PRINTK with pr_debug, and kills the RAID5_DEBUG definition in favor of the global DEBUG definition. To get local debug messages just add '#define DEBUG' to the top of the file. Signed-off-by: Dan Williams Acked-By: NeilBrown commit a445685647e825c713175d180ffc8dd54d90589b Author: Dan Williams Date: Mon Jul 9 11:56:43 2007 -0700 raid5: refactor handle_stripe5 and handle_stripe6 (v3) handle_stripe5 and handle_stripe6 have very deep logic paths handling the various states of a stripe_head. By introducing the 'stripe_head_state' and 'r6_state' objects, large portions of the logic can be moved to sub-routines. 'struct stripe_head_state' consumes all of the automatic variables that previously stood alone in handle_stripe5,6. 'struct r6_state' contains the handle_stripe6 specific variables like p_failed and q_failed. One of the nice side effects of the 'stripe_head_state' change is that it allows for further reductions in code duplication between raid5 and raid6. The following new routines are shared between raid5 and raid6: handle_completed_write_requests handle_requests_to_failed_array handle_stripe_expansion Changes: * v2: fixed 'conf->raid_disk-1' for the raid6 'handle_stripe_expansion' path * v3: removed the unused 'dirty' field from struct stripe_head_state * v3: coalesced open coded bi_end_io routines into return_io() Signed-off-by: Dan Williams Acked-By: NeilBrown commit 9bc89cd82d6f88fb0ca39b30445c329a430fd66b Author: Dan Williams Date: Tue Jan 2 11:10:44 2007 -0700 async_tx: add the async_tx api The async_tx api provides methods for describing a chain of asynchronous bulk memory transfers/transforms with support for inter-transactional dependencies. It is implemented as a dmaengine client that smooths over the details of different hardware offload engine implementations. Code that is written to the api can optimize for asynchronous operation and the api will fit the chain of operations to the available offload resources. I imagine that any piece of ADMA hardware would register with the 'async_*' subsystem, and a call to async_X would be routed as appropriate, or be run in-line. - Neil Brown async_tx exploits the capabilities of struct dma_async_tx_descriptor to provide an api of the following general format: struct dma_async_tx_descriptor * async_(..., struct dma_async_tx_descriptor *depend_tx, dma_async_tx_callback cb_fn, void *cb_param) { struct dma_chan *chan = async_tx_find_channel(depend_tx, ); struct dma_device *device = chan ? chan->device : NULL; int int_en = cb_fn ? 1 : 0; struct dma_async_tx_descriptor *tx = device ? device->device_prep_dma_(chan, len, int_en) : NULL; if (tx) { /* run asynchronously */ ... tx->tx_set_dest(addr, tx, index); ... tx->tx_set_src(addr, tx, index); ... async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); } else { /* run synchronously */ ... ... async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param); } return tx; } async_tx_find_channel() returns a capable channel from its pool. The channel pool is organized as a per-cpu array of channel pointers. The async_tx_rebalance() routine is tasked with managing these arrays. In the uniprocessor case async_tx_rebalance() tries to spread responsibility evenly over channels of similar capabilities. For example if there are two copy+xor channels, one will handle copy operations and the other will handle xor. In the SMP case async_tx_rebalance() attempts to spread the operations evenly over the cpus, e.g. cpu0 gets copy channel0 and xor channel0 while cpu1 gets copy channel 1 and xor channel 1. When a dependency is specified async_tx_find_channel defaults to keeping the operation on the same channel. A xor->copy->xor chain will stay on one channel if it supports both operation types, otherwise the transaction will transition between a copy and a xor resource. Currently the raid5 implementation in the MD raid456 driver has been converted to the async_tx api. A driver for the offload engines on the Intel Xscale series of I/O processors, iop-adma, is provided in a later commit. With the iop-adma driver and async_tx, raid456 is able to offload copy, xor, and xor-zero-sum operations to hardware engines. On iop342 tiobench showed higher throughput for sequential writes (20 - 30% improvement) and sequential reads to a degraded array (40 - 55% improvement). For the other cases performance was roughly equal, +/- a few percentage points. On a x86-smp platform the performance of the async_tx implementation (in synchronous mode) was also +/- a few percentage points of the original implementation. According to 'top' on iop342 CPU utilization drops from ~50% to ~15% during a 'resync' while the speed according to /proc/mdstat doubles from ~25 MB/s to ~50 MB/s. The tiobench command line used for testing was: tiobench --size 2048 --block 4096 --block 131072 --dir /mnt/raid --numruns 5 * iop342 had 1GB of memory available Details: * if CONFIG_DMA_ENGINE=n the asynchronous path is compiled away by making async_tx_find_channel a static inline routine that always returns NULL * when a callback is specified for a given transaction an interrupt will fire at operation completion time and the callback will occur in a tasklet. if the the channel does not support interrupts then a live polling wait will be performed * the api is written as a dmaengine client that requests all available channels * In support of dependencies the api implicitly schedules channel-switch interrupts. The interrupt triggers the cleanup tasklet which causes pending operations to be scheduled on the next channel * Xor engines treat an xor destination address differently than a software xor routine. To the software routine the destination address is an implied source, whereas engines treat it as a write-only destination. This patch modifies the xor_blocks routine to take a an explicit destination address to mirror the hardware. Changelog: * fixed a leftover debug print * don't allow callbacks in async_interrupt_cond * fixed xor_block changes * fixed usage of ASYNC_TX_XOR_DROP_DEST * drop dma mapping methods, suggested by Chris Leech * printk warning fixups from Andrew Morton * don't use inline in C files, Adrian Bunk * select the API when MD is enabled * BUG_ON xor source counts <= 1 * implicitly handle hardware concerns like channel switching and interrupts, Neil Brown * remove the per operation type list, and distribute operation capabilities evenly amongst the available channels * simplify async_tx_find_channel to optimize the fast path * introduce the channel_table_initialized flag to prevent early calls to the api * reorganize the code to mimic crypto * include mm.h as not all archs include it in dma-mapping.h * make the Kconfig options non-user visible, Adrian Bunk * move async_tx under crypto since it is meant as 'core' functionality, and the two may share algorithms in the future * move large inline functions into c files * checkpatch.pl fixes * gpl v2 only correction Cc: Herbert Xu Signed-off-by: Dan Williams Acked-By: NeilBrown commit 685784aaf3cd0e3ff5e36c7ecf6f441cdbf57f73 Author: Dan Williams Date: Mon Jul 9 11:56:42 2007 -0700 xor: make 'xor_blocks' a library routine for use with async_tx The async_tx api tries to use a dma engine for an operation, but will fall back to an optimized software routine otherwise. Xor support is implemented using the raid5 xor routines. For organizational purposes this routine is moved to a common area. The following fixes are also made: * rename xor_block => xor_blocks, suggested by Adrian Bunk * ensure that xor.o initializes before md.o in the built-in case * checkpatch.pl fixes * mark calibrate_xor_blocks __init, Adrian Bunk Cc: Adrian Bunk Cc: NeilBrown Cc: Herbert Xu Signed-off-by: Dan Williams commit d379b01e9087a582d58f4b678208a4f8d8376fe7 Author: Dan Williams Date: Mon Jul 9 11:56:42 2007 -0700 dmaengine: make clients responsible for managing channels The current implementation assumes that a channel will only be used by one client at a time. In order to enable channel sharing the dmaengine core is changed to a model where clients subscribe to channel-available-events. Instead of tracking how many channels a client wants and how many it has received the core just broadcasts the available channels and lets the clients optionally take a reference. The core learns about the clients' needs at dma_event_callback time. In support of multiple operation types, clients can specify a capability mask to only be notified of channels that satisfy a certain set of capabilities. Changelog: * removed DMA_TX_ARRAY_INIT, no longer needed * dma_client_chan_free -> dma_chan_release: switch to global reference counting only at device unregistration time, before it was also happening at client unregistration time * clients now return dma_state_client to dmaengine (ack, dup, nak) * checkpatch.pl fixes * fixup merge with git-ioat Cc: Chris Leech Signed-off-by: Shannon Nelson Signed-off-by: Dan Williams Acked-by: David S. Miller commit 7405f74badf46b5d023c5d2b670b4471525f6c91 Author: Dan Williams Date: Tue Jan 2 11:10:43 2007 -0700 dmaengine: refactor dmaengine around dma_async_tx_descriptor The current dmaengine interface defines mutliple routines per operation, i.e. dma_async_memcpy_buf_to_buf, dma_async_memcpy_buf_to_page etc. Adding more operation types (xor, crc, etc) to this model would result in an unmanageable number of method permutations. Are we really going to add a set of hooks for each DMA engine whizbang feature? - Jeff Garzik The descriptor creation process is refactored using the new common dma_async_tx_descriptor structure. Instead of per driver do___to_ methods, drivers integrate dma_async_tx_descriptor into their private software descriptor and then define a 'prep' routine per operation. The prep routine allocates a descriptor and ensures that the tx_set_src, tx_set_dest, tx_submit routines are valid. Descriptor creation and submission becomes: struct dma_device *dev; struct dma_chan *chan; struct dma_async_tx_descriptor *tx; tx = dev->device_prep_dma_(chan, len, int_flag) tx->tx_set_src(dma_addr_t, tx, index /* for multi-source ops */) tx->tx_set_dest(dma_addr_t, tx, index) tx->tx_submit(tx) In addition to the refactoring, dma_async_tx_descriptor also lays the groundwork for definining cross-channel-operation dependencies, and a callback facility for asynchronous notification of operation completion. Changelog: * drop dma mapping methods, suggested by Chris Leech * fix ioat_dma_dependency_added, also caught by Andrew Morton * fix dma_sync_wait, change from Andrew Morton * uninline large functions, change from Andrew Morton * add tx->callback = NULL to dmaengine calls to interoperate with async_tx calls * hookup ioat_tx_submit * convert channel capabilities to a 'cpumask_t like' bitmap * removed DMA_TX_ARRAY_INIT, no longer needed * checkpatch.pl fixes * make set_src, set_dest, and tx_submit descriptor specific methods * fixup git-ioat merge * move group_list and phys to dma_async_tx_descriptor Cc: Jeff Garzik Cc: Chris Leech Signed-off-by: Shannon Nelson Signed-off-by: Dan Williams Acked-by: David S. Miller commit 51a92c0f6ce8fa85fa0e18ecda1d847e606e8066 Author: Jens Axboe Date: Fri Jul 13 14:11:43 2007 +0200 splice: fix offset mangling with direct splicing (sendfile) If the output actor doesn't transfer the full amount of data, we will increment ppos too much. Two related bugs in there: - We need to break out and return actor() retval if it is shorted than what we spliced into the pipe. - Adjust ppos only according to actor() return. Also fix loop problem in generic_file_splice_read(), it should not keep going when data has already been transferred. Signed-off-by: Jens Axboe commit 29ce20586be54ceba49c55ae049541398cd2c416 Author: James Morris Date: Fri Jul 13 11:44:32 2007 +0200 security: revalidate rw permissions for sys_splice and sys_vmsplice Revalidate read/write permissions for splice(2) and vmslice(2), in case security policy has changed since the files were opened. Acked-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: Jens Axboe commit d3f35d98b3b87d2506289320375687c6e9bc53ed Author: Tom Zanussi Date: Thu Jul 12 08:12:05 2007 +0200 relay: fixup kerneldoc comment Change comment from kerneldoc to normal. Signed-off-by: Tom Zanussi Signed-off-by: Jens Axboe commit 24da24de2eae0c277b85836e2b4b09cfafeea995 Author: Tom Zanussi Date: Thu Jul 12 08:12:04 2007 +0200 relay: fix bogus cast in subbuf_splice_actor() The current code that sets the read position in subbuf_splice_actor may give erroneous results if the buffer size isn't a power of 2. This patch fixes the problem. Signed-off-by: Tom Zanussi Signed-off-by: Jens Axboe commit 773208946a132fb733ba273ee8562814f828cc28 Author: Linus Torvalds Date: Thu Jul 12 17:06:50 2007 -0700 Revert "USB: fix gregkh-usb-usb-use-menuconfig-objects" This reverts commit acb11c8b8020f1f1b2545152020675ef32d09a58. It was broken. We most certainly *do* want the default to be the old behaviour (and the common case!), instead of breaking everybodys configuration and making 99% of all people have to override the default. What were you guys thinking? Signed-off-by: Linus Torvalds commit 9374430a52dfae5c013b88f7f030c04a6774d410 Merge: 66f4973... 13f9966... Author: Linus Torvalds Date: Thu Jul 12 16:46:58 2007 -0700 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6 * master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (149 commits) USB: ohci-pnx4008: Remove unnecessary cast of return value of kzalloc USB: additions to the quirk list usb-storage: implement autosuspend USB: cdc-acm: add new device id to option driver USB: goku_udc trivial cleanups USB: usb gadget stack can now -DDEBUG with Kconfig usb gadget stack: remove usb_ep_*_buffer(), part 2 usb gadget stack: remove usb_ep_*_buffer(), part 1 USB: pxa2xx_udc -- cleanups, mostly removing dma hooks USB: pxa2xx_udc: use generic gpio layer USB: quirk for samsung printer USB: usb/dma doc updates USB: drivers/usb/storage/unusual_devs.h whitespace cleanup USB: remove Makefile reference to obsolete OHCI_AT91 USB: io_*: remove bogus termios no change checks USB: mos7720: remove bogus no termios change check USB: visor and whiteheat: remove bogus termios change checks USB: pl2303: remove bogus checks and fix speed support to use tty_get_baud_rate() USB: mos7840.c: turn this into a serial driver USB: make the usb_device numa_node get assigned from controller ... commit 66f49739fe1591197364f2dad1b67b975e8f5e85 Merge: 0cdf699... 57e4acb... Author: Linus Torvalds Date: Thu Jul 12 16:46:01 2007 -0700 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Un-break ia64 build commit 0cdf6990e992902ae59cbc625d28cb41390f378e Merge: de081fa... cec7c89... Author: Linus Torvalds Date: Thu Jul 12 16:45:40 2007 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (76 commits) IB: Update MAINTAINERS with Hal's new email address IB/mlx4: Implement query SRQ IB/mlx4: Implement query QP IB/cm: Send no match if a SIDR REQ does not match a listen IB/cm: Fix handling of duplicate SIDR REQs IB/cm: cm_msgs.h should include ib_cm.h IB/cm: Include HCA ACK delay in local ACK timeout IB/cm: Use spin_lock_irq() instead of spin_lock_irqsave() when possible IB/sa: Make sure SA queries use default P_Key IPoIB: Recycle loopback skbs instead of freeing and reallocating IB/mthca: Replace memset(, 0, PAGE_SIZE) with clear_page() IPoIB/cm: Fix warning if IPV6 is not enabled IB/core: Take sizeof the correct pointer when calling kmalloc() IB/ehca: Improve latency by unlocking after triggering the hardware IB/ehca: Notify consumers of LID/PKEY/SM changes after nondisruptive events IB/ehca: Return QP pointer in poll_cq() IB/ehca: Change idr spinlocks into rwlocks IB/ehca: Refactor sync between completions and destroy_cq using atomic_t IB/ehca: Lock renaming, static initializers IB/ehca: Report RDMA atomic attributes in query_qp() ... commit de081fa517fed81b0369f2e90ca87c30182879c8 Author: Linus Torvalds Date: Thu Jul 12 16:40:08 2007 -0700 Revert "[BNX2]: Seems to not need net/tcp.h" This reverts commit 963bd949b12158d9b5380b718b31c4b33372ed73. The driver _does_ need the networking header files; CC [M] drivers/net/bnx2.o drivers/net/bnx2.c: In function 'bnx2_start_xmit': drivers/net/bnx2.c:5177: warning: implicit declaration of function 'tcp_optlen' drivers/net/bnx2.c:5181: error: invalid application of 'sizeof' to incomplete type 'struct ipv6hdr' drivers/net/bnx2.c:5202: error: invalid application of 'sizeof' to incomplete type 'struct tcphdr' drivers/net/bnx2.c:5207: warning: implicit declaration of function 'tcp_hdr' drivers/net/bnx2.c:5207: error: invalid type argument of '->' make[2]: *** [drivers/net/bnx2.o] Error 1 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 Cc: Ilpo Jävinen Cc: David Miller Signed-off-by: Linus Torvalds commit 13f9966b3ba5b45f47f2ea0eb0a90afceedfbb1f Author: Suresh Jayaraman Date: Thu Jun 28 11:16:30 2007 -0600 USB: ohci-pnx4008: Remove unnecessary cast of return value of kzalloc Remove unnecessary cast of return value of kzalloc() in usb/host/ohci-pnx4008.c Signed-off-by: Suresh Jayaraman Signed-off-by: Greg Kroah-Hartman commit 6c59649d49df4b9084bf407890734b5965d77b41 Author: Oliver Neukum Date: Tue Jul 10 14:12:08 2007 +0200 USB: additions to the quirk list this adds some scanners reported to be crashed by autosuspend to the quirk list. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 8dfe4b14869fd185ca25ee88b02ada58a3005eaf Author: Alan Stern Date: Fri Jul 6 14:24:27 2007 -0400 usb-storage: implement autosuspend This patch (as930) implements autosuspend for usb-storage. It is adapted from a patch by Oliver Neukum. Autosuspend is allowed except during LUN scanning, resets, and command execution. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit b0e2a705bffbfb70d9bed8b5f9094901f28d9563 Author: Andrey Arapov Date: Wed Jul 4 17:11:42 2007 +0200 USB: cdc-acm: add new device id to option driver USB: add new device id to option driver device is Samsung X180 China cellphone Signed-off-by: Andrey Arapov Acked-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 2d70c99b9340fa6c834fa6e32209e153f35a3e20 Author: David Brownell Date: Sun Jul 1 17:55:50 2007 -0700 USB: goku_udc trivial cleanups Minor fixes to goku_udc ... whitespace, let -DDEBUG do its thing, check the return value of device_register(), sparse tweaks. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 70790f6339a868e2a0d643f44899418f64a95943 Author: David Brownell Date: Sun Jul 1 17:35:28 2007 -0700 USB: usb gadget stack can now -DDEBUG with Kconfig Although the other USB driver directories got taught how use Kconfig and the Makefile to enable the debugging messages enabled by -DDEBUG, the gadget stack was overlooked. This patch remedies that omission, but doesn't update any drivers to remove previous idiosyncracies in this area ... other than the RNDIS code, which defined its own DEBUG() macro in a broken way. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit c67ab134ba9f83f9de86e58adfeaa14a9efa6e00 Author: David Brownell Date: Sun Jul 1 12:21:00 2007 -0700 usb gadget stack: remove usb_ep_*_buffer(), part 2 This patch removes controller driver infrastructure which supported the now-removed usb_ep_{alloc,free}_buffer() calls. As can be seen, many of the implementations of this were broken to various degrees. Many didn't properly return dma-coherent mappings; those which did so were necessarily ugly because of bogosity in the underlying dma_free_coherent() calls ... which on many platforms can't be called from the same contexts (notably in_irq) from which their dma_alloc_coherent() sibling can be called. The main potential downside of removing this is that gadget drivers wouldn't have specific knowledge that the controller drivers have: endpoints that aren't dma-capable don't need any dma mappings at all. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 9d8bab58b758cd5a96d368a8cc64111c9ab50407 Author: David Brownell Date: Sun Jul 1 11:04:54 2007 -0700 usb gadget stack: remove usb_ep_*_buffer(), part 1 Remove usb_ep_{alloc,free}_buffer() calls, for small dma-coherent buffers. This patch just removes the interface and its users; later patches will remove controller driver support. - This interface is invariably not implemented correctly in the controller drivers (e.g. using dma pools, a mechanism which post-dates the interface by several years). - At this point no gadget driver really *needs* to use it. In current kernels, any driver that needs such a mechanism could allocate a dma pool themselves. Removing this interface is thus a simplification and improvement. Note that the gmidi.c driver had a bug in this area; fixed. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit ad8c623f4f48085edd51c7f4cdfd10295547bf45 Author: David Brownell Date: Sat Jun 30 06:30:04 2007 -0700 USB: pxa2xx_udc -- cleanups, mostly removing dma hooks Cleanups to the pxa2xx_udc code: - Primarily removing unused DMA hooks. - One "sparse" warning removed - Remove some Lubbock-only LED hooks (for debugging) That DMA code was never really completed. It worked, mostly, for IN transfers (to the host) if they were fortuitously aligned, but that code was never fully tested. And it was never coded for OUT transfers (which is where DMA would really help) ... because of chip errata on essentially every chip other than the pxa255, and because of design botches (nothing automated data toggle). So it's effectively been dead code for several years now ... no point in keeping it around. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 9068a4c6467986e8fda5bdb29bd5f10c6788e2ff Author: Milan Svoboda Date: Sat Jun 30 06:25:35 2007 -0700 USB: pxa2xx_udc: use generic gpio layer This patch lets the pxa2xx_udc use the generic gpio layer, on the relevant PXA and IXP systems. Signed-off-by: Milan Svoboda Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit e4f747373cd96c86db3c64c21710748c6889c03c Author: Oliver Neukum Date: Fri Jun 29 08:44:37 2007 +0200 USB: quirk for samsung printer this printer does not survive suspension. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit fbf54dd32001359ccda6a9d8577f7b00e67357c7 Author: David Brownell Date: Sun Jul 1 23:33:12 2007 -0700 USB: usb/dma doc updates This patch updates some of the documentation about DMA buffer management for USB, and ways to avoid extra copying. Our understanding of the issues has improved over time. - Most drivers should *avoid* the dma-coherent allocators. There are a few exceptions (like the HID driver). - Some methods are currently commented out; it seems folk writing USB drivers aren't doing performance tuning at that level yet. - Just avoid highmem; there's no good way to pass an "I can do highmem DMA" capability through a driver stack. This is easy, everything already avoids highmem. But it'd be nice if x86_32 systems with much physical memory could use it directly with network adapters and mass storage devices. (Patch, anyone?) Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit c0e0c19cc9d899da0ee15104907ac158eb94365b Author: S.Caglar Onur Date: Wed Jul 4 13:52:47 2007 -0700 USB: drivers/usb/storage/unusual_devs.h whitespace cleanup Following patch removes trailing whitespaces at the ends of lines and converts smarttabs/whitespaces into real tabs. Signed-off-by: S.Caglar Onur Signed-off-by: Phil Dibowitz Signed-off-by: Greg Kroah-Hartman commit a603c665516a3cb9df6abafad491bef24cc87aa5 Author: Robert P. J. Day Date: Mon Jul 9 12:03:13 2007 -0700 USB: remove Makefile reference to obsolete OHCI_AT91 Signed-off-by: Robert P. J. Day Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 6dc731024347ab499c3fc0347ab90d972771b8a1 Author: Alan Cox Date: Mon Jul 9 12:03:12 2007 -0700 USB: io_*: remove bogus termios no change checks Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit eb58c0c5f2b3cf6306a184cdf1c751155b7ddb3b Author: Alan Cox Date: Mon Jul 9 12:03:12 2007 -0700 USB: mos7720: remove bogus no termios change check Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 9a64f251326154dcd40b21a6980fe2ab9537dde7 Author: Alan Cox Date: Mon Jul 9 12:03:11 2007 -0700 USB: visor and whiteheat: remove bogus termios change checks Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit e0c79f512cf469bc11fe9d53a4dcc5d0c39a3b79 Author: Alan Cox Date: Mon Jul 9 12:03:10 2007 -0700 USB: pl2303: remove bogus checks and fix speed support to use tty_get_baud_rate() Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 31473aae5afb11f0c5217dafdbc9df8a470071aa Author: Alan Cox Date: Mon Jul 9 12:03:10 2007 -0700 USB: mos7840.c: turn this into a serial driver The MOS driver is "interesting", in a bad kind of 'how the hell did this get merged' kind of way - Remove the bogus termios change check - Remove the duplicate code for half the ioctls - Remove the supporting code to duplicate the ioctl code Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 70f458f668aa09cc45384728dec434f2975a3947 Author: Yinghai Lu Date: Mon Jul 9 12:03:09 2007 -0700 USB: make the usb_device numa_node get assigned from controller So we can use dev_to_node(&usb_dev->dev) later in kmalloc_node to dma buffer Signed-off-by: Yinghai Lu Cc: Andi Kleen Acked-by: Christoph Lameter Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 0ffbbe25a73db12792a05f725aa39f8a5de2c882 Author: Oliver Neukum Date: Mon Jul 9 12:03:08 2007 -0700 USB: ftdi_sio: fix oops due to processing workarounds too early Fix an oops that happens in relation with applying work arounds for buggy ftdi_sio devices. The quirks were handled too early because due to changes in the initialisation of usb serial devices the device was not fully initialised when the old hook was called. Addresses bug 8564 Cc: Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit a69228deefea57ca27c17a196e5727b091c6d323 Author: Matthias Kaehlcke Date: Mon Jul 9 12:03:07 2007 -0700 USB: drivers/block/ub.c: use list_for_each_entry() Low performance USB storage driver: Use list_for_each_entry() instead of list_for_each() Signed-off-by: Matthias Kaehlcke Cc: Pete Zaitcev Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit acb11c8b8020f1f1b2545152020675ef32d09a58 Author: Jan Engelhardt Date: Mon Jul 9 12:03:06 2007 -0700 USB: fix gregkh-usb-usb-use-menuconfig-objects Generally, Jens Axboe was against 'default y', so I'll have some patches to remove it. Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 8d6d5fd05088c023bb8b22a4bd0067c21f9c5f18 Author: Venki Pallipadi Date: Mon Jul 9 12:03:06 2007 -0700 USB: Make usb-autosuspend timer 1 sec jiffy aligned Make usb autosuspend timers 1sec jiffy aligned. This helps to reduce the frequency at which the CPU must be taken out of a lower-power state. Signed-off-by: Venkatesh Pallipadi Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 8e80e753ea654ae0a66b33e404c0a517b34cb6e1 Author: Jeremy Katz Date: Tue Jun 19 17:16:10 2007 -0400 USB: Don't autosuspend Blackberry devices. Blackberry devices charge over USB. By autosuspending the port, they are not able to charge reliably. Signed-off-by: Jeremy Katz Signed-off-by: Greg Kroah-Hartman commit 49bb607fa0bd94e4855ee695f9ed3ecee7579cc6 Author: Jeremy Katz Date: Tue Jun 19 17:15:38 2007 -0400 USB: Support Blackberry Pearl with berry_charge The Blackberry Pearl (8100) needs similar tweaks as older Blackberry models to be able to charge when connected via USB. The Pearl also adds an additional need to go into a separate mode for fully accessing the device; do that by default as well. Changes based on the changes from bcharge in the barry project (http://barry.sf.net) Signed-off-by: Jeremy Katz Signed-off-by: Greg Kroah-Hartman commit 165fe97ed6107d3cde63592d5ac36400a5eb9f6f Author: Craig W. Nadler Date: Fri Jun 15 23:14:35 2007 -0400 USB: add IAD support to usbfs and sysfs USB_IAD: Adds support for USB Interface Association Descriptors. This patch adds support to the USB host stack for parsing, storing, and displaying Interface Association Descriptors. In /proc/bus/usb/devices lines starting with A: show the fields in an IAD. In sysfs if an interface on a USB device is referenced by an IAD the following files will be added to the sysfs directory for that interface: iad_bFirstInterface, iad_bInterfaceCount, iad_bFunctionClass, and iad_bFunctionSubClass, iad_bFunctionProtocol Signed-off-by: Craig W. Nadler Signed-off-by: Greg Kroah-Hartman commit 50d2dc7266573dfbdc84fc207494dd21315782ef Author: Greg Kroah-Hartman Date: Mon Jun 25 01:08:01 2007 -0700 USB: mos7720: change developer email addresses Update the original developer's email addresses at their request. Cc: Vijaya Kumar Cc: Ajay Kumar Cc: Gurudeva Signed-off-by: Greg Kroah-Hartman commit 8ccef0df54642f0f72f922d8aa57e8b290e31671 Author: Alan Stern Date: Thu Jun 21 16:26:46 2007 -0400 USB: Fix off-by-1 error in the scatter-gather library The loop in usb_sg_wait() is structured in a way that makes it hard to tell, when the loop exits, whether or not the last URB submission succeeded. This patch (as928) changes it from a "for" loop to a "while" loop and keeps "i" always equal to the number of successful submissions. This fixes an off-by-one error which can show up when the first URB submission fails. The patch also removes a couple of lines that initialize fields which don't need to be initialized. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit cfa59dab27d1b282886e7772a8f9548236883892 Author: Alan Stern Date: Thu Jun 21 16:25:35 2007 -0400 USB: Don't resume root hub if the controller is suspended Root hubs can't be resumed if their parent controller device is still suspended. This patch (as925) adds a check for that condition in hcd_bus_resume() and prevents it from being treated as a fatal controller failure. ehci-hcd is updated to add the corresponding test. Unnecessary debugging messages are removed from uhci-hcd and dummy-hcd. The error return code from dummy-hcd is changed to -ESHUTDOWN, the same as the others. ohci-hcd doesn't need any changes. Suspend handling in the non-PCI host drivers is somewhat hit-and-miss. This patch shouldn't have any effect on them. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit e7e6da9eb189dfa221e3bf9c21d58f02adc8983c Author: Alan Stern Date: Thu Jun 21 16:25:17 2007 -0400 USB: Remove usages of dev->power.power_state This patch (as922) removes all but one of the remaining vestiges of dev->power.power_state from usbcore. The only usage left must remain until the deprecated "power/state" sysfs attribute is gone. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 317c67b8f7092db325a3df825646eb26982908c6 Author: Pete Zaitcev Date: Thu Jun 21 12:44:56 2007 -0700 USB: usblp: add dynamic URBs, fix races This patch's main bulk aims to make usblp the premier driver for code pillaging once again. The code is as streamlined as possible and is bug-free as possible. The usb-skeleton performs the same function, but is somewhat abstract. The usblp is usb-skeleton which is actually used by many. Since I combed a few small bugs away, this also fixes the small races we had in usblp for a while. For example, now it's possible for several threads to make write(2) calls (sounds silly, but consider a printer for paper record, where every line of text is self-contained and thus it's all right to have them interleaved). Also gone are issues with interrupts using barriers dangerously. This patch makes use of Oliver's anchor, and so it must trail the anchor patch on the way to Linus. Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman commit 73e4fb3f70987b36fd0f16b5f762b2018ab84e4f Author: Pete Zaitcev Date: Thu Jun 21 15:18:35 2007 -0700 USB: Pete's taking over usblp Vojtech agreed to pass usblp over to me, so if you find bugs don't bug him. Signed-off-by: Pete Zaitcev Signed-off-by: Vojtech Pavlik Signed-off-by: Greg Kroah-Hartman commit 7542548fd843f3d49068f17a082069319f19992a Author: Li Yang Date: Tue Jun 19 17:33:48 2007 +0800 USB: fsl_usb2_udc: fix bug for portsc bit masking Fix a bug that PORT_TYPE and PORT_WIDTH aren't masked correctly in portsc. Signed-off-by: Christopher Cason Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit 7bbe990c989ee16f2c1be3e4ae28f8004bec788c Author: Oliver Neukum Date: Wed Jun 13 17:13:31 2007 +0200 USB: autosuspend for usblcd this patch implements autosuspend for the usblcd driver. It uses the new usb_anchor infrastructure. Many thanks to Georges for testing. Signed-off-by: Oliver Neukum Cc: Georges Toth Signed-off-by: Greg Kroah-Hartman commit 55b3fd41b0846929f68b5fb1058ad8077289f584 Author: Haavard Skinnemoen Date: Thu Jun 14 18:01:45 2007 +0200 usb gadget: Rename husb2dev -> usba husb2dev was the internal name of the USB Device Controller on AT32AP7000. Rename it to "atmel_usba", which is closer to the official name used in documentation and marketing material. Signed-off-by: Haavard Skinnemoen Signed-off-by: Greg Kroah-Hartman commit 8b3b01c898a44c2fc7217eb579982b9d132113f5 Author: Marcel Holtmann Date: Wed Jun 13 08:02:11 2007 +0200 USB: Add URB_FREE_BUFFER flag and the logic behind it USB: Add URB_FREE_BUFFER flag for freeing the transfer buffer In some cases it is not needed that the driver keeps track of the transfer buffer of an URB. It can be simply freed along with the URB itself when the reference count goes down to zero. The new flag URB_FREE_BUFFER enables this behavior. Signed-off-by: Marcel Holtmann Signed-off-by: Greg Kroah-Hartman commit 300871cd963e24a68aaa9b762f4a10403697d9be Author: Laurent Pinchart Date: Tue Jun 12 21:47:17 2007 +0200 USB: Fix up full-speed bInterval values in high-speed interrupt descriptor Many device manufacturers are using full-speed bInterval values in high-speed interrupt endpoint descriptors. If the bInterval value is greater than 16, assume the device uses full-speed descriptors and fix the value accordingly. Signed-off-by: Laurent Pinchart Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 87d093e25d73249ae92b28ae88db92eaea7df70f Author: Oliver Neukum Date: Mon Jun 11 14:55:51 2007 +0200 USB: usb-skeleton: use anchors in pre/post reset use anchors in pre/post_reset Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 758f7e161b1da3039368bf7180b9d9f4c33453da Author: Oliver Neukum Date: Mon Jun 11 14:55:08 2007 +0200 USB: usb-skeleton" use anchors in suspend/resume handling use anchors in suspend/resume handling Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit e73c7247b8e10a74cbf6b7430585e02c7cc05444 Author: Oliver Neukum Date: Mon Jun 11 14:54:02 2007 +0200 USB: usb-skeleton: use anchors in disconnect handling use anchors in disconnect handling Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit a6ea438b6d38689b7f876093bcba4505fe1995d1 Author: Alan Cox Date: Fri Jun 22 14:44:54 2007 +0100 USB: serial: ir_usb: Clean up the worst of it, remove exciting 'crash on open' feature - Drivers don't call ldisc termios methods. They certainly don't call them the way this one does - remove wrong call - The tty buffer code isn't designed to be abused from IRQ handlers and the new buffering removes the need for the uglies involved - fix them - Style - Remove incorrect baud and change handling for termios changes The driver now has some style, but not a lot - it goes insane if you have two dongles for example as it continues to use global variables for per dongle state. That bit isn't my problem. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 9a8baec77205dfe14f98a4e291c830a311125a8b Author: Alan Cox Date: Fri Jun 22 14:40:18 2007 +0100 USB: serial: belkin_sa: Various needed fixes Use the baud rate stuff from the kernel don't parse CBAUD directly Remove pointless and wrong 'no change' check Could do with some good testing as well but again better than adding && BROKEN (The use of BELKIN_SA_BAUD() might seem a bit odd but x/a = b and x/b = a (rounded for integers)). Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 568c24adeaa4d9ec2fd04c6ae226eeb673a385db Author: Alan Cox Date: Fri Jun 22 14:36:29 2007 +0100 USB: serial: ark3116.c: Mixed fixups o Don't parse the cflag for baud rates, its not valid to do so any more and this driver got it wrong anyway o Don't do clever termios change checks in drivers and get them wrong (arguably we should do some smart ones in the tty core but stty to change nothing is *not* a common or critical path I don't have the hardware so if you can test this carefully please do. I thought fixing it up this far was better than marking it and other bits of USB serial && BROKEN Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman commit 9e85c5f63268a5700860f53e52b090973652a5b2 Author: Greg Kroah-Hartman Date: Wed Jun 20 14:22:23 2007 +0900 USB: sierra: cleanup the startup and shutdown path This removes the ugly code that was copied from the keyspan driver and allocates the in urbs in a much shorter code path that can be understood easier. Also turned off the interrupt urb when no port was open as it's not nice to keep the bus busy for no good reason at all (this should be a power savings.) All in all, this saved over 40 lines of code and cleaned things up better. Cc: Kevin Lloyd Signed-off-by: Greg Kroah-Hartman commit 17c2327419a889293fb955baf0c69a7d38c5809c Author: Greg Kroah-Hartman Date: Wed Jun 20 14:22:23 2007 +0900 USB: sierra: remove incorrect usage of the urb status field You can't rely on the fact that the status really is correct like it was. Also simplified the write path and now we allocate the urb and data on the fly, instead of trying to do that really odd timeout check which I am guessing doesn't really work properly. This should speed up the device by keeping the hardware queue full easier. As a benefit, this reduces the size of the driver. Cc: Kevin Lloyd Signed-off-by: Greg Kroah-Hartman commit 05400013698776a71b1e401ceacf709bda3d1517 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: whiteheat: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 38e8c910ff7a1aafe2923f085df0f74a60f9de3c Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: visor: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 52171b480865985c060a58fa3cbcd31ba6e13f75 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: ti_usb_3410_5052: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Al Borchers Cc: Peter Berger Signed-off-by: Greg Kroah-Hartman commit 17dd2215adee8c988b88308671cc20a69839a850 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: sierra: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Kevin Lloyd Signed-off-by: Greg Kroah-Hartman commit 3a75ab943688d765cdb60b33f3f9db72c752c521 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: safe_serial: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Stuart Lynne Cc: Tom Rushworth Signed-off-by: Greg Kroah-Hartman commit 461d696aeeae294ad22dfcaae462d1757f955778 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: pl2303: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 78c26aebd9f4d29f9bd163c7c47f2c89991fcdb1 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: oti6858: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit d6977b51d5faa8649bbab0e53455e8421d425ce1 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: option: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Matthias Urlichs Signed-off-by: Greg Kroah-Hartman commit fdc2deb3892e802e916d1df7b1587aa0dbf3b271 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: omninet: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 9965d612631c62c2018973080fa03396f49fce59 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: navman: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 0643c72435bcd36980314de825773989d4dca97f Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: mos7840: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Paul Schroeder Signed-off-by: Greg Kroah-Hartman commit 81105984848481d8876e454e3c503dbd0e8e4dce Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: mos7720: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: VijayaKumar G.N. Cc: AjayKumar Cc: Gurudeva N. Signed-off-by: Greg Kroah-Hartman commit e96da398ce32c0e2af5eee772feb112323f027b4 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: mct_u232: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Wolfgang Grandegger Signed-off-by: Greg Kroah-Hartman commit 6fcdcf04e391c033eb9a558a744d8729d52e646e Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: kobil_sct: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Thomas Wahrenbruch Signed-off-by: Greg Kroah-Hartman commit 17c1b35a469b5e518b88cc509562ccfb44950145 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: kl5kusb105: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Utz-Uwe Haus Signed-off-by: Greg Kroah-Hartman commit 23189aee76c3297c7ff797ca8bc8e314783039ef Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: keyspan_pda: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 95b934548049e2fd6a67853c6b5055c073bf6961 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: keyspan: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 3152b74f92048223263c54383b3639a2939d853a Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: ir-usb: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Gary Brubaker Signed-off-by: Greg Kroah-Hartman commit b4a1579772667f9ebc0c9e26ed0b674966085e85 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: ipw: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Roelf Diedericks Signed-off-by: Greg Kroah-Hartman commit 2362deb5782d9861a0dade72e2e29114652c69a3 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: ipaq: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Ganesh Varadarajan Signed-off-by: Greg Kroah-Hartman commit ee337c212ad5d61fd58cfa6a4e48a84497495ebc Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: io_ti: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Al Borchers Cc: Peter Berger Signed-off-by: Greg Kroah-Hartman commit 2a393f5fd872fad99d639812087383111074cfeb Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: io_edgeport: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Al Borchers Cc: Peter Berger Signed-off-by: Greg Kroah-Hartman commit fbd272254b034e22a5157af51c8c5907a8f69614 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: generic: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit f9feb517faf03ee85de6e2467f7fcb87c1af2258 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: garmin_gps: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Hermann Kneissel Signed-off-by: Greg Kroah-Hartman commit 0fb0aa188d0e61d58485288071e73d3766513f2a Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: ftdi_sio: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Kuba Ober Signed-off-by: Greg Kroah-Hartman commit 335202f44a9a68902a80e09ba33aa4eaddc9c8ed Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: empeg: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Gary Brubaker Signed-off-by: Greg Kroah-Hartman commit 85d75107117eca0e29ac3da8cb82b45f9cd3a7fa Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: digi_acceleport: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Peter Berger Cc: Al Borchers Signed-off-by: Greg Kroah-Hartman commit 8d7bc55ecf86d1488996c4619642b4557e5e42f1 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: cypress_m8: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Lonnie Mendez Cc: Neil Whelchel Signed-off-by: Greg Kroah-Hartman commit 7dcc85cd9b7134bbcdc50dc14ccfc7c49f092506 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: cyberjack: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Cc: Signed-off-by: Greg Kroah-Hartman commit f26aad25d2c336a1efd393aff17bfe975b04fed5 Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: belkin_sa: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit d3434cf6916d9014d7906b3b2513f8fe325a6d5c Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: airprime: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 1373dbbca55503804ed191ba3914af68ce01e4bc Author: Greg Kroah-Hartman Date: Fri Jun 15 15:44:13 2007 -0700 USB: serial: aircable: clean up urb->status usage This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Cc: Signed-off-by: Greg Kroah-Hartman commit 4d0dce3e0b794942407391c52f8dd2760802f391 Author: Greg Kroah-Hartman Date: Tue Jun 12 11:43:37 2007 -0700 USB: fix up license wording on some of my usb-serial drivers Also update the copyright date on the pl2303 driver, as it was out of date. Signed-off-by: Greg Kroah-Hartman commit 9f6a93f7bbb6d73ca0e43c000f3bbf521cd4f782 Author: Pete Zaitcev Date: Fri Jun 8 13:37:49 2007 -0700 usb: free DMA mappings if enqueue fails This patch releases DMA resources if enqueue fails in the HCD. Linux had this bug ever since we converted from virt_to_bus for 2.4. It is difficult to hit. A user would need a significant memory pressure or some other unusual condition. It was reported to me by IBM. They ran a management application for RSA II adapters which sent Bulk requests to an Interrupt endpoint. Submissions got rejected by HCD due to an invalid interval value and the swiotlb pool became depleted in the matter of hours. We fixed the invalid interval issue in devio.c separately, but this seems to be a bug worth fixing as well. Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman commit 60aac1ec26b960fe77bf600457bc6c06f8aa7db4 Author: Alan Stern Date: Fri Jun 8 15:25:02 2007 -0400 USB: Handle bogus low-speed Bulk endpoints A noticeable number of low-speed devices mistakenly include descriptors for Bulk endpoints, which is forbidden by the USB spec. In an attempt to make such devices more usable, this patch (as924) converts the descriptors to Interrupt with an interval of 1 ms. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 52f6b5e1f15fa8c06efa69a4b5faa69c04707c92 Author: Benny Halevy Date: Tue May 15 11:15:27 2007 +0300 synchronization in usb_serial_put I think there is a race between usb_serial_put() and usb_serial_get_by_index() (and get_free_serial()) with regards to handling the serial port refcount. usb_serial_get_by_index() gets a reference on the serial port under table_lock while return_serial releases all the returned ports from the table under the same lock. However, the table_lock is not taken around the call to kref_put, theoretically allowing to sneak in and grab a reference after kref_put has already determined that the reference count is zero (and before calling destroy_serial) causing use after free. Signed-off-by: Benny Halevy Cc: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit efdff60885e36b5091cdc47742dd5768ff4119be Author: Oliver Neukum Date: Tue Jun 5 10:50:48 2007 +0200 USB: io_ti: sleep with spinlock held detected by automatic tool this fixes the sleep found with the automatic tool. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 756aa6b3d536afe85e151138cb03a293998887b3 Author: Christian Engelmayer Date: Wed May 30 11:04:48 2007 -0700 ehci-hub: improved over-current recovery According to the USB Specification Revision 2.0 chapter 11.12.5 a hub experiencing an over-current condition must place all affected ports in the powered-off state. It seems that some root hubs need port power to be cycled by software in order to get back to normal functionality after an over-current condition ... like the EHCI implementation on an MPC8343E. Signed-off-by: Christian Engelmayer Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 648dcfc805ea1308552225e96113dc60e054f2f0 Author: David Brownell Date: Thu Jun 7 14:13:26 2007 -0700 USB: usb host side can be configured given PCMCIA Platforms with PCMCIA support can implement host-side USB with "sl811_cs", so make sure this menu shows up on platforms with PCMCIA. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit ed76cacbea08ebfdb678c8687f98237cb7c67bb6 Author: Alan Stern Date: Thu Jun 7 17:12:25 2007 -0400 USB: usb-storage: use kthread_stop() for the control thread This patch (as923) makes usb-storage's control thread use kthread_should_stop()/kthread_stop(). The scanning thread can't be similarly converted until the core kthread implementation allows threads to call do_exit(). The advantage of this change is that we can now be certain the control thread has terminated before storage_disconnect() returns. This will simplify the locking requirements when autosuspend support is added. Signed-off-by: Alan Stern Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman commit 3fc154b6b8134b98bb94d60cad9a46ec1ffbe372 Author: Arnaud Patard Date: Wed Jun 6 21:05:49 2007 -0700 USB Gadget driver for Samsung s3c2410 ARM SoC This patch adds the support for the Usb Device Controller on Samsung S3C24xx SoCs. This driver passes all tests from testusb (including #13) and has been tested on S3C2410, S3C24212, and S3C2440 SoCs. Whitespace updates, minor cleanups by David Signed-off-by: Arnaud Patard Signed-off-by: Ben Dooks Cc: Herbert Pötzl Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 7a4eb7fd50d4df99fc1f623e6d90680d9fca3d82 Author: Geoff Levand Date: Tue Jun 5 20:04:35 2007 -0700 USB: PS3: USB system-bus rework USB HCD glue updates to reflect the new PS3 unifed device support. - Fixed remove() routine. - Added shutdown() routine. - Added request_mem_region() call. - Fixed MODULE_ALIAS(). - Made a proper fix for the hack done to support muti-platform in commit 48fda45120a819ca40cadc50144b55bff1c4c78d. Signed-off-by: Geoff Levand Cc: Paul Mackerras Signed-off-by: Greg Kroah-Hartman commit 59c2afa072506aae10ef93126aab651142e0c908 Author: Alan Stern Date: Tue Jun 5 16:46:26 2007 -0700 USB: option: fix usage of urb->status abuse Might fix bug 8561 On Mon, 4 Jun 2007, Paulo Pereira wrote: > The patch that you send is not resolving the problem... :( > I stil have Kernel panic after 45/60 min of work with Ktorrent/Amule... > > The Drump is: > > Call Trace: > [] usb_hcd_submit+0xb1/0x763 > [] ipt_do_table+0x2c7/0x2ef [ip_tables] > [] nf_ct_deliver_cached_events+0x41/0x96 [nf_conntrak] > [] ipv4_confirm+0x36/0c3b [nf_conntrack_ipv4] > [] tcp_v4_rcv+0x827/0x899 > [] nf_hook_slow+0x4d/0xb5 > [] irq_enter+0x19/0x23 > [] irq_enter+0x19/0x23 > [] do_IRQ+0xbd/0xd1 > [] option_write+0xa7/0xef [option] Okay, from this it looks like there's a problem in the option.c serial driver. Glancing at the code, it's obvious why: The thing totally abuses the USB API. Try applying this patch; it should help. From: Alan Stern Cc: Paulo Pereira Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit 4365831dadfeeeb4c9f8c4944e48ccf78c27f845 Author: Li Yang Date: Wed Jun 6 21:13:44 2007 -0700 USB: fsl_usb2_udc: Get max ep number from DCCPARAMS register Currently the driver is expecting max ep number in platform data which isn't passing this information. This patch fix the problem by reading it from DCCPARAMS(Device Controller Capability Parameters) register. The change also need some reordering of the probe code. Signed-off-by: Li Yang Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 37b5453dd4dafccec3fad636c28f1c3e3e14354f Author: Li Yang Date: Thu Jun 7 16:07:18 2007 +0800 USB: fsl_usb2_udc: replace deprecated irq flag Signed-off-by: Li Yang Signed-off-by: Greg Kroah-Hartman commit b41a60eca833d76593d4dac8a59f5c38714194ee Author: Alan Stern Date: Wed May 30 15:39:33 2007 -0400 USB: add power/persist device attribute This patch (as920) adds an extra level of protection to the USB-Persist facility. Now it will apply by default only to hubs; for all other devices the user must enable it explicitly by setting the power/persist device attribute. The disconnect_all_children() routine in hub.c has been removed and its code placed inline. This is the way it was originally as part of hub_pre_reset(); the revised usage in hub_reset_resume() is sufficiently different that the code can no longer be shared. Likewise, mark_children_for_reset() is now inline as part of hub_reset_resume(). The end result looks much cleaner than before. The sysfs interface is updated to add the new attribute file, and there are corresponding documentation updates. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 54515fe528d8c6f9bfaf7d0b9fffb908deecad78 Author: Alan Stern Date: Wed May 30 15:38:58 2007 -0400 USB: unify reset_resume and normal resume This patch (as919) unifies the code paths used for normal resume and for reset-resume. Earlier I had failed to note a section in the USB spec which requires the host to resume a suspended port before resetting it if the attached device is enabled for remote wakeup. Since the port has to be resumed anyway, we might as well reuse the existing code. The main changes are: usb_reset_suspended_device() is eliminated. usb_root_hub_lost_power() is moved down next to the hub_reset_resume() routine, to which it is logically related. finish_port_resume() does a port reset() if the device's reset_resume flag is set. usb_port_resume() doesn't check whether the port is initially enabled if this is a USB-Persist sort of resume. Code to perform the port reset is added to the resume pathway for the non-CONFIG_USB_SUSPEND case. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit f07600cf9eb3ee92777b2001e564faa413144a99 Author: Alan Stern Date: Wed May 30 15:38:16 2007 -0400 USB: add reset_resume method This patch (as918) introduces a new USB driver method: reset_resume. It is called when a device needs to be reset as part of a resume procedure (whether because of a device quirk or because of the USB-Persist facility), thereby taking over a role formerly assigned to the post_reset method. As a consequence, post_reset no longer needs an argument indicating whether it is being called as part of a reset-resume. This separation of functions makes the code clearer. In addition, the pre_reset and post_reset method return types are changed; they now must return an error code. The return value is unused at present, but at some later time we may unbind drivers and re-probe if they encounter an error during reset handling. The existing pre_reset and post_reset methods in the usbhid, usb-storage, and hub drivers are updated to match the new requirements. For usbhid the post_reset routine is also used for reset_resume (duplicate method pointers); for the other drivers a new reset_resume routine is added. The change to hub.c looks bigger than it really is, because mark_children_for_reset_resume() gets moved down next to the new hub_reset_resume() routine. A minor change to usb-storage makes the usb_stor_report_bus_reset() routine acquire the host lock instead of requiring the caller to hold it already. Signed-off-by: Alan Stern Signed-off-by: Jiri Kosina CC: Matthew Dharm Signed-off-by: Greg Kroah-Hartman commit 624d6c0732d2c4ac00945ad79dbb6ff39ba90ee3 Author: Alan Stern Date: Wed May 30 15:35:16 2007 -0400 USB: remove excess code from hub.c This patch (as917) removes a now-unnecessary level of subroutine nesting from hub.c. Since usb_port_suspend() does nothing but call hub_port_suspend(), and usb_port_resume() does nothing but call hub_port_resume(), there's no reason to keep the routines separate. Also included in the patch are a few cosmetic changes involving whitespace and use of braces. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 686314cfbdac21c9019c0e04487b5d940db62406 Author: Alan Stern Date: Wed May 30 15:34:36 2007 -0400 USB: separate root and non-root suspend/resume This patch (as916) completes the separation of code paths for suspend and resume of root hubs as opposed to non-root devices. Root hubs will be power-managed through their bus_suspend and bus_resume methods, whereas normal devices will use usb_port_suspend() and usb_port_resume(). Changes to the hcd_bus_{suspend,resume} routines mostly represent motion of code that was already present elsewhere. They include: Adding debugging log messages, Setting the device state appropriately, and Adding a resume recovery time delay. Changes to the port-suspend and port-resume routines in hub.c include: Removal of checks for root devices (since they will never be triggered), and Removal of checks for NULL or invalid device pointers (these were left over from earlier kernel versions and aren't needed at all). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 4956eccdd6101c5abb71966079e8183d12796d6c Author: Alan Stern Date: Wed May 30 16:51:28 2007 -0400 USB: remove __usb_port_suspend This patch (as915b) combines the public routine usb_port_suspend() and the private routine __usb_port_suspend() into a single function. By removing the explicit mention of otg_port in the call to __usb_port_suspend(), we prevent a possible error in which the system tries to perform HNP on the wrong port when a non-targeted device is plugged into a non-OTG port. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit d576bb9f2769b315a795f77f0c33322a976add7a Author: Michael Hanselmann Date: Thu May 31 23:34:27 2007 +0200 USB: Fix NEC OHCI chip silicon bug This patch fixes a silicon bug in some NEC OHCI chips. The bug appears at random times and is very, very difficult to reproduce. Without the following patch, Linux would shut the chip and its associated devices down. In Apple PowerBooks this leads to an unusable keyboard and mouse (SSH still working). The idea of restarting the chip is taken from public Darwin code. Signed-off-by: Michael Hanselmann Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit 020363384adfb02f26c1c038a127ed3da3d5cf37 Author: Tony Lindgren Date: Tue May 29 09:57:41 2007 -0700 USB: Disable file_storage USB_CONFIG_ATT_WAKEUP Disable file_storage USB_CONFIG_ATT_WAKEUP as it requires user interaction during Chapter 9 tests. Signed-off-by: Tony Lindgren Acked-by: Alan Stern Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit d23a13779f14808b54181d31222e6c44532abd80 Author: Vladimir Barinov Date: Wed May 23 20:07:48 2007 +0400 USB: EHCI: Safe endianness for transfer buffers after reset in case of HUB with TT This patch fixes the endianness select for transfer buffers in EHCI controllers that have Transaction Translator built in the hub. Also I cleaned it up to make rid of magic numbers. Signed-off-by: Vladimir Barinov Cc: Signed-off-by: Greg Kroah-Hartman commit 5fea2a4dabdfa1ad59845c42ea770ee8cb41ecad Author: Al Borchers Date: Wed May 23 12:24:53 2007 -0700 USB: digi_acceleport further buffer clean up Some further cleanup after Oliver's patch to update the tty buffering. The input buffer is not used at all anymore, so I removed it. Signed-off-by: Al Borchers Signed-off-by: Greg Kroah-Hartman commit 08a2b3b610a734a6d6e4ff0455eec1241966fcb3 Author: Oliver Neukum Date: Thu May 24 13:52:51 2007 +0200 USB: whiteheat driver update this is an update of the whiteheat driver. It fixes: - switch from spinlocks to mutexes to prevent sleeping with a spinlock held - locking to stop races with disconnect - error handling for commands that time out Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 403dfb58c3134a339e415fba9f6d45b51c6ee357 Author: Oliver Neukum Date: Fri May 25 13:42:56 2007 +0200 USB: usb-skeleton: usb anchor to implement flush This patch set introduces usb_anchor and uses it to implement all modern APIs in the skeleton driver. - proper error reporting in the skeleton driver - implementation of flush() Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit 51a2f077c44e559841b09de6da605b4d3ae40dad Author: Oliver Neukum Date: Fri May 25 13:40:56 2007 +0200 USB: introduce usb_anchor - introduction of usb_anchor and its methods Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit ffcdc18d64d73ecce49c182f969977ae88ff4384 Author: Vikram Pandita Date: Fri May 25 21:31:07 2007 -0700 USB Core: hub.c: prevent re-enumeration on HNP Patch is to prevent the OTG host of doing 3 times enumeration of device when the Host suspends for HNP. The error code used in this case is ENOTSUPP. Signed-off-by: Vikram Pandita Acked-by: Alan Stern Acked-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit b29dbbd811b006deea85275e37fc1a09e8983d48 Author: David Brownell Date: Fri May 25 20:40:31 2007 -0700 USB: usb serial gadget, sparse fixes Fix a few serial gadget issues reported by the latest "sparse": some functions should have been defined as static, not just declared that way. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 715f9527c1c1edd1a9c7a55ab4535211279c9374 Author: t.sefzick Date: Wed Apr 25 15:05:22 2007 +0200 USB: flow control fix for pl2303 in order to be able to switch back to 'flow-control none' after having activated 'flow-control rts/cts', I made a small change to 'pl2303.c'. Signed-off-by: Greg Kroah-Hartman commit 1abdeeb1d566f74bc5b3e68447d91c8c37d47942 Author: Oliver Neukum Date: Mon May 7 12:09:33 2007 +0200 USB: generic usb serial to new buffering scheme the generic driver also had its own buffering. Signed-off-by: Oliver Neukum commit 39892da44b21b5362eb848ca424d73a25ccc488f Author: Oliver Neukum Date: Mon May 7 13:16:58 2007 +0200 USB: Digi AccelePort adapted to new tty buffering this fixes the flushing trouble due to its own buffering for this driver. Signed-off-by: Oliver Neukum Cc: Al Borchers Signed-off-by: Greg Kroah-Hartman commit b308e74d9c708ee2a9af14fbe235e0a41216f4ed Author: Oliver Neukum Date: Mon May 7 10:37:08 2007 +0200 USB: visor driver adapted to new tty buffering the new tty buffering code allows usb drivers to stop private buffering. In fact we must do so to allow flushing to work correctly. This does so for the visor driver. Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman commit a5262dcfda9163ca1f8a64349a6f7ba640ac1dc2 Author: David Brownell Date: Mon May 14 19:36:41 2007 -0700 USB: export as Make sure gadgetfs userspace interface is properly exported: - Move to ; - Export it using Kbuild; - Add an #include guard; - Correct some internal documentation; - Update struct layout so it's the same on 32/64 bit kernels. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 8234509c3968a87faa301a8a9d7f8b987cd9181c Author: David Rientjes Date: Fri May 11 14:39:44 2007 -0700 USB: use function attribute __maybe_unused Substitute USB instances of __attribute__ ((unused)) functions with the newly introduced __maybe_unused. Signed-off-by: David Rientjes Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit ba02978a48f0117b3d0aced97a30615a5d7412e2 Author: Li Yang Date: Fri May 11 17:09:55 2007 +0800 USB: ehci_fsl update for MPC831x support For MPC831x support, change the ehci-fsl driver to preserve bits set in platform code. Add a common CONFIG_USB_EHCI_FSL to indicate presence of Freescale EHCI SOC. Add FSL_USB2_DR_OTG operating mode support, thus both host and device can work for the mini-ab receptacle. Note: this doesn't enable OTG protocol support. Signed-off-by: Li Yang Cc: David Brownell Signed-off-by: Greg Kroah-Hartman commit 4d68c0be69b65aa260448cea9fb1c555ae90d268 Author: Stefan Roese Date: Fri May 4 11:39:37 2007 -0700 USB: Set CONFIG_USB_EHCI_BIG_ENDIAN_MMIO/_DESC in usb/host/Kconfig Now select the big-endian configuration options CONFIG_USB_EHCI_BIG_ENDIAN_MMIO and CONFIG_USB_EHCI_BIG_ENDIAN_DESC in the usb host Kconfig file and not in the platform Kconfig files. Signed-off-by: Stefan Roese Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit fc65a15f1fc0fc95c319c9bfaeb7636fef9987cc Author: Stefan Roese Date: Fri May 4 11:38:17 2007 -0700 USB: EHCI big endian data structures support (for 440EPx) This patch adds support for the AMCC 440EPx EHCI controller whose in-memory data structures and the registers are represented in big- endian format. Signed-off-by: Stefan Roese Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 97cd49ebf74e3bee49d541a47ef085df1fbfac7d Author: Stepan Moskovchenko Date: Wed May 9 14:53:04 2007 -0400 USB: ftdi_sio.c: Allow setting latency timer on FT232RL The new FT232RL allows setting and getting the value of the latency timer, like on the FT232BM. However, the driver will not create the sysfs entries for the RL without this one-line patch. I have tested it on two systems with successful results. From: Stepan Moskovchenko Signed-off-by: Greg Kroah-Hartman commit 20dfdad74a2baabeecc2896c770efcbf698b9b8d Author: Alan Stern Date: Tue May 22 11:50:17 2007 -0400 USB: rework C++-style comments This patch (as911) replaces some C++-style commented-out debugging lines in driver.c with a new "verbose debugging" macro. It makes the code look cleaner, and it's easier to turn the debugging on or off. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit d4ead16f50f9ad30bdc7276ec8fee7a24c72f294 Author: Alan Stern Date: Tue May 22 11:46:41 2007 -0400 USB: prevent char device open/deregister race This patch (as908) adds central protection in usbcore for the prototypical race between opening and unregistering a char device. The spinlock used to protect the minor-numbers array is replaced with an rwsem, which can remain locked across a call to a driver's open() method. This guarantees that open() and deregister() will be mutually exclusive. The private locks currently used in several individual drivers for this purpose are no longer necessary, and the patch removes them. The following USB drivers are affected: usblcd, idmouse, auerswald, legousbtower, sisusbvga/sisusb, ldusb, adutux, iowarrior, and usb-skeleton. As a side effect of this change, usb_deregister_dev() must not be called while holding a lock that is acquired by open(). Unfortunately a number of drivers do this, but luckily the solution is simple: call usb_deregister_dev() before acquiring the lock. In addition to these changes (and their consequent code simplifications), the patch fixes a use-after-free bug in adutux and a race between open() and release() in iowarrior. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 55e5fdfa541ec7bf1b1613624ed4dd8cdacaa841 Author: Mark Lord Date: Mon May 14 19:48:02 2007 -0400 USB: hub.c loops forever on resume from ram due to bluetooth Okay, found it. The root cause here was a missing CONFIG_USB_SUSPEND=y, which means the hci_usb device never got marked as USB_STATE_SUSPENDED, which then caused the loop to go on forever. The system works fine now with CONFIG_USB_SUSPEND=y in the .config. Here's the patch to prevent future lockups for this or other causes. I no longer need it, but it does still seem a good idea. Signed-off-by: Mark Lord Signed-off-by: Greg Kroah-Hartman commit 8538f96ae5aada1c04d69a993b20ad160b191d47 Author: Daniel Drake Date: Thu May 10 00:32:24 2007 +0100 USB: add USB_DEVICE_AND_INTERFACE_INFO for device matching Recently, the USB device matching code stopped matching generic interface matches against devices with vendor-specific device class values. Some drivers now need to explicitly match USB device ID's (in addition to generic interface info) to retain the same behaviour as before. This new macro, suggested by Alan Stern, makes the explicit device/interface matching a little simpler for those users. Signed-off-by: Daniel Drake Signed-off-by: Greg Kroah-Hartman commit 7f9985c2e4e5555b750d6f891b4923e63cc834c1 Author: David Brownell Date: Tue May 8 21:01:30 2007 -0700 USB: usb gadget, dead config cleanup Remove some dead CONFIG_ symbols, and document the status of a few others. The "gadget_chips.h" references are by and large to drivers which exist but haven't yet been submitted for merging to the main 2.6 tree. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 45b844df5a4b17884b4e26e43bfc4802604e7cab Author: Dave Platt Date: Tue May 8 11:00:12 2007 -0700 USB: RTS/CTS handshaking support, DTR fixes for MCT U232 serial adapter Improvements and fixes to the MCT U232 USB/serial interface driver. Implement RTS/CTS hardware flow control. Implement HUPCL. Bring handling of DTR and RTS into conformance with other Linux serial port drivers - assert both signals when opening device, even if "crtscts" is not currently selected. Signed-off-by: Dave Platt Signed-off-by: Greg Kroah-Hartman commit 01cd08192040eab30f837f061ca07f43cf15f4a1 Author: Arjan van de Ven Date: Tue May 22 12:42:56 2007 -0700 USB: Patch to align the various USB timers to fire at the same time This patch modifies the USB regular 250ms timer to be "perfectly aligned" to the second and quarters thereof. This change is there to make sure that if you have multiple USB ports, the timers for all these ports will fire at the same time rather than all spread out. All spread out wakes the CPU up from power saving idle a lot more than needed... Signed-off-by: Arjan van de Ven Signed-off-by: Greg Kroah-Hartman commit fc4cbd755b75c7687b923da5b75ba4a64652582e Author: Martin K. Petersen Date: Tue May 22 15:57:04 2007 -0400 USB: io_ti: Digi EdgePort update for new devices This patch adds support for the most recent Digi EdgePort USB serial devices. Signed-off-by: Martin K. Petersen Signed-off-by: Mike Swift Signed-off-by: Jeremy McBane Signed-off-by: Greg Kroah-Hartman commit dd4dd19e8d13e1e9bf8295bf71f132b511b130bf Author: Alan Stern Date: Fri May 4 11:55:54 2007 -0400 USB: Make device reset stop retrying after disconnect This patch (as898) changes the port reset code in the hub driver. If a connect change occurs, it is reported the same way as a disconnect (which of course is what it really is). It also changes usb_reset_device(), to prevent the routine from futilely retrying the reset after a disconnect has occurred. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 3c519b846c4d5edf7c94d1eede42445a815bf65c Author: Alan Stern Date: Fri May 4 11:55:31 2007 -0400 USB: EHCI: fix handover for designated full-speed ports This patch (as895) fixes up a loose end in the port-handover code for the USB-Persist facility. A special case occurs when a high-speed device is attached to a port which the user has designated to run at full-speed only; the port must be disabled before the handover can take place. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 6bc6cff52e0c4c4c876b1b8a5750041da61ad42b Author: Alan Stern Date: Fri May 4 11:53:03 2007 -0400 USB: add RESET_RESUME device quirk This patch (as888) adds a new USB device quirk for devices which are unable to resume correctly. By using the new code added for the USB-persist facility, it is a simple matter to reset these devices instead of resuming them. To get things kicked off, a quirk entry is added for the Philips PSC805. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 383975d765523a56dc43a6cd6d52e9b376800cf2 Author: Alan Stern Date: Fri May 4 11:52:40 2007 -0400 USB: EHCI, OHCI: handover changes This patch (as887) changes the way ehci-hcd and ohci-hcd handle a loss of VBUS power during suspend. In order for the USB-persist facility to work correctly, it is necessary for low- and full-speed devices attached to a high-speed port to be handed back to the companion controller during resume processing. This entails three changes: adding code to ehci-hcd to perform the handover, removing code from ohci-hcd to turn off ports during root-hub reinit, and adding code to ohci-hcd to turn on ports during PCI controller resume. (Other bus glue resume methods for platforms supporting high-speed controllers would need a similar change, if any existed.) Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 0458d5b4c9cc4ca0f62625d0144ddc4b4bc97a3c Author: Alan Stern Date: Fri May 4 11:52:20 2007 -0400 USB: add USB-Persist facility This patch (as886) adds the controversial USB-persist facility, allowing USB devices to persist across a power loss during system suspend. The facility is controlled by a new Kconfig option (with appropriate warnings about the potential dangers); when the option is off the behavior will remain the same as it is now. But when the option is on, people will be able to use suspend-to-disk and keep their USB filesystems intact -- something particularly valuable for small machines where the root filesystem is on a USB device! Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit ce7cd137fced114d49178b73d468b82096a107fb Author: Pete Zaitcev Date: Thu May 3 16:51:16 2007 -0700 usbmon: Add class for binary interface Add a class which allows for an easier integration with udev. This code was originally written by Paolo Abeni, and arrived to my tree as a part of big patch to add binary API on December 18. As I understand, Paolo always meant the class to be a part of the whole thing. This is his udev rule to go along with the patch: KERNEL=="usbmon[0-9]*", NAME="usbmon%n", MODE="0440",OWNER="root",GROUP="bin" Signed-off-by: Pete Zaitcev Signed-off-by: Greg Kroah-Hartman commit 49cdee0ed0fce9e1bda81f5dcad8d5cce6aec983 Author: Kees Lemmens Date: Tue Mar 27 12:34:30 2007 +0200 USB: oti6858 usb-serial driver (in Nokia CA-42 cable) Last week I've been searching for a driver for the CA-42 cable (see usb below) that fitted my kernel 2.6.20. I only found an abandoned version for a driver on your website that indeed worked on 2.6.18 but wouldn't even compile with a more recent 2.6.20 kernel. I fiddled 2 evenings with the kernel code and have patched it up now to work with the modifications in the 2.6.20 kernel. The patch is attached hereafter and it works fine (at least for me :-) ). Bus 2 Device 13: ID 0ea0:6858 Ours Technology, Inc. I had to fiddle a little with the settings in .gnokiirc but that also occurred with the older 2.6.18 kernel. Nevertheless, on one system with this cable and my Nokia 6070 I had best results with : model = 6510 connection = dku5 while on an other system with the same kernel, cable and phone it only worked with : model = AT connection = serial serial_write_usleep = 1 From: Kees Lemmens Cc: Cc: Signed-off-by: Greg Kroah-Hartman commit 9c033e810eef0aff6d4d3bf028aa1e583c074f93 Author: David Brownell Date: Thu May 17 12:21:19 2007 -0700 USB: ehci refcounts work on ppc7448 Remove atomic operations on the reference counter for EHCI queue heads. On various platforms (including ppc7448), atomic operations are unusable with dma-coherent memory. Signed-off-by: Steven J. Hill Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman commit 04d06ad0f1fdb499af84ae3d7969e2136a462f38 Author: Jan Engelhardt Date: Thu May 10 23:04:13 2007 -0700 USB: Use menuconfig objects Make a "menuconfig" out of the Kconfig objects "menu, ..., endmenu", so that the user can disable all the options in that menu at once instead of having to disable each option separately. Signed-off-by: Jan Engelhardt Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman commit e8054854221d9d51e381c64d365404f4c1c30f50 Author: Alan Stern Date: Fri May 4 11:55:11 2007 -0400 USB: make hub driver's release more robust This revised patch (as893c) improves the method used by the hub driver to release its private data structure. The current code is non-robust, relying on a memory region not getting reused by another driver after it has been freed. The patch adds a reference count to the structure, resolving the question of when to release it. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman commit 06b84e8adcad8280d76a7c71e772c5cddba96d85 Author: Alan Stern Date: Fri May 4 11:54:50 2007 -0400 USB: remove "locktree" routine from the hub driver This patch (as892) removes the "locktree" routine from the hub driver. It currently is used in only one place, by a single kernel thread; hence it isn't doing any good. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Ha