From: Greg Kroah-Hartman Date: Tue, 9 Mar 2010 22:34:35 +0000 (-0800) Subject: some .31 patches X-Git-Tag: v2.6.32.10~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e1c042e2e96cdb0bd2b3ba5065a031145c9322a;p=thirdparty%2Fkernel%2Fstable-queue.git some .31 patches --- diff --git a/queue-2.6.31/acpi-be-in-ts_polling-state-during-mwait-based-c-state-entry.patch b/queue-2.6.31/acpi-be-in-ts_polling-state-during-mwait-based-c-state-entry.patch new file mode 100644 index 00000000000..f1a58e3215e --- /dev/null +++ b/queue-2.6.31/acpi-be-in-ts_polling-state-during-mwait-based-c-state-entry.patch @@ -0,0 +1,77 @@ +From d306ebc28649b89877a22158fe0076f06cc46f60 Mon Sep 17 00:00:00 2001 +From: Pallipadi, Venkatesh +Date: Wed, 10 Feb 2010 10:35:31 -0800 +Subject: ACPI: Be in TS_POLLING state during mwait based C-state entry + +From: Pallipadi, Venkatesh + +commit d306ebc28649b89877a22158fe0076f06cc46f60 upstream. + +ACPI deep C-state entry had a long standing bug/missing feature, wherein we were sending +resched IPIs when an idle CPU is in mwait based deep C-state. Only mwait based C1 was using +the write to the monitored address to wake up mwait'ing CPU. + +This patch changes the code to retain TS_POLLING bit if we are entering an mwait based +deep C-state. + +The patch has been verified to reduce the number of resched IPIs in general and also +improves the performance/power on workloads with low system utilization (i.e., when mwait based +deep C-states are being used). + +Fixes "netperf ~50% regression with 2.6.33-rc1, bisect to 1b9508f" +http://marc.info/?l=linux-kernel&m=126441481427331&w=4 + +Reported-by: Lin Ming +Tested-by: Alex Shi +Signed-off-by: Venkatesh Pallipadi +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/processor_idle.c | 28 ++++++++++++++++------------ + 1 file changed, 16 insertions(+), 12 deletions(-) + +--- a/drivers/acpi/processor_idle.c ++++ b/drivers/acpi/processor_idle.c +@@ -876,12 +876,14 @@ static int acpi_idle_enter_simple(struct + return(acpi_idle_enter_c1(dev, state)); + + local_irq_disable(); +- current_thread_info()->status &= ~TS_POLLING; +- /* +- * TS_POLLING-cleared state must be visible before we test +- * NEED_RESCHED: +- */ +- smp_mb(); ++ if (cx->entry_method != ACPI_CSTATE_FFH) { ++ current_thread_info()->status &= ~TS_POLLING; ++ /* ++ * TS_POLLING-cleared state must be visible before we test ++ * NEED_RESCHED: ++ */ ++ smp_mb(); ++ } + + if (unlikely(need_resched())) { + current_thread_info()->status |= TS_POLLING; +@@ -961,12 +963,14 @@ static int acpi_idle_enter_bm(struct cpu + } + + local_irq_disable(); +- current_thread_info()->status &= ~TS_POLLING; +- /* +- * TS_POLLING-cleared state must be visible before we test +- * NEED_RESCHED: +- */ +- smp_mb(); ++ if (cx->entry_method != ACPI_CSTATE_FFH) { ++ current_thread_info()->status &= ~TS_POLLING; ++ /* ++ * TS_POLLING-cleared state must be visible before we test ++ * NEED_RESCHED: ++ */ ++ smp_mb(); ++ } + + if (unlikely(need_resched())) { + current_thread_info()->status |= TS_POLLING; diff --git a/queue-2.6.31/airo-fix-setting-zero-length-wep-key.patch b/queue-2.6.31/airo-fix-setting-zero-length-wep-key.patch new file mode 100644 index 00000000000..f9d58645c39 --- /dev/null +++ b/queue-2.6.31/airo-fix-setting-zero-length-wep-key.patch @@ -0,0 +1,84 @@ +From f09c256375c7cf1e112b8ef6306cdd313490d7c0 Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka +Date: Tue, 2 Feb 2010 15:34:50 +0100 +Subject: airo: fix setting zero length WEP key + +From: Stanislaw Gruszka + +commit f09c256375c7cf1e112b8ef6306cdd313490d7c0 upstream. + +Patch prevents call set_wep_key() with zero key length. That fix long +standing regression since commit c0380693520b1a1e4f756799a0edc379378b462a +"airo: clean up WEP key operations". Additionally print call trace when +someone will try to use improper parameters, and remove key.len = 0 +assignment, because it is in not possible code path. + +Reported-by: Chris Siebenmann +Bisected-by: Chris Siebenmann +Tested-by: Chris Siebenmann +Cc: Dan Williams +Signed-off-by: Stanislaw Gruszka +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/airo.c | 34 ++++++++++++++++++---------------- + 1 file changed, 18 insertions(+), 16 deletions(-) + +--- a/drivers/net/wireless/airo.c ++++ b/drivers/net/wireless/airo.c +@@ -5249,11 +5249,7 @@ static int set_wep_key(struct airo_info + WepKeyRid wkr; + int rc; + +- if (keylen == 0) { +- airo_print_err(ai->dev->name, "%s: key length to set was zero", +- __func__); +- return -1; +- } ++ WARN_ON(keylen == 0); + + memset(&wkr, 0, sizeof(wkr)); + wkr.len = cpu_to_le16(sizeof(wkr)); +@@ -6399,11 +6395,7 @@ static int airo_set_encode(struct net_de + if (dwrq->length > MIN_KEY_SIZE) + key.len = MAX_KEY_SIZE; + else +- if (dwrq->length > 0) +- key.len = MIN_KEY_SIZE; +- else +- /* Disable the key */ +- key.len = 0; ++ key.len = MIN_KEY_SIZE; + /* Check if the key is not marked as invalid */ + if(!(dwrq->flags & IW_ENCODE_NOKEY)) { + /* Cleanup */ +@@ -6584,12 +6576,22 @@ static int airo_set_encodeext(struct net + default: + return -EINVAL; + } +- /* Send the key to the card */ +- rc = set_wep_key(local, idx, key.key, key.len, perm, 1); +- if (rc < 0) { +- airo_print_err(local->dev->name, "failed to set WEP key" +- " at index %d: %d.", idx, rc); +- return rc; ++ if (key.len == 0) { ++ rc = set_wep_tx_idx(local, idx, perm, 1); ++ if (rc < 0) { ++ airo_print_err(local->dev->name, ++ "failed to set WEP transmit index to %d: %d.", ++ idx, rc); ++ return rc; ++ } ++ } else { ++ rc = set_wep_key(local, idx, key.key, key.len, perm, 1); ++ if (rc < 0) { ++ airo_print_err(local->dev->name, ++ "failed to set WEP key at index %d: %d.", ++ idx, rc); ++ return rc; ++ } + } + } + diff --git a/queue-2.6.31/mpt2sas-delete-volume-before-hba-detach.patch b/queue-2.6.31/mpt2sas-delete-volume-before-hba-detach.patch new file mode 100644 index 00000000000..5de97b7f436 --- /dev/null +++ b/queue-2.6.31/mpt2sas-delete-volume-before-hba-detach.patch @@ -0,0 +1,59 @@ +From d7384b28afb2bf2b7be835ddc8c852bdc5e0ce1c Mon Sep 17 00:00:00 2001 +From: Kashyap, Desai +Date: Wed, 16 Dec 2009 18:50:06 +0530 +Subject: [SCSI] mpt2sas: Delete volume before HBA detach. + +From: Kashyap, Desai + +commit d7384b28afb2bf2b7be835ddc8c852bdc5e0ce1c upstream. + +The driver hangs when doing `rmmod mpt2sas` if there are any +IR volumes present.The hang is due the scsi midlayer trying to access the +IR volumes after the driver releases controller resources. Perhaps when +scsi_remove_host is called,the scsi mid layer is sending some request. +This doesn't occur for bare drives becuase the driver is already reporting +those drives deleted prior to calling mpt2sas_base_detach. +To solve this issue, we need to delete the volumes as well. + +Signed-off-by: Kashyap Desai +Reviewed-by: Eric Moore +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_scsih.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c +@@ -5496,6 +5496,8 @@ _scsih_remove(struct pci_dev *pdev) + struct _sas_port *mpt2sas_port; + struct _sas_device *sas_device; + struct _sas_node *expander_sibling; ++ struct _raid_device *raid_device, *next; ++ struct MPT2SAS_TARGET *sas_target_priv_data; + struct workqueue_struct *wq; + unsigned long flags; + +@@ -5509,6 +5511,21 @@ _scsih_remove(struct pci_dev *pdev) + if (wq) + destroy_workqueue(wq); + ++ /* release all the volumes */ ++ list_for_each_entry_safe(raid_device, next, &ioc->raid_device_list, ++ list) { ++ if (raid_device->starget) { ++ sas_target_priv_data = ++ raid_device->starget->hostdata; ++ sas_target_priv_data->deleted = 1; ++ scsi_remove_target(&raid_device->starget->dev); ++ } ++ printk(MPT2SAS_INFO_FMT "removing handle(0x%04x), wwid" ++ "(0x%016llx)\n", ioc->name, raid_device->handle, ++ (unsigned long long) raid_device->wwid); ++ _scsih_raid_device_remove(ioc, raid_device); ++ } ++ + /* free ports attached to the sas_host */ + retry_again: + list_for_each_entry(mpt2sas_port, diff --git a/queue-2.6.31/series b/queue-2.6.31/series index ae0aa91528a..8473520857f 100644 --- a/queue-2.6.31/series +++ b/queue-2.6.31/series @@ -66,3 +66,7 @@ alsa-hda-intel-avoid-divide-by-zero-crash.patch b43-fix-throughput-regression.patch class-free-the-class-private-data-in-class_release.patch serial-8250-add-serial-transmitter-fully-empty-test.patch +acpi-be-in-ts_polling-state-during-mwait-based-c-state-entry.patch +airo-fix-setting-zero-length-wep-key.patch +mpt2sas-delete-volume-before-hba-detach.patch +v4l-dvb-video-pwc-fix-regression-in-pwc_set_shutter_speed-caused-by-bad-constant-sizeof-conversion.patch diff --git a/queue-2.6.31/v4l-dvb-video-pwc-fix-regression-in-pwc_set_shutter_speed-caused-by-bad-constant-sizeof-conversion.patch b/queue-2.6.31/v4l-dvb-video-pwc-fix-regression-in-pwc_set_shutter_speed-caused-by-bad-constant-sizeof-conversion.patch new file mode 100644 index 00000000000..ba41a6bea22 --- /dev/null +++ b/queue-2.6.31/v4l-dvb-video-pwc-fix-regression-in-pwc_set_shutter_speed-caused-by-bad-constant-sizeof-conversion.patch @@ -0,0 +1,37 @@ +From 53f68607caba85db9a73846ccd289e4b7fa96295 Mon Sep 17 00:00:00 2001 +From: Martin Fuzzey +Date: Thu, 11 Feb 2010 10:50:31 -0300 +Subject: V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion. + +From: Martin Fuzzey + +commit 53f68607caba85db9a73846ccd289e4b7fa96295 upstream. + +Regression was caused by my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0 +which determined message size using sizeof rather than hardcoded constants. + +Unfortunately pwc_set_shutter_speed reuses a 2 byte buffer for a one byte +message too so the sizeof was bogus in this case. + +All other uses of sizeof checked and are ok. + +Acked-by: Laurent Pinchart +Signed-off-by: Martin Fuzzey +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/video/pwc/pwc-ctrl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/media/video/pwc/pwc-ctrl.c ++++ b/drivers/media/video/pwc/pwc-ctrl.c +@@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_dev + buf[0] = 0xff; /* fixed */ + + ret = send_control_msg(pdev, +- SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf)); ++ SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1); + + if (!mode && ret >= 0) { + if (value < 0)