Patch Upstream: xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN
commit: a32c88b9386ce3df87f28dd46bdc3776cd6edf75 From: Konrad Rzeszutek Wilk Date: Wed, 23 May 2012 12:55:38 -0400 Subject: xen/hvc: Fix error cases around HVM_PARAM_CONSOLE_PFN We weren't resetting the parameter to be passed in to a known default. Nor were we checking the return value of hvm_get_parameter. CC: sta...@kernel.org Signed-off-by: Konrad Rzeszutek Wilk --- drivers/tty/hvc/hvc_xen.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index afc7fc2..3277f0e 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -219,7 +219,8 @@ static int xen_hvm_console_init(void) if (r < 0) goto err; info->evtchn = v; - hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v); + v = 0; + r = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v); if (r < 0) goto err; mfn = v; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: xen/hvc: Collapse error logic.
commit: 2e5ad6b9c45d43cc4e7b8ac5ded1c55a7c4a3893 From: Konrad Rzeszutek Wilk Date: Wed, 23 May 2012 12:53:11 -0400 Subject: xen/hvc: Collapse error logic. All of the error paths are doing the same logic. In which case we might as well collapse them in one path. CC: sta...@kernel.org Acked-by: Stefano Stabellini Signed-off-by: Konrad Rzeszutek Wilk --- drivers/tty/hvc/hvc_xen.c | 21 + 1 files changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index d3d91da..afc7fc2 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -216,22 +216,16 @@ static int xen_hvm_console_init(void) return 0; r = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v); - if (r < 0) { - kfree(info); - return -ENODEV; - } + if (r < 0) + goto err; info->evtchn = v; hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v); - if (r < 0) { - kfree(info); - return -ENODEV; - } + if (r < 0) + goto err; mfn = v; info->intf = ioremap(mfn << PAGE_SHIFT, PAGE_SIZE); - if (info->intf == NULL) { - kfree(info); - return -ENODEV; - } + if (info->intf == NULL) + goto err; info->vtermno = HVC_COOKIE; spin_lock(&xencons_lock); @@ -239,6 +233,9 @@ static int xen_hvm_console_init(void) spin_unlock(&xencons_lock); return 0; +err: + kfree(info); + return -ENODEV; } static int xen_pv_console_init(void) -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness.
commit: 5842f5768599094758931b74190cdf93641a8e35 From: Konrad Rzeszutek Wilk Date: Wed, 23 May 2012 12:56:59 -0400 Subject: xen/hvc: Check HVM_PARAM_CONSOLE_[EVTCHN|PFN] for correctness. We need to make sure that those parameters are setup to be correct. As such the value of 0 is deemed invalid and we find that we bail out. The hypervisor sets by default all of them to be zero and when the hypercall is done does a simple: a.value = d->arch.hvm_domain.params[a.index]; Which means that if the Xen toolstack forgot to setup the proper HVM_PARAM_CONSOLE_EVTCHN (or the PFN one), we would get the default value of 0 and use that. CC: sta...@kernel.org Fixes-Oracle-Bug: 14091238 Signed-off-by: Konrad Rzeszutek Wilk --- drivers/tty/hvc/hvc_xen.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 3277f0e..944eaeb 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -214,14 +214,19 @@ static int xen_hvm_console_init(void) /* already configured */ if (info->intf != NULL) return 0; - + /* +* If the toolstack (or the hypervisor) hasn't set these values, the +* default value is 0. Even though mfn = 0 and evtchn = 0 are +* theoretically correct values, in practice they never are and they +* mean that a legacy toolstack hasn't initialized the pv console correctly. +*/ r = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v); - if (r < 0) + if (r < 0 || v == 0) goto err; info->evtchn = v; v = 0; r = hvm_get_parameter(HVM_PARAM_CONSOLE_PFN, &v); - if (r < 0) + if (r < 0 || v == 0) goto err; mfn = v; info->intf = ioremap(mfn << PAGE_SHIFT, PAGE_SIZE); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: NFSv4.1: Fix a request leak on the back channel
commit: b3b02ae5865c2dcd506322e0fc6def59a042e72f From: Trond Myklebust Date: Thu, 31 May 2012 15:26:38 -0400 Subject: NFSv4.1: Fix a request leak on the back channel If the call to svc_process_common() fails, then the request needs to be freed before we can exit bc_svc_process. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org --- net/sunrpc/svc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c index 017c011..074df5a 100644 --- a/net/sunrpc/svc.c +++ b/net/sunrpc/svc.c @@ -1377,7 +1377,8 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req, sizeof(req->rq_snd_buf)); return bc_send(req); } else { - /* Nothing to do to drop request */ + /* drop request */ + xprt_free_bc_request(req); return 0; } } -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: xen/setup: filter APERFMPERF cpuid feature out
commit: 5e626254206a709c6e937f3dda69bf26c7344f6f From: Andre Przywara Date: Tue, 29 May 2012 13:07:31 +0200 Subject: xen/setup: filter APERFMPERF cpuid feature out Xen PV kernels allow access to the APERF/MPERF registers to read the effective frequency. Access to the MSRs is however redirected to the currently scheduled physical CPU, making consecutive read and compares unreliable. In addition each rdmsr traps into the hypervisor. So to avoid bogus readouts and expensive traps, disable the kernel internal feature flag for APERF/MPERF if running under Xen. This will a) remove the aperfmperf flag from /proc/cpuinfo b) not mislead the power scheduler (arch/x86/kernel/cpu/sched.c) to use the feature to improve scheduling (by default disabled) c) not mislead the cpufreq driver to use the MSRs This does not cover userland programs which access the MSRs via the device file interface, but this will be addressed separately. Signed-off-by: Andre Przywara Cc: stable@vger.kernel.org # v3.0+ Signed-off-by: Konrad Rzeszutek Wilk --- arch/x86/xen/enlighten.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index d1f9a04..272ebd0 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -208,6 +208,9 @@ static void __init xen_banner(void) xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : ""); } +#define CPUID_THERM_POWER_LEAF 6 +#define APERFMPERF_PRESENT 0 + static __read_mostly unsigned int cpuid_leaf1_edx_mask = ~0; static __read_mostly unsigned int cpuid_leaf1_ecx_mask = ~0; @@ -241,6 +244,11 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx, *dx = cpuid_leaf5_edx_val; return; + case CPUID_THERM_POWER_LEAF: + /* Disabling APERFMPERF for kernel usage */ + maskecx = ~(1 << APERFMPERF_PRESENT); + break; + case 0xb: /* Suppress extended topology stuff */ maskebx = 0; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: tracing: Have tracing_off() actually turn tracing off
commit: f2bf1f6f5f89d031245067512449fc889b2f4bb2 From: Steven Rostedt Date: Wed, 6 Jun 2012 19:50:40 -0400 Subject: tracing: Have tracing_off() actually turn tracing off A recent update to have tracing_on/off() only affect the ftrace ring buffers instead of all ring buffers had a cut and paste error. The tracing_off() did the exact same thing as tracing_on() and would not actually turn off tracing. Unfortunately, tracing_off() is more important to be working than tracing_on() as this is a key development tool, as it lets the developer turn off tracing as soon as a problem is discovered. It is also used by panic and oops code. This bug also breaks the 'echo func:traceoff > set_ftrace_filter' Cc: # 3.4 Signed-off-by: Steven Rostedt --- kernel/trace/trace.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 68032c6..49249c2 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -371,7 +371,7 @@ EXPORT_SYMBOL_GPL(tracing_on); void tracing_off(void) { if (global_trace.buffer) - ring_buffer_record_on(global_trace.buffer); + ring_buffer_record_off(global_trace.buffer); /* * This flag is only looked at when buffers haven't been * allocated yet. We don't really care about the race -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: [SCSI] mpt2sas: Fix unsafe using smp_processor_id() in preemptible
commit: a2c658505bf5c75516ee0a79287223e86a2474af From: nagalakshmi.nandig...@lsi.com Date: Tue, 17 Apr 2012 11:25:04 +0530 Subject: [SCSI] mpt2sas: Fix unsafe using smp_processor_id() in preemptible When CONFIG_DEBUG_PREEMPT is enabled, bug is observed in the smp_processor_id(). This is because smp_processor_id() is not called in preempt safe condition. To fix this issue, use raw_smp_processor_id instead of smp_processor_id. Signed-off-by: Nagalakshmi Nandigama CC: stable@vger.kernel.org Signed-off-by: James Bottomley --- drivers/scsi/mpt2sas/mpt2sas_base.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 6102ef2..9d46fcb 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c @@ -1792,7 +1792,7 @@ static inline void _base_writeq(__u64 b, volatile void __iomem *addr, static inline u8 _base_get_msix_index(struct MPT2SAS_ADAPTER *ioc) { - return ioc->cpu_msix_table[smp_processor_id()]; + return ioc->cpu_msix_table[raw_smp_processor_id()]; } /** -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: usb: musb_gadget: fix crash caused by dangling pointer
commit: 08f75bf14fadaa81fe362d5acda9b77b113dd0a2 From: Grazvydas Ignotas Date: Sat, 26 May 2012 00:21:33 +0300 Subject: usb: musb_gadget: fix crash caused by dangling pointer usb_ep_ops.disable must clear external copy of the endpoint descriptor, otherwise musb crashes after loading/unloading several gadget modules in a row: Unable to handle kernel paging request at virtual address bf013730 pgd = c0004000 [bf013730] *pgd=8f26d811, *pte=, *ppte= Internal error: Oops: 7 [#1] Modules linked in: g_cdc [last unloaded: g_file_storage] CPU: 0Not tainted (3.2.17 #647) PC is at musb_gadget_enable+0x4c/0x24c LR is at _raw_spin_lock_irqsave+0x4c/0x58 [] (musb_gadget_enable+0x4c/0x24c) from [] (gether_connect+0x3c/0x19c [g_cdc]) [] (gether_connect+0x3c/0x19c [g_cdc]) from [] (ecm_set_alt+0x15c/0x180 [g_cdc]) [] (ecm_set_alt+0x15c/0x180 [g_cdc]) from [] (composite_setup+0x85c/0xac4 [g_cdc]) [] (composite_setup+0x85c/0xac4 [g_cdc]) from [] (musb_g_ep0_irq+0x844/0x924) [] (musb_g_ep0_irq+0x844/0x924) from [] (musb_interrupt+0x79c/0x864) [] (musb_interrupt+0x79c/0x864) from [] (generic_interrupt+0x64/0x7c) [] (generic_interrupt+0x64/0x7c) from [] (handle_irq_event_percpu+0x28/0x178) ... Cc: stable@vger.kernel.org # v3.1+ Signed-off-by: Grazvydas Ignotas Signed-off-by: Felipe Balbi --- drivers/usb/musb/musb_gadget.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index f42c29b..95918da 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -1232,6 +1232,7 @@ static int musb_gadget_disable(struct usb_ep *ep) } musb_ep->desc = NULL; + musb_ep->end_point.desc = NULL; /* abort all pending DMA and requests */ nuke(musb_ep, -ESHUTDOWN); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: usb: musb: davinci: Fix build breakage
commit: 6594b2d7b1ef8260e6e36ddc96bd37a40e39ba80 From: Jon Povey Date: Fri, 25 May 2012 10:50:18 +0900 Subject: usb: musb: davinci: Fix build breakage This appears to have been broken by commit 5cfb19ac604a68c030b245561f575c2d1bac1d49 (ARM: davinci: streamline sysmod access) For now, fix by hardcoding USB_PHY_CTRL and DM355_DEEPSLEEP Tested on DM365 with defconfig changes. Signed-off-by: Jon Povey Acked-by: Sekhar Nori CC: Felipe Balbi Cc: # v3.4.x Signed-off-by: Felipe Balbi --- drivers/usb/musb/davinci.c |1 + drivers/usb/musb/davinci.h |4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 768b4b5..9d63ba4 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c @@ -34,6 +34,7 @@ #include #include +#include #include diff --git a/drivers/usb/musb/davinci.h b/drivers/usb/musb/davinci.h index 046c844..371baa0 100644 --- a/drivers/usb/musb/davinci.h +++ b/drivers/usb/musb/davinci.h @@ -15,7 +15,7 @@ */ /* Integrated highspeed/otg PHY */ -#define USBPHY_CTL_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x34) +#define USBPHY_CTL_PADDR 0x01c40034 #define USBPHY_DATAPOL BIT(11) /* (dm355) switch D+/D- */ #define USBPHY_PHYCLKGDBIT(8) #define USBPHY_SESNDEN BIT(7) /* v(sess_end) comparator */ @@ -27,7 +27,7 @@ #define USBPHY_OTGPDWN BIT(1) #define USBPHY_PHYPDWN BIT(0) -#define DM355_DEEPSLEEP_PADDR (DAVINCI_SYSTEM_MODULE_BASE + 0x48) +#define DM355_DEEPSLEEP_PADDR 0x01c40048 #define DRVVBUS_FORCE BIT(2) #define DRVVBUS_OVERRIDE BIT(1) -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: rpc_pipefs: allow rpc_purge_list to take a NULL waitq pointer
commit: 92123e068efa310b09e9943ac1cfd10ff6b6d2e4 From: Jeff Layton Date: Mon, 11 Jun 2012 10:03:42 -0400 Subject: rpc_pipefs: allow rpc_purge_list to take a NULL waitq pointer In the event that we don't have a dentry for a rpc_pipefs pipe, we still need to allow the queue_timeout job to clean out the queue. There's just no waitq to wake up in that event. Cc: sta...@kernel.org Reported-by: Hans de Bruin Reported-by: Joerg Platte Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust --- net/sunrpc/rpc_pipe.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 0404047..21fde99 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -71,7 +71,9 @@ static void rpc_purge_list(wait_queue_head_t *waitq, struct list_head *head, msg->errno = err; destroy_msg(msg); } while (!list_empty(head)); - wake_up(waitq); + + if (waitq) + wake_up(waitq); } static void @@ -91,11 +93,9 @@ rpc_timeout_upcall_queue(struct work_struct *work) } dentry = dget(pipe->dentry); spin_unlock(&pipe->lock); - if (dentry) { - rpc_purge_list(&RPC_I(dentry->d_inode)->waitq, - &free_list, destroy_msg, -ETIMEDOUT); - dput(dentry); - } + rpc_purge_list(dentry ? &RPC_I(dentry->d_inode)->waitq : NULL, + &free_list, destroy_msg, -ETIMEDOUT); + dput(dentry); } ssize_t rpc_pipe_generic_upcall(struct file *filp, struct rpc_pipe_msg *msg, -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: NFSv4: Fix unnecessary delegation returns in nfs4_do_open
commit: 2d0dbc6ae8a5194aaecb9cfffb9053f38fce8b86 From: Trond Myklebust Date: Fri, 8 Jun 2012 10:58:09 -0400 Subject: NFSv4: Fix unnecessary delegation returns in nfs4_do_open While nfs4_do_open() expects the fmode argument to be restricted to combinations of FMODE_READ and FMODE_WRITE, both nfs4_atomic_open() and nfs4_proc_create will pass the nfs_open_context->mode, which contains the full fmode_t. This patch ensures that nfs4_do_open strips the other fmode_t bits, fixing a problem in which the nfs4_do_open call would result in an unnecessary delegation return. Reported-by: Fred Isaman Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org --- fs/nfs/nfs4proc.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 5881f2c..f23977e 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1902,6 +1902,7 @@ static struct nfs4_state *nfs4_do_open(struct inode *dir, struct nfs4_state *res; int status; + fmode &= FMODE_READ|FMODE_WRITE; do { status = _nfs4_do_open(dir, dentry, fmode, flags, sattr, cred, &res, ctx_th); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: option: Updated Huawei K4605 has better id
commit: 42ca7da1c2363dbef4ba1b6917c4c02274b6a5e2 From: Andrew Bird Date: Mon, 28 May 2012 12:43:06 +0100 Subject: USB: option: Updated Huawei K4605 has better id Later firmwares for this device now have proper subclass and protocol info so we can identify it nicely without needing to use the blacklist. I'm not removing the old 0xff matching as there may be devices in the field that still need that. Signed-off-by: Andrew Bird Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index f3e4a47..d9cb552 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -667,6 +667,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x31) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0x01, 0x32) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) }, -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: serial: cp210x: add Optris MS Pro usb id
commit: 5bbfa6f427c1d7244a5ee154ab8fa37265a5e049 From: Mikko Tuumanen Date: Fri, 1 Jun 2012 11:28:55 +0300 Subject: USB: serial: cp210x: add Optris MS Pro usb id Signed-off-by: Mikko Tuumanen Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/cp210x.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 1b19262..73d25cd 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -82,6 +82,7 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x10C4, 0x8066) }, /* Argussoft In-System Programmer */ { USB_DEVICE(0x10C4, 0x806F) }, /* IMS USB to RS422 Converter Cable */ { USB_DEVICE(0x10C4, 0x807A) }, /* Crumb128 board */ + { USB_DEVICE(0x10C4, 0x80C4) }, /* Cygnal Integrated Products, Inc., Optris infrared thermometer */ { USB_DEVICE(0x10C4, 0x80CA) }, /* Degree Controls Inc */ { USB_DEVICE(0x10C4, 0x80DD) }, /* Tracient RFID */ { USB_DEVICE(0x10C4, 0x80F6) }, /* Suunto sports instrument */ -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: serial: sierra: Add support for Sierra Wireless AirCard 320U modem
commit: 19a3dd1575e954e8c004413bee3e12d3962f2525 From: Tom Cassidy Date: Wed, 6 Jun 2012 17:08:48 +1000 Subject: USB: serial: sierra: Add support for Sierra Wireless AirCard 320U modem Add support for Sierra Wireless AirCard 320U modem Signed-off-by: Tomas Cassidy Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/sierra.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index ba54a0a..d423d36 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -294,6 +294,10 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x1199, 0x68A3), /* Sierra Wireless Direct IP modems */ .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist }, + /* AT&T Direct IP LTE modems */ + { USB_DEVICE_AND_INTERFACE_INFO(0x0F3D, 0x68AA, 0xFF, 0xFF, 0xFF), + .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist + }, { USB_DEVICE(0x0f3d, 0x68A3), /* Airprime/Sierra Wireless Direct IP modems */ .driver_info = (kernel_ulong_t)&direct_ip_interface_blacklist }, -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: ftdi-sio: Add support for RT Systems USB-RTS01 serial adapter
commit: e00a54d772210d450e5c1a801534c3c8a448549f From: Evan McNabb Date: Fri, 25 May 2012 22:46:14 -0400 Subject: USB: ftdi-sio: Add support for RT Systems USB-RTS01 serial adapter Add support for RT Systems USB-RTS01 USB to Serial adapter: http://www.rtsystemsinc.com/Photos/USBRTS01.html Tested by controlling Icom IC-718 amateur radio transceiver via hamlib. Signed-off-by: Evan McNabb Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/ftdi_sio.c |1 + drivers/usb/serial/ftdi_sio_ids.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 8c084ea..bc912e5 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -737,6 +737,7 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) }, { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) }, + { USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_RTS01_PID) }, { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, { USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) }, { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index f3c7c78..5661c7e 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h @@ -784,6 +784,7 @@ #define RTSYSTEMS_VID 0x2100 /* Vendor ID */ #define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */ #define RTSYSTEMS_CT29B_PID0x9e54 /* CT29B Radio Cable */ +#define RTSYSTEMS_RTS01_PID0x9e57 /* USB-RTS01 Radio Cable */ /* -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: qcserial: Add Sierra Wireless device IDs
commit: c41444ccfa33a1c20efa319e554cb531576e64a2 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Thu, 24 May 2012 11:19:04 +0200 Subject: USB: qcserial: Add Sierra Wireless device IDs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some additional IDs found in the BSD/GPL licensed out-of-tree GobiSerial driver from Sierra Wireless. Signed-off-by: Bjørn Mork Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/qcserial.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index 0d5fe59..996015c 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c @@ -105,7 +105,13 @@ static const struct usb_device_id id_table[] = { {USB_DEVICE(0x1410, 0xa021)}, /* Novatel Gobi 3000 Composite */ {USB_DEVICE(0x413c, 0x8193)}, /* Dell Gobi 3000 QDL */ {USB_DEVICE(0x413c, 0x8194)}, /* Dell Gobi 3000 Composite */ + {USB_DEVICE(0x1199, 0x9010)}, /* Sierra Wireless Gobi 3000 QDL */ + {USB_DEVICE(0x1199, 0x9012)}, /* Sierra Wireless Gobi 3000 QDL */ {USB_DEVICE(0x1199, 0x9013)}, /* Sierra Wireless Gobi 3000 Modem device (MC8355) */ + {USB_DEVICE(0x1199, 0x9014)}, /* Sierra Wireless Gobi 3000 QDL */ + {USB_DEVICE(0x1199, 0x9015)}, /* Sierra Wireless Gobi 3000 Modem device */ + {USB_DEVICE(0x1199, 0x9018)}, /* Sierra Wireless Gobi 3000 QDL */ + {USB_DEVICE(0x1199, 0x9019)}, /* Sierra Wireless Gobi 3000 Modem device */ {USB_DEVICE(0x12D1, 0x14F0)}, /* Sony Gobi 3000 QDL */ {USB_DEVICE(0x12D1, 0x14F1)}, /* Sony Gobi 3000 Composite */ { } /* Terminating entry */ -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: option: Add Vodafone/Huawei K5005 support
commit: 4cbbb039a9719fb3bba73d255c6a95bc6dc6428b From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sat, 19 May 2012 19:20:50 +0200 Subject: USB: option: Add Vodafone/Huawei K5005 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tested-by: Thomas Schäfer Signed-off-by: Bjørn Mork Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 1aae902..f3e4a47 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -150,6 +150,7 @@ static void option_instat_callback(struct urb *urb); #define HUAWEI_PRODUCT_E14AC 0x14AC #define HUAWEI_PRODUCT_K3806 0x14AE #define HUAWEI_PRODUCT_K4605 0x14C6 +#define HUAWEI_PRODUCT_K5005 0x14C8 #define HUAWEI_PRODUCT_K3770 0x14C9 #define HUAWEI_PRODUCT_K3771 0x14CA #define HUAWEI_PRODUCT_K4510 0x14CB @@ -666,6 +667,9 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3806, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K4605, 0xff, 0xff, 0xff), .driver_info = (kernel_ulong_t) &huawei_cdc12_blacklist }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x31) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x32) }, + { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K5005, 0xff, 0x01, 0x33) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x31) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3770, 0xff, 0x02, 0x32) }, { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_K3771, 0xff, 0x02, 0x31) }, -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: cdc-wdm: Add Vodafone/Huawei K5005 support
commit: de102ef41f24a4c251c4a3838796bb27557d4d93 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sat, 19 May 2012 19:19:48 +0200 Subject: USB: cdc-wdm: Add Vodafone/Huawei K5005 support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tested-by: Thomas Schäfer Signed-off-by: Bjørn Mork Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/class/cdc-wdm.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index ea8b304..8fd398d 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -55,6 +55,15 @@ static const struct usb_device_id wdm_ids[] = { .bInterfaceSubClass = 1, .bInterfaceProtocol = 9, /* NOTE: CDC ECM control interface! */ }, + { +/* Vodafone/Huawei K5005 (12d1:14c8) and similar modems */ + .match_flags= USB_DEVICE_ID_MATCH_VENDOR | + USB_DEVICE_ID_MATCH_INT_INFO, + .idVendor = HUAWEI_VENDOR_ID, + .bInterfaceClass= USB_CLASS_VENDOR_SPEC, + .bInterfaceSubClass = 1, + .bInterfaceProtocol = 57, /* NOTE: CDC ECM control interface! */ + }, { } }; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: option: add more YUGA device ids
commit: 0ef0be15fd2564767f114c249fc4af704d8e16f4 From: =?UTF-8?q?=E8=AF=B4=E4=B8=8D=E5=BE=97?= Date: Mon, 28 May 2012 21:31:29 +0800 Subject: USB: option: add more YUGA device ids Signed-off-by: gavin zhu Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 44 ++ 1 files changed, 27 insertions(+), 17 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index d12ee2f..e668a24 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -427,7 +427,7 @@ static void option_instat_callback(struct urb *urb); #define SAMSUNG_VENDOR_ID 0x04e8 #define SAMSUNG_PRODUCT_GT_B37300x6889 -/* YUGA products www.yuga-info.com*/ +/* YUGA products www.yuga-info.com gavin...@qq.com */ #define YUGA_VENDOR_ID 0x257A #define YUGA_PRODUCT_CEM6000x1601 #define YUGA_PRODUCT_CEM6100x1602 @@ -444,6 +444,8 @@ static void option_instat_callback(struct urb *urb); #define YUGA_PRODUCT_CEU5160x160C #define YUGA_PRODUCT_CEU5280x160D #define YUGA_PRODUCT_CEU5260x160F +#define YUGA_PRODUCT_CEU8810x161F +#define YUGA_PRODUCT_CEU8820x162F #define YUGA_PRODUCT_CWM6000x2601 #define YUGA_PRODUCT_CWM6100x2602 @@ -459,23 +461,26 @@ static void option_instat_callback(struct urb *urb); #define YUGA_PRODUCT_CWU5180x260B #define YUGA_PRODUCT_CWU5160x260C #define YUGA_PRODUCT_CWU5280x260D +#define YUGA_PRODUCT_CWU5810x260E #define YUGA_PRODUCT_CWU5260x260F - -#define YUGA_PRODUCT_CLM6000x2601 -#define YUGA_PRODUCT_CLM6100x2602 -#define YUGA_PRODUCT_CLM5000x2603 -#define YUGA_PRODUCT_CLM5100x2604 -#define YUGA_PRODUCT_CLM8000x2605 -#define YUGA_PRODUCT_CLM9000x2606 - -#define YUGA_PRODUCT_CLU7180x2607 -#define YUGA_PRODUCT_CLU7160x2608 -#define YUGA_PRODUCT_CLU7280x2609 -#define YUGA_PRODUCT_CLU7260x260A -#define YUGA_PRODUCT_CLU5180x260B -#define YUGA_PRODUCT_CLU5160x260C -#define YUGA_PRODUCT_CLU5280x260D -#define YUGA_PRODUCT_CLU5260x260F +#define YUGA_PRODUCT_CWU5820x261F +#define YUGA_PRODUCT_CWU5830x262F + +#define YUGA_PRODUCT_CLM6000x3601 +#define YUGA_PRODUCT_CLM6100x3602 +#define YUGA_PRODUCT_CLM5000x3603 +#define YUGA_PRODUCT_CLM5100x3604 +#define YUGA_PRODUCT_CLM8000x3605 +#define YUGA_PRODUCT_CLM9000x3606 + +#define YUGA_PRODUCT_CLU7180x3607 +#define YUGA_PRODUCT_CLU7160x3608 +#define YUGA_PRODUCT_CLU7280x3609 +#define YUGA_PRODUCT_CLU7260x360A +#define YUGA_PRODUCT_CLU5180x360B +#define YUGA_PRODUCT_CLU5160x360C +#define YUGA_PRODUCT_CLU5280x360D +#define YUGA_PRODUCT_CLU5260x360F /* Viettel products */ #define VIETTEL_VENDOR_ID 0x2262 @@ -1216,6 +1221,11 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU516) }, { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU528) }, { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CLU526) }, + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU881) }, + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CEU882) }, + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU581) }, + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU582) }, + { USB_DEVICE(YUGA_VENDOR_ID, YUGA_PRODUCT_CWU583) }, { USB_DEVICE_AND_INTERFACE_INFO(VIETTEL_VENDOR_ID, VIETTEL_PRODUCT_VT1000, 0xff, 0xff, 0xff) }, { USB_DEVICE_AND_INTERFACE_INFO(ZD_VENDOR_ID, ZD_PRODUCT_7000, 0xff, 0xff, 0xff) }, { USB_DEVICE(LG_VENDOR_ID, LG_PRODUCT_L02C) }, /* docomo L-02C modem */ -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: target: Return error to initiator if SET TARGET PORT GROUPS emulation fails
commit: 59e4f541baf728dbb426949bfa9f6862387ffd0e From: Roland Dreier Date: Mon, 4 Jun 2012 23:24:51 -0700 Subject: target: Return error to initiator if SET TARGET PORT GROUPS emulation fails The error paths in target_emulate_set_target_port_groups() are all essentially "rc = -EINVAL; goto out;" but the code at "out:" ignores rc and always returns success. This means that even if eg explicit ALUA is turned off, the initiator will always see a good SCSI status for SET TARGET PORT GROUPS. Fix this by returning rc as is intended. It appears this bug was added by the following patch: commit 05d1c7c0d0db4cc25548d9aadebb416888a82327 Author: Andy Grover Date: Wed Jul 20 19:13:28 2011 + target: Make all control CDBs scatter-gather Signed-off-by: Roland Dreier Cc: Andy Grover Cc: Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_alua.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c index e624b83..9179997 100644 --- a/drivers/target/target_core_alua.c +++ b/drivers/target/target_core_alua.c @@ -374,8 +374,9 @@ int target_emulate_set_target_port_groups(struct se_cmd *cmd) out: transport_kunmap_data_sg(cmd); - target_complete_cmd(cmd, GOOD); - return 0; + if (!rc) + target_complete_cmd(cmd, GOOD); + return rc; } static inline int core_alua_state_nonoptimized( -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: mos7840: Fix compilation of usb serial driver
commit: b9c87663eead64c767e72a373ae6f8a94bead459 From: Tony Zelenoff Date: Tue, 5 Jun 2012 17:58:04 +0400 Subject: USB: mos7840: Fix compilation of usb serial driver The __devinitconst section can't be referenced from usb_serial_device structure. Thus removed it as it done in other mos* device drivers. Error itself: WARNING: drivers/usb/serial/mos7840.o(.data+0x8): Section mismatch in reference from the variable moschip7840_4port_device to the variable .devinit.rodata:id_table The variable moschip7840_4port_device references the variable __devinitconst id_table [v2] no attach now Signed-off-by: Tony Zelenoff Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/mos7840.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 29160f8..57eca24 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -190,7 +190,7 @@ static int device_type; -static const struct usb_device_id id_table[] __devinitconst = { +static const struct usb_device_id id_table[] = { {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7840)}, {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7820)}, {USB_DEVICE(USB_VENDOR_ID_MOSCHIP, MOSCHIP_DEVICE_ID_7810)}, -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: option: fix memory leak
commit: b9c3aab315b51f81649a0d737c4c73783fbd8de0 From: Johan Hovold Date: Tue, 29 May 2012 18:22:48 +0200 Subject: USB: option: fix memory leak Fix memory leak introduced by commit 383cedc3bb435de7a2 ("USB: serial: full autosuspend support for the option driver") which allocates usb-serial data but never frees it. Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 9c2f7b2..d12ee2f 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -47,6 +47,7 @@ /* Function prototypes */ static int option_probe(struct usb_serial *serial, const struct usb_device_id *id); +static void option_release(struct usb_serial *serial); static int option_send_setup(struct usb_serial_port *port); static void option_instat_callback(struct urb *urb); @@ -1251,7 +1252,7 @@ static struct usb_serial_driver option_1port_device = { .ioctl = usb_wwan_ioctl, .attach= usb_wwan_startup, .disconnect= usb_wwan_disconnect, - .release = usb_wwan_release, + .release = option_release, .read_int_callback = option_instat_callback, #ifdef CONFIG_PM .suspend = usb_wwan_suspend, @@ -1333,6 +1334,15 @@ static int option_probe(struct usb_serial *serial, return 0; } +static void option_release(struct usb_serial *serial) +{ + struct usb_wwan_intf_private *priv = usb_get_serial_data(serial); + + usb_wwan_release(serial); + + kfree(priv); +} + static void option_instat_callback(struct urb *urb) { int err; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: mct_u232: Fix incorrect TIOCMSET return
commit: 1aa3c63cf0a79153ee13c8f82e4eb6c40b66a161 From: Alan Cox Date: Tue, 22 May 2012 20:45:13 +0100 Subject: USB: mct_u232: Fix incorrect TIOCMSET return The low level helper returns 1 on success. The ioctl should however return 0. As this is the only user of the helper return, make the helper return 0 or an error code. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=43009 Signed-off-by: Alan Cox Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/mct_u232.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index d0ec1aa..a71fa0a 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c @@ -309,13 +309,16 @@ static int mct_u232_set_modem_ctrl(struct usb_serial *serial, MCT_U232_SET_REQUEST_TYPE, 0, 0, buf, MCT_U232_SET_MODEM_CTRL_SIZE, WDR_TIMEOUT); - if (rc < 0) - dev_err(&serial->dev->dev, - "Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc); + kfree(buf); + dbg("set_modem_ctrl: state=0x%x ==> mcr=0x%x", control_state, mcr); - kfree(buf); - return rc; + if (rc < 0) { + dev_err(&serial->dev->dev, + "Set MODEM CTRL 0x%x failed (error = %d)\n", mcr, rc); + return rc; + } + return 0; } /* mct_u232_set_modem_ctrl */ static int mct_u232_get_modem_stat(struct usb_serial *serial, -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: option: fix port-data abuse
commit: 4273f9878b0a8271df055e3c8f2e7f08c6a4a2f4 From: Johan Hovold Date: Tue, 29 May 2012 17:57:52 +0200 Subject: USB: option: fix port-data abuse Commit 8b4c6a3ab596961b78465 ("USB: option: Use generic USB wwan code") moved option port-data allocation to usb_wwan_startup but still cast the port data to the old struct... Cc: stable Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/option.c | 34 +++--- 1 files changed, 3 insertions(+), 31 deletions(-) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index d9cb552..9c2f7b2 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1265,35 +1265,6 @@ static struct usb_serial_driver * const serial_drivers[] = { static bool debug; -/* per port private data */ - -#define N_IN_URB 4 -#define N_OUT_URB 4 -#define IN_BUFLEN 4096 -#define OUT_BUFLEN 4096 - -struct option_port_private { - /* Input endpoints and buffer for this port */ - struct urb *in_urbs[N_IN_URB]; - u8 *in_buffer[N_IN_URB]; - /* Output endpoints and buffer for this port */ - struct urb *out_urbs[N_OUT_URB]; - u8 *out_buffer[N_OUT_URB]; - unsigned long out_busy; /* Bit vector of URBs in use */ - int opened; - struct usb_anchor delayed; - - /* Settings for the port */ - int rts_state; /* Handshaking pins (outputs) */ - int dtr_state; - int cts_state; /* Handshaking pins (inputs) */ - int dsr_state; - int dcd_state; - int ri_state; - - unsigned long tx_start_time[N_OUT_URB]; -}; - module_usb_serial_driver(serial_drivers, option_ids); static bool is_blacklisted(const u8 ifnum, enum option_blacklist_reason reason, @@ -1367,7 +1338,8 @@ static void option_instat_callback(struct urb *urb) int err; int status = urb->status; struct usb_serial_port *port = urb->context; - struct option_port_private *portdata = usb_get_serial_port_data(port); + struct usb_wwan_port_private *portdata = + usb_get_serial_port_data(port); dbg("%s: urb %p port %p has data %p", __func__, urb, port, portdata); @@ -1427,7 +1399,7 @@ static int option_send_setup(struct usb_serial_port *port) struct usb_serial *serial = port->serial; struct usb_wwan_intf_private *intfdata = (struct usb_wwan_intf_private *) serial->private; - struct option_port_private *portdata; + struct usb_wwan_port_private *portdata; int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber; int val = 0; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: xhci: Fix invalid loop check in xhci_free_tt_info()
commit: 46ed8f00d8982e49f8fe2c1a9cea192f640cb3ba From: Takashi Iwai Date: Fri, 1 Jun 2012 10:06:23 +0200 Subject: xhci: Fix invalid loop check in xhci_free_tt_info() xhci_free_tt_info() may access the invalid memory when it removes the last entry but the list is not empty. Then tt_next reaches to the list head but it still tries to check the tt_info of that entry. This patch fixes the bug and cleans up the messy code by rewriting with a simple list_for_each_entry_safe(). This patch should be backported to kernels as old as 3.2, that contain the commit 839c817ce67178ca3c7c7ad534c571bba1e69ebe "xhci: Store information about roothubs and TTs." Signed-off-by: Takashi Iwai Signed-off-by: Sarah Sharp Reviewed-by: Oliver Neukum Cc: --- drivers/usb/host/xhci-mem.c | 39 ++- 1 files changed, 10 insertions(+), 29 deletions(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index ec4338e..898dfc8 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -793,10 +793,9 @@ static void xhci_free_tt_info(struct xhci_hcd *xhci, struct xhci_virt_device *virt_dev, int slot_id) { - struct list_head *tt; struct list_head *tt_list_head; - struct list_head *tt_next; - struct xhci_tt_bw_info *tt_info; + struct xhci_tt_bw_info *tt_info, *next; + bool slot_found = false; /* If the device never made it past the Set Address stage, * it may not have the real_port set correctly. @@ -808,34 +807,16 @@ static void xhci_free_tt_info(struct xhci_hcd *xhci, } tt_list_head = &(xhci->rh_bw[virt_dev->real_port - 1].tts); - if (list_empty(tt_list_head)) - return; - - list_for_each(tt, tt_list_head) { - tt_info = list_entry(tt, struct xhci_tt_bw_info, tt_list); - if (tt_info->slot_id == slot_id) + list_for_each_entry_safe(tt_info, next, tt_list_head, tt_list) { + /* Multi-TT hubs will have more than one entry */ + if (tt_info->slot_id == slot_id) { + slot_found = true; + list_del(&tt_info->tt_list); + kfree(tt_info); + } else if (slot_found) { break; + } } - /* Cautionary measure in case the hub was disconnected before we -* stored the TT information. -*/ - if (tt_info->slot_id != slot_id) - return; - - tt_next = tt->next; - tt_info = list_entry(tt, struct xhci_tt_bw_info, - tt_list); - /* Multi-TT hubs will have more than one entry */ - do { - list_del(tt); - kfree(tt_info); - tt = tt_next; - if (list_empty(tt_list_head)) - break; - tt_next = tt->next; - tt_info = list_entry(tt, struct xhci_tt_bw_info, - tt_list); - } while (tt_info->slot_id == slot_id); } int xhci_alloc_tt_info(struct xhci_hcd *xhci, -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: serial: Enforce USB driver and USB serial driver match
commit: 954c3f8a5f1b7716be9eee978b3bc85bae92d7c8 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Wed, 30 May 2012 10:00:14 +0200 Subject: USB: serial: Enforce USB driver and USB serial driver match MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to make sure that the USB serial driver we find matches the USB driver whose probe we are currently executing. Otherwise we will end up with USB serial devices bound to the correct serial driver but wrong USB driver. An example of such cross-probing, where the usbserial_generic USB driver has found the sierra serial driver: May 29 18:26:15 nemi kernel: [ 4442.559246] usbserial_generic 4-4:1.0: Sierra USB modem converter detected May 29 18:26:20 nemi kernel: [ 4447.556747] usbserial_generic 4-4:1.2: Sierra USB modem converter detected May 29 18:26:25 nemi kernel: [ 4452.557288] usbserial_generic 4-4:1.3: Sierra USB modem converter detected sysfs view of the same problem: bjorn@nemi:~$ ls -l /sys/bus/usb/drivers/sierra/ total 0 --w--- 1 root root 4096 May 29 18:23 bind lrwxrwxrwx 1 root root0 May 29 18:23 module -> ../../../../module/usbserial --w--- 1 root root 4096 May 29 18:23 uevent --w--- 1 root root 4096 May 29 18:23 unbind bjorn@nemi:~$ ls -l /sys/bus/usb-serial/drivers/sierra/ total 0 --w--- 1 root root 4096 May 29 18:23 bind lrwxrwxrwx 1 root root0 May 29 18:23 module -> ../../../../module/sierra -rw-r--r-- 1 root root 4096 May 29 18:23 new_id lrwxrwxrwx 1 root root0 May 29 18:32 ttyUSB0 -> ../../../../devices/pci:00/:00:1d.7/usb4/4-4/4-4:1.0/ttyUSB0 lrwxrwxrwx 1 root root0 May 29 18:32 ttyUSB1 -> ../../../../devices/pci:00/:00:1d.7/usb4/4-4/4-4:1.2/ttyUSB1 lrwxrwxrwx 1 root root0 May 29 18:32 ttyUSB2 -> ../../../../devices/pci:00/:00:1d.7/usb4/4-4/4-4:1.3/ttyUSB2 --w--- 1 root root 4096 May 29 18:23 uevent --w--- 1 root root 4096 May 29 18:23 unbind bjorn@nemi:~$ ls -l /sys/bus/usb/drivers/usbserial_generic/ total 0 lrwxrwxrwx 1 root root0 May 29 18:33 4-4:1.0 -> ../../../../devices/pci:00/:00:1d.7/usb4/4-4/4-4:1.0 lrwxrwxrwx 1 root root0 May 29 18:33 4-4:1.2 -> ../../../../devices/pci:00/:00:1d.7/usb4/4-4/4-4:1.2 lrwxrwxrwx 1 root root0 May 29 18:33 4-4:1.3 -> ../../../../devices/pci:00/:00:1d.7/usb4/4-4/4-4:1.3 --w--- 1 root root 4096 May 29 18:33 bind lrwxrwxrwx 1 root root0 May 29 18:33 module -> ../../../../module/usbserial --w--- 1 root root 4096 May 29 18:22 uevent --w--- 1 root root 4096 May 29 18:33 unbind bjorn@nemi:~$ ls -l /sys/bus/usb-serial/drivers/generic/ total 0 --w--- 1 root root 4096 May 29 18:33 bind lrwxrwxrwx 1 root root0 May 29 18:33 module -> ../../../../module/usbserial -rw-r--r-- 1 root root 4096 May 29 18:33 new_id --w--- 1 root root 4096 May 29 18:22 uevent --w--- 1 root root 4096 May 29 18:33 unbind So we end up with a mismatch between the USB driver and the USB serial driver. The reason for the above is simple: The USB driver probe will succeed if *any* registered serial driver matches, and will use that serial driver for all serial driver functions. This makes ref counting go wrong. We count the USB driver as used, but not the USB serial driver. This may result in Oops'es as demonstrated by Johan Hovold : [11811.646396] drivers/usb/serial/usb-serial.c: get_free_serial 1 [11811.646443] drivers/usb/serial/usb-serial.c: get_free_serial - minor base = 0 [11811.646460] drivers/usb/serial/usb-serial.c: usb_serial_probe - registering ttyUSB0 [11811.646766] usb 6-1: pl2303 converter now attached to ttyUSB0 [11812.264197] USB Serial deregistering driver FTDI USB Serial Device [11812.264865] usbcore: deregistering interface driver ftdi_sio [11812.282180] USB Serial deregistering driver pl2303 [11812.283141] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0 [11812.283272] usbcore: deregistering interface driver pl2303 [11812.301056] USB Serial deregistering driver generic [11812.301186] usbcore: deregistering interface driver usbserial_generic [11812.301259] drivers/usb/serial/usb-serial.c: usb_serial_disconnect [11812.301823] BUG: unable to handle kernel paging request at f8e7438c [11812.301845] IP: [] usb_serial_disconnect+0xb5/0x100 [usbserial] [11812.301871] *pde = 357ef067 *pte = [11812.301957] Oops: [#1] PREEMPT SMP [11812.301983] Modules linked in: usbserial(-) [last unloaded: pl2303] [11812.302008] [11812.302019] Pid: 1323, comm: modprobe Tainted: GW3.4.0-rc7+ #101 Dell Inc. Vostro 1520/0T816J [11812.302115] EIP: 0060:[] EFLAGS: 00010246 CPU: 1 [11812.302130] EIP is at usb_serial_disconnect+0xb5/0x100 [usbserial] [11812.302141] EAX: f508a180 EBX: f508a180 ECX: EDX: f8e74300 [11812.302151] ESI: f5050800 EDI: 0001 EBP: f5141e78 ESP: f5141e58 [11812.302160] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 [11812.302170] CR0: 8005003b CR2: f8e7438c CR3: 34848000 CR4: 07d0 [11812.302
Patch Upstream: USB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2
commit: c2fb8a3fa25513de8fedb38509b1f15a5bbee47b From: Alan Stern Date: Wed, 13 Jun 2012 11:20:19 -0400 Subject: USB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch (as1558) fixes a problem affecting several ASUS computers: The machine crashes or corrupts memory when going into suspend if the ehci-hcd driver is bound to any controllers. Users have been forced to unbind or unload ehci-hcd before putting their systems to sleep. After extensive testing, it was determined that the machines don't like going into suspend when any EHCI controllers are in the PCI D3 power state. Presumably this is a firmware bug, but there's nothing we can do about it except to avoid putting the controllers in D3 during system sleep. The patch adds a new flag to indicate whether the problem is present, and avoids changing the controller's power state if the flag is set. Runtime suspend is unaffected; this matters only for system suspend. However as a side effect, the controller will not respond to remote wakeup requests while the system is asleep. Hence USB wakeup is not functional -- but of course, this is already true in the current state of affairs. A similar patch has already been applied as commit 151b61284776be2d6f02d48c23c3625678960b97 (USB: EHCI: fix crash during suspend on ASUS computers). The patch supersedes that one and reverts it. There are two differences: The old patch added the flag at the USB level; this patch adds it at the PCI level. The old patch applied to all chipsets with the same vendor, subsystem vendor, and product IDs; this patch makes an exception for a known-good system (based on DMI information). Signed-off-by: Alan Stern Tested-by: Dâniel Fraga Tested-by: Andrey Rahmatullin Tested-by: Steven Rostedt Cc: stable Reviewed-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/pci/pci.c |5 + drivers/pci/quirks.c| 26 ++ drivers/usb/core/hcd-pci.c |9 - drivers/usb/host/ehci-pci.c |8 include/linux/pci.h |2 ++ include/linux/usb/hcd.h |2 -- 6 files changed, 33 insertions(+), 19 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 447e834..77cb54a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1744,6 +1744,11 @@ int pci_prepare_to_sleep(struct pci_dev *dev) if (target_state == PCI_POWER_ERROR) return -EIO; + /* Some devices mustn't be in D3 during system sleep */ + if (target_state == PCI_D3hot && + (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP)) + return 0; + pci_enable_wake(dev, target_state, device_may_wakeup(&dev->dev)); error = pci_set_power_state(dev, target_state); diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 2a75216..194b243a 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2929,6 +2929,32 @@ static void __devinit disable_igfx_irq(struct pci_dev *dev) DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq); +/* + * The Intel 6 Series/C200 Series chipset's EHCI controllers on many + * ASUS motherboards will cause memory corruption or a system crash + * if they are in D3 while the system is put into S3 sleep. + */ +static void __devinit asus_ehci_no_d3(struct pci_dev *dev) +{ + const char *sys_info; + static const char good_Asus_board[] = "P8Z68-V"; + + if (dev->dev_flags & PCI_DEV_FLAGS_NO_D3_DURING_SLEEP) + return; + if (dev->subsystem_vendor != PCI_VENDOR_ID_ASUSTEK) + return; + sys_info = dmi_get_system_info(DMI_BOARD_NAME); + if (sys_info && memcmp(sys_info, good_Asus_board, + sizeof(good_Asus_board) - 1) == 0) + return; + + dev_info(&dev->dev, "broken D3 during system sleep on ASUS\n"); + dev->dev_flags |= PCI_DEV_FLAGS_NO_D3_DURING_SLEEP; + device_set_wakeup_capable(&dev->dev, false); +} +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c26, asus_ehci_no_d3); +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x1c2d, asus_ehci_no_d3); + static void pci_do_fixups(struct pci_dev *dev, struct pci_fixup *f, struct pci_fixup *end) { diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 57ed9e4..622b4a4 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -493,15 +493,6 @@ static int hcd_pci_suspend_noirq(struct device *dev) pci_save_state(pci_dev); - /* -* Some systems crash if an EHCI controller is in D3 during -* a sleep transition. We have to leave such controllers in D0. -*/ - if (hcd->broken_pci_sleep) { - dev_dbg(dev, "Stay
Patch Upstream: USB: fix PS3 EHCI systems
commit: 4f7a67e2dd49fbfba002c453bc24bf00e701cc71 From: Ricardo Martins Date: Tue, 22 May 2012 18:02:03 +0100 Subject: USB: fix PS3 EHCI systems After commit aaa0ef289afe9186f81e2340114ea413eef0492a "PS3 EHCI QH read work-around", Terratec Grabby (em28xx) stopped working with AMD Geode LX 800 (USB controller AMD CS5536). Since this is a PS3 only fix, the following patch adds a conditional block around it. Signed-off-by: Ricardo Martins Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-hcd.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index b100f5f..800be38 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -671,7 +671,9 @@ static int ehci_init(struct usb_hcd *hcd) hw = ehci->async->hw; hw->hw_next = QH_NEXT(ehci, ehci->async->qh_dma); hw->hw_info1 = cpu_to_hc32(ehci, QH_HEAD); +#if defined(CONFIG_PPC_PS3) hw->hw_info1 |= cpu_to_hc32(ehci, (1 << 7));/* I = 1 */ +#endif hw->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); hw->hw_qtd_next = EHCI_LIST_END(ehci); ehci->async->qh_state = QH_STATE_LINKED; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: xhci: Don't free endpoints in xhci_mem_cleanup()
commit: 32f1d2c536d0c26c5814cb0e6a0606c42d02fac1 From: Takashi Iwai Date: Fri, 1 Jun 2012 10:06:24 +0200 Subject: xhci: Don't free endpoints in xhci_mem_cleanup() This patch fixes a few issues introduced in the recent fix [f8a9e72d: USB: fix resource leak in xhci power loss path] - The endpoints listed in bw table are just links and each entry is an array member of dev->eps[]. But the commit above adds a kfree() call to these instances, and thus it results in memory corruption. - It clears only the first entry of rh_bw[], but there can be multiple ports. - It'd be safer to clear the list_head of ep as well, not only removing from the list, as it's checked in xhci_discover_or_reset_device(). This patch should be backported to kernels as old as 3.2, that contain the commit 839c817ce67178ca3c7c7ad534c571bba1e69ebe "xhci: Store information about roothubs and TTs." Signed-off-by: Takashi Iwai Signed-off-by: Sarah Sharp Reviewed-by: Oliver Neukum Cc: --- drivers/usb/host/xhci-mem.c | 35 ++- 1 files changed, 14 insertions(+), 21 deletions(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 898dfc8..77689bd 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -1772,17 +1772,9 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) { struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); struct dev_info *dev_info, *next; - struct list_head *tt_list_head; - struct list_head *tt; - struct list_head *endpoints; - struct list_head *ep, *q; - struct xhci_tt_bw_info *tt_info; - struct xhci_interval_bw_table *bwt; - struct xhci_virt_ep *virt_ep; - unsigned long flags; int size; - int i; + int i, j, num_ports; /* Free the Event Ring Segment Table and the actual Event Ring */ size = sizeof(struct xhci_erst_entry)*(xhci->erst.num_entries); @@ -1841,21 +1833,22 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci) } spin_unlock_irqrestore(&xhci->lock, flags); - bwt = &xhci->rh_bw->bw_table; - for (i = 0; i < XHCI_MAX_INTERVAL; i++) { - endpoints = &bwt->interval_bw[i].endpoints; - list_for_each_safe(ep, q, endpoints) { - virt_ep = list_entry(ep, struct xhci_virt_ep, bw_endpoint_list); - list_del(&virt_ep->bw_endpoint_list); - kfree(virt_ep); + num_ports = HCS_MAX_PORTS(xhci->hcs_params1); + for (i = 0; i < num_ports; i++) { + struct xhci_interval_bw_table *bwt = &xhci->rh_bw[i].bw_table; + for (j = 0; j < XHCI_MAX_INTERVAL; j++) { + struct list_head *ep = &bwt->interval_bw[j].endpoints; + while (!list_empty(ep)) + list_del_init(ep->next); } } - tt_list_head = &xhci->rh_bw->tts; - list_for_each_safe(tt, q, tt_list_head) { - tt_info = list_entry(tt, struct xhci_tt_bw_info, tt_list); - list_del(tt); - kfree(tt_info); + for (i = 0; i < num_ports; i++) { + struct xhci_tt_bw_info *tt, *n; + list_for_each_entry_safe(tt, n, &xhci->rh_bw[i].tts, tt_list) { + list_del(&tt->tt_list); + kfree(tt); + } } xhci->num_usb2_ports = 0; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: xHCI: Increase the timeout for controller save/restore state operation
commit: 622eb783fe6ff4c1baa47db16c3a5db97f9e6e50 From: Andiry Xu Date: Wed, 13 Jun 2012 10:51:57 +0800 Subject: xHCI: Increase the timeout for controller save/restore state operation When system software decides to power down the xHC with the intent of resuming operation at a later time, it will ask xHC to save the internal state and restore it when resume to correctly recover from a power event. Two bits are used to enable this operation: Save State and Restore State. xHCI spec 4.23.2 says software should "Set the Controller Save/Restore State flag in the USBCMD register and wait for the Save/Restore State Status flag in the USBSTS register to transition to '0'". However, it does not define how long software should wait for the SSS/RSS bit to transition to 0. Currently the timeout is set to 1ms. There is bug report (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1002697) indicates that the timeout is too short for ASMedia ASM1042 host controller to save/restore the state successfully. Increase the timeout to 10ms helps to resolve the issue. This patch should be backported to stable kernels as old as 2.6.37, that contain the commit 5535b1d5f8885695c6ded783c692e3c0d0eda8ca "USB: xHCI: PCI power management implementation" Signed-off-by: Andiry Xu Signed-off-by: Sarah Sharp Cc: Ming Lei Cc: stable@vger.kernel.org --- drivers/usb/host/xhci.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index 1d4958f..a979cd0 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c @@ -795,8 +795,8 @@ int xhci_suspend(struct xhci_hcd *xhci) command = xhci_readl(xhci, &xhci->op_regs->command); command |= CMD_CSS; xhci_writel(xhci, command, &xhci->op_regs->command); - if (handshake(xhci, &xhci->op_regs->status, STS_SAVE, 0, 10*100)) { - xhci_warn(xhci, "WARN: xHC CMD_CSS timeout\n"); + if (handshake(xhci, &xhci->op_regs->status, STS_SAVE, 0, 10 * 1000)) { + xhci_warn(xhci, "WARN: xHC save state timeout\n"); spin_unlock_irq(&xhci->lock); return -ETIMEDOUT; } @@ -848,8 +848,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated) command |= CMD_CRS; xhci_writel(xhci, command, &xhci->op_regs->command); if (handshake(xhci, &xhci->op_regs->status, - STS_RESTORE, 0, 10*100)) { - xhci_dbg(xhci, "WARN: xHC CMD_CSS timeout\n"); + STS_RESTORE, 0, 10 * 1000)) { + xhci_warn(xhci, "WARN: xHC restore state timeout\n"); spin_unlock_irq(&xhci->lock); return -ETIMEDOUT; } -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: usb-storage: Add 090c:1000 to unusal-devs
commit: afff07e61a5243e14ee3f0a272a0380cd744a8a3 From: Hans de Goede Date: Wed, 13 Jun 2012 11:44:58 +0200 Subject: usb-storage: Add 090c:1000 to unusal-devs This device gives a bogus answer to get_capacity(16): [ 8628.278614] scsi 8:0:0:0: Direct-Access USB 2.0 USB Flash Drive 1100 PQ: 0 ANSI: 4 [ 8628.279452] sd 8:0:0:0: Attached scsi generic sg4 type 0 [ 8628.280338] sd 8:0:0:0: [sdd] 35747322042253313 512-byte logical blocks: (18.3 EB/15.8 EiB) So set the quirk flag to avoid using get_capacity(16) with it: [11731.386014] usb-storage 2-1.6:1.0: Quirks match for vid 090c pid 1000: 8 [11731.386075] scsi9 : usb-storage 2-1.6:1.0 [11731.386172] usbcore: registered new interface driver usb-storage [11731.386175] USB Mass Storage support registered. [11732.387394] scsi 9:0:0:0: Direct-Access USB 2.0 USB Flash Drive 1100 PQ: 0 ANSI: 4 [11732.388462] sd 9:0:0:0: Attached scsi generic sg3 type 0 [11732.389432] sd 9:0:0:0: [sdc] 7975296 512-byte logical blocks: (4.08 GB/3.80 GiB) Which makes the capacity look a lot more sane :) Signed-off-by: Hans de Goede Tested-by: Simon Raffeiner Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/unusual_devs.h |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 1719886..caf22bf 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h @@ -1107,6 +1107,13 @@ UNUSUAL_DEV( 0x090a, 0x1200, 0x, 0x, USB_SC_RBC, USB_PR_BULK, NULL, 0 ), +/* Feiya QDI U2 DISK, reported by Hans de Goede */ +UNUSUAL_DEV( 0x090c, 0x1000, 0x, 0x, + "Feiya", + "QDI U2 DISK", + USB_SC_DEVICE, USB_PR_DEVICE, NULL, + US_FL_NO_READ_CAPACITY_16 ), + /* aeb */ UNUSUAL_DEV( 0x090c, 0x1132, 0x, 0x, "Feiya", -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: usb: cdc-acm: fix devices not unthrottled on open
commit: 6c4707f3f8c44ec18282e1c014c80e1c257042f9 From: Otto Meta Date: Wed, 6 Jun 2012 18:46:21 +0200 Subject: usb: cdc-acm: fix devices not unthrottled on open Currently CDC-ACM devices stay throttled when their TTY is closed while throttled, stalling further communication attempts after the next open. Unthrottling during open/activate got lost starting with kernel 3.0.0 and this patch reintroduces it. Signed-off-by: Otto Meta Cc: stable Acked-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/class/cdc-acm.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index f2a120e..36a2a0b 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -567,6 +567,14 @@ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty) usb_autopm_put_interface(acm->control); + /* +* Unthrottle device in case the TTY was closed while throttled. +*/ + spin_lock_irq(&acm->read_lock); + acm->throttled = 0; + acm->throttle_req = 0; + spin_unlock_irq(&acm->read_lock); + if (acm_submit_read_urbs(acm, GFP_KERNEL)) goto error_submit_read_urbs; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels
commit: bc2df47a408f2d64cf81bcfd0f6e3e14c84cb0ab From: J. Bruce Fields Date: Tue, 12 Jun 2012 08:28:48 -0400 Subject: nfsd4: BUG_ON(!is_spin_locked()) no good on UP kernels Most frequent symptom was a BUG triggering in expire_client, with the server locking up shortly thereafter. Introduced by 508dc6e110c6dbdc0bbe84298ccfe22de7538486 "nfsd41: free_session/free_client must be called under the client_lock". Cc: sta...@kernel.org Cc: Benny Halevy Signed-off-by: J. Bruce Fields --- fs/nfsd/nfs4state.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 8fdc9ec..94effd5 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -900,7 +900,7 @@ static void free_session(struct kref *kref) struct nfsd4_session *ses; int mem; - BUG_ON(!spin_is_locked(&client_lock)); + lockdep_assert_held(&client_lock); ses = container_of(kref, struct nfsd4_session, se_ref); nfsd4_del_conns(ses); spin_lock(&nfsd_drc_lock); @@ -1080,7 +1080,7 @@ static struct nfs4_client *alloc_client(struct xdr_netobj name) static inline void free_client(struct nfs4_client *clp) { - BUG_ON(!spin_is_locked(&client_lock)); + lockdep_assert_held(&client_lock); while (!list_empty(&clp->cl_sessions)) { struct nfsd4_session *ses; ses = list_entry(clp->cl_sessions.next, struct nfsd4_session, -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: Make hard_irq_disable() actually hard-disable interrupts
commit: f948501b36c6b3d9352ce212a197098a7e958971 From: Paul Mackerras Date: Fri, 15 Jun 2012 14:51:39 +1000 Subject: Make hard_irq_disable() actually hard-disable interrupts At present, hard_irq_disable() does nothing on powerpc because of this code in include/linux/interrupt.h: #ifndef hard_irq_disable #define hard_irq_disable() do { } while(0) #endif So we need to make our hard_irq_disable be a macro. It was previously a macro until commit 7230c56441 ("powerpc: Rework lazy-interrupt handling") changed it to a static inline function. Cc: stable@vger.kernel.org Acked-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras -- arch/powerpc/include/asm/hw_irq.h |3 +++ 1 file changed, 3 insertions(+) --- arch/powerpc/include/asm/hw_irq.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index c9aac24..32b394f 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h @@ -100,6 +100,9 @@ static inline void hard_irq_disable(void) get_paca()->irq_happened |= PACA_IRQ_HARD_DIS; } +/* include/linux/interrupt.h needs hard_irq_disable to be a macro */ +#define hard_irq_disable hard_irq_disable + /* * This is called by asynchronous interrupts to conditionally * re-enable hard interrupts when soft-disabled after having -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Patch Upstream: USB: fix gathering of interface associations
commit: b3a3dd074f7053ef824ad077e5331b52220ceba1 From: Daniel Mack Date: Tue, 12 Jun 2012 20:23:52 +0200 Subject: USB: fix gathering of interface associations TEAC's UD-H01 (and probably other devices) have a gap in the interface number allocation of their descriptors: Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 220 bNumInterfaces 3 [...] Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 [...] Interface Association: bLength 8 bDescriptorType11 bFirstInterface 2 bInterfaceCount 2 bFunctionClass 1 Audio bFunctionSubClass 0 bFunctionProtocol 32 iFunction 4 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber2 bAlternateSetting 0 [...] Once a configuration is selected, usb_set_configuration() walks the known interfaces of a given configuration and calls find_iad() on each of them to set the interface association pointer the interface is included in. The problem here is that the loop variable is taken for the interface number in the comparison logic that gathers the association. Which is fine as long as the descriptors are sane. In the case above, however, the logic gets out of sync and the interface association fields of all interfaces beyond the interface number gap are wrong. Fix this by passing the interface's bInterfaceNumber to find_iad() instead. Signed-off-by: Daniel Mack Reported-by: bEN Reported-by: Ivan Perrone Tested-by: ivan perrone Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/message.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index b548cf1..bdd1c67 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -1838,7 +1838,6 @@ free_interfaces: intfc = cp->intf_cache[i]; intf->altsetting = intfc->altsetting; intf->num_altsetting = intfc->num_altsetting; - intf->intf_assoc = find_iad(dev, cp, i); kref_get(&intfc->ref); alt = usb_altnum_to_altsetting(intf, 0); @@ -1851,6 +1850,8 @@ free_interfaces: if (!alt) alt = &intf->altsetting[0]; + intf->intf_assoc = + find_iad(dev, cp, alt->desc.bInterfaceNumber); intf->cur_altsetting = alt; usb_enable_interface(dev, intf, true); intf->dev.parent = &dev->dev; -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] driver core: fix shutdown races with probe/remove(v2)
On Mon, Jun 11, 2012 at 01:13:20PM +0800, Ming Lei wrote: > Firstly, .shutdown callback may touch a uninitialized hardware > if dev->driver is set and .probe is not completed. > > Secondly, device_shutdown() may dereference a null pointer to cause > oops when dev->driver is cleared after it is checked in > device_shutdown(). > > So just try to hold device lock and its parent lock(if it has) to > fix the races. > > Cc: Alan Stern > Cc: stable@vger.kernel.org Why stable? Are there known systems that crash right now without this change? I don't think we ever heard back from the original poster about this issue as to what exactly was going wrong. > Signed-off-by: Ming Lei > --- > v2: > - take Alan's suggestion to use device_trylock to avoid > hanging during shutdown by buggy device or driver > - hold parent reference counter > > drivers/base/core.c | 32 > 1 file changed, 32 insertions(+) > > diff --git a/drivers/base/core.c b/drivers/base/core.c > index 346be8b..f2fc989 100644 > --- a/drivers/base/core.c > +++ b/drivers/base/core.c > @@ -1796,6 +1796,16 @@ out: > } > EXPORT_SYMBOL_GPL(device_move); > > +static int __try_lock(struct device *dev) > +{ > + int i = 0; > + > + while (!device_trylock(dev) && i++ < 100) > + msleep(10); > + > + return i < 100; > +} That's a totally arbritary time, why does this work and other times do not? And what is this returning, if the lock was grabbed successfully? What's with the __ naming? I really don't like this at all. > + > /** > * device_shutdown - call ->shutdown() on each device to shutdown. > */ > @@ -1810,8 +1820,11 @@ void device_shutdown(void) >* devices offline, even as the system is shutting down. >*/ > while (!list_empty(&devices_kset->list)) { > + int nonlocked; > + > dev = list_entry(devices_kset->list.prev, struct device, > kobj.entry); > + get_device(dev->parent); Why grab the parent reference? > get_device(dev); > /* >* Make sure the device is off the kset list, in the > @@ -1820,6 +1833,18 @@ void device_shutdown(void) > list_del_init(&dev->kobj.entry); > spin_unlock(&devices_kset->list_lock); > > + /* hold lock to avoid race with .probe/.release */ > + if (dev->parent && !__try_lock(dev->parent)) > + nonlocked = 2; > + else if (!__try_lock(dev)) > + nonlocked = 1; > + else > + nonlocked = 0; Ick ick ick. Why can't we just grab the lock to try to only call these callbacks one at a time? What is causing the big problem here that I am missing? > + > + if (nonlocked) > + dev_err(dev, "can't hold %slock for shutdown\n", > + nonlocked == 1 ? "" : "parent "); What can anyone do with this message? I sure wouldn't know what to do with it, do you? If so, what? greg k-h -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
patch "staging: r8712u: Add new USB IDs" added to staging tree
This is a note to let you know that I've just added the patch titled staging: r8712u: Add new USB IDs to my staging git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git in the staging-linus branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will hopefully also be merged in Linus's tree for the next -rc kernel release. If you have any questions about this process, please let me know. >From 3026b0e942c65c65c8fc80d391d004228b52b916 Mon Sep 17 00:00:00 2001 From: Lubomir Schmidt Date: Fri, 15 Jun 2012 15:12:17 -0500 Subject: staging: r8712u: Add new USB IDs There are two new devices for this driver. Signed-off-by: Larry Finger Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8712/usb_intf.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 9bd18e2..69f616c 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -102,6 +102,8 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = { /* - */ {USB_DEVICE(0x20F4, 0x646B)}, {USB_DEVICE(0x083A, 0xC512)}, + {USB_DEVICE(0x25D4, 0x4CA1)}, + {USB_DEVICE(0x25D4, 0x4CAB)}, /* RTL8191SU */ /* Realtek */ -- 1.7.10.1.362.g242cab3 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] staging: r8712u: Add new USB IDs
From: Lubomir Schmidt There are two new devices for this driver. Signed-off-by: Larry Finger Cc: Stable --- drivers/staging/rtl8712/usb_intf.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl8712/usb_intf.c index 9bd18e2..69f616c 100644 --- a/drivers/staging/rtl8712/usb_intf.c +++ b/drivers/staging/rtl8712/usb_intf.c @@ -102,6 +102,8 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = { /* - */ {USB_DEVICE(0x20F4, 0x646B)}, {USB_DEVICE(0x083A, 0xC512)}, + {USB_DEVICE(0x25D4, 0x4CA1)}, + {USB_DEVICE(0x25D4, 0x4CAB)}, /* RTL8191SU */ /* Realtek */ -- 1.7.10.130.g36e6c -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH -stable] ntp: Correct TAI offset during leap second
On 06/15/2012 11:56 AM, John Stultz wrote: Hey Greg, Forgot to cc stable on this one. Thanks to Dave Jones for noticing! -john Gah. Thunderbird's preformat wrecked that one. Sorry. Here it is again. -john -- From: Richard Cochran commit dd48d708ff3e917f6d6b6c2b696c3f18c019feed upstream. When repeating a UTC time value during a leap second (when the UTC time should be 23:59:60), the TAI timescale should not stop. The kernel NTP code increments the TAI offset one second too late. This patch fixes the issue by incrementing the offset during the leap second itself. Signed-off-by: Richard Cochran Signed-off-by: John Stultz --- kernel/time/ntp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index f03fd83..e8c8671 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -412,6 +412,7 @@ int second_overflow(unsigned long secs) if (secs % 86400 == 0) { leap = -1; time_state = TIME_OOP; + time_tai++; printk(KERN_NOTICE "Clock: inserting leap second 23:59:60 UTC\n"); } @@ -426,7 +427,6 @@ int second_overflow(unsigned long secs) } break; case TIME_OOP: - time_tai++; time_state = TIME_WAIT; break; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH -stable] ntp: Correct TAI offset during leap second
Hey Greg, Forgot to cc stable on this one. Thanks to Dave Jones for noticing! -john -- From: Richard Cochran commit dd48d708ff3e917f6d6b6c2b696c3f18c019feed upstream. When repeating a UTC time value during a leap second (when the UTC time should be 23:59:60), the TAI timescale should not stop. The kernel NTP code increments the TAI offset one second too late. This patch fixes the issue by incrementing the offset during the leap second itself. Signed-off-by: Richard Cochran Signed-off-by: John Stultz --- kernel/time/ntp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c index f03fd83..e8c8671 100644 --- a/kernel/time/ntp.c +++ b/kernel/time/ntp.c @@ -412,6 +412,7 @@ int second_overflow(unsigned long secs) if (secs % 86400 == 0) { leap = -1; time_state = TIME_OOP; + time_tai++; printk(KERN_NOTICE "Clock: inserting leap second 23:59:60 UTC\n"); } @@ -426,7 +427,6 @@ int second_overflow(unsigned long secs) } break; case TIME_OOP: - time_tai++; time_state = TIME_WAIT; break; -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Fix the relax_domain_level boot parameter
* Dimitri Sivanich wrote: > On Thu, Jun 14, 2012 at 08:49:35AM -0700, Greg KH wrote: > > On Thu, Jun 14, 2012 at 07:55:07AM -0500, Dimitri Sivanich wrote: > > > Could commit a841f8cef4bb124f0f5563314d0beaf2e1249d72 be added to the > > > stable tree? > > > > For which stable tree? > > 3.0 and 3.4, sorry about that. > > > > > > http://git2.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=a841f8cef4bb124f0f5563314d0beaf2e1249d72 > > > > Any reason you didn't cc: the other people who signed-off that patch? > Laziness :) Cc:-ing maintainers is especially useful to do in such cases, when the commit went upstream without a -stable tag. I have no objection to this backport. Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ACPI, cpuidle: Fix suspend/resume regression caused by cpuidle cleanup.
Apologies for the confusion. Please add the Cc: stable tag for this patch as this regression affects older kernels too. Link to the patch : http://permalink.gmane.org/gmane.linux.power-management.general/27614 Thanks ! Deepthi On 06/15/2012 05:46 PM, Deepthi Dharwar wrote: > Please include this in -stable tree, as this is a regression fix which > affects older kernels ( 3.1 onwards ) > Link to the patch : > http://permalink.gmane.org/gmane.linux.power-management.general/27614 > > Thanks ! > Deepthi > > On 06/14/2012 01:31 AM, Rafael J. Wysocki wrote: > >> On Wednesday, June 13, 2012, Deepthi Dharwar wrote: >>> >>> From: Deepthi Dharwar >>> >>> Fix suspend/resume regression caused by cpuidle cleanup. >>> >>> Commit e978aa7d7d57d04eb5f88a7507c4fb98577def77 ( cpuidle: Move >>> dev->last_residency update to driver enter routine; remove dev->last_state) >>> was breaking suspend on laptops, as reported in the below link >>> - https://lkml.org/lkml/2011/11/11/164 >>> >>> This was fixed in commit 3439a8da16bcad6b0982ece938c9f8299bb53584 >>> (ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression) >>> by removing acpi_idle_suspend flag. >>> - https://lkml.org/lkml/2011/11/14/74 >>> >>> But this fix did not work on all systems >>> as Suspend/resume regression was reported on Lenovo S10-3 >>> recently by Dave. >>> - https://lkml.org/lkml/2012/5/27/115 >>> It looked like with commit e978aa7d broke suspend and >>> with commit 3439a8da resume was not working with acpi_idle driver. >>> >>> This patch fixes the regression that caused this issue >>> in the first place. acpi_idle_suspend flag is essential on >>> some x86 systems to prevent the cpus from going to deeper C-states >>> when suspend is triggered ( commit b04e7bdb984 ) >>> So reverting the commit 3439a8da is essential. >>> >>> By default, irqs are disabled in cpu_idle arch specific call >>> and re-enabled in idle state return path . As the acpi_idle_suspend >>> flag was being set during suspend, which prevented the cpus >>> going to deeper idle states, it is essential to >>> enabling the irqs in its return path too. >>> >>> To address the suspend issue, >>> we were not re-enabling the interrupts while returning from >>> acpi_idle_enter_bm() routine if acpi_idle_suspend flag is set. >>> and this was causing suspend failure. >>> >>> In addition to the above fix, a sanity check has also been added >>> in x86 arch specific cpu_idle call to ensure that the idle call >>> always returns with IRQs enabled. >>> >>> This patch applies on 3.5-rc2 >>> --- >>> >>> Reported-and-Tested-by: Dav Hansen >>> Tested-by: Preeti Murthy >>> Signed-off-by: Deepthi Dharwar >>> Reviewed-by: Srivatsa S Bhat >> >> Acked-by: Rafael J. Wysocki >> >>> --- >>> arch/x86/kernel/process.c |6 ++ >>> drivers/acpi/processor_idle.c | 28 >>> 2 files changed, 34 insertions(+), 0 deletions(-) >>> >>> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c >>> index 735279e..8ab76ad 100644 >>> --- a/arch/x86/kernel/process.c >>> +++ b/arch/x86/kernel/process.c >>> @@ -460,6 +460,12 @@ void cpu_idle(void) >>> pm_idle(); >>> >>> rcu_idle_exit(); >>> + >>> + /* >>> +* Sanity check to ensure that idle call returns >>> +* with IRQs enabled >>> +*/ >>> + WARN_ON(irqs_disabled()); >>> start_critical_timings(); >>> >>> /* In many cases the interrupt that ended idle >>> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c >>> index f3decb3..c2ffd84 100644 >>> --- a/drivers/acpi/processor_idle.c >>> +++ b/drivers/acpi/processor_idle.c >>> @@ -224,6 +224,7 @@ static void lapic_timer_state_broadcast(struct >>> acpi_processor *pr, >>> /* >>> * Suspend / resume control >>> */ >>> +static int acpi_idle_suspend; >>> static u32 saved_bm_rld; >>> >>> static void acpi_idle_bm_rld_save(void) >>> @@ -242,13 +243,21 @@ static void acpi_idle_bm_rld_restore(void) >>> >>> int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) >>> { >>> + if (acpi_idle_suspend == 1) >>> + return 0; >>> + >>> acpi_idle_bm_rld_save(); >>> + acpi_idle_suspend = 1; >>> return 0; >>> } >>> >>> int acpi_processor_resume(struct acpi_device * device) >>> { >>> + if (acpi_idle_suspend == 0) >>> + return 0; >>> + >>> acpi_idle_bm_rld_restore(); >>> + acpi_idle_suspend = 0; >>> return 0; >>> } >>> >>> @@ -754,6 +763,12 @@ static int acpi_idle_enter_c1(struct cpuidle_device >>> *dev, >>> >>> local_irq_disable(); >>> >>> + if (acpi_idle_suspend) { >>> + local_irq_enable(); >>> + cpu_relax(); >>> + return -EINVAL; >>> + } >>> + >>> lapic_timer_state_broadcast(pr, cx, 1); >>> kt1 = ktime_get_real(); >>> acpi_idle_do_entry(cx); >>> @
Re: [PATCH] ACPI, cpuidle: Fix suspend/resume regression caused by cpuidle cleanup.
Apologies for the confusion. Please add the Cc: stable tag for this patch as this regression affects older kernels too. Link to the patch : http://permalink.gmane.org/gmane.linux.power-management.general/27614 Thanks ! Deepthi On 06/15/2012 05:46 PM, Deepthi Dharwar wrote: > Please include this in -stable tree, as this is a regression fix which > affects older kernels ( 3.1 onwards ) Sorry for the typo. :( > Link to the patch : > http://permalink.gmane.org/gmane.linux.power-management.general/27614 > > Thanks ! > Deepthi > > On 06/14/2012 01:31 AM, Rafael J. Wysocki wrote: > >> On Wednesday, June 13, 2012, Deepthi Dharwar wrote: >>> >>> From: Deepthi Dharwar >>> >>> Fix suspend/resume regression caused by cpuidle cleanup. >>> >>> Commit e978aa7d7d57d04eb5f88a7507c4fb98577def77 ( cpuidle: Move >>> dev->last_residency update to driver enter routine; remove dev->last_state) >>> was breaking suspend on laptops, as reported in the below link >>> - https://lkml.org/lkml/2011/11/11/164 >>> >>> This was fixed in commit 3439a8da16bcad6b0982ece938c9f8299bb53584 >>> (ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression) >>> by removing acpi_idle_suspend flag. >>> - https://lkml.org/lkml/2011/11/14/74 >>> >>> But this fix did not work on all systems >>> as Suspend/resume regression was reported on Lenovo S10-3 >>> recently by Dave. >>> - https://lkml.org/lkml/2012/5/27/115 >>> It looked like with commit e978aa7d broke suspend and >>> with commit 3439a8da resume was not working with acpi_idle driver. >>> >>> This patch fixes the regression that caused this issue >>> in the first place. acpi_idle_suspend flag is essential on >>> some x86 systems to prevent the cpus from going to deeper C-states >>> when suspend is triggered ( commit b04e7bdb984 ) >>> So reverting the commit 3439a8da is essential. >>> >>> By default, irqs are disabled in cpu_idle arch specific call >>> and re-enabled in idle state return path . As the acpi_idle_suspend >>> flag was being set during suspend, which prevented the cpus >>> going to deeper idle states, it is essential to >>> enabling the irqs in its return path too. >>> >>> To address the suspend issue, >>> we were not re-enabling the interrupts while returning from >>> acpi_idle_enter_bm() routine if acpi_idle_suspend flag is set. >>> and this was causing suspend failure. >>> >>> In addition to the above fix, a sanity check has also been added >>> in x86 arch specific cpu_idle call to ensure that the idle call >>> always returns with IRQs enabled. >>> >>> This patch applies on 3.5-rc2 >>> --- >>> >>> Reported-and-Tested-by: Dav Hansen >>> Tested-by: Preeti Murthy >>> Signed-off-by: Deepthi Dharwar >>> Reviewed-by: Srivatsa S Bhat >> >> Acked-by: Rafael J. Wysocki >> >>> --- >>> arch/x86/kernel/process.c |6 ++ >>> drivers/acpi/processor_idle.c | 28 >>> 2 files changed, 34 insertions(+), 0 deletions(-) >>> >>> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c >>> index 735279e..8ab76ad 100644 >>> --- a/arch/x86/kernel/process.c >>> +++ b/arch/x86/kernel/process.c >>> @@ -460,6 +460,12 @@ void cpu_idle(void) >>> pm_idle(); >>> >>> rcu_idle_exit(); >>> + >>> + /* >>> +* Sanity check to ensure that idle call returns >>> +* with IRQs enabled >>> +*/ >>> + WARN_ON(irqs_disabled()); >>> start_critical_timings(); >>> >>> /* In many cases the interrupt that ended idle >>> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c >>> index f3decb3..c2ffd84 100644 >>> --- a/drivers/acpi/processor_idle.c >>> +++ b/drivers/acpi/processor_idle.c >>> @@ -224,6 +224,7 @@ static void lapic_timer_state_broadcast(struct >>> acpi_processor *pr, >>> /* >>> * Suspend / resume control >>> */ >>> +static int acpi_idle_suspend; >>> static u32 saved_bm_rld; >>> >>> static void acpi_idle_bm_rld_save(void) >>> @@ -242,13 +243,21 @@ static void acpi_idle_bm_rld_restore(void) >>> >>> int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) >>> { >>> + if (acpi_idle_suspend == 1) >>> + return 0; >>> + >>> acpi_idle_bm_rld_save(); >>> + acpi_idle_suspend = 1; >>> return 0; >>> } >>> >>> int acpi_processor_resume(struct acpi_device * device) >>> { >>> + if (acpi_idle_suspend == 0) >>> + return 0; >>> + >>> acpi_idle_bm_rld_restore(); >>> + acpi_idle_suspend = 0; >>> return 0; >>> } >>> >>> @@ -754,6 +763,12 @@ static int acpi_idle_enter_c1(struct cpuidle_device >>> *dev, >>> >>> local_irq_disable(); >>> >>> + if (acpi_idle_suspend) { >>> + local_irq_enable(); >>> + cpu_relax(); >>> + return -EINVAL; >>> + } >>> + >>> lapic_timer_state_broadcast(pr, cx, 1); >>> kt1 = ktime_get_real(); >>> a
Re: [PATCH] ACPI, cpuidle: Fix suspend/resume regression caused by cpuidle cleanup.
Please include this in -stable tree, as this is a regression fix which affects older kernels ( 3.1 onwards ) Link to the patch : http://permalink.gmane.org/gmane.linux.power-management.general/27614 Thanks ! Deepthi On 06/14/2012 01:31 AM, Rafael J. Wysocki wrote: > On Wednesday, June 13, 2012, Deepthi Dharwar wrote: >> >> From: Deepthi Dharwar >> >> Fix suspend/resume regression caused by cpuidle cleanup. >> >> Commit e978aa7d7d57d04eb5f88a7507c4fb98577def77 ( cpuidle: Move >> dev->last_residency update to driver enter routine; remove dev->last_state) >> was breaking suspend on laptops, as reported in the below link >> - https://lkml.org/lkml/2011/11/11/164 >> >> This was fixed in commit 3439a8da16bcad6b0982ece938c9f8299bb53584 >> (ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression) >> by removing acpi_idle_suspend flag. >> - https://lkml.org/lkml/2011/11/14/74 >> >> But this fix did not work on all systems >> as Suspend/resume regression was reported on Lenovo S10-3 >> recently by Dave. >> - https://lkml.org/lkml/2012/5/27/115 >> It looked like with commit e978aa7d broke suspend and >> with commit 3439a8da resume was not working with acpi_idle driver. >> >> This patch fixes the regression that caused this issue >> in the first place. acpi_idle_suspend flag is essential on >> some x86 systems to prevent the cpus from going to deeper C-states >> when suspend is triggered ( commit b04e7bdb984 ) >> So reverting the commit 3439a8da is essential. >> >> By default, irqs are disabled in cpu_idle arch specific call >> and re-enabled in idle state return path . As the acpi_idle_suspend >> flag was being set during suspend, which prevented the cpus >> going to deeper idle states, it is essential to >> enabling the irqs in its return path too. >> >> To address the suspend issue, >> we were not re-enabling the interrupts while returning from >> acpi_idle_enter_bm() routine if acpi_idle_suspend flag is set. >> and this was causing suspend failure. >> >> In addition to the above fix, a sanity check has also been added >> in x86 arch specific cpu_idle call to ensure that the idle call >> always returns with IRQs enabled. >> >> This patch applies on 3.5-rc2 >> --- >> >> Reported-and-Tested-by: Dav Hansen >> Tested-by: Preeti Murthy >> Signed-off-by: Deepthi Dharwar >> Reviewed-by: Srivatsa S Bhat > > Acked-by: Rafael J. Wysocki > >> --- >> arch/x86/kernel/process.c |6 ++ >> drivers/acpi/processor_idle.c | 28 >> 2 files changed, 34 insertions(+), 0 deletions(-) >> >> diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c >> index 735279e..8ab76ad 100644 >> --- a/arch/x86/kernel/process.c >> +++ b/arch/x86/kernel/process.c >> @@ -460,6 +460,12 @@ void cpu_idle(void) >> pm_idle(); >> >> rcu_idle_exit(); >> + >> +/* >> + * Sanity check to ensure that idle call returns >> + * with IRQs enabled >> + */ >> +WARN_ON(irqs_disabled()); >> start_critical_timings(); >> >> /* In many cases the interrupt that ended idle >> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c >> index f3decb3..c2ffd84 100644 >> --- a/drivers/acpi/processor_idle.c >> +++ b/drivers/acpi/processor_idle.c >> @@ -224,6 +224,7 @@ static void lapic_timer_state_broadcast(struct >> acpi_processor *pr, >> /* >> * Suspend / resume control >> */ >> +static int acpi_idle_suspend; >> static u32 saved_bm_rld; >> >> static void acpi_idle_bm_rld_save(void) >> @@ -242,13 +243,21 @@ static void acpi_idle_bm_rld_restore(void) >> >> int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) >> { >> +if (acpi_idle_suspend == 1) >> +return 0; >> + >> acpi_idle_bm_rld_save(); >> +acpi_idle_suspend = 1; >> return 0; >> } >> >> int acpi_processor_resume(struct acpi_device * device) >> { >> +if (acpi_idle_suspend == 0) >> +return 0; >> + >> acpi_idle_bm_rld_restore(); >> +acpi_idle_suspend = 0; >> return 0; >> } >> >> @@ -754,6 +763,12 @@ static int acpi_idle_enter_c1(struct cpuidle_device >> *dev, >> >> local_irq_disable(); >> >> +if (acpi_idle_suspend) { >> +local_irq_enable(); >> +cpu_relax(); >> +return -EINVAL; >> +} >> + >> lapic_timer_state_broadcast(pr, cx, 1); >> kt1 = ktime_get_real(); >> acpi_idle_do_entry(cx); >> @@ -823,6 +838,12 @@ static int acpi_idle_enter_simple(struct cpuidle_device >> *dev, >> >> local_irq_disable(); >> >> +if (acpi_idle_suspend) { >> +local_irq_enable(); >> +cpu_relax(); >> +return -EINVAL; >> +} >> + >> if (cx->entry_method != ACPI_CSTATE_FFH) { >> current_thread_info()->status &= ~TS_POLLING; >> /
From all Hyper-V admins: Big thanks! Re: [ 41/42] libata + [ 42/42] ata_piix: defer disks to the Hyper-V drivers by default has been added to the 3.4-stable tree
Hi! == From: "Greg KH" Sent: Friday, June 15, 2012 2:57 AM 3.4-stable review patches: has been added to the 3.4-stable tree [ 41/42] libata: add a host flag to ignore detected ATA devices [ 42/42] ata_piix: defer disks to the Hyper-V drivers by default == From all Hyper-V admins: Big thanks! Best regards, Victor Miasnikov Blog: http://vvm.blog.tut.by/ -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] can: c_can: precedence error in c_can_chip_config()
From: Dan Carpenter (CAN_CTRLMODE_LISTENONLY & CAN_CTRLMODE_LOOPBACK) is (0x02 & 0x01) which is zero so the condition is never true. The intent here was to test that both flags were set. Cc: # 2.6.39+ Signed-off-by: Dan Carpenter Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde --- drivers/net/can/c_can/c_can.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/c_can/c_can.c b/drivers/net/can/c_can/c_can.c index 8dc84d6..86cd532 100644 --- a/drivers/net/can/c_can/c_can.c +++ b/drivers/net/can/c_can/c_can.c @@ -590,8 +590,8 @@ static void c_can_chip_config(struct net_device *dev) priv->write_reg(priv, &priv->regs->control, CONTROL_ENABLE_AR); - if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY & - CAN_CTRLMODE_LOOPBACK)) { + if ((priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY) && + (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)) { /* loopback + silent mode : useful for hot self-test */ priv->write_reg(priv, &priv->regs->control, CONTROL_EIE | CONTROL_SIE | CONTROL_IE | CONTROL_TEST); -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] ARM: ux500: Fix build errors/warnings when MACH_UX500_DT is not set
When MACH_UX500_DT and all related Device Tree configurations are forced off the warning and error below prevent the kernel from compiling. This simple patch fixes both issues and allows for full build and boot of ST-Ericsson's low-cost development board, Snowball. Warnings fixed: arch/arm/mach-ux500/board-mop500.c:680:32: warning: ‘snowball_of_platform_devs’ defined but not used Errors fixed: arch/arm/mach-ux500/timer.c: In function ‘ux500_timer_init’: arch/arm/mach-ux500/timer.c:66:3: error: implicit declaration of function ‘of_find_matching_node’ arch/arm/mach-ux500/timer.c:66:6: warning: assignment makes pointer from integer without a cast Cc: stable@vger.kernel.org Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 10 +- arch/arm/mach-ux500/timer.c|2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 9c74ac5..73fb6e8 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -677,11 +677,6 @@ static struct platform_device *snowball_platform_devs[] __initdata = { &ab8500_device, }; -static struct platform_device *snowball_of_platform_devs[] __initdata = { - &snowball_led_dev, - &snowball_key_dev, -}; - static void __init mop500_init_machine(void) { struct device *parent = NULL; @@ -821,6 +816,11 @@ MACHINE_END #ifdef CONFIG_MACH_UX500_DT +static struct platform_device *snowball_of_platform_devs[] __initdata = { + &snowball_led_dev, + &snowball_key_dev, +}; + struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = { /* Requires DMA and call-back bindings. */ OF_DEV_AUXDATA("arm,pl011", 0x8012, "uart0", &uart0_plat), diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c index 741e71f..66e7f00 100644 --- a/arch/arm/mach-ux500/timer.c +++ b/arch/arm/mach-ux500/timer.c @@ -63,8 +63,10 @@ static void __init ux500_timer_init(void) /* TODO: Once MTU has been DT:ed place code above into else. */ if (of_have_populated_dt()) { +#ifdef CONFIG_OF np = of_find_matching_node(NULL, prcmu_timer_of_match); if (!np) +#endif goto dt_fail; tmp_base = of_iomap(np, 0); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3.4] iwlwifi: fix TX power antenna access
From: Johannes Berg commit a5fdde28b4f5fb756032e7ad2c6fcdcffde20958 upstream. Since my commit iwlwifi: use valid TX/RX antenna from hw_params the config values are pure overrides, not the real values for all hardware. Therefore, the EEPROM TX power reading code checks the wrong values, it should check the hw_params values. Cc: sta...@kernel.org [3.4] Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- drivers/net/wireless/iwlwifi/iwl-eeprom.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 23cea42..79dddc4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c @@ -513,28 +513,28 @@ static int iwl_find_otp_image(struct iwl_trans *trans, * iwl_get_max_txpower_avg - get the highest tx power from all chains. * find the highest tx power from all chains for the channel */ -static s8 iwl_get_max_txpower_avg(const struct iwl_cfg *cfg, +static s8 iwl_get_max_txpower_avg(struct iwl_priv *priv, struct iwl_eeprom_enhanced_txpwr *enhanced_txpower, int element, s8 *max_txpower_in_half_dbm) { s8 max_txpower_avg = 0; /* (dBm) */ /* Take the highest tx power from any valid chains */ - if ((cfg->valid_tx_ant & ANT_A) && + if ((hw_params(priv).valid_tx_ant & ANT_A) && (enhanced_txpower[element].chain_a_max > max_txpower_avg)) max_txpower_avg = enhanced_txpower[element].chain_a_max; - if ((cfg->valid_tx_ant & ANT_B) && + if ((hw_params(priv).valid_tx_ant & ANT_B) && (enhanced_txpower[element].chain_b_max > max_txpower_avg)) max_txpower_avg = enhanced_txpower[element].chain_b_max; - if ((cfg->valid_tx_ant & ANT_C) && + if ((hw_params(priv).valid_tx_ant & ANT_C) && (enhanced_txpower[element].chain_c_max > max_txpower_avg)) max_txpower_avg = enhanced_txpower[element].chain_c_max; - if (((cfg->valid_tx_ant == ANT_AB) | - (cfg->valid_tx_ant == ANT_BC) | - (cfg->valid_tx_ant == ANT_AC)) && + if (((hw_params(priv).valid_tx_ant == ANT_AB) | + (hw_params(priv).valid_tx_ant == ANT_BC) | + (hw_params(priv).valid_tx_ant == ANT_AC)) && (enhanced_txpower[element].mimo2_max > max_txpower_avg)) max_txpower_avg = enhanced_txpower[element].mimo2_max; - if ((cfg->valid_tx_ant == ANT_ABC) && + if ((hw_params(priv).valid_tx_ant == ANT_ABC) && (enhanced_txpower[element].mimo3_max > max_txpower_avg)) max_txpower_avg = enhanced_txpower[element].mimo3_max; @@ -637,7 +637,7 @@ static void iwl_eeprom_enhanced_txpower(struct iwl_priv *priv) ((txp->delta_20_in_40 & 0xf0) >> 4), (txp->delta_20_in_40 & 0x0f)); - max_txp_avg = iwl_get_max_txpower_avg(cfg(priv), txp_array, idx, + max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx, &max_txp_avg_halfdbm); /* -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3.4] iwlwifi: use correct supported firmware for 6035 and 6000g2
From: Meenakshi Venkataraman commit d2c8b15d0cb486f4938ba7f2af349d9d1220cb10 upstream. My patch iwlwifi: use correct released ucode version did not correctly report supported firmware for the 6035 device. This patch fixes it. The minimum supported firmware version for 6035 is v6. Also correct the minimum supported firmware version for the 6000g2 series of devices. Cc: sta...@kernel.org Signed-off-by: Meenakshi Venkataraman Reviewed-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- drivers/net/wireless/iwlwifi/iwl-6000.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 9f71b85..c0cfa4e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c @@ -49,17 +49,20 @@ #define IWL6000_UCODE_API_MAX 6 #define IWL6050_UCODE_API_MAX 5 #define IWL6000G2_UCODE_API_MAX 6 +#define IWL6035_UCODE_API_MAX 6 /* Oldest version we won't warn about */ #define IWL6000_UCODE_API_OK 4 #define IWL6000G2_UCODE_API_OK 5 #define IWL6050_UCODE_API_OK 5 #define IWL6000G2B_UCODE_API_OK 6 +#define IWL6035_UCODE_API_OK 6 /* Lowest firmware API version supported */ #define IWL6000_UCODE_API_MIN 4 #define IWL6050_UCODE_API_MIN 4 -#define IWL6000G2_UCODE_API_MIN 4 +#define IWL6000G2_UCODE_API_MIN 5 +#define IWL6035_UCODE_API_MIN 6 #define IWL6000_FW_PRE "iwlwifi-6000-" #define IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE __stringify(api) ".ucode" @@ -425,9 +428,25 @@ const struct iwl_cfg iwl6030_2bg_cfg = { IWL_DEVICE_6030, }; +#define IWL_DEVICE_6035\ + .fw_name_pre = IWL6030_FW_PRE, \ + .ucode_api_max = IWL6035_UCODE_API_MAX, \ + .ucode_api_ok = IWL6035_UCODE_API_OK, \ + .ucode_api_min = IWL6035_UCODE_API_MIN, \ + .max_inst_size = IWL60_RTC_INST_SIZE, \ + .max_data_size = IWL60_RTC_DATA_SIZE, \ + .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ + .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ + .lib = &iwl6030_lib,\ + .base_params = &iwl6000_g2_base_params, \ + .bt_params = &iwl6000_bt_params,\ + .need_temp_offset_calib = true, \ + .led_mode = IWL_LED_RF_STATE, \ + .adv_pm = true + const struct iwl_cfg iwl6035_2agn_cfg = { .name = "Intel(R) Centrino(R) Advanced-N 6235 AGN", - IWL_DEVICE_6030, + IWL_DEVICE_6035, .ht_params = &iwl6000_ht_params, }; -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3.4] iwlwifi: fix the Transmit Frame Descriptor rings
From: Emmanuel Grumbach commit ebed633c61c023e5d1aa4ed159cd67406e9e37c2 upstream. The logic that allows to have a short TFD queue was completely wrong. We do maintain 256 Transmit Frame Descriptors, but they point to recycled buffers. We used to attach and de-attach different TFDs for the same buffer and it worked since they pointed to the same buffer. Also zero the number of BDs after unmapping a TFD. This seems not necessary since we don't reclaim the same TFD twice, but I like housekeeping. This patch solves this warning: [ 6427.079855] WARNING: at lib/dma-debug.c:866 check_unmap+0x727/0x7a0() [ 6427.079859] Hardware name: Latitude E6410 [ 6427.079865] iwlwifi :02:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x296d393c] [size=8 bytes] [ 6427.079870] Modules linked in: ... [ 6427.079950] Pid: 6613, comm: ifconfig Tainted: G O 3.3.3 #5 [ 6427.079954] Call Trace: [ 6427.079963] [] warn_slowpath_common+0x72/0xa0 [ 6427.079982] [] warn_slowpath_fmt+0x33/0x40 [ 6427.079988] [] check_unmap+0x727/0x7a0 [ 6427.079995] [] debug_dma_unmap_page+0x5a/0x80 [ 6427.080024] [] iwlagn_unmap_tfd+0x12c/0x180 [iwlwifi] [ 6427.080048] [] iwlagn_txq_free_tfd+0x49/0xb0 [iwlwifi] [ 6427.080071] [] iwl_tx_queue_unmap+0x67/0x90 [iwlwifi] [ 6427.080095] [] iwl_trans_pcie_stop_device+0x341/0x7b0 [iwlwifi] [ 6427.080113] [] iwl_down+0x17e/0x260 [iwlwifi] [ 6427.080132] [] iwlagn_mac_stop+0x6c/0xf0 [iwlwifi] [ 6427.080168] [] ieee80211_stop_device+0x5e/0x190 [mac80211] [ 6427.080198] [] ieee80211_do_stop+0x288/0x620 [mac80211] [ 6427.080243] [] ieee80211_stop+0x17/0x20 [mac80211] [ 6427.080250] [] __dev_close_many+0x81/0xd0 [ 6427.080270] [] __dev_close+0x2d/0x50 [ 6427.080276] [] __dev_change_flags+0x82/0x150 [ 6427.080282] [] dev_change_flags+0x23/0x60 [ 6427.080289] [] devinet_ioctl+0x6a0/0x770 [ 6427.080296] [] inet_ioctl+0x95/0xb0 [ 6427.080304] [] sock_ioctl+0x70/0x270 Cc: stable@vger.kernel.org Reported-by: Antonio Quartulli Tested-by: Antonio Quartulli Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg --- drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h |2 +- drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c | 20 +--- drivers/net/wireless/iwlwifi/iwl-trans-pcie.c |4 +--- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h index 1c2fe87..3b844b7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h @@ -342,7 +342,7 @@ void iwl_trans_pcie_tx_agg_setup(struct iwl_trans *trans, enum iwl_rxon_context_id ctx, int sta_id, int tid, int frame_limit, u16 ssn); void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq, - int index, enum dma_data_direction dma_dir); +enum dma_data_direction dma_dir); int iwl_tx_queue_reclaim(struct iwl_trans *trans, int txq_id, int index, struct sk_buff_head *skbs); int iwl_queue_space(const struct iwl_queue *q); diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c index e92972f..d7964b1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c @@ -237,32 +237,38 @@ static void iwlagn_unmap_tfd(struct iwl_trans *trans, struct iwl_cmd_meta *meta, for (i = 1; i < num_tbs; i++) dma_unmap_single(trans->dev, iwl_tfd_tb_get_addr(tfd, i), iwl_tfd_tb_get_len(tfd, i), dma_dir); + + tfd->num_tbs = 0; } /** * iwlagn_txq_free_tfd - Free all chunks referenced by TFD [txq->q.read_ptr] * @trans - transport private data * @txq - tx queue - * @index - the index of the TFD to be freed - *@dma_dir - the direction of the DMA mapping + * @dma_dir - the direction of the DMA mapping * * Does NOT advance any TFD circular buffer read/write indexes * Does NOT free the TFD itself (which is within circular buffer) */ void iwlagn_txq_free_tfd(struct iwl_trans *trans, struct iwl_tx_queue *txq, - int index, enum dma_data_direction dma_dir) +enum dma_data_direction dma_dir) { struct iwl_tfd *tfd_tmp = txq->tfds; + /* rd_ptr is bounded by n_bd and idx is bounded by n_window */ + int rd_ptr = txq->q.read_ptr; + int idx = get_cmd_index(&txq->q, rd_ptr); + lockdep_assert_held(&txq->lock); - iwlagn_unmap_tfd(trans, &txq->meta[index], &tfd_tmp[index], dma_dir); + /* We have only q->n_window txq->entries, but we use q->n_bd tfds */ + iwlagn_unmap_tfd(trans, &txq->meta[idx], &tfd_tmp[rd_ptr], dma_dir); /* free SKB */ if (txq->skbs) { struct sk_buff *skb; -