2.6.27.21-stable review
Subsystems (17)
cover 2.6.27.21-stable review
This is the start of the stable review cycle for the 2.6.27.21 release. There are 32 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let us know. If anyone is a maintainer of the proper subsystem, and wants to add a Signed-off-by: line to the patch, please respond with it.
These patches are sent out with a number of different people on the Cc:
line. If you wish to be a reviewer, please email [email protected] to add your name to the list. If you want to be off the reviewer list, also email us.
Responses should be made by Monday, March 23, 20:00:00 UTC. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v2.6/stable-review/patch-2.6.27.21-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Makefile | 5 +++- arch/ia64/Kconfig | 3 +- arch/powerpc/sysdev/fsl_soc.c | 2 +- arch/s390/lib/div64.c | 2 +- arch/x86/kernel/cpu/intel.c | 13 +++++++++ arch/x86/kernel/cpu/intel_64.c | 13 +++++++++ drivers/ata/ata_piix.c | 37 +++++++++++++++++++++++++++ drivers/md/dm-crypt.c | 26 +++++++++++++++--- drivers/md/dm-io.c | 2 + drivers/md/dm-ioctl.c | 3 +- drivers/media/video/cx23885/cx23885-417.c | 3 +- drivers/media/video/cx23885/cx23885-video.c | 5 ++- drivers/misc/thinkpad_acpi.c | 8 +++--- drivers/usb/core/devio.c | 12 +++++--- drivers/usb/host/ehci-q.c | 3 +- drivers/usb/host/ehci-sched.c | 10 +++---- drivers/usb/serial/cp2101.c | 1 + drivers/usb/serial/ftdi_sio.c | 5 +++ drivers/usb/serial/ftdi_sio.h | 20 ++++++++++++++ drivers/usb/serial/option.c | 12 ++++---- drivers/usb/storage/unusual_devs.h | 16 ++++++++++- fs/aio.c | 37 +++++++++++++++++++------- fs/nfsd/nfs4xdr.c | 1 + include/asm-x86/msr-index.h | 29 +++++++++++++++++++++ include/linux/capability.h | 6 +++- sound/core/oss/pcm_oss.c | 4 +- sound/core/sgbuf.c | 7 +++-- sound/pci/hda/hda_intel.c | 8 ++++++ sound/pci/mixart/mixart.c | 1 + 29 files changed, 239 insertions(+), 55 deletions(-)
PATCH 1/32 Build fix for __early_pfn_to_nid() undefined link error
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tony Luck <[email protected]>
commit 334f85b647bc46ff4d27ace55aa65f44d6a2f4db upstream.
ia64 only defines __early_pfn_to_nid() for SPARSEMEM && NUMA configurations, so the recent:
commit: f2dbcfa738368c8a40d4a5f0b65dc9879577cb21 mm: clean up for early_pfn_to_nid()
ends up with some link problems for certain configuration files.
Fix arch/ia64/Kconfig to only define HAVE_ARCH_EARLY_PFN_TO_NID in the cases where we do provide this function.
--- arch/ia64/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/ia64/Kconfig +1 -2
@@ -444,8 +444,7 @@ config HOLES_IN_ZONE default y if VIRTUAL_MEM_MAP config HAVE_ARCH_EARLY_PFN_TO_NID - def_bool y - depends on NEED_MULTIPLE_NODES + def_bool NUMA && SPARSEMEM config HAVE_ARCH_NODEDATA_EXTENSION def_bool y
PATCH 2/32 Add -fwrapv to gcc CFLAGS
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <[email protected]>
commit 68df3755e383e6fecf2354a67b08f92f18536594 upstream.
This makes sure that gcc doesn't try to optimize away wrapping arithmetic, which the kernel occasionally uses for overflow testing, ie things like
if (ptr + offset < ptr)
which technically is undefined for non-unsigned types. See
http://bugzilla.kernel.org/show_bug.cgi?id=12597
for details.
Not all versions of gcc support it, so we need to make it conditional (it looks like it was introduced in gcc-3.4).
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -341,6 +341,7 @@ KBUILD_CPPFLAGS := -D__KERNEL__ $(LINUXI KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Werror-implicit-function-declaration +KBUILD_CFLAGS += $(call cc-option,-fwrapv) KBUILD_AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from include/config/kernel.release (if it exists)
PATCH 3/32 Move cc-option to below arch-specific setup
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <[email protected]>
commit d0115552cdb0b4d4146975889fee2e9355515c4b upstream.
Sam Ravnborg says:
"We have several architectures that plays strange games with $(CC) and
$(CROSS_COMPILE).
So we need to postpone any use of $(call cc-option..) until we have included the arch specific Makefile so we try with the correct $(CC) version."
--- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Makefile +3 -1
@@ -341,7 +341,6 @@ KBUILD_CPPFLAGS := -D__KERNEL__ $(LINUXI KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Werror-implicit-function-declaration -KBUILD_CFLAGS += $(call cc-option,-fwrapv) KBUILD_AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from include/config/kernel.release (if it exists)
@@ -556,6 +555,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wdecl # disable pointer signed / unsigned warnings in gcc 4.0 KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) +# disable invalid "can't wrap" optimzations for signed / pointers +KBUILD_CFLAGS += $(call cc-option,-fwrapv) + # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments # But warn user when we do so warn-assign = \
PATCH 4/32 nfsd: nfsd should drop CAP_MKNOD for non-root
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: J. Bruce Fields <[email protected]>
commit 76a67ec6fb79ff3570dcb5342142c16098299911 upstream.
Since creating a device node is normally an operation requiring special privilege, Igor Zhbanov points out that it is surprising (to say the least) that a client can, for example, create a device node on a filesystem exported with root_squash.
So, make sure CAP_MKNOD is among the capabilities dropped when an nfsd thread handles a request from a non-root user.
--- include/linux/capability.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
include/linux/capability.h +4 -2
@@ -382,8 +382,10 @@ typedef struct kernel_cap_struct {# define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }})# define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }})# define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) -# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ - CAP_FS_MASK_B1 } }) +# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ + | CAP_TO_MASK(CAP_SYS_RESOURCE) \ + | CAP_TO_MASK(CAP_MKNOD), \ + CAP_FS_MASK_B1 } })#endif /* _KERNEL_CAPABILITY_U32S != 2 */
PATCH 5/32 NFSD: provide encode routine for OP_OPENATTR
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Benny Halevy <[email protected]>
commit 84f09f46b4ee9e4e9b6381f8af31817516d2091b upstream.
Although this operation is unsupported by our implementation we still need to provide an encode routine for it to merely encode its (error) status back in the compound reply.
Thanks for Bill Baker at sun.com for testing with the Sun OpenSolaris' client, finding, and reporting this bug at Connectathon 2009.
This bug was introduced in 2.6.27
--- fs/nfsd/nfs4xdr.c | 1 + 1 file changed, 1 insertion(+)
fs/nfsd/nfs4xdr.c +1 -0
@@ -2593,6 +2593,7 @@ static nfsd4_enc nfsd4_enc_ops[] = { [OP_LOOKUPP] = (nfsd4_enc)nfsd4_encode_noop, [OP_NVERIFY] = (nfsd4_enc)nfsd4_encode_noop, [OP_OPEN] = (nfsd4_enc)nfsd4_encode_open, + [OP_OPENATTR] = (nfsd4_enc)nfsd4_encode_noop, [OP_OPEN_CONFIRM] = (nfsd4_enc)nfsd4_encode_open_confirm, [OP_OPEN_DOWNGRADE] = (nfsd4_enc)nfsd4_encode_open_downgrade, [OP_PUTFH] = (nfsd4_enc)nfsd4_encode_noop,
PATCH 6/32 ALSA: Fix vunmap and free order in snd_free_sgbuf_pages()
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <[email protected]>
commit 6af845e4eb36fb91b322aaf77ec1cab2220a48ad upstream.
In snd_free_sgbuf_pags(), vunmap() is called after releasing the SG pages, and it causes errors on Xen as Xen manages the pages differently. Although no significant errors have been reported on the actual hardware, this order should be fixed other way round, first vunmap() then free pages.
--- sound/core/sgbuf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
sound/core/sgbuf.c +4 -3
@@ -38,6 +38,10 @@ int snd_free_sgbuf_pages(struct snd_dma_if (! sgbuf)return -EINVAL ; +if (dmab->area) +vunmap (dmab->area); + dmab->area =NULL ; + tmpb.dev.type =SNDRV_DMA_TYPE_DEV ; tmpb.dev.dev = sgbuf->dev;for (i =0 ; i < sgbuf->pages; i++) {
@@ -46,9 +50,6 @@ int snd_free_sgbuf_pages(struct snd_dma_ tmpb.bytes =PAGE_SIZE ;snd_dma_free_pages (&tmpb); } -if (dmab->area) -vunmap (dmab->area); - dmab->area =NULL ;kfree (sgbuf->table);kfree (sgbuf->page_table);
PATCH 7/32 ALSA: hda - Fix DMA mask for ATI controllers
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <[email protected]>
commit 09240cf429505891d6123ce14a29f58f2a60121e upstream.
ATI controllers (at least some SB0600 models) appear buggy to handle 64bit DMA. As a workaround, reset GCAP bit0 and let the driver to use only 32bit DMA on these controllers.
--- sound/pci/hda/hda_intel.c | 8 ++++++++ 1 file changed, 8 insertions(+)
sound/pci/hda/hda_intel.c +8 -0
@@ -2110,9 +2110,17 @@ static int __devinit azx_create(struct s gcap =azx_readw (chip,GCAP );snd_printdd ("chipset global capabilities = 0x%x\n" , gcap); +/* ATI chips seems buggy about 64bit DMA addresses */ +if (chip->driver_type ==AZX_DRIVER_ATI ) + gcap &= ~0x01 ; +/* allow 64bit DMA address if supported by H/W */ if ((gcap &0x01 ) && !pci_set_dma_mask (pci,DMA_64BIT_MASK ))pci_set_consistent_dma_mask (pci,DMA_64BIT_MASK ); +else { +pci_set_dma_mask (pci,DMA_32BIT_MASK ); +pci_set_consistent_dma_mask (pci,DMA_32BIT_MASK ); + }/* read number of streams from GCAP register instead of using * hardcoded value
PATCH 8/32 ALSA: mixart, fix lock imbalance
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Slaby <[email protected]>
commit 82f5d57163abed2e5ff271d03217b6f90c616eb8 upstream.
There is an omitted unlock in one snd_mixart_hw_params fail path. Fix it.
--- sound/pci/mixart/mixart.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/mixart/mixart.c +1 -0
@@ -607,6 +607,7 @@ static int snd_mixart_hw_params(struct s/* set the format to the board */ err =mixart_set_format (stream, format);if (err <0 ) { +mutex_unlock (&mgr->setup_mutex);return err; }
PATCH 9/32 ALSA: pcm_oss, fix locking typo
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Slaby <[email protected]>
commit 91054598f794fb5d8a0b1e747ff8e2e8fc2115b3 upstream.
s/mutex_lock/mutex_unlock/ on 2 fail paths in snd_pcm_oss_proc_write. Probably a typo, lock should be unlocked when leaving the function.
--- sound/core/oss/pcm_oss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/core/oss/pcm_oss.c +2 -2
@@ -2854,7 +2854,7 @@ static void snd_pcm_oss_proc_write(struc setup =kmalloc (sizeof (*setup),GFP_KERNEL );if (! setup) { buffer->error = -ENOMEM ; -mutex_lock (&pstr->oss.setup_mutex); +mutex_unlock (&pstr->oss.setup_mutex);return ; }if (pstr->oss.setup_list ==NULL )
@@ -2868,7 +2868,7 @@ static void snd_pcm_oss_proc_write(strucif (! template.task_name) {kfree (setup); buffer->error = -ENOMEM ; -mutex_lock (&pstr->oss.setup_mutex); +mutex_unlock (&pstr->oss.setup_mutex);return ; } }
PATCH 10/32 ata_piix: add workaround for Samsung DB-P70
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tejun Heo <[email protected]>
commit e9c1670c2a14ef9cc20d86b24b829f3947aad34e upstream.
Samsung DB-P70 somehow botched the first ICH9 SATA port. The board doesn't expose the first port but somehow SStatus reports link online while failing SRST protocol leading to repeated probe failures and thus long boot delay.
Because the BIOS doesn't carry any identifying DMI information, the port can't be blacklisted safely. Fortunately, the controller does have subsystem vendor and ID set. It's unclear whether the subsystem IDs are used only for the board but it can be safely worked around by disabling SIDPR access and just using SRST works around the problem. Even when the workaround is triggered on an unaffected board the only side effect will be missing SCR access.
--- drivers/ata/ata_piix.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
drivers/ata/ata_piix.c +37 -0
@@ -1363,6 +1363,39 @@ static const int *__devinit piix_init_sareturn map; } +static bool piix_no_sidpr (struct ata_host *host) +{ +struct pci_dev *pdev =to_pci_dev (host->dev); + +/* +* Samsung DB-P70 only has three ATA ports exposed and +* curiously the unconnected first port reports link online +* while not responding to SRST protocol causing excessive +* detection delay. +* +* Unfortunately, the system doesn't carry enough DMI +* information to identify the machine but does have subsystem +* vendor and device set. As it's unclear whether the +* subsystem vendor/device is used only for this specific +* board, the port can't be disabled solely with the +* information; however, turning off SIDPR access works around +* the problem. Turn it off. +* +* This problem is reported in bnc#441240. +* +* https://bugzilla.novell.com/show_bug.cgi?id=441420 +*/ +if (pdev->vendor ==PCI_VENDOR_ID_INTEL && pdev->device ==0x2920 && + pdev->subsystem_vendor ==PCI_VENDOR_ID_SAMSUNG && + pdev->subsystem_device ==0xb049 ) { +dev_printk (KERN_WARNING , host->dev, +"Samsung DB-P70 detected, disabling SIDPR\n" ); +return true; + } + +return false; +} +static void __devinit piix_init_sidpr (struct ata_host *host) {struct pci_dev *pdev =to_pci_dev (host->dev);
@@ -1376,6 +1409,10 @@ static void __devinit piix_init_sidpr(stif (hpriv->map[i] ==IDE )return ; +/* is it blacklisted? */ +if (piix_no_sidpr (host)) +return ; +if (!(host->ports[0 ]->flags &PIIX_FLAG_SIDPR ))return ;
PATCH 11/32 dm crypt: fix kcryptd_async_done parameter
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Huang Ying <[email protected]>
commit b2174eebd1fadb76454dad09a1dacbc17081e6b0 upstream.
In the async encryption-complete function (kcryptd_async_done), the crypto_async_request passed in may be different from the one passed to crypto_ablkcipher_encrypt/decrypt. Only crypto_async_request->data is guaranteed to be same as the one passed in. The current kcryptd_async_done uses the passed-in crypto_async_request directly which may cause the AES-NI-based AES algorithm implementation to panic.
This patch fixes this bug by only using crypto_async_request->data, which points to dm_crypt_request, the crypto_async_request passed in. The original data (convert_context) is gotten from dm_crypt_request.
--- drivers/md/dm-crypt.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-)
drivers/md/dm-crypt.c +21 -5
@@ -59,6 +59,7 @@ struct dm_crypt_io { };struct dm_crypt_request { +struct convert_context *ctx;struct scatterlist sg_in;struct scatterlist sg_out; };
@@ -336,6 +337,18 @@ static void crypt_convert_init(struct cratomic_set (&ctx->pending,1 ); } +static struct dm_crypt_request *dmreq_of_req (struct crypt_config *cc, +struct ablkcipher_request *req) +{ +return (struct dm_crypt_request *)((char *)req + cc->dmreq_start); +} + +static struct ablkcipher_request *req_of_dmreq (struct crypt_config *cc, +struct dm_crypt_request *dmreq) +{ +return (struct ablkcipher_request *)((char *)dmreq - cc->dmreq_start); +} +static int crypt_convert_block (struct crypt_config *cc,struct convert_context *ctx,struct ablkcipher_request *req)
@@ -346,10 +359,11 @@ static int crypt_convert_block(struct cru8 *iv;int r =0 ; - dmreq = (struct dm_crypt_request *)((char *)req + cc->dmreq_start); + dmreq =dmreq_of_req (cc, req); iv = (u8 *)ALIGN ((unsigned long )(dmreq +1 ),crypto_ablkcipher_alignmask (cc->tfm) +1 ); + dmreq->ctx = ctx;sg_init_table (&dmreq->sg_in,1 );sg_set_page (&dmreq->sg_in, bv_in->bv_page,1 <<SECTOR_SHIFT , bv_in->bv_offset + ctx->offset_in);
@@ -396,8 +410,9 @@ static void crypt_alloc_req(struct crypt cc->req =mempool_alloc (cc->req_pool,GFP_NOIO );ablkcipher_request_set_tfm (cc->req, cc->tfm);ablkcipher_request_set_callback (cc->req,CRYPTO_TFM_REQ_MAY_BACKLOG | -CRYPTO_TFM_REQ_MAY_SLEEP , - kcryptd_async_done, ctx); +CRYPTO_TFM_REQ_MAY_SLEEP , + kcryptd_async_done, +dmreq_of_req (cc, cc->req)); }/*
@@ -757,7 +772,8 @@ static void kcryptd_crypt_read_convert(sstatic void kcryptd_async_done (struct crypto_async_request *async_req,int error) { -struct convert_context *ctx = async_req->data; +struct dm_crypt_request *dmreq = async_req->data; +struct convert_context *ctx = dmreq->ctx; struct dm_crypt_io *io = container_of(ctx, struct dm_crypt_io, ctx);struct crypt_config *cc = io->target->private;
@@ -766,7 +782,7 @@ static void kcryptd_async_done(struct crreturn ; } -mempool_free (ablkcipher_request_cast (async_req), cc->req_pool); +mempool_free (req_of_dmreq (cc, dmreq), cc->req_pool);if (!atomic_dec_and_test (&ctx->pending))return ;
PATCH 12/32 dm ioctl: validate name length when renaming
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Milan Broz <[email protected]>
commit bc0fd67feba2e0770aad85393500ba77c6489f1c upstream.
When renaming a mapped device validate the length of the new name.
The rename ioctl accepted any correctly-terminated string enclosed within the data passed from userspace. The other ioctls enforce a size limit of DM_NAME_LEN. If the name is changed and becomes longer than that, the device can no longer be addressed by name.
Fix it by properly checking for device name length (including terminating zero).
--- drivers/md/dm-ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/dm-ioctl.c +2 -1
@@ -704,7 +704,8 @@ static int dev_rename(struct dm_ioctl *pchar *new_name = (char *) param + param->data_start;if (new_name < param->data || -invalid_str (new_name, (void *) param + param_size)) { +invalid_str (new_name, (void *) param + param_size) || +strlen (new_name) >DM_NAME_LEN -1 ) {DMWARN ("Invalid new logical volume name supplied." );return -EINVAL ; }
PATCH 13/32 dm io: respect BIO_MAX_PAGES limit
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mikulas Patocka <[email protected]>
commit d659e6cc98766a1a61d6bdd283f95d149abd7719 upstream.
dm-io calls bio_get_nr_vecs to get the maximum number of pages to use for a given device. It allocates one additional bio_vec to use internally but failed to respect BIO_MAX_PAGES, so fix this.
This was the likely cause of:
https://bugzilla.redhat.com/show_bug.cgi?id=173153
--- drivers/md/dm-io.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/md/dm-io.c +2 -0
@@ -292,6 +292,8 @@ static void do_region(int rw, unsigned r (PAGE_SIZE >> SECTOR_SHIFT)); num_bvecs =1 +min_t (int,bio_get_nr_vecs (where->bdev), num_bvecs); +if (unlikely (num_bvecs >BIO_MAX_PAGES )) + num_bvecs =BIO_MAX_PAGES ; bio =bio_alloc_bioset (GFP_NOIO , num_bvecs, io->client->bios); bio->bi_sector = where->sector + (where->count - remaining); bio->bi_bdev = where->bdev;
PATCH 14/32 eventfd: remove fput() call from possible IRQ context
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Davide Libenzi <[email protected]>
commit 87c3a86e1c220121d0ced59d1a71e78ed9abc6dd upstream.
Remove a source of fput() call from inside IRQ context. Myself, like Eric, wasn't able to reproduce an fput() call from IRQ context, but Jeff said he was able to, with the attached test program. Independently from this, the bug is conceptually there, so we might be better off fixing it. This patch adds an optimization similar to the one we already do on ->ki_filp, on ->ki_eventfd. Playing with ->f_count directly is not pretty in general, but the alternative here would be to add a brand new delayed fput() infrastructure, that I'm not sure is worth it.
--- fs/aio.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-)
fs/aio.c +27 -10
@@ -428,7 +428,7 @@ static struct kiocb *__aio_get_req(struc req->private =NULL ; req->ki_iovec =NULL ;INIT_LIST_HEAD (&req->ki_run_list); - req->ki_eventfd =ERR_PTR (-EINVAL ); + req->ki_eventfd =NULL ;/* Check if the completion queue has enough free space to * accept an event from this io.
@@ -470,8 +470,6 @@ static inline void really_put_req(struct {assert_spin_locked (&ctx->ctx_lock); -if (!IS_ERR (req->ki_eventfd)) -fput (req->ki_eventfd);if (req->ki_dtor) req->ki_dtor (req);if (req->ki_iovec != &req->ki_inline_vec)
@@ -493,8 +491,11 @@ static void aio_fput_routine(struct worklist_del (&req->ki_list);spin_unlock_irq (&fput_lock); -/* Complete the fput */ -__fput (req->ki_filp); +/* Complete the fput(s) */ +if (req->ki_filp !=NULL ) +__fput (req->ki_filp); +if (req->ki_eventfd !=NULL ) +__fput (req->ki_eventfd);/* Link the iocb into the context's free list */ spin_lock_irq (&ctx->ctx_lock);
@@ -512,12 +513,14 @@ static void aio_fput_routine(struct work*/ static int __aio_put_req (struct kioctx *ctx,struct kiocb *req) { +int schedule_putreq =0 ; +dprintk (KERN_DEBUG "aio_put(%p): f_count=%ld\n" , req,atomic_long_read (&req->ki_filp->f_count));assert_spin_locked (&ctx->ctx_lock); - req->ki_users --; + req->ki_users--;BUG_ON (req->ki_users <0 );if (likely (req->ki_users))return 0 ;
@@ -525,10 +528,23 @@ static int __aio_put_req(struct kioctx * req->ki_cancel =NULL ; req->ki_retry =NULL ; -/* Must be done under the lock to serialise against cancellation. -* Call this aio_fput as it duplicates fput via the fput_work. +/* +* Try to optimize the aio and eventfd file* puts, by avoiding to +* schedule work in case it is not __fput() time. In normal cases, +* we would not be holding the last reference to the file*, so +* this function will be executed w/out any aio kthread wakeup. */ -if (unlikely (atomic_long_dec_and_test (&req->ki_filp->f_count))) { +if (unlikely (atomic_long_dec_and_test (&req->ki_filp->f_count))) + schedule_putreq++; +else + req->ki_filp =NULL ; +if (req->ki_eventfd !=NULL ) { +if (unlikely (atomic_long_dec_and_test (&req->ki_eventfd->f_count))) + schedule_putreq++; +else + req->ki_eventfd =NULL ; + } +if (unlikely (schedule_putreq)) {get_ioctx (ctx);spin_lock (&fput_lock);list_add (&req->ki_list, &fput_head);
@@ -992,7 +1008,7 @@ int aio_complete(struct kiocb *iocb, lon* eventfd. The eventfd_signal() function is safe to be called * from IRQ context. */ -if (!IS_ERR (iocb->ki_eventfd)) +if (iocb->ki_eventfd !=NULL )eventfd_signal (iocb->ki_eventfd,1 ); put_rq:
@@ -1596,6 +1612,7 @@ static int io_submit_one(struct kioctx * req->ki_eventfd =eventfd_fget ((int ) iocb->aio_resfd);if (IS_ERR (req->ki_eventfd)) { ret =PTR_ERR (req->ki_eventfd); + req->ki_eventfd =NULL ; goto out_put_req; } }
PATCH 15/32 S390: __div64_31 broken for CONFIG_MARCH_G5
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Martin Schwidefsky <[email protected]>
commit 4fa81ed27781a12f6303b9263056635ae74e3e21 upstream.
The implementation of __div64_31 for G5 machines is broken. The comments in __div64_31 are correct, only the code does not do what the comments say. The part "If the remainder has overflown subtract base and increase the quotient" is only partially realized, the base is subtracted correctly but the quotient is only increased if the dividend had the last bit set. Using the correct instruction fixes the problem.
--- arch/s390/lib/div64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/s390/lib/div64.c +1 -1
@@ -61,7 +61,7 @@ static uint32_t __div64_31(uint64_t *n," clr %0,%3\n" " jl 0f\n" " slr %0,%3\n" -" alr %1,%2\n" +" ahi %1,1\n" "0:\n" : "+d" (reg2), "+d" (reg3), "=d" (tmp) : "d" (base), "2" (1UL) : "cc" );
PATCH 16/32 thinkpad-acpi: fix module autoloading for older models
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mathieu Chouquet-Stringer <[email protected]>
commit b36a50f92d1c4300a88f606b4d2bbdc4f442a2d7 upstream.
Looking at the source, there seems to be a missing * to match my DMI string. I mean for newer IBM and Lenovo's laptops you match either one of the following:MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*");
While for older Thinkpads, you do this (for instance):IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]");
with IBM_BIOS_MODULE_ALIAS being MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW")
Note there's no * terminating the string. As result, udev doesn't load anything because modprobe cannot find anything matching this (my machine actually):
udevtest: run: '/sbin/modprobe dmi:bvnIBM:bvr1IET71WW(2.10):bd06/16/2006:svnIBM:pn236621U:pvrNotAv
--- drivers/misc/thinkpad_acpi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/misc/thinkpad_acpi.c +4 -4
@@ -6826,7 +6826,7 @@ MODULE_ALIAS(TPACPI_DRVR_SHORTNAME);* if it is not there yet. */ #define IBM_BIOS_MODULE_ALIAS (__type) \ - MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW") + MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW*")/* Non-ancient thinkpads */ MODULE_ALIAS ("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*" );
@@ -6835,9 +6835,9 @@ MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:/* Ancient thinkpad BIOSes have to be identified by * BIOS type or model number, and there are far less * BIOS types than model numbers... */ -IBM_BIOS_MODULE_ALIAS ("I[B,D,H,I,M,N,O,T,W,V,Y,Z]" ); -IBM_BIOS_MODULE_ALIAS ("1[0,3,6,8,A-G,I,K,M-P,S,T]" ); -IBM_BIOS_MODULE_ALIAS ("K[U,X-Z]" ); +IBM_BIOS_MODULE_ALIAS ("I[BDHIMNOTWVYZ]" ); +IBM_BIOS_MODULE_ALIAS ("1[0368A-GIKM-PST]" ); +IBM_BIOS_MODULE_ALIAS ("K[UX-Z]" );MODULE_AUTHOR ("Borislav Deianov, Henrique de Moraes Holschuh" );MODULE_DESCRIPTION (TPACPI_DESC );
PATCH 17/32 V4L/DVB (10218): cx23885: Fix Oops for mixed install of analog and digital only cards
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andy Walls <[email protected]>
commit cd8f894eacf13996d920fdd2aef1afc55156b191 upstream.
Analog support for HVR-1250 has not been completed, but does exist for the HVR-1800.
Since both cards use the same driver, it tries to create the analog dev for both devices, which is not possible.
This causes a NULL error to show up in video_open and mpeg_open.
-Mark
Iterations through the cx23885_devlist must check for NULL pointers as some supported devices only have DVB support at the moment. Mark Jenks encoutered an Oops in a system with both an HVR-1250 and HVR-1800 installed.
-Andy
--- drivers/media/video/cx23885/cx23885-417.c | 3 ++- drivers/media/video/cx23885/cx23885-video.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/media/video/cx23885/cx23885-417.c +2 -1
@@ -1585,7 +1585,8 @@ static int mpeg_open(struct inode *inodelist_for_each (list, &cx23885_devlist) { h = list_entry(list, struct cx23885_dev, devlist); -if (h->v4l_device->minor == minor) { +if (h->v4l_device && + h->v4l_device->minor == minor) { dev = h;break ; }
drivers/media/video/cx23885/cx23885-video.c +3 -2
@@ -733,12 +733,13 @@ static int video_open(struct inode *inodlist_for_each (list, &cx23885_devlist) { h = list_entry(list, struct cx23885_dev, devlist); -if (h->video_dev->minor == minor) { +if (h->video_dev && + h->video_dev->minor == minor) { dev = h; type =V4L2_BUF_TYPE_VIDEO_CAPTURE ; }if (h->vbi_dev && - h->vbi_dev->minor == minor) { + h->vbi_dev->minor == minor) { dev = h; type =V4L2_BUF_TYPE_VBI_CAPTURE ; }
PATCH 18/32 Fix misreporting of #cores as #hyperthreads for Q9550
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Joe Korty <[email protected]>
Fix misreporting of #cores for the Intel Quad Core Q9550.
For the Q9550, in x86_64 mode, /proc/cpuinfo mistakenly reports the #cores present as the #hyperthreads present. i386 mode was not examined but is assumed to have the same problem.
A backport of the following three 2.6.29-rc1 patches fixes the problem:
066941bd4eeb159307a5d7d795100d0887c00442:
[PATCH] x86: unmask CPUID levels on Intel CPUs
99fb4d349db7e7dacb2099c5cc320a9e2d31c1ef:
[PATCH] x86: unmask CPUID levels on Intel CPUs, fix
bdf21a49bab28f0d9613e8d8724ef9c9168b61b9:
[PATCH] x86: add MSR_IA32_MISC_ENABLE bits to <asm/msr-index.h>
Quoted 1 line
From the first patch: "If the CPUID limit bit in
MSR_IA32_MISC_ENABLE is set, clear it to make all CPUID information available. This is required for some features to work, in particular XSAVE."
--- arch/x86/kernel/cpu/intel.c | 13 +++++++++++++ arch/x86/kernel/cpu/intel_64.c | 13 +++++++++++++ include/asm-x86/msr-index.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+)
arch/x86/kernel/cpu/intel_64.c +13 -0
@@ -9,6 +9,19 @@static void __cpuinit early_init_intel (struct cpuinfo_x86 *c) { +/* Unmask CPUID levels if masked: */ +if (c->x86 ==6 && c->x86_model >=15 ) { +u64 misc_enable; + +rdmsrl (MSR_IA32_MISC_ENABLE , misc_enable); + +if (misc_enable &MSR_IA32_MISC_ENABLE_LIMIT_CPUID ) { + misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID ; +wrmsrl (MSR_IA32_MISC_ENABLE , misc_enable); + c->cpuid_level =cpuid_eax (0 ); + } + } +if ((c->x86 ==0xf && c->x86_model >=0x03 ) || (c->x86 ==0x6 && c->x86_model >=0x0e ))set_cpu_cap (c,X86_FEATURE_CONSTANT_TSC );
arch/x86/kernel/cpu/intel.c +13 -0
@@ -32,6 +32,19 @@ struct movsl_mask movsl_mask __read_moststatic void __cpuinit early_init_intel (struct cpuinfo_x86 *c) { +/* Unmask CPUID levels if masked: */ +if (c->x86 ==6 && c->x86_model >=15 ) { +u64 misc_enable; + +rdmsrl (MSR_IA32_MISC_ENABLE , misc_enable); + +if (misc_enable &MSR_IA32_MISC_ENABLE_LIMIT_CPUID ) { + misc_enable &= ~MSR_IA32_MISC_ENABLE_LIMIT_CPUID ; +wrmsrl (MSR_IA32_MISC_ENABLE , misc_enable); + c->cpuid_level =cpuid_eax (0 ); + } + } +/* Netburst reports 64 bytes clflush size, but does IO in 128 bytes */ if (c->x86 ==15 && c->x86_cache_alignment ==64 ) c->x86_cache_alignment =128 ;
include/asm-x86/msr-index.h +29 -0
@@ -196,6 +196,35 @@#define MSR_IA32_THERM_STATUS 0x0000019c#define MSR_IA32_MISC_ENABLE 0x000001a0 +/* MISC_ENABLE bits: architectural */ +#define MSR_IA32_MISC_ENABLE_FAST_STRING (1ULL << 0) +#define MSR_IA32_MISC_ENABLE_TCC (1ULL << 1) +#define MSR_IA32_MISC_ENABLE_EMON (1ULL << 7) +#define MSR_IA32_MISC_ENABLE_BTS_UNAVAIL (1ULL << 11) +#define MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL (1ULL << 12) +#define MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP (1ULL << 16) +#define MSR_IA32_MISC_ENABLE_MWAIT (1ULL << 18) +#define MSR_IA32_MISC_ENABLE_LIMIT_CPUID (1ULL << 22) +#define MSR_IA32_MISC_ENABLE_XTPR_DISABLE (1ULL << 23) +#define MSR_IA32_MISC_ENABLE_XD_DISABLE (1ULL << 34) + +/* MISC_ENABLE bits: model-specific, meaning may vary from core to core */ +#define MSR_IA32_MISC_ENABLE_X87_COMPAT (1ULL << 2) +#define MSR_IA32_MISC_ENABLE_TM1 (1ULL << 3) +#define MSR_IA32_MISC_ENABLE_SPLIT_LOCK_DISABLE (1ULL << 4) +#define MSR_IA32_MISC_ENABLE_L3CACHE_DISABLE (1ULL << 6) +#define MSR_IA32_MISC_ENABLE_SUPPRESS_LOCK (1ULL << 8) +#define MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE (1ULL << 9) +#define MSR_IA32_MISC_ENABLE_FERR (1ULL << 10) +#define MSR_IA32_MISC_ENABLE_FERR_MULTIPLEX (1ULL << 10) +#define MSR_IA32_MISC_ENABLE_TM2 (1ULL << 13) +#define MSR_IA32_MISC_ENABLE_ADJ_PREF_DISABLE (1ULL << 19) +#define MSR_IA32_MISC_ENABLE_SPEEDSTEP_LOCK (1ULL << 20) +#define MSR_IA32_MISC_ENABLE_L1D_CONTEXT (1ULL << 24) +#define MSR_IA32_MISC_ENABLE_DCU_PREF_DISABLE (1ULL << 37) +#define MSR_IA32_MISC_ENABLE_TURBO_DISABLE (1ULL << 38) +#define MSR_IA32_MISC_ENABLE_IP_PREF_DISABLE (1ULL << 39) +/* Intel Model 6 */ #define MSR_P6_EVNTSEL0 0x00000186#define MSR_P6_EVNTSEL1 0x00000187
PATCH 19/32 powerpc: Remove extra semicolon in fsl_soc.c
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Johns Daniel <[email protected]>
TSEC/MDIO will not work with older device trees because of a semicolon at the end of a macro resulting in an empty for loop body.
This fix only applies to 2.6.28; this code is gone in 2.6.29, according to Grant Likely!
--- arch/powerpc/sysdev/fsl_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/sysdev/fsl_soc.c +1 -1
@@ -255,7 +255,7 @@ static int __init gfar_mdio_of_init(voidgfar_mdio_of_init_one (np);/* try the deprecated version */ -for_each_compatible_node (np,"mdio" ,"gianfar" ); +for_each_compatible_node (np,"mdio" ,"gianfar" )gfar_mdio_of_init_one (np);return 0 ;
PATCH 20/32 USB: EHCI: expedite unlinks when the root hub is suspended
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <[email protected]>
commit 391016f6e2fe3b9979b4c6880a76e5e434d6947c upstream.
This patch (as1225) fixes a bug in ehci-hcd. The condition for whether unlinked QHs can become IDLE should not be that the controller is halted, but rather that the controller isn't running. In other words when the root hub is suspended, the hardware doesn't own any QHs.
This fixes a problem that can show up during hibernation: If a QH is only partially unlinked when the root hub is frozen, then when the root hub is thawed the QH won't be in the IDLE state. As a result it can't be used properly for new URB submissions.
--- drivers/usb/host/ehci-q.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/ehci-q.c +2 -1
@@ -1095,7 +1095,8 @@ static void start_unlink_async (struct e prev->qh_next = qh->qh_next;wmb (); -if (unlikely (ehci_to_hcd (ehci)->state ==HC_STATE_HALT )) { +/* If the controller isn't running, we don't have to wait for it */ +if (unlikely (!HC_IS_RUNNING (ehci_to_hcd (ehci)->state))) {/* if (unlikely (qh->reclaim != 0)) * this will recurse, probably not much */
PATCH 21/32 USB: EHCI: Fix isochronous URB leak
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Karsten Wiese <[email protected]>
commit 508db8c954d55ed30f870d2c24d741ba6269d13c upstream.
ehci-hcd uses usb_get_urb() and usb_put_urb() in an unbalanced way causing isochronous URB's kref.counts incrementing once per usb_submit_urb() call. The culprit is *usb being set to NULL when usb_put_urb() is called after URB is given back.
Due to other fixes there is no need for ehci-hcd to deal with usb_get_urb() nor usb_put_urb() anymore, so patch removes their usages in ehci-hcd. Patch also makes ehci_to_hcd(ehci)->self.bandwidth_allocated adjust, if a stream finishes.
--- drivers/usb/host/ehci-sched.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/usb/host/ehci-sched.c +4 -6
@@ -1536,7 +1536,7 @@ itd_link_urb ( struct ehci_itd, itd_list);list_move_tail (&itd->itd_list, &stream->td_list); itd->stream =iso_stream_get (stream); - itd->urb =usb_get_urb (urb); + itd->urb = urb;itd_init (ehci, stream, itd); }
@@ -1645,7 +1645,7 @@ itd_complete ( (void )disable_periodic (ehci);ehci_to_hcd (ehci)->self.bandwidth_isoc_reqs--; -if (unlikely (list_empty (&stream->td_list))) { +if (unlikely (list_is_singular (&stream->td_list))) {ehci_to_hcd (ehci)->self.bandwidth_allocated -= stream->bandwidth; ehci_vdbg (ehci,
@@ -1656,7 +1656,6 @@ itd_complete (iso_stream_put (ehci, stream); done: -usb_put_urb (urb); itd->urb =NULL ;if (ehci->clock_frame != itd->frame || itd->index[7 ] !=-1 ) {/* OK to recycle this ITD now. */
@@ -1949,7 +1948,7 @@ sitd_link_urb ( struct ehci_sitd, sitd_list);list_move_tail (&sitd->sitd_list, &stream->td_list); sitd->stream =iso_stream_get (stream); - sitd->urb =usb_get_urb (urb); + sitd->urb = urb;sitd_patch (ehci, stream, sitd, sched, packet); sitd_link (ehci, (next_uframe >> 3) % ehci->periodic_size,
@@ -2034,7 +2033,7 @@ sitd_complete ( (void )disable_periodic (ehci);ehci_to_hcd (ehci)->self.bandwidth_isoc_reqs--; -if (list_empty (&stream->td_list)) { +if (list_is_singular (&stream->td_list)) {ehci_to_hcd (ehci)->self.bandwidth_allocated -= stream->bandwidth; ehci_vdbg (ehci,
@@ -2045,7 +2044,6 @@ sitd_complete (iso_stream_put (ehci, stream);/* OK to recycle this SITD now that its completion callback ran. */ done: -usb_put_urb (urb); sitd->urb =NULL ; sitd->stream =NULL ;list_move (&sitd->sitd_list, &stream->free_list);
PATCH 22/32 USB: Add Vendor/Product ID for new CDMA U727 to option driver
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dirk Hohndel <[email protected]>
commit 56a21827439a4d715b510bfaf488534e6f4ad2f8 upstream.
* newer versions of the Novatel Wireless U727 CDMA 3G USB stick have a different Product ID (0x5010); adding this ID makes them work just fine with the option driver
--- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/serial/option.c +2 -0
@@ -190,6 +190,7 @@ static int option_send_setup(struct tty/* OVATION PRODUCTS */ #define NOVATELWIRELESS_PRODUCT_MC727 0x4100#define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 +#define NOVATELWIRELESS_PRODUCT_U727 0x5010/* FUTURE NOVATEL PRODUCTS */ #define NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED 0X6000
@@ -402,6 +403,7 @@ static struct usb_device_id option_ids[] { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ + { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED) }, /* Novatel EVDO product */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */
PATCH 23/32 USB: option.c: add ZTE 622 modem device
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Albert Pauw <[email protected]>
commit 9ea19b82f3126da4e47d6b94563a3c2cd586f6e2 upstream.
Please consider this small patch for the usb option-card driver. This patch adds the ZTE 622 usb modem device.
--- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/serial/option.c +2 -0
@@ -282,6 +282,7 @@ static int option_send_setup(struct tty/* ZTE PRODUCTS */ #define ZTE_VENDOR_ID 0x19d2 +#define ZTE_PRODUCT_MF622 0x0001#define ZTE_PRODUCT_MF628 0x0015#define ZTE_PRODUCT_MF626 0x0031#define ZTE_PRODUCT_CDMA_TECH 0xfffe
@@ -499,6 +500,7 @@ static struct usb_device_id option_ids[] { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, + { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622) }, { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626) }, { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) },
PATCH 24/32 USB: Add device id for Option GTM380 to option driver
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Achilleas Kotsis <[email protected]>
commit e7f2f0d77a7b483a26054f29ba8393831b25a8a4 upstream.
Option GTM380 in Modem mode uses Product ID 0x7201. This has been tested and works on production systems for over 6 months.
--- drivers/usb/serial/option.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/usb/serial/option.c +2 -0
@@ -89,6 +89,7 @@ static int option_send_setup(struct tty#define OPTION_PRODUCT_ETNA_MODEM_GT 0x7041#define OPTION_PRODUCT_ETNA_MODEM_EX 0x7061#define OPTION_PRODUCT_ETNA_KOI_MODEM 0x7100 +#define OPTION_PRODUCT_GTM380_MODEM 0x7201#define HUAWEI_VENDOR_ID 0x12D1#define HUAWEI_PRODUCT_E600 0x1001
@@ -319,6 +320,7 @@ static struct usb_device_id option_ids[] { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_GT) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_EX) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, + { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTM380_MODEM) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) },
PATCH 25/32 USB: Option: let cdc-acm handle Sony Ericsson F3507g / Dell 5530
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Williams <[email protected]>
commit 0cc6bfe901b946df125d8e37186d8e45f876457d upstream.
The generic cdc-acm driver is now the best one to handle Sony Ericsson F3507g-based devices (which the Dell 5530 is a rebrand of), now that all the pieces are in place (ie, cac477e8f1038c41b6f29d3161ce351462ef3df7). Removing the IDs from option allows cdc-acm to handle the device.
--- drivers/usb/serial/option.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/usb/serial/option.c +0 -6
@@ -288,10 +288,6 @@ static int option_send_setup(struct tty#define ZTE_PRODUCT_MF626 0x0031#define ZTE_PRODUCT_CDMA_TECH 0xfffe -/* Ericsson products */ -#define ERICSSON_VENDOR_ID 0x0bdb -#define ERICSSON_PRODUCT_F3507G 0x1900 -#define BENQ_VENDOR_ID 0x04a5#define BENQ_PRODUCT_H10 0x4068
@@ -434,7 +430,6 @@ static struct usb_device_id option_ids[] { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_CINGULAR) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_L) }, /* Dell Wireless HSDPA 5520 */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_I) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ - { USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */
@@ -506,7 +501,6 @@ static struct usb_device_id option_ids[] { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626) }, { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, - { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G) }, { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, { USB_DEVICE(0x1da5, 0x4515) }, /* BenQ H20 */ { } /* Terminating entry */
PATCH 26/32 USB: serial: add FTDI USB/Serial converter devices
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Axel Wachtler <[email protected]>
commit 7f82b6dd7015aabca2fd55fb690248f742cd67f3 upstream.
Add the following devices to the USB FTDI SIO device table:
Bus 001 Device 009: ID 03eb:2109 Atmel Corp.
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4187
Bus 001 Device 008: ID 1cf1:0001
http://www.dresden-elektronik.de/shop/prod75.html
Bus 001 Device 007: ID 1c1f:0004
http://www.dresden-elektronik.de/shop/prod64.html
--- drivers/usb/serial/ftdi_sio.c | 3 +++ drivers/usb/serial/ftdi_sio.h | 13 +++++++++++++ 2 files changed, 16 insertions(+)
drivers/usb/serial/ftdi_sio.c +3 -0
@@ -657,6 +657,9 @@ static struct usb_device_id id_table_com { USB_DEVICE(PAPOUCH_VID, PAPOUCH_QUIDO4x4_PID) }, { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DGQG_PID) }, { USB_DEVICE(FTDI_VID, FTDI_DOMINTELL_DUSB_PID) }, + { USB_DEVICE(ATMEL_VID, STK541_PID) }, + { USB_DEVICE(DE_VID, STB_PID) }, + { USB_DEVICE(DE_VID, WHT_PID) }, { }, /* Optional parameter entry */ { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio.h +13 -0
@@ -870,6 +870,19 @@#define RATOC_PRODUCT_ID_USB60F 0xb020/* +* Atmel STK541 +*/ +#define ATMEL_VID 0x03eb/* Vendor ID */ +#define STK541_PID 0x2109/* Zigbee Controller */ + +/* +* Dresden Elektronic Sensor Terminal Board +*/ +#define DE_VID 0x1cf1/* Vendor ID */ +#define STB_PID 0x0001/* Sensor Terminal Board */ +#define WHT_PID 0x0004/* Wireless Handheld Terminal */ + +/* * BmRequestType: 1100 0000b * bRequest: FTDI_E2_READ * wValue: 0
PATCH 27/32 USB: serial: ftdi: enable UART detection on gnICE JTAG adaptors blacklist interface0
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Hennerich <[email protected]>
commit b0d659002168146ec6b03d1ef062d8dcf05ff510 upstream.
--- drivers/usb/serial/ftdi_sio.c | 2 ++ drivers/usb/serial/ftdi_sio.h | 7 +++++++ 2 files changed, 9 insertions(+)
drivers/usb/serial/ftdi_sio.c +2 -0
@@ -660,6 +660,8 @@ static struct usb_device_id id_table_com { USB_DEVICE(ATMEL_VID, STK541_PID) }, { USB_DEVICE(DE_VID, STB_PID) }, { USB_DEVICE(DE_VID, WHT_PID) }, + { USB_DEVICE(ADI_VID, ADI_GNICE_PID), + .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { }, /* Optional parameter entry */ { } /* Terminating entry */ };
drivers/usb/serial/ftdi_sio.h +7 -0
@@ -883,6 +883,13 @@#define WHT_PID 0x0004/* Wireless Handheld Terminal */ /* +* Blackfin gnICE JTAG +* http://docs.blackfin.uclinux.org/doku.php?id=hw:jtag:gnice +*/ +#define ADI_VID 0x0456 +#define ADI_GNICE_PID 0xF000 + +/* * BmRequestType: 1100 0000b * bRequest: FTDI_E2_READ * wValue: 0
PATCH 28/32 USB: serial: new cp2101 device id
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Robert M. Kenney <[email protected]>
commit c6535668798b0644e1af5934c2aec0e912280449 upstream.
From: Robert M. Kenney <[email protected]>
--- drivers/usb/serial/cp2101.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/serial/cp2101.c +1 -0
@@ -77,6 +77,7 @@ static struct usb_device_id id_table [] { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ + { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */ { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */ { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */ { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
PATCH 29/32 USB: storage: Unusual USB device Prolific 2507 variation added
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Bartosik <[email protected]>
commit 8a0845c51b2e300f5204a323b874f7f58ea0eff7 upstream.
The "c-enter" USB to Toshiba 1.8" IDE enclosure needs special treatment to work flawlessly. This patch is absolutely trivial, as the integrated USB-IDE bridge is already identified to be an "unusual" device, only the bcdDevice is different (lower) to the bcdDeviceMin already included in the kernel.
It is a Prolific 2507 bridge.
T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=067b ProdID=2507 Rev= 0.01 S: Manufacturer=Prolific Technology Inc. S: Product=ATAPI-6 Bridge Controller S: SerialNumber=00000272 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/usb/storage/unusual_devs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/usb/storage/unusual_devs.h +3 -1
@@ -990,7 +990,9 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0 US_FL_FIX_CAPACITY ),/* Reported by Richard -=[]=- <[email protected]> */ -UNUSUAL_DEV( 0x067b, 0x2507, 0x0100, 0x0100, +/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by +* Thomas Bartosik <[email protected]> */ +UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100, "Prolific Technology Inc.", "Mass Storage Device", US_SC_DEVICE, US_PR_DEVICE, NULL,
PATCH 30/32 USB: unusual_devs: Add support for GI 0431 SD-Card interface
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Dumon <[email protected]>
commit c497e715f93d148d751c055401568684eea0bf6b upstream.
Enable the SD-Card interface on the GI 0431 HSUPA stick from Option.
The unusual_devs.h entry is necessary because the device descriptor is vendor-specific. That prevents usb-storage from binding to it as an interface driver.
T: Bus=07 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#= 15 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1 P: Vendor=0af0 ProdID=7501 Rev= 0.00 S: Manufacturer=Option N.V. S: Product=Globetrotter HSUPA Modem C:* #Ifs=11 Cfg#= 1 Atr=a0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 7 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none) E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#= 9 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=2ms E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms I:* If#=10 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
--- drivers/usb/storage/unusual_devs.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/usb/storage/unusual_devs.h +10 -0
@@ -1407,6 +1407,16 @@ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0 US_SC_DEVICE, US_PR_DEVICE, NULL, 0 ), +/* Reported by Jan Dumon <[email protected]> +* This device (wrongly) has a vendor-specific device descriptor. +* The entry is needed so usb-storage can bind to it's mass-storage +* interface as an interface driver */ +UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000, + "Option", + "GI 0431 SD-Card", + US_SC_DEVICE, US_PR_DEVICE, NULL, + 0 ), +#ifdef CONFIG_USB_STORAGE_ISD200 UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110, "ATI",
PATCH 31/32 USB: Updated unusual-devs entry for USB mass storage on Nokia 6233
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Moritz Muehlenhoff <[email protected]>
commit 716a9c8561d9c50ec454f4fbd39a265892feda2c upstream.
Current firmware revision 5.60 still behaves the same, so update the quirk up a (non-existing) 99.99 revision.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493415
--- drivers/usb/storage/unusual_devs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/storage/unusual_devs.h +1 -1
@@ -219,7 +219,7 @@ UNUSUAL_DEV( 0x0421, 0x047c, 0x0370, 0x US_FL_MAX_SECTORS_64 ),/* Reported by Manuel Osdoba <[email protected]> */ -UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x0452, +UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x9999, "Nokia", "Nokia 6233", US_SC_DEVICE, US_PR_DEVICE, NULL,
PATCH 32/32 USB: usbfs: keep async URBs until the device file is closed
In reply to Greg KH2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <[email protected]>
commit 6ff10464096540e14d7575a72c50d0316d003714 upstream.
The usbfs driver manages a list of completed asynchronous URBs. But it is too eager to free the entries on this list: destroy_async() gets called whenever an interface is unbound or a device is removed, and it deallocates the outstanding struct async entries for all URBs on that interface or device. This is wrong; the user program should be able to reap an URB any time after it has completed, regardless of whether or not the interface is still bound or the device is still present.
This patch (as1222) moves the code for deallocating the completed list entries from destroy_async() to usbdev_release(). The outstanding entries won't be freed until the user program has closed the device file, thereby eliminating any possibility that the remaining URBs might still be reaped.
This fixes a bug in which a program can hang in the USBDEVFS_REAPURB ioctl when the device is unplugged.
--- drivers/usb/core/devio.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)
drivers/usb/core/devio.c +7 -5
@@ -359,11 +359,6 @@ static void destroy_async(struct dev_staspin_lock_irqsave (&ps->lock, flags); }spin_unlock_irqrestore (&ps->lock, flags); - as =async_getcompleted (ps); -while (as) { -free_async (as); - as =async_getcompleted (ps); - } } static void destroy_async_on_interface(struct dev_state *ps,
@@ -639,6 +634,7 @@ static int usbdev_release(struct inode *struct dev_state *ps = file->private_data;struct usb_device *dev = ps->dev;unsigned int ifnum; +struct async *as;usb_lock_device (dev);
@@ -657,6 +653,12 @@ static int usbdev_release(struct inode *usb_unlock_device (dev);usb_put_dev (dev);put_pid (ps->disc_pid); + + as =async_getcompleted (ps); +while (as) { +free_async (as); + as =async_getcompleted (ps); + }kfree (ps);return 0 ; }