From: Greg Kroah-Hartman Date: Mon, 19 Apr 2010 17:10:57 +0000 (-0700) Subject: .32 patches X-Git-Tag: v2.6.32.12~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6691e1a9c5a405d279ba5dd8fdb55e80f71e92d5;p=thirdparty%2Fkernel%2Fstable-queue.git .32 patches --- diff --git a/queue-2.6.32/alsa-hda-add-a-quirk-for-clevo-m570u-laptop.patch b/queue-2.6.32/alsa-hda-add-a-quirk-for-clevo-m570u-laptop.patch new file mode 100644 index 00000000000..9d20000c7d7 --- /dev/null +++ b/queue-2.6.32/alsa-hda-add-a-quirk-for-clevo-m570u-laptop.patch @@ -0,0 +1,30 @@ +From d1501ea844eefdf925f6b711875b4b2b928fddf8 Mon Sep 17 00:00:00 2001 +From: Joerg Schirottke +Date: Thu, 15 Apr 2010 08:37:41 +0200 +Subject: ALSA: hda - add a quirk for Clevo M570U laptop + +From: Joerg Schirottke + +commit d1501ea844eefdf925f6b711875b4b2b928fddf8 upstream. + +Added the matching model for Clevo laptop M570U. + +Signed-off-by: Joerg Schirottke +Tested-by: Maximilian Gerhard +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -8895,6 +8895,7 @@ static struct snd_pci_quirk alc882_cfg_t + SND_PCI_QUIRK(0x1462, 0xaa08, "MSI", ALC883_TARGA_2ch_DIG), + + SND_PCI_QUIRK(0x147b, 0x1083, "Abit IP35-PRO", ALC883_6ST_DIG), ++ SND_PCI_QUIRK(0x1558, 0x0571, "Clevo laptop M570U", ALC883_3ST_6ch_DIG), + SND_PCI_QUIRK(0x1558, 0x0721, "Clevo laptop M720R", ALC883_CLEVO_M720), + SND_PCI_QUIRK(0x1558, 0x0722, "Clevo laptop M720SR", ALC883_CLEVO_M720), + SND_PCI_QUIRK(0x1558, 0x5409, "Clevo laptop M540R", ALC883_CLEVO_M540R), diff --git a/queue-2.6.32/alsa-usb-fix-oops-after-usb-midi-disconnection.patch b/queue-2.6.32/alsa-usb-fix-oops-after-usb-midi-disconnection.patch new file mode 100644 index 00000000000..f1c4af88394 --- /dev/null +++ b/queue-2.6.32/alsa-usb-fix-oops-after-usb-midi-disconnection.patch @@ -0,0 +1,83 @@ +From 29aac005ff4dc8a5f50b80f4e5c4f59b21c0fb50 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sat, 10 Apr 2010 21:27:23 +0200 +Subject: ALSA: usb - Fix Oops after usb-midi disconnection + +From: Takashi Iwai + +commit 29aac005ff4dc8a5f50b80f4e5c4f59b21c0fb50 upstream. + +usb-midi causes sometimes Oops at snd_usbmidi_output_drain() after +disconnection. This is due to the access to the endpoints which have +been already released at disconnection while the files are still alive. + +This patch fixes the problem by checking disconnection state at +snd_usbmidi_output_drain() and by releasing urbs but keeping the +endpoint instances until really all freed. + +Tested-by: Tvrtko Ursulin +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/usbmidi.c | 24 ++++++++++++++++++------ + 1 file changed, 18 insertions(+), 6 deletions(-) + +--- a/sound/usb/usbmidi.c ++++ b/sound/usb/usbmidi.c +@@ -931,6 +931,8 @@ static void snd_usbmidi_output_drain(str + DEFINE_WAIT(wait); + long timeout = msecs_to_jiffies(50); + ++ if (ep->umidi->disconnected) ++ return; + /* + * The substream buffer is empty, but some data might still be in the + * currently active URBs, so we have to wait for those to complete. +@@ -1075,14 +1077,21 @@ static unsigned int snd_usbmidi_count_bi + * Frees an output endpoint. + * May be called when ep hasn't been initialized completely. + */ +-static void snd_usbmidi_out_endpoint_delete(struct snd_usb_midi_out_endpoint* ep) ++static void snd_usbmidi_out_endpoint_clear(struct snd_usb_midi_out_endpoint *ep) + { + unsigned int i; + + for (i = 0; i < OUTPUT_URBS; ++i) +- if (ep->urbs[i].urb) ++ if (ep->urbs[i].urb) { + free_urb_and_buffer(ep->umidi, ep->urbs[i].urb, + ep->max_transfer); ++ ep->urbs[i].urb = NULL; ++ } ++} ++ ++static void snd_usbmidi_out_endpoint_delete(struct snd_usb_midi_out_endpoint *ep) ++{ ++ snd_usbmidi_out_endpoint_clear(ep); + kfree(ep); + } + +@@ -1201,15 +1210,18 @@ void snd_usbmidi_disconnect(struct list_ + usb_kill_urb(ep->out->urbs[j].urb); + if (umidi->usb_protocol_ops->finish_out_endpoint) + umidi->usb_protocol_ops->finish_out_endpoint(ep->out); ++ ep->out->active_urbs = 0; ++ if (ep->out->drain_urbs) { ++ ep->out->drain_urbs = 0; ++ wake_up(&ep->out->drain_wait); ++ } + } + if (ep->in) + for (j = 0; j < INPUT_URBS; ++j) + usb_kill_urb(ep->in->urbs[j]); + /* free endpoints here; later call can result in Oops */ +- if (ep->out) { +- snd_usbmidi_out_endpoint_delete(ep->out); +- ep->out = NULL; +- } ++ if (ep->out) ++ snd_usbmidi_out_endpoint_clear(ep->out); + if (ep->in) { + snd_usbmidi_in_endpoint_delete(ep->in); + ep->in = NULL; diff --git a/queue-2.6.32/drm-i915-add-no_lvds-entry-for-the-clientron-u800.patch b/queue-2.6.32/drm-i915-add-no_lvds-entry-for-the-clientron-u800.patch new file mode 100644 index 00000000000..34d2619e590 --- /dev/null +++ b/queue-2.6.32/drm-i915-add-no_lvds-entry-for-the-clientron-u800.patch @@ -0,0 +1,39 @@ +From 9875557ee8247c3f7390d378c027b45c7535a224 Mon Sep 17 00:00:00 2001 +From: Stefan Bader +Date: Mon, 29 Mar 2010 17:53:12 +0200 +Subject: drm/i915: Add no_lvds entry for the Clientron U800 + +From: Stefan Bader + +commit 9875557ee8247c3f7390d378c027b45c7535a224 upstream. + +BugLink: http://bugs.launchpad.net/ubuntu/bugs/544671 + +This system claims to have a LVDS but has not. + +Signed-off-by: Stephane Graber +Signed-off-by: Stefan Bader +Signed-off-by: Eric Anholt +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_lvds.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_lvds.c ++++ b/drivers/gpu/drm/i915/intel_lvds.c +@@ -885,6 +885,14 @@ static const struct dmi_system_id intel_ + DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"), + }, + }, ++ { ++ .callback = intel_no_lvds_dmi_callback, ++ .ident = "Clientron U800", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Clientron"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "U800"), ++ }, ++ }, + + { } /* terminating entry */ + }; diff --git a/queue-2.6.32/drm-radeon-kms-add-firemv-2400-pci-id.patch b/queue-2.6.32/drm-radeon-kms-add-firemv-2400-pci-id.patch new file mode 100644 index 00000000000..7311eb1e48c --- /dev/null +++ b/queue-2.6.32/drm-radeon-kms-add-firemv-2400-pci-id.patch @@ -0,0 +1,30 @@ +From 79b9517a33a283c5d9db875c263670ed1e055f7e Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Mon, 19 Apr 2010 17:54:31 +1000 +Subject: drm/radeon/kms: add FireMV 2400 PCI ID. + +From: Dave Airlie + +commit 79b9517a33a283c5d9db875c263670ed1e055f7e upstream. + +This is an M24/X600 chip. + +From RH# 581927 + +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + include/drm/drm_pciids.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/drm/drm_pciids.h ++++ b/include/drm/drm_pciids.h +@@ -6,6 +6,7 @@ + {0x1002, 0x3150, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY}, \ + {0x1002, 0x3152, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x3154, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ ++ {0x1002, 0x3155, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x3E50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x3E54, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RV380|RADEON_NEW_MEMMAP}, \ + {0x1002, 0x4136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_RS100|RADEON_IS_IGP}, \ diff --git a/queue-2.6.32/drm-radeon-kms-disable-the-tv-encoder-when-tv-cv-is-not-in-use.patch b/queue-2.6.32/drm-radeon-kms-disable-the-tv-encoder-when-tv-cv-is-not-in-use.patch new file mode 100644 index 00000000000..0f29df7da18 --- /dev/null +++ b/queue-2.6.32/drm-radeon-kms-disable-the-tv-encoder-when-tv-cv-is-not-in-use.patch @@ -0,0 +1,39 @@ +From d3a67a43b0460bae3e2ac14092497833344ac10d Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Tue, 13 Apr 2010 11:21:59 -0400 +Subject: drm/radeon/kms: disable the tv encoder when tv/cv is not in use + +From: Alex Deucher + +commit d3a67a43b0460bae3e2ac14092497833344ac10d upstream. + +Switching between TV and VGA caused VGA to break on some systems +since the TV encoder was left enabled when VGA was used. + +fixes fdo bug 25520. + +Signed-off-by: Alex Deucher +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_encoders.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_encoders.c ++++ b/drivers/gpu/drm/radeon/radeon_encoders.c +@@ -1155,8 +1155,12 @@ radeon_atom_encoder_mode_set(struct drm_ + case ENCODER_OBJECT_ID_INTERNAL_DAC2: + case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2: + atombios_dac_setup(encoder, ATOM_ENABLE); +- if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT)) +- atombios_tv_setup(encoder, ATOM_ENABLE); ++ if (radeon_encoder->devices & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT)) { ++ if (radeon_encoder->active_device & (ATOM_DEVICE_TV_SUPPORT | ATOM_DEVICE_CV_SUPPORT)) ++ atombios_tv_setup(encoder, ATOM_ENABLE); ++ else ++ atombios_tv_setup(encoder, ATOM_DISABLE); ++ } + break; + } + atombios_apply_encoder_quirks(encoder, adjusted_mode); diff --git a/queue-2.6.32/drm-radeon-kms-fix-rs600-tlb-flush.patch b/queue-2.6.32/drm-radeon-kms-fix-rs600-tlb-flush.patch new file mode 100644 index 00000000000..556af4ce14f --- /dev/null +++ b/queue-2.6.32/drm-radeon-kms-fix-rs600-tlb-flush.patch @@ -0,0 +1,32 @@ +From 30f69f3fb20bd719b5e1bf879339914063d38f47 Mon Sep 17 00:00:00 2001 +From: Jerome Glisse +Date: Fri, 16 Apr 2010 18:46:35 +0200 +Subject: drm/radeon/kms: fix rs600 tlb flush + +From: Jerome Glisse + +commit 30f69f3fb20bd719b5e1bf879339914063d38f47 upstream. + +Typo in in flush leaded to no flush of the RS600 tlb which +ultimately leaded to massive system ram corruption, with +this patch everythings seems to work properly. + +Signed-off-by: Jerome Glisse +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/rs600.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/rs600.c ++++ b/drivers/gpu/drm/radeon/rs600.c +@@ -57,7 +57,7 @@ void rs600_gart_tlb_flush(struct radeon_ + WREG32_MC(R_000100_MC_PT0_CNTL, tmp); + + tmp = RREG32_MC(R_000100_MC_PT0_CNTL); +- tmp |= S_000100_INVALIDATE_ALL_L1_TLBS(1) & S_000100_INVALIDATE_L2_CACHE(1); ++ tmp |= S_000100_INVALIDATE_ALL_L1_TLBS(1) | S_000100_INVALIDATE_L2_CACHE(1); + WREG32_MC(R_000100_MC_PT0_CNTL, tmp); + + tmp = RREG32_MC(R_000100_MC_PT0_CNTL); diff --git a/queue-2.6.32/drm-radeon-kms-fix-tv-dac-conflict-resolver.patch b/queue-2.6.32/drm-radeon-kms-fix-tv-dac-conflict-resolver.patch new file mode 100644 index 00000000000..561992bb6d2 --- /dev/null +++ b/queue-2.6.32/drm-radeon-kms-fix-tv-dac-conflict-resolver.patch @@ -0,0 +1,52 @@ +From 08d075116db3592db218bfe0f554cd93c9e12505 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 15 Apr 2010 13:31:12 -0400 +Subject: drm/radeon/kms: fix tv dac conflict resolver + +From: Alex Deucher + +commit 08d075116db3592db218bfe0f554cd93c9e12505 upstream. + +On systems with the tv dac shared between DVI and TV, +we can only use the dac for one of the connectors. +However, when using a digital monitor on the DVI port, +you can use the dac for the TV connector just fine. +Check the use_digital status when resolving the conflict. + +Fixes fdo bug 27649, possibly others. + +Signed-off-by: Alex Deucher +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_connectors.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/gpu/drm/radeon/radeon_connectors.c ++++ b/drivers/gpu/drm/radeon/radeon_connectors.c +@@ -140,12 +140,14 @@ radeon_connector_analog_encoder_conflict + { + struct drm_device *dev = connector->dev; + struct drm_connector *conflict; ++ struct radeon_connector *radeon_conflict; + int i; + + list_for_each_entry(conflict, &dev->mode_config.connector_list, head) { + if (conflict == connector) + continue; + ++ radeon_conflict = to_radeon_connector(conflict); + for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { + if (conflict->encoder_ids[i] == 0) + break; +@@ -155,6 +157,9 @@ radeon_connector_analog_encoder_conflict + if (conflict->status != connector_status_connected) + continue; + ++ if (radeon_conflict->use_digital) ++ continue; ++ + if (priority == true) { + DRM_INFO("1: conflicting encoders switching off %s\n", drm_get_connector_name(conflict)); + DRM_INFO("in favor of %s\n", drm_get_connector_name(connector)); diff --git a/queue-2.6.32/hwmon-sht15-fix-sht15_calc_temp-interpolation-function.patch b/queue-2.6.32/hwmon-sht15-fix-sht15_calc_temp-interpolation-function.patch new file mode 100644 index 00000000000..32843769cc2 --- /dev/null +++ b/queue-2.6.32/hwmon-sht15-fix-sht15_calc_temp-interpolation-function.patch @@ -0,0 +1,47 @@ +From 328a2c22abd08911e37fa66f1358f829cecd72e9 Mon Sep 17 00:00:00 2001 +From: Jerome Oufella +Date: Wed, 14 Apr 2010 16:14:07 +0200 +Subject: hwmon: (sht15) Fix sht15_calc_temp interpolation function + +From: Jerome Oufella + +commit 328a2c22abd08911e37fa66f1358f829cecd72e9 upstream. + +I discovered two issues. +First the previous sht15_calc_temp() loop did not iterate through the +temppoints array since the (data->supply_uV > temppoints[i - 1].vdd) +test is always true in this direction. + +Also the two-points linear interpolation function was returning biased +values due to a stray division by 1000 which shouldn't be there. + +[JD: Also change the default value for d1 from 0 to something saner.] + +Signed-off-by: Jerome Oufella +Acked-by: Jonathan Cameron +Signed-off-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/sht15.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/hwmon/sht15.c ++++ b/drivers/hwmon/sht15.c +@@ -302,13 +302,13 @@ error_ret: + **/ + static inline int sht15_calc_temp(struct sht15_data *data) + { +- int d1 = 0; ++ int d1 = temppoints[0].d1; + int i; + +- for (i = 1; i < ARRAY_SIZE(temppoints); i++) ++ for (i = ARRAY_SIZE(temppoints) - 1; i > 0; i--) + /* Find pointer to interpolate */ + if (data->supply_uV > temppoints[i - 1].vdd) { +- d1 = (data->supply_uV/1000 - temppoints[i - 1].vdd) ++ d1 = (data->supply_uV - temppoints[i - 1].vdd) + * (temppoints[i].d1 - temppoints[i - 1].d1) + / (temppoints[i].vdd - temppoints[i - 1].vdd) + + temppoints[i - 1].d1; diff --git a/queue-2.6.32/hwmon-sht15-properly-handle-the-case-config_regulator-n.patch b/queue-2.6.32/hwmon-sht15-properly-handle-the-case-config_regulator-n.patch new file mode 100644 index 00000000000..f61f10e2360 --- /dev/null +++ b/queue-2.6.32/hwmon-sht15-properly-handle-the-case-config_regulator-n.patch @@ -0,0 +1,38 @@ +From c7a78d2c2e2537fd24903e966f34aae50319d587 Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Wed, 14 Apr 2010 16:14:08 +0200 +Subject: hwmon: (sht15) Properly handle the case CONFIG_REGULATOR=n + +From: Jean Delvare + +commit c7a78d2c2e2537fd24903e966f34aae50319d587 upstream. + +When CONFIG_REGULATOR isn't set, regulator_get_voltage() returns 0. +Properly handle this case by not trusting the value. + +Reported-by: Jerome Oufella +Signed-off-by: Jean Delvare +Cc: Jonathan Cameron +Acked-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/sht15.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/hwmon/sht15.c ++++ b/drivers/hwmon/sht15.c +@@ -541,7 +541,12 @@ static int __devinit sht15_probe(struct + /* If a regulator is available, query what the supply voltage actually is!*/ + data->reg = regulator_get(data->dev, "vcc"); + if (!IS_ERR(data->reg)) { +- data->supply_uV = regulator_get_voltage(data->reg); ++ int voltage; ++ ++ voltage = regulator_get_voltage(data->reg); ++ if (voltage) ++ data->supply_uV = voltage; ++ + regulator_enable(data->reg); + /* setup a notifier block to update this if another device + * causes the voltage to change */ diff --git a/queue-2.6.32/input-alps-add-signature-for-hp-pavilion-dm3-laptops.patch b/queue-2.6.32/input-alps-add-signature-for-hp-pavilion-dm3-laptops.patch new file mode 100644 index 00000000000..dc8b64f1e09 --- /dev/null +++ b/queue-2.6.32/input-alps-add-signature-for-hp-pavilion-dm3-laptops.patch @@ -0,0 +1,31 @@ +From 5e28d8eb68c12eab9c4a47b42ba993a6420d71d3 Mon Sep 17 00:00:00 2001 +From: Chase Douglas +Date: Mon, 5 Apr 2010 22:29:08 -0700 +Subject: Input: ALPS - add signature for HP Pavilion dm3 laptops + +From: Chase Douglas + +commit 5e28d8eb68c12eab9c4a47b42ba993a6420d71d3 upstream. + +Tested by a user running Ubuntu 9.10 in the following bug report. + +BugLink: http://bugs.launchpad.net/bugs/545307 + +Signed-off-by: Chase Douglas +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/mouse/alps.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/input/mouse/alps.c ++++ b/drivers/input/mouse/alps.c +@@ -62,6 +62,7 @@ static const struct alps_model_info alps + { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, + ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, + { { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 }, /* Dell Vostro 1400 */ ++ { { 0x73, 0x02, 0x64 }, 0xf8, 0xf8, 0 }, /* HP Pavilion dm3 */ + { { 0x52, 0x01, 0x14 }, 0xff, 0xff, + ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */ + }; diff --git a/queue-2.6.32/nfsv4-fall-back-to-ordinary-lookup-if-nfs4_atomic_open-returns-eisdir.patch b/queue-2.6.32/nfsv4-fall-back-to-ordinary-lookup-if-nfs4_atomic_open-returns-eisdir.patch new file mode 100644 index 00000000000..9a18537ebc4 --- /dev/null +++ b/queue-2.6.32/nfsv4-fall-back-to-ordinary-lookup-if-nfs4_atomic_open-returns-eisdir.patch @@ -0,0 +1,32 @@ +From 80e60639f1b7c121a7fea53920c5a4b94009361a Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Thu, 25 Mar 2010 13:51:05 -0400 +Subject: NFSv4: Fall back to ordinary lookup if nfs4_atomic_open() returns EISDIR + +From: Trond Myklebust + +commit 80e60639f1b7c121a7fea53920c5a4b94009361a upstream. + +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/dir.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/nfs/dir.c ++++ b/fs/nfs/dir.c +@@ -1025,12 +1025,12 @@ static struct dentry *nfs_atomic_lookup( + res = NULL; + goto out; + /* This turned out not to be a regular file */ ++ case -EISDIR: + case -ENOTDIR: + goto no_open; + case -ELOOP: + if (!(nd->intent.open.flags & O_NOFOLLOW)) + goto no_open; +- /* case -EISDIR: */ + /* case -EINVAL: */ + default: + goto out; diff --git a/queue-2.6.32/nfsv4-fix-delegated-locking.patch b/queue-2.6.32/nfsv4-fix-delegated-locking.patch new file mode 100644 index 00000000000..7dbc0e733a6 --- /dev/null +++ b/queue-2.6.32/nfsv4-fix-delegated-locking.patch @@ -0,0 +1,74 @@ +From 0df5dd4aae211edeeeb84f7f84f6d093406d7c22 Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Sun, 11 Apr 2010 16:48:44 -0400 +Subject: NFSv4: fix delegated locking + +From: Trond Myklebust + +commit 0df5dd4aae211edeeeb84f7f84f6d093406d7c22 upstream. + +Arnaud Giersch reports that NFSv4 locking is broken when we hold a +delegation since commit 8e469ebd6dc32cbaf620e134d79f740bf0ebab79 (NFSv4: +Don't allow posix locking against servers that don't support it). + +According to Arnaud, the lock succeeds the first time he opens the file +(since we cannot do a delegated open) but then fails after we start using +delegated opens. + +The following patch fixes it by ensuring that locking behaviour is +governed by a per-filesystem capability flag that is initially set, but +gets cleared if the server ever returns an OPEN without the +NFS4_OPEN_RESULT_LOCKTYPE_POSIX flag being set. + +Reported-by: Arnaud Giersch +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/client.c | 3 ++- + fs/nfs/nfs4proc.c | 4 +++- + include/linux/nfs_fs_sb.h | 1 + + 3 files changed, 6 insertions(+), 2 deletions(-) + +--- a/fs/nfs/client.c ++++ b/fs/nfs/client.c +@@ -1283,7 +1283,8 @@ static int nfs4_init_server(struct nfs_s + + /* Initialise the client representation from the mount data */ + server->flags = data->flags; +- server->caps |= NFS_CAP_ATOMIC_OPEN|NFS_CAP_CHANGE_ATTR; ++ server->caps |= NFS_CAP_ATOMIC_OPEN|NFS_CAP_CHANGE_ATTR| ++ NFS_CAP_POSIX_LOCK; + server->options = data->options; + + /* Get a client record */ +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -1439,6 +1439,8 @@ static int _nfs4_proc_open(struct nfs4_o + nfs_post_op_update_inode(dir, o_res->dir_attr); + } else + nfs_refresh_inode(dir, o_res->dir_attr); ++ if ((o_res->rflags & NFS4_OPEN_RESULT_LOCKTYPE_POSIX) == 0) ++ server->caps &= ~NFS_CAP_POSIX_LOCK; + if(o_res->rflags & NFS4_OPEN_RESULT_CONFIRM) { + status = _nfs4_proc_open_confirm(data); + if (status != 0) +@@ -1573,7 +1575,7 @@ static int _nfs4_do_open(struct inode *d + status = PTR_ERR(state); + if (IS_ERR(state)) + goto err_opendata_put; +- if ((opendata->o_res.rflags & NFS4_OPEN_RESULT_LOCKTYPE_POSIX) != 0) ++ if (server->caps & NFS_CAP_POSIX_LOCK) + set_bit(NFS_STATE_POSIX_LOCKS, &state->flags); + nfs4_opendata_put(opendata); + nfs4_put_state_owner(sp); +--- a/include/linux/nfs_fs_sb.h ++++ b/include/linux/nfs_fs_sb.h +@@ -176,6 +176,7 @@ struct nfs_server { + #define NFS_CAP_ATIME (1U << 11) + #define NFS_CAP_CTIME (1U << 12) + #define NFS_CAP_MTIME (1U << 13) ++#define NFS_CAP_POSIX_LOCK (1U << 14) + + + /* maximum number of slots to use */ diff --git a/queue-2.6.32/revert-x86-disable-iommus-on-kernel-crash.patch b/queue-2.6.32/revert-x86-disable-iommus-on-kernel-crash.patch new file mode 100644 index 00000000000..9beadb37cc0 --- /dev/null +++ b/queue-2.6.32/revert-x86-disable-iommus-on-kernel-crash.patch @@ -0,0 +1,48 @@ +From 8f9f55e83e939724490d7cde3833c4883c6d1310 Mon Sep 17 00:00:00 2001 +From: Chris Wright +Date: Fri, 2 Apr 2010 18:27:54 -0700 +Subject: Revert "x86: disable IOMMUs on kernel crash" + +From: Chris Wright + +commit 8f9f55e83e939724490d7cde3833c4883c6d1310 upstream. + +This effectively reverts commit 61d047be99757fd9b0af900d7abce9a13a337488. + +Disabling the IOMMU can potetially allow DMA transactions to +complete without being translated. Leave it enabled, and allow +crash kernel to do the IOMMU reinitialization properly. + +Cc: Joerg Roedel +Cc: Eric Biederman +Cc: Neil Horman +Cc: Vivek Goyal +Signed-off-by: Chris Wright +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/crash.c | 6 ------ + 1 file changed, 6 deletions(-) + +--- a/arch/x86/kernel/crash.c ++++ b/arch/x86/kernel/crash.c +@@ -27,7 +27,6 @@ + #include + #include + #include +-#include + + + #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) +@@ -104,10 +103,5 @@ void native_machine_crash_shutdown(struc + #ifdef CONFIG_HPET_TIMER + hpet_disable(); + #endif +- +-#ifdef CONFIG_X86_64 +- pci_iommu_shutdown(); +-#endif +- + crash_save_cpu(regs, safe_smp_processor_id()); + } diff --git a/queue-2.6.32/series b/queue-2.6.32/series index 26ac8973c28..70fbebff249 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -93,3 +93,18 @@ x86-hpet-erratum-workaround-for-read-after-write-of-hpet-comparator.patch x86-fix-double-enable_ir_x2apic-call-on-smp-kernel-on-smp-boards.patch sched-sched_getaffinity-allow-less-than-nr_cpus-length.patch sched-fix-sched_getaffinity.patch +nfsv4-fall-back-to-ordinary-lookup-if-nfs4_atomic_open-returns-eisdir.patch +nfsv4-fix-delegated-locking.patch +input-alps-add-signature-for-hp-pavilion-dm3-laptops.patch +alsa-hda-add-a-quirk-for-clevo-m570u-laptop.patch +alsa-usb-fix-oops-after-usb-midi-disconnection.patch +hwmon-sht15-fix-sht15_calc_temp-interpolation-function.patch +hwmon-sht15-properly-handle-the-case-config_regulator-n.patch +drm-i915-add-no_lvds-entry-for-the-clientron-u800.patch +drm-radeon-kms-disable-the-tv-encoder-when-tv-cv-is-not-in-use.patch +drm-radeon-kms-fix-tv-dac-conflict-resolver.patch +drm-radeon-kms-fix-rs600-tlb-flush.patch +drm-radeon-kms-add-firemv-2400-pci-id.patch +x86-amd-iommu-use-helper-function-to-destroy-domain.patch +x86-amd-iommu-enable-iommu-before-attaching-devices.patch +revert-x86-disable-iommus-on-kernel-crash.patch diff --git a/queue-2.6.32/x86-amd-iommu-enable-iommu-before-attaching-devices.patch b/queue-2.6.32/x86-amd-iommu-enable-iommu-before-attaching-devices.patch new file mode 100644 index 00000000000..6428f9c8a32 --- /dev/null +++ b/queue-2.6.32/x86-amd-iommu-enable-iommu-before-attaching-devices.patch @@ -0,0 +1,58 @@ +From 75f66533bc883f761a7adcab3281fe3323efbc90 Mon Sep 17 00:00:00 2001 +From: Chris Wright +Date: Fri, 2 Apr 2010 18:27:52 -0700 +Subject: x86/amd-iommu: enable iommu before attaching devices + +From: Chris Wright + +commit 75f66533bc883f761a7adcab3281fe3323efbc90 upstream. + +Hit another kdump problem as reported by Neil Horman. When initializaing +the IOMMU, we attach devices to their domains before the IOMMU is +fully (re)initialized. Attaching a device will issue some important +invalidations. In the context of the newly kexec'd kdump kernel, the +IOMMU may have stale cached data from the original kernel. Because we +do the attach too early, the invalidation commands are placed in the new +command buffer before the IOMMU is updated w/ that buffer. This leaves +the stale entries in the kdump context and can renders device unusable. +Simply enable the IOMMU before we do the attach. + +Cc: Neil Horman +Cc: Vivek Goyal +Signed-off-by: Chris Wright +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/amd_iommu_init.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/arch/x86/kernel/amd_iommu_init.c ++++ b/arch/x86/kernel/amd_iommu_init.c +@@ -1284,6 +1284,8 @@ int __init amd_iommu_init(void) + if (ret) + goto free; + ++ enable_iommus(); ++ + if (iommu_pass_through) + ret = amd_iommu_init_passthrough(); + else +@@ -1294,8 +1296,6 @@ int __init amd_iommu_init(void) + + amd_iommu_init_api(); + +- enable_iommus(); +- + if (iommu_pass_through) + goto out; + +@@ -1314,6 +1314,8 @@ out: + return ret; + + free: ++ disable_iommus(); ++ + free_pages((unsigned long)amd_iommu_pd_alloc_bitmap, + get_order(MAX_DOMAIN_ID/8)); + diff --git a/queue-2.6.32/x86-amd-iommu-use-helper-function-to-destroy-domain.patch b/queue-2.6.32/x86-amd-iommu-use-helper-function-to-destroy-domain.patch new file mode 100644 index 00000000000..729c02d0897 --- /dev/null +++ b/queue-2.6.32/x86-amd-iommu-use-helper-function-to-destroy-domain.patch @@ -0,0 +1,35 @@ +From 8b408fe4f853dcfa18d133aa4cf1d7546b4c3870 Mon Sep 17 00:00:00 2001 +From: Joerg Roedel +Date: Mon, 8 Mar 2010 14:20:07 +0100 +Subject: x86/amd-iommu: Use helper function to destroy domain + +From: Joerg Roedel + +commit 8b408fe4f853dcfa18d133aa4cf1d7546b4c3870 upstream. + +In the amd_iommu_domain_destroy the protection_domain_free +function is partly reimplemented. The 'partly' is the bug +here because the domain is not deleted from the domain list. +This results in use-after-free errors and data-corruption. +Fix it by just using protection_domain_free instead. + +Signed-off-by: Joerg Roedel +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/kernel/amd_iommu.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/arch/x86/kernel/amd_iommu.c ++++ b/arch/x86/kernel/amd_iommu.c +@@ -2239,9 +2239,7 @@ static void amd_iommu_domain_destroy(str + + free_pagetable(domain); + +- domain_id_free(domain->id); +- +- kfree(domain); ++ protection_domain_free(domain); + + dom->priv = NULL; + }