From: Greg Kroah-Hartman Date: Sat, 12 Feb 2011 00:16:26 +0000 (-0800) Subject: .36 patches X-Git-Tag: v2.6.36.4~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2b52abcd56df79677a46b7fd97d9883aaa9cf69;p=thirdparty%2Fkernel%2Fstable-queue.git .36 patches --- diff --git a/queue-2.6.36/alsa-au88x0-limit-number-of-channels-to-fix-oops-via-oss-emu.patch b/queue-2.6.36/alsa-au88x0-limit-number-of-channels-to-fix-oops-via-oss-emu.patch new file mode 100644 index 00000000000..49b80aa4d48 --- /dev/null +++ b/queue-2.6.36/alsa-au88x0-limit-number-of-channels-to-fix-oops-via-oss-emu.patch @@ -0,0 +1,70 @@ +From d9ab344336f74c012f6643ed3d1ad8ca0136de3b Mon Sep 17 00:00:00 2001 +From: Raymond Yau +Date: Sun, 16 Jan 2011 10:55:54 +0800 +Subject: ALSA : au88x0 - Limit number of channels to fix Oops via OSS emu + +From: Raymond Yau + +commit d9ab344336f74c012f6643ed3d1ad8ca0136de3b upstream. + +Fix playback/capture channels patch to change supported playback +channels of au8830 to 1,2,4 and capture channels to 1,2. +This prevent oops when oss emulation use SNDCTL_DSP_CHANNELS to +set 3 Channels + +Signed-off-by: Raymond Yau +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/au88x0/au88x0_pcm.c | 24 ++++++++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +--- a/sound/pci/au88x0/au88x0_pcm.c ++++ b/sound/pci/au88x0/au88x0_pcm.c +@@ -42,11 +42,7 @@ static struct snd_pcm_hardware snd_vorte + .rate_min = 5000, + .rate_max = 48000, + .channels_min = 1, +-#ifdef CHIP_AU8830 +- .channels_max = 4, +-#else + .channels_max = 2, +-#endif + .buffer_bytes_max = 0x10000, + .period_bytes_min = 0x1, + .period_bytes_max = 0x1000, +@@ -115,6 +111,17 @@ static struct snd_pcm_hardware snd_vorte + .periods_max = 64, + }; + #endif ++#ifdef CHIP_AU8830 ++static unsigned int au8830_channels[3] = { ++ 1, 2, 4, ++}; ++ ++static struct snd_pcm_hw_constraint_list hw_constraints_au8830_channels = { ++ .count = ARRAY_SIZE(au8830_channels), ++ .list = au8830_channels, ++ .mask = 0, ++}; ++#endif + /* open callback */ + static int snd_vortex_pcm_open(struct snd_pcm_substream *substream) + { +@@ -156,6 +163,15 @@ static int snd_vortex_pcm_open(struct sn + if (VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB + || VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_I2S) + runtime->hw = snd_vortex_playback_hw_adb; ++#ifdef CHIP_AU8830 ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK && ++ VORTEX_PCM_TYPE(substream->pcm) == VORTEX_PCM_ADB) { ++ runtime->hw.channels_max = 4; ++ snd_pcm_hw_constraint_list(runtime, 0, ++ SNDRV_PCM_HW_PARAM_CHANNELS, ++ &hw_constraints_au8830_channels); ++ } ++#endif + substream->runtime->private_data = NULL; + } + #ifndef CHIP_AU8810 diff --git a/queue-2.6.36/alsa-fix-invalid-hardware.h-include-in-ac97c-for-avr32-architecture.patch b/queue-2.6.36/alsa-fix-invalid-hardware.h-include-in-ac97c-for-avr32-architecture.patch new file mode 100644 index 00000000000..4b5126a3192 --- /dev/null +++ b/queue-2.6.36/alsa-fix-invalid-hardware.h-include-in-ac97c-for-avr32-architecture.patch @@ -0,0 +1,37 @@ +From fd76804f3f5484b35e6a51214c91e916ebba05aa Mon Sep 17 00:00:00 2001 +From: Hans-Christian Egtvedt +Date: Mon, 24 Jan 2011 16:09:56 +0100 +Subject: ALSA: fix invalid hardware.h include in ac97c for AVR32 architecture + +From: Hans-Christian Egtvedt + +commit fd76804f3f5484b35e6a51214c91e916ebba05aa upstream. + +This patch fixes the non-compiling AC97C driver for AVR32 architecture by +include mach/hardware.h only for AT91 architecture. The AVR32 architecture does +not supply the hardware.h include file. + +Signed-off-by: Hans-Christian Egtvedt +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/atmel/ac97c.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/sound/atmel/ac97c.c ++++ b/sound/atmel/ac97c.c +@@ -33,9 +33,12 @@ + #include + + #include +-#include + #include + ++#ifdef CONFIG_ARCH_AT91 ++#include ++#endif ++ + #include "ac97c.h" + + enum { diff --git a/queue-2.6.36/alsa-hda-create-mixers-on-alc887.patch b/queue-2.6.36/alsa-hda-create-mixers-on-alc887.patch new file mode 100644 index 00000000000..3f5614c1e90 --- /dev/null +++ b/queue-2.6.36/alsa-hda-create-mixers-on-alc887.patch @@ -0,0 +1,56 @@ +From 03b7a1ab557efe34e8f79b78660e514bd7374248 Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Tue, 9 Nov 2010 14:35:30 +0100 +Subject: ALSA: HDA: Create mixers on ALC887 + +From: David Henningsson + +commit 03b7a1ab557efe34e8f79b78660e514bd7374248 upstream. + +BugLink: http://launchpad.net/bugs/669092 + +ALC887 does not have any volume control ability on the mixer NIDs, +so put the volume controls on the dac NIDs instead. Without this +patch, ALC887 users cannot use alsamixer at all. + +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -10646,6 +10646,9 @@ static int alc_auto_add_mic_boost(struct + return 0; + } + ++static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, ++ const struct auto_pin_cfg *cfg); ++ + /* almost identical with ALC880 parser... */ + static int alc882_parse_auto_config(struct hda_codec *codec) + { +@@ -10663,7 +10666,10 @@ static int alc882_parse_auto_config(stru + err = alc880_auto_fill_dac_nids(spec, &spec->autocfg); + if (err < 0) + return err; +- err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg); ++ if (codec->vendor_id == 0x10ec0887) ++ err = alc861vd_auto_create_multi_out_ctls(spec, &spec->autocfg); ++ else ++ err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg); + if (err < 0) + return err; + err = alc880_auto_create_extra_out(spec, spec->autocfg.hp_pins[0], +@@ -16622,7 +16628,7 @@ static void alc861vd_auto_init_analog_in + #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) + + /* add playback controls from the parsed DAC table */ +-/* Based on ALC880 version. But ALC861VD has separate, ++/* Based on ALC880 version. But ALC861VD and ALC887 have separate, + * different NIDs for mute/unmute switch and volume control */ + static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, + const struct auto_pin_cfg *cfg) diff --git a/queue-2.6.36/alsa-hda-fix-dmesg-output-of-hdmi-supported-bits.patch b/queue-2.6.36/alsa-hda-fix-dmesg-output-of-hdmi-supported-bits.patch new file mode 100644 index 00000000000..4ffc9f097d1 --- /dev/null +++ b/queue-2.6.36/alsa-hda-fix-dmesg-output-of-hdmi-supported-bits.patch @@ -0,0 +1,31 @@ +From d757534ed15387202e322854cd72dc58bbb975de Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Tue, 25 Jan 2011 19:44:26 +0100 +Subject: ALSA: HDA: Fix dmesg output of HDMI supported bits + +From: David Henningsson + +commit d757534ed15387202e322854cd72dc58bbb975de upstream. + +This typo caused the dmesg output of the supported bits of HDMI +to be cut off early. + +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_eld.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/pci/hda/hda_eld.c ++++ b/sound/pci/hda/hda_eld.c +@@ -381,7 +381,7 @@ static void hdmi_show_short_audio_desc(s + snd_print_pcm_rates(a->rates, buf, sizeof(buf)); + + if (a->format == AUDIO_CODING_TYPE_LPCM) +- snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2 - 8)); ++ snd_print_pcm_bits(a->sample_bits, buf2 + 8, sizeof(buf2) - 8); + else if (a->max_bitrate) + snprintf(buf2, sizeof(buf2), + ", max bitrate = %d", a->max_bitrate); diff --git a/queue-2.6.36/alsa-hda-fix-memory-leaks-in-conexant-jack-arrays.patch b/queue-2.6.36/alsa-hda-fix-memory-leaks-in-conexant-jack-arrays.patch new file mode 100644 index 00000000000..12521c6fbaa --- /dev/null +++ b/queue-2.6.36/alsa-hda-fix-memory-leaks-in-conexant-jack-arrays.patch @@ -0,0 +1,46 @@ +From 70f7db11c45a313b23922cacf248c613c3b2144c Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 2 Feb 2011 17:16:38 +0100 +Subject: ALSA: hda - Fix memory leaks in conexant jack arrays + +From: Takashi Iwai + +commit 70f7db11c45a313b23922cacf248c613c3b2144c upstream. + +The Conexant codec driver adds the jack arrays in init callback which +may be called also in each PM resume. This results in the addition of +new jack element at each time. + +The fix is to check whether the requested jack is already present in +the array. + +Reference: Novell bug 668929 + https://bugzilla.novell.com/show_bug.cgi?id=668929 + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_conexant.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_conexant.c ++++ b/sound/pci/hda/patch_conexant.c +@@ -393,10 +393,16 @@ static int conexant_add_jack(struct hda_ + struct conexant_spec *spec; + struct conexant_jack *jack; + const char *name; +- int err; ++ int i, err; + + spec = codec->spec; + snd_array_init(&spec->jacks, sizeof(*jack), 32); ++ ++ jack = spec->jacks.list; ++ for (i = 0; i < spec->jacks.used; i++, jack++) ++ if (jack->nid == nid) ++ return 0 ; /* already present */ ++ + jack = snd_array_new(&spec->jacks); + name = (type == SND_JACK_HEADPHONE) ? "Headphone" : "Mic" ; + diff --git a/queue-2.6.36/cfg80211-fix-allowing-country-ies-for-wiphy_flag_strict_regulatory.patch b/queue-2.6.36/cfg80211-fix-allowing-country-ies-for-wiphy_flag_strict_regulatory.patch new file mode 100644 index 00000000000..4d71dbcfc11 --- /dev/null +++ b/queue-2.6.36/cfg80211-fix-allowing-country-ies-for-wiphy_flag_strict_regulatory.patch @@ -0,0 +1,62 @@ +From 749b527b21465fb079796c03ffb4302584dc31c1 Mon Sep 17 00:00:00 2001 +From: Luis R. Rodriguez +Date: Wed, 20 Oct 2010 10:18:54 -0700 +Subject: cfg80211: fix allowing country IEs for WIPHY_FLAG_STRICT_REGULATORY + +From: Luis R. Rodriguez + +commit 749b527b21465fb079796c03ffb4302584dc31c1 upstream. + +We should be enabling country IE hints for WIPHY_FLAG_STRICT_REGULATORY +even if we haven't yet recieved regulatory domain hint for the driver +if it needed one. Without this Country IEs are not passed on to drivers +that have set WIPHY_FLAG_STRICT_REGULATORY, today this is just all +Atheros chipset drivers: ath5k, ath9k, ar9170, carl9170. + +This was part of the original design, however it was completely +overlooked... + +Cc: Easwar Krishnan +Signed-off-by: Luis R. Rodriguez +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + include/net/cfg80211.h | 15 ++++++++------- + net/wireless/reg.c | 1 + + 2 files changed, 9 insertions(+), 7 deletions(-) + +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -1201,13 +1201,14 @@ struct cfg80211_ops { + * initiator is %REGDOM_SET_BY_CORE). + * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will + * ignore regulatory domain settings until it gets its own regulatory +- * domain via its regulatory_hint(). After its gets its own regulatory +- * domain it will only allow further regulatory domain settings to +- * further enhance compliance. For example if channel 13 and 14 are +- * disabled by this regulatory domain no user regulatory domain can +- * enable these channels at a later time. This can be used for devices +- * which do not have calibration information gauranteed for frequencies +- * or settings outside of its regulatory domain. ++ * domain via its regulatory_hint() unless the regulatory hint is ++ * from a country IE. After its gets its own regulatory domain it will ++ * only allow further regulatory domain settings to further enhance ++ * compliance. For example if channel 13 and 14 are disabled by this ++ * regulatory domain no user regulatory domain can enable these channels ++ * at a later time. This can be used for devices which do not have ++ * calibration information guaranteed for frequencies or settings ++ * outside of its regulatory domain. + * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure + * that passive scan flags and beaconing flags may not be lifted by + * cfg80211 due to regulatory beacon hints. For more information on beacon +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -816,6 +816,7 @@ static bool ignore_reg_update(struct wip + * desired regulatory domain set + */ + if (wiphy->flags & WIPHY_FLAG_STRICT_REGULATORY && !wiphy->regd && ++ initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE && + !is_world_regdom(last_request->alpha2)) + return true; + return false; diff --git a/queue-2.6.36/cfg80211-pass-the-reg-hint-initiator-to-helpers.patch b/queue-2.6.36/cfg80211-pass-the-reg-hint-initiator-to-helpers.patch new file mode 100644 index 00000000000..c100caf91f8 --- /dev/null +++ b/queue-2.6.36/cfg80211-pass-the-reg-hint-initiator-to-helpers.patch @@ -0,0 +1,62 @@ +From 7ca43d03b1291481bdf894bbaec5d580e7684e7d Mon Sep 17 00:00:00 2001 +From: Luis R. Rodriguez +Date: Wed, 20 Oct 2010 10:18:53 -0700 +Subject: cfg80211: pass the reg hint initiator to helpers + +From: Luis R. Rodriguez + +commit 7ca43d03b1291481bdf894bbaec5d580e7684e7d upstream. + +This is required later. + +Cc: Easwar Krishnan +Signed-off-by: Luis R. Rodriguez +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + net/wireless/reg.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/net/wireless/reg.c ++++ b/net/wireless/reg.c +@@ -723,7 +723,9 @@ EXPORT_SYMBOL(freq_reg_info); + * on the wiphy with the target_bw specified. Then we can simply use + * that below for the desired_bw_khz below. + */ +-static void handle_channel(struct wiphy *wiphy, enum ieee80211_band band, ++static void handle_channel(struct wiphy *wiphy, ++ enum nl80211_reg_initiator initiator, ++ enum ieee80211_band band, + unsigned int chan_idx) + { + int r; +@@ -787,7 +789,9 @@ static void handle_channel(struct wiphy + chan->max_power = (int) MBM_TO_DBM(power_rule->max_eirp); + } + +-static void handle_band(struct wiphy *wiphy, enum ieee80211_band band) ++static void handle_band(struct wiphy *wiphy, ++ enum ieee80211_band band, ++ enum nl80211_reg_initiator initiator) + { + unsigned int i; + struct ieee80211_supported_band *sband; +@@ -796,7 +800,7 @@ static void handle_band(struct wiphy *wi + sband = wiphy->bands[band]; + + for (i = 0; i < sband->n_channels; i++) +- handle_channel(wiphy, band, i); ++ handle_channel(wiphy, initiator, band, i); + } + + static bool ignore_reg_update(struct wiphy *wiphy, +@@ -1033,7 +1037,7 @@ void wiphy_update_regulatory(struct wiph + goto out; + for (band = 0; band < IEEE80211_NUM_BANDS; band++) { + if (wiphy->bands[band]) +- handle_band(wiphy, band); ++ handle_band(wiphy, band, initiator); + } + out: + reg_process_beacons(wiphy); diff --git a/queue-2.6.36/em28xx-fix-audio-input-for-terratec-grabby.patch b/queue-2.6.36/em28xx-fix-audio-input-for-terratec-grabby.patch new file mode 100644 index 00000000000..7f0fdbd98e6 --- /dev/null +++ b/queue-2.6.36/em28xx-fix-audio-input-for-terratec-grabby.patch @@ -0,0 +1,34 @@ +From a3fa904ec79b94f0db7faed010ff94d42f7d1d47 Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Mon, 25 Oct 2010 17:51:15 -0300 +Subject: [media] em28xx: Fix audio input for Terratec Grabby + +From: Mauro Carvalho Chehab + +commit a3fa904ec79b94f0db7faed010ff94d42f7d1d47 upstream. + +The audio input line was wrong. Fix it. + +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/video/em28xx/em28xx-cards.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/media/video/em28xx/em28xx-cards.c ++++ b/drivers/media/video/em28xx/em28xx-cards.c +@@ -1621,11 +1621,11 @@ struct em28xx_board em28xx_boards[] = { + .input = { { + .type = EM28XX_VMUX_COMPOSITE1, + .vmux = SAA7115_COMPOSITE0, +- .amux = EM28XX_AMUX_VIDEO2, ++ .amux = EM28XX_AMUX_LINE_IN, + }, { + .type = EM28XX_VMUX_SVIDEO, + .vmux = SAA7115_SVIDEO3, +- .amux = EM28XX_AMUX_VIDEO2, ++ .amux = EM28XX_AMUX_LINE_IN, + } }, + }, + [EM2860_BOARD_TERRATEC_AV350] = { diff --git a/queue-2.6.36/fix-incorrect-value-of-scsi_max_sg_chain_segments-due-to-include-file-ordering.patch b/queue-2.6.36/fix-incorrect-value-of-scsi_max_sg_chain_segments-due-to-include-file-ordering.patch new file mode 100644 index 00000000000..fcdea1593e8 --- /dev/null +++ b/queue-2.6.36/fix-incorrect-value-of-scsi_max_sg_chain_segments-due-to-include-file-ordering.patch @@ -0,0 +1,31 @@ +From ac61c46f4f7665ab4548e90430c37b2529e16cff Mon Sep 17 00:00:00 2001 +From: David Dillow +Date: Sun, 16 Jan 2011 15:12:39 -0500 +Subject: [SCSI] fix incorrect value of SCSI_MAX_SG_CHAIN_SEGMENTS due to include file ordering + +From: David Dillow + +commit ac61c46f4f7665ab4548e90430c37b2529e16cff upstream. + +If the compiled object doesn't include linux/scatterlist.h before +scsi/scsi.h, it will get an incorrect definition of +SCSI_MAX_SG_CHAIN_SEGMENTS. + +Signed-off-by: David Dillow +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + include/scsi/scsi.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/include/scsi/scsi.h ++++ b/include/scsi/scsi.h +@@ -9,6 +9,7 @@ + #define _SCSI_SCSI_H + + #include ++#include + + struct scsi_cmnd; + diff --git a/queue-2.6.36/fix-medium-error-problems-with-some-arrays-which-can-cause-data-corruption.patch b/queue-2.6.36/fix-medium-error-problems-with-some-arrays-which-can-cause-data-corruption.patch new file mode 100644 index 00000000000..e77315ae428 --- /dev/null +++ b/queue-2.6.36/fix-medium-error-problems-with-some-arrays-which-can-cause-data-corruption.patch @@ -0,0 +1,61 @@ +From a8733c7baf457b071528e385a0b7d4aaec79287c Mon Sep 17 00:00:00 2001 +From: James Bottomley +Date: Fri, 17 Dec 2010 15:36:34 -0500 +Subject: [SCSI] fix medium error problems with some arrays which can cause data corruption + +From: James Bottomley + +commit a8733c7baf457b071528e385a0b7d4aaec79287c upstream. + +Our current handling of medium error assumes that data is returned up +to the bad sector. This assumption holds good for all disk devices, +all DIF arrays and most ordinary arrays. However, an LSI array engine +was recently discovered which reports a medium error without returning +any data. This means that when we report good data up to the medium +error, we've reported junk originally in the buffer as good. Worse, +if the read consists of requested data plus a readahead, and the error +occurs in readahead, we'll just strip off the readahead and report +junk up to userspace as good data with no error. + +The fix for this is to have the error position computation take into +account the amount of data returned by the driver using the scsi +residual data. Unfortunately, not every driver fills in this data, +but for those who don't, it's set to zero, which means we'll think a +full set of data was transferred and the behaviour will be identical +to the prior behaviour of the code (believe the buffer up to the error +sector). All modern drivers seem to set the residual, so that should +fix up the LSI failure/corruption case. + +Reported-by: Douglas Gilbert +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/sd.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +--- a/drivers/scsi/sd.c ++++ b/drivers/scsi/sd.c +@@ -1153,6 +1153,12 @@ static unsigned int sd_completed_bytes(s + u64 end_lba = blk_rq_pos(scmd->request) + (scsi_bufflen(scmd) / 512); + u64 bad_lba; + int info_valid; ++ /* ++ * resid is optional but mostly filled in. When it's unused, ++ * its value is zero, so we assume the whole buffer transferred ++ */ ++ unsigned int transferred = scsi_bufflen(scmd) - scsi_get_resid(scmd); ++ unsigned int good_bytes; + + if (scmd->request->cmd_type != REQ_TYPE_FS) + return 0; +@@ -1186,7 +1192,8 @@ static unsigned int sd_completed_bytes(s + /* This computation should always be done in terms of + * the resolution of the device's medium. + */ +- return (bad_lba - start_lba) * scmd->device->sector_size; ++ good_bytes = (bad_lba - start_lba) * scmd->device->sector_size; ++ return min(good_bytes, transferred); + } + + /** diff --git a/queue-2.6.36/input-bcm5974-add-support-for-macbookair3.patch b/queue-2.6.36/input-bcm5974-add-support-for-macbookair3.patch new file mode 100644 index 00000000000..4226c8d36a5 --- /dev/null +++ b/queue-2.6.36/input-bcm5974-add-support-for-macbookair3.patch @@ -0,0 +1,85 @@ +From 6021afcf19d8c6f5db6d11cadcfb6a22d0c28a48 Mon Sep 17 00:00:00 2001 +From: Edgar (gimli) Hucek +Date: Tue, 9 Nov 2010 17:38:42 +0100 +Subject: input: bcm5974: Add support for MacBookAir3 + +From: Edgar (gimli) Hucek + +commit 6021afcf19d8c6f5db6d11cadcfb6a22d0c28a48 upstream. + +This patch adds support for the MacBookAir3,1 and MacBookAir3,2 +models. + +[rydberg@euromail.se: touchpad range calibration] +Signed-off-by: Edgar (gimli) Hucek +Signed-off-by: Henrik Rydberg +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/mouse/bcm5974.c | 40 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 40 insertions(+) + +--- a/drivers/input/mouse/bcm5974.c ++++ b/drivers/input/mouse/bcm5974.c +@@ -55,6 +55,14 @@ + #define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236 + #define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237 + #define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238 ++/* MacbookAir3,2 (unibody), aka wellspring5 */ ++#define USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI 0x023f ++#define USB_DEVICE_ID_APPLE_WELLSPRING4_ISO 0x0240 ++#define USB_DEVICE_ID_APPLE_WELLSPRING4_JIS 0x0241 ++/* MacbookAir3,1 (unibody), aka wellspring4 */ ++#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI 0x0242 ++#define USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO 0x0243 ++#define USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS 0x0244 + + #define BCM5974_DEVICE(prod) { \ + .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \ +@@ -80,6 +88,14 @@ static const struct usb_device_id bcm597 + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI), + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_ISO), + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING3_JIS), ++ /* MacbookAir3,2 */ ++ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI), ++ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_ISO), ++ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4_JIS), ++ /* MacbookAir3,1 */ ++ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI), ++ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO), ++ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS), + /* Terminating entry */ + {} + }; +@@ -234,6 +250,30 @@ static const struct bcm5974_config bcm59 + { DIM_X, DIM_X / SN_COORD, -4460, 5166 }, + { DIM_Y, DIM_Y / SN_COORD, -75, 6700 } + }, ++ { ++ USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI, ++ USB_DEVICE_ID_APPLE_WELLSPRING4_ISO, ++ USB_DEVICE_ID_APPLE_WELLSPRING4_JIS, ++ HAS_INTEGRATED_BUTTON, ++ 0x84, sizeof(struct bt_data), ++ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, ++ { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, ++ { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, ++ { DIM_X, DIM_X / SN_COORD, -4620, 5140 }, ++ { DIM_Y, DIM_Y / SN_COORD, -150, 6600 } ++ }, ++ { ++ USB_DEVICE_ID_APPLE_WELLSPRING4A_ANSI, ++ USB_DEVICE_ID_APPLE_WELLSPRING4A_ISO, ++ USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS, ++ HAS_INTEGRATED_BUTTON, ++ 0x84, sizeof(struct bt_data), ++ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS, ++ { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 }, ++ { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 }, ++ { DIM_X, DIM_X / SN_COORD, -4616, 5112 }, ++ { DIM_Y, DIM_Y / SN_COORD, -142, 5234 } ++ }, + {} + }; + diff --git a/queue-2.6.36/input-i8042-introduce-notimeout-blacklist-for-dell-vostro-v13.patch b/queue-2.6.36/input-i8042-introduce-notimeout-blacklist-for-dell-vostro-v13.patch new file mode 100644 index 00000000000..22d98e3c59c --- /dev/null +++ b/queue-2.6.36/input-i8042-introduce-notimeout-blacklist-for-dell-vostro-v13.patch @@ -0,0 +1,104 @@ +From f8313ef1f448006207f12c107123522c8bc00f15 Mon Sep 17 00:00:00 2001 +From: Jiri Kosina +Date: Sat, 8 Jan 2011 01:37:26 -0800 +Subject: Input: i8042 - introduce 'notimeout' blacklist for Dell Vostro V13 + +From: Jiri Kosina + +commit f8313ef1f448006207f12c107123522c8bc00f15 upstream. + +i8042 controller present in Dell Vostro V13 errorneously signals spurious +timeouts. + +Introduce i8042.notimeout parameter for ignoring i8042-signalled timeouts +and apply this quirk automatically for Dell Vostro V13, based on DMI match. + +In addition to that, this machine also needs to be added to nomux blacklist. + +Signed-off-by: Jiri Kosina +Signed-off-by: Dmitry Torokhov +Cc: Tim Gardner +Signed-off-by: Greg Kroah-Hartman + +--- + Documentation/kernel-parameters.txt | 1 + + drivers/input/serio/i8042-x86ia64io.h | 21 +++++++++++++++++++++ + drivers/input/serio/i8042.c | 6 +++++- + 3 files changed, 27 insertions(+), 1 deletion(-) + +--- a/Documentation/kernel-parameters.txt ++++ b/Documentation/kernel-parameters.txt +@@ -879,6 +879,7 @@ and is between 256 and 4096 characters. + controller + i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX + controllers ++ i8042.notimeout [HW] Ignore timeout condition signalled by conroller + i8042.reset [HW] Reset the controller during init and cleanup + i8042.unlock [HW] Unlock (ignore) the keylock + +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -420,6 +420,13 @@ static const struct dmi_system_id __init + DMI_MATCH(DMI_PRODUCT_VERSION, "0100"), + }, + }, ++ { ++ /* Dell Vostro V13 */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V13"), ++ }, ++ }, + { } + }; + +@@ -541,6 +548,17 @@ static const struct dmi_system_id __init + }; + #endif + ++static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = { ++ { ++ /* Dell Vostro V13 */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V13"), ++ }, ++ }, ++ { } ++}; ++ + /* + * Some Wistron based laptops need us to explicitly enable the 'Dritek + * keyboard extension' to make their extra keys start generating scancodes. +@@ -893,6 +911,9 @@ static int __init i8042_platform_init(vo + if (dmi_check_system(i8042_dmi_nomux_table)) + i8042_nomux = true; + ++ if (dmi_check_system(i8042_dmi_notimeout_table)) ++ i8042_notimeout = true; ++ + if (dmi_check_system(i8042_dmi_dritek_table)) + i8042_dritek = true; + #endif /* CONFIG_X86 */ +--- a/drivers/input/serio/i8042.c ++++ b/drivers/input/serio/i8042.c +@@ -61,6 +61,10 @@ static bool i8042_noloop; + module_param_named(noloop, i8042_noloop, bool, 0); + MODULE_PARM_DESC(noloop, "Disable the AUX Loopback command while probing for the AUX port"); + ++static bool i8042_notimeout; ++module_param_named(notimeout, i8042_notimeout, bool, 0); ++MODULE_PARM_DESC(notimeout, "Ignore timeouts signalled by i8042"); ++ + #ifdef CONFIG_X86 + static bool i8042_dritek; + module_param_named(dritek, i8042_dritek, bool, 0); +@@ -503,7 +507,7 @@ static irqreturn_t i8042_interrupt(int i + } else { + + dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) | +- ((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0); ++ ((str & I8042_STR_TIMEOUT && !i8042_notimeout) ? SERIO_TIMEOUT : 0); + + port_no = (str & I8042_STR_AUXDATA) ? + I8042_AUX_PORT_NO : I8042_KBD_PORT_NO; diff --git a/queue-2.6.36/libsas-fix-runaway-error-handler-problem.patch b/queue-2.6.36/libsas-fix-runaway-error-handler-problem.patch new file mode 100644 index 00000000000..6f7609f008a --- /dev/null +++ b/queue-2.6.36/libsas-fix-runaway-error-handler-problem.patch @@ -0,0 +1,33 @@ +From 9ee91f7fb550a4c82f82d9818e42493484c754af Mon Sep 17 00:00:00 2001 +From: James Bottomley +Date: Thu, 20 Jan 2011 17:26:44 -0600 +Subject: [SCSI] libsas: fix runaway error handler problem + +From: James Bottomley + +commit 9ee91f7fb550a4c82f82d9818e42493484c754af upstream. + +libsas makes use of scsi_schedule_eh() but forgets to clear the +host_eh_scheduled flag in its error handling routine. Because of this, +the error handler thread never gets to sleep; it's constantly awake and +trying to run the error routine leading to console spew and inability to +run anything else (at least on a UP system). The fix is to clear the +flag as we splice the work queue. + +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libsas/sas_scsi_host.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/scsi/libsas/sas_scsi_host.c ++++ b/drivers/scsi/libsas/sas_scsi_host.c +@@ -649,6 +649,7 @@ void sas_scsi_recover_host(struct Scsi_H + + spin_lock_irqsave(shost->host_lock, flags); + list_splice_init(&shost->eh_cmd_q, &eh_work_q); ++ shost->host_eh_scheduled = 0; + spin_unlock_irqrestore(shost->host_lock, flags); + + SAS_DPRINTK("Enter %s\n", __func__); diff --git a/queue-2.6.36/mpt2sas-add-missing-initialization-of-scsih_cmds.patch b/queue-2.6.36/mpt2sas-add-missing-initialization-of-scsih_cmds.patch new file mode 100644 index 00000000000..28968c8c4b5 --- /dev/null +++ b/queue-2.6.36/mpt2sas-add-missing-initialization-of-scsih_cmds.patch @@ -0,0 +1,33 @@ +From d685c262083dcd5fd98b7499b22a377a3225229c Mon Sep 17 00:00:00 2001 +From: Kashyap, Desai +Date: Tue, 17 Nov 2009 13:16:37 +0530 +Subject: [SCSI] mpt2sas: add missing initialization of scsih_cmds + +From: Kashyap, Desai + +commit d685c262083dcd5fd98b7499b22a377a3225229c upstream. + +Internal command scsih_cmds init is included in mpt2sas_base_attach. + +Signed-off-by: Kashyap Desai +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_base.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/scsi/mpt2sas/mpt2sas_base.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_base.c +@@ -3662,6 +3662,11 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPT + ioc->scsih_cmds.status = MPT2_CMD_NOT_USED; + mutex_init(&ioc->scsih_cmds.mutex); + ++ /* scsih internal command bits */ ++ ioc->scsih_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); ++ ioc->scsih_cmds.status = MPT2_CMD_NOT_USED; ++ mutex_init(&ioc->scsih_cmds.mutex); ++ + /* task management internal command bits */ + ioc->tm_cmds.reply = kzalloc(ioc->reply_sz, GFP_KERNEL); + ioc->tm_cmds.status = MPT2_CMD_NOT_USED; diff --git a/queue-2.6.36/mpt2sas-correct-resizing-calculation-for-max_queue_depth.patch b/queue-2.6.36/mpt2sas-correct-resizing-calculation-for-max_queue_depth.patch new file mode 100644 index 00000000000..12c756c2435 --- /dev/null +++ b/queue-2.6.36/mpt2sas-correct-resizing-calculation-for-max_queue_depth.patch @@ -0,0 +1,39 @@ +From 11e1b961ab067ee3acaf723531da4d3f23e1d6f7 Mon Sep 17 00:00:00 2001 +From: Kashyap, Desai +Date: Tue, 4 Jan 2011 11:34:57 +0530 +Subject: [SCSI] mpt2sas: Correct resizing calculation for max_queue_depth + +From: Kashyap, Desai + +commit 11e1b961ab067ee3acaf723531da4d3f23e1d6f7 upstream. + +The ioc->hba_queue_depth is not properly resized when the controller +firmware reports that it supports more outstanding IO than what can be fit +inside the reply descriptor pool depth. This is reproduced by setting the +controller global credits larger than 30,000. The bug results in an +incorrect sizing of the queues. The fix is to resize the queue_size by +dividing queue_diff by two. + +Signed-off-by: Kashyap Desai +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_base.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/scsi/mpt2sas/mpt2sas_base.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_base.c +@@ -2057,9 +2057,9 @@ _base_allocate_memory_pools(struct MPT2S + /* adjust hba_queue_depth, reply_free_queue_depth, + * and queue_size + */ +- ioc->hba_queue_depth -= queue_diff; +- ioc->reply_free_queue_depth -= queue_diff; +- queue_size -= queue_diff; ++ ioc->hba_queue_depth -= (queue_diff / 2); ++ ioc->reply_free_queue_depth -= (queue_diff / 2); ++ queue_size = facts->MaxReplyDescriptorPostQueueDepth; + } + ioc->reply_post_queue_depth = queue_size; + diff --git a/queue-2.6.36/mpt2sas-fix-device-removal-handshake-for-zoned-devices.patch b/queue-2.6.36/mpt2sas-fix-device-removal-handshake-for-zoned-devices.patch new file mode 100644 index 00000000000..6858098fcbd --- /dev/null +++ b/queue-2.6.36/mpt2sas-fix-device-removal-handshake-for-zoned-devices.patch @@ -0,0 +1,37 @@ +From 4dc2757a2e9a9d1f2faee4fc6119276fc0061c16 Mon Sep 17 00:00:00 2001 +From: Kashyap, Desai +Date: Tue, 4 Jan 2011 11:32:13 +0530 +Subject: [SCSI] mpt2sas: Fix device removal handshake for zoned devices + +From: Kashyap, Desai + +commit 4dc2757a2e9a9d1f2faee4fc6119276fc0061c16 upstream. + +When zoning end devices, the driver is not sending device +removal handshake alogrithm to firmware. This results in controller +firmware not sending sas topology add events the next time the device is +added. The fix is the driver should be doing the device removal handshake +even though the PHYSTATUS_VACANT bit is set in the PhyStatus of the +event data. The current design is avoiding the handshake when the +VACANT bit is set in the phy status. + +Signed-off-by: Kashyap Desai +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_scsih.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c +@@ -2957,9 +2957,6 @@ _scsih_check_topo_delete_events(struct M + u16 handle; + + for (i = 0 ; i < event_data->NumEntries; i++) { +- if (event_data->PHY[i].PhyStatus & +- MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT) +- continue; + handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle); + if (!handle) + continue; diff --git a/queue-2.6.36/mpt2sas-fix-integrated-raid-unsynced-on-shutdown-problem.patch b/queue-2.6.36/mpt2sas-fix-integrated-raid-unsynced-on-shutdown-problem.patch new file mode 100644 index 00000000000..5147929950a --- /dev/null +++ b/queue-2.6.36/mpt2sas-fix-integrated-raid-unsynced-on-shutdown-problem.patch @@ -0,0 +1,45 @@ +From 3a9c913a3e57b170887d39456e04c18f2305ec67 Mon Sep 17 00:00:00 2001 +From: Kashyap, Desai +Date: Tue, 4 Jan 2011 11:40:23 +0530 +Subject: [SCSI] mpt2sas: fix Integrated Raid unsynced on shutdown problem + +From: Kashyap, Desai + +commit 3a9c913a3e57b170887d39456e04c18f2305ec67 upstream. + +Issue: +IR shutdown(sending) and IR shutdown(complete) messages not +listed in /var/log/messages when driver is removed. + +The driver needs to issue a MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED +request when the driver is unloaded so the IR metadata journal is updated. +If this request is not sent, then the volume would need a "check +consistency" issued on the next bootup if the volume was roamed from one +initiator to another. The current driver supports this feature only when the +system is rebooted, however this also need to be supported if the driver is +unloaded + +Fix: +To fix this issue, the driver is going +to need to call the _scsih_ir_shutdown prior to reporting +the volumes missing from the OS, hence the device handles +are still present. + +Signed-off-by: Kashyap Desai +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_scsih.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c +@@ -6685,6 +6685,7 @@ _scsih_remove(struct pci_dev *pdev) + destroy_workqueue(wq); + + /* release all the volumes */ ++ _scsih_ir_shutdown(ioc); + list_for_each_entry_safe(raid_device, next, &ioc->raid_device_list, + list) { + if (raid_device->starget) { diff --git a/queue-2.6.36/mpt2sas-fix-internal-device-reset-for-older-firmware-prior-to-mpi-rev-k.patch b/queue-2.6.36/mpt2sas-fix-internal-device-reset-for-older-firmware-prior-to-mpi-rev-k.patch new file mode 100644 index 00000000000..bfe37cff1e4 --- /dev/null +++ b/queue-2.6.36/mpt2sas-fix-internal-device-reset-for-older-firmware-prior-to-mpi-rev-k.patch @@ -0,0 +1,40 @@ +From efe82a16bc0f9f9e1fc8fa706eb0309fcd57770a Mon Sep 17 00:00:00 2001 +From: Kashyap, Desai +Date: Tue, 4 Jan 2011 11:34:17 +0530 +Subject: [SCSI] mpt2sas: fix internal device reset for older firmware prior to MPI Rev K + +From: Kashyap, Desai + +commit efe82a16bc0f9f9e1fc8fa706eb0309fcd57770a upstream. + +The "internal device reset complete" event is not supported +for older firmware prior to MPI Rev K We added +a check in the driver so the "internal device reset" event is +ignored for older firmware. When ignored, the tm_busy flag doesn't +get set nor cleared. Without this fix, IO queues would be froozen +indefinetly after the "internal device reset" event, as the "complete" event +never sent to clear the flag. + +Signed-off-by: Kashyap Desai +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_scsih.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c +@@ -4937,6 +4937,12 @@ _scsih_sas_device_status_change_event(st + event_data); + #endif + ++ /* In MPI Revision K (0xC), the internal device reset complete was ++ * implemented, so avoid setting tm_busy flag for older firmware. ++ */ ++ if ((ioc->facts.HeaderVersion >> 8) < 0xC) ++ return; ++ + if (event_data->ReasonCode != + MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET && + event_data->ReasonCode != diff --git a/queue-2.6.36/mpt2sas-fix-the-race-between-broadcast-asyn-event-and-scsi-command-completion.patch b/queue-2.6.36/mpt2sas-fix-the-race-between-broadcast-asyn-event-and-scsi-command-completion.patch new file mode 100644 index 00000000000..b6b778b0448 --- /dev/null +++ b/queue-2.6.36/mpt2sas-fix-the-race-between-broadcast-asyn-event-and-scsi-command-completion.patch @@ -0,0 +1,160 @@ +From ec07a053597bdab51cbd23619f9f9f392712508a Mon Sep 17 00:00:00 2001 +From: Kashyap, Desai +Date: Wed, 5 Jan 2011 17:54:32 +0530 +Subject: [SCSI] mpt2sas: Fix the race between broadcast asyn event and scsi command completion + +From: Kashyap, Desai + +commit ec07a053597bdab51cbd23619f9f9f392712508a upstream. + +False timeout after hard resets, there were two issues which leads +to timeout. +(1) Panic because of invalid memory access in the broadcast asyn +event processing routine due to a race between accessing the scsi command +pointer from broadcast asyn event processing thread and completing +the same scsi command from the interrupt context. +(2) Broadcast asyn event notifcations are not handled due to events +ignored while the broadcast asyn event is activity being processed +from the event process kernel thread. + +In addition, changed the ABRT_TASK_SET to ABORT_TASK in the +broadcast async event processing routine. This is less disruptive to other +request that generate Broadcast Asyn Primitives besides target +reset. e.g clear reservations, microcode download,and mode select. + +Signed-off-by: Kashyap Desai +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_scsih.c | 54 +++++++++++++++++++++++++++++------ + 1 file changed, 45 insertions(+), 9 deletions(-) + +--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c +@@ -819,7 +819,7 @@ _scsih_is_end_device(u32 device_info) + } + + /** +- * mptscsih_get_scsi_lookup - returns scmd entry ++ * _scsih_scsi_lookup_get - returns scmd entry + * @ioc: per adapter object + * @smid: system request message index + * +@@ -832,6 +832,28 @@ _scsih_scsi_lookup_get(struct MPT2SAS_AD + } + + /** ++ * _scsih_scsi_lookup_get_clear - returns scmd entry ++ * @ioc: per adapter object ++ * @smid: system request message index ++ * ++ * Returns the smid stored scmd pointer. ++ * Then will derefrence the stored scmd pointer. ++ */ ++static inline struct scsi_cmnd * ++_scsih_scsi_lookup_get_clear(struct MPT2SAS_ADAPTER *ioc, u16 smid) ++{ ++ unsigned long flags; ++ struct scsi_cmnd *scmd; ++ ++ spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ++ scmd = ioc->scsi_lookup[smid - 1].scmd; ++ ioc->scsi_lookup[smid - 1].scmd = NULL; ++ spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); ++ ++ return scmd; ++} ++ ++/** + * _scsih_scsi_lookup_find_by_scmd - scmd lookup + * @ioc: per adapter object + * @smid: system request message index +@@ -3183,7 +3205,7 @@ _scsih_flush_running_cmds(struct MPT2SAS + u16 count = 0; + + for (smid = 1; smid <= ioc->scsiio_depth; smid++) { +- scmd = _scsih_scsi_lookup_get(ioc, smid); ++ scmd = _scsih_scsi_lookup_get_clear(ioc, smid); + if (!scmd) + continue; + count++; +@@ -3775,7 +3797,7 @@ _scsih_io_done(struct MPT2SAS_ADAPTER *i + u32 response_code = 0; + + mpi_reply = mpt2sas_base_get_reply_virt_addr(ioc, reply); +- scmd = _scsih_scsi_lookup_get(ioc, smid); ++ scmd = _scsih_scsi_lookup_get_clear(ioc, smid); + if (scmd == NULL) + return 1; + +@@ -5037,6 +5059,7 @@ _scsih_sas_broadcast_primative_event(str + struct fw_event_work *fw_event) + { + struct scsi_cmnd *scmd; ++ struct scsi_device *sdev; + u16 smid, handle; + u32 lun; + struct MPT2SAS_DEVICE *sas_device_priv_data; +@@ -5047,12 +5070,17 @@ _scsih_sas_broadcast_primative_event(str + Mpi2EventDataSasBroadcastPrimitive_t *event_data = fw_event->event_data; + #endif + u16 ioc_status; ++ unsigned long flags; ++ int r; ++ + dewtprintk(ioc, printk(MPT2SAS_INFO_FMT "broadcast primative: " + "phy number(%d), width(%d)\n", ioc->name, event_data->PhyNum, + event_data->PortWidth)); + dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name, + __func__)); + ++ spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); ++ ioc->broadcast_aen_busy = 0; + termination_count = 0; + query_count = 0; + mpi_reply = ioc->tm_cmds.reply; +@@ -5060,7 +5088,8 @@ _scsih_sas_broadcast_primative_event(str + scmd = _scsih_scsi_lookup_get(ioc, smid); + if (!scmd) + continue; +- sas_device_priv_data = scmd->device->hostdata; ++ sdev = scmd->device; ++ sas_device_priv_data = sdev->hostdata; + if (!sas_device_priv_data || !sas_device_priv_data->sas_target) + continue; + /* skip hidden raid components */ +@@ -5076,6 +5105,7 @@ _scsih_sas_broadcast_primative_event(str + lun = sas_device_priv_data->lun; + query_count++; + ++ spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); + mpt2sas_scsih_issue_tm(ioc, handle, 0, 0, lun, + MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK, smid, 30, NULL); + ioc->tm_cmds.status = MPT2_CMD_NOT_USED; +@@ -5085,14 +5115,20 @@ _scsih_sas_broadcast_primative_event(str + (mpi_reply->ResponseCode == + MPI2_SCSITASKMGMT_RSP_TM_SUCCEEDED || + mpi_reply->ResponseCode == +- MPI2_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC)) ++ MPI2_SCSITASKMGMT_RSP_IO_QUEUED_ON_IOC)) { ++ spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); + continue; +- +- mpt2sas_scsih_issue_tm(ioc, handle, 0, 0, lun, +- MPI2_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET, 0, 30, NULL); ++ } ++ r = mpt2sas_scsih_issue_tm(ioc, handle, sdev->channel, sdev->id, ++ sdev->lun, MPI2_SCSITASKMGMT_TASKTYPE_ABORT_TASK, smid, 30, ++ scmd); ++ if (r == FAILED) ++ sdev_printk(KERN_WARNING, sdev, "task abort: FAILED " ++ "scmd(%p)\n", scmd); + termination_count += le32_to_cpu(mpi_reply->TerminationCount); ++ spin_lock_irqsave(&ioc->scsi_lookup_lock, flags); + } +- ioc->broadcast_aen_busy = 0; ++ spin_unlock_irqrestore(&ioc->scsi_lookup_lock, flags); + + dtmprintk(ioc, printk(MPT2SAS_INFO_FMT + "%s - exit, query_count = %d termination_count = %d\n", diff --git a/queue-2.6.36/mpt2sas-kernel-panic-during-large-topology-discovery.patch b/queue-2.6.36/mpt2sas-kernel-panic-during-large-topology-discovery.patch new file mode 100644 index 00000000000..12cfb0db507 --- /dev/null +++ b/queue-2.6.36/mpt2sas-kernel-panic-during-large-topology-discovery.patch @@ -0,0 +1,69 @@ +From 4224489f45b503f0a1f1cf310f76dc108f45689a Mon Sep 17 00:00:00 2001 +From: Kashyap, Desai +Date: Tue, 4 Jan 2011 11:38:39 +0530 +Subject: [SCSI] mpt2sas: Kernel Panic during Large Topology discovery + +From: Kashyap, Desai + +commit 4224489f45b503f0a1f1cf310f76dc108f45689a upstream. + +There was a configuration page timing out during the initial port +enable at driver load time. The port enable would fail, and this would +result in the driver unloading itself, meanwhile the driver was accessing +freed memory in another context resulting in the panic. The fix is to +prevent access to freed memory once the driver had issued the diag reset +which woke up the sleeping port enable process. The routine +_base_reset_handler was reorganized so the last sleeping process woken up was +the port_enable. + +Signed-off-by: Kashyap Desai +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/mpt2sas/mpt2sas_base.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/mpt2sas/mpt2sas_base.c ++++ b/drivers/scsi/mpt2sas/mpt2sas_base.c +@@ -3786,6 +3786,8 @@ mpt2sas_base_detach(struct MPT2SAS_ADAPT + static void + _base_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase) + { ++ mpt2sas_scsih_reset_handler(ioc, reset_phase); ++ mpt2sas_ctl_reset_handler(ioc, reset_phase); + switch (reset_phase) { + case MPT2_IOC_PRE_RESET: + dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: " +@@ -3816,8 +3818,6 @@ _base_reset_handler(struct MPT2SAS_ADAPT + "MPT2_IOC_DONE_RESET\n", ioc->name, __func__)); + break; + } +- mpt2sas_scsih_reset_handler(ioc, reset_phase); +- mpt2sas_ctl_reset_handler(ioc, reset_phase); + } + + /** +@@ -3871,6 +3871,7 @@ mpt2sas_base_hard_reset_handler(struct M + { + int r; + unsigned long flags; ++ u8 pe_complete = ioc->wait_for_port_enable_to_complete; + + dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: enter\n", ioc->name, + __func__)); +@@ -3913,6 +3914,14 @@ mpt2sas_base_hard_reset_handler(struct M + if (r) + goto out; + _base_reset_handler(ioc, MPT2_IOC_AFTER_RESET); ++ ++ /* If this hard reset is called while port enable is active, then ++ * there is no reason to call make_ioc_operational ++ */ ++ if (pe_complete) { ++ r = -EFAULT; ++ goto out; ++ } + r = _base_make_ioc_operational(ioc, sleep_flag); + if (!r) + _base_reset_handler(ioc, MPT2_IOC_DONE_RESET); diff --git a/queue-2.6.36/qdio-use-proper-qebsm-operand-for-siga-r-and-siga-s.patch b/queue-2.6.36/qdio-use-proper-qebsm-operand-for-siga-r-and-siga-s.patch new file mode 100644 index 00000000000..d4aa73e5812 --- /dev/null +++ b/queue-2.6.36/qdio-use-proper-qebsm-operand-for-siga-r-and-siga-s.patch @@ -0,0 +1,140 @@ +From 958c0ba403cb6a693b54be2389f9ef53377fa259 Mon Sep 17 00:00:00 2001 +From: Jan Glauber +Date: Wed, 5 Jan 2011 12:47:52 +0100 +Subject: [S390] qdio: use proper QEBSM operand for SIGA-R and SIGA-S + +From: Jan Glauber + +commit 958c0ba403cb6a693b54be2389f9ef53377fa259 upstream. + +If QIOASSIST is enabled for a qdio device the SIGA instruction requires +a modified function code. This function code modifier was missing for +SIGA-R and SIGA-S which can lead to a kernel panic caused by an +operand exception. + +Signed-off-by: Jan Glauber +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/s390/cio/qdio.h | 6 ++++++ + drivers/s390/cio/qdio_main.c | 43 ++++++++++++++++++++++++++++--------------- + 2 files changed, 34 insertions(+), 15 deletions(-) + +--- a/drivers/s390/cio/qdio.h ++++ b/drivers/s390/cio/qdio.h +@@ -91,6 +91,12 @@ enum qdio_irq_states { + #define AC1_SC_QEBSM_AVAILABLE 0x02 /* available for subchannel */ + #define AC1_SC_QEBSM_ENABLED 0x01 /* enabled for subchannel */ + ++/* SIGA flags */ ++#define QDIO_SIGA_WRITE 0x00 ++#define QDIO_SIGA_READ 0x01 ++#define QDIO_SIGA_SYNC 0x02 ++#define QDIO_SIGA_QEBSM_FLAG 0x80 ++ + #ifdef CONFIG_64BIT + static inline int do_sqbs(u64 token, unsigned char state, int queue, + int *start, int *count) +--- a/drivers/s390/cio/qdio_main.c ++++ b/drivers/s390/cio/qdio_main.c +@@ -29,11 +29,12 @@ MODULE_AUTHOR("Utz Bacher irq_ptr->schid); ++ unsigned int fc = QDIO_SIGA_SYNC; + int cc; + + if (!need_siga_sync(q)) +@@ -287,7 +291,12 @@ static inline int qdio_siga_sync(struct + DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-s:%1d", q->nr); + qperf_inc(q, siga_sync); + +- cc = do_siga_sync(q->irq_ptr->schid, output, input); ++ if (is_qebsm(q)) { ++ schid = q->irq_ptr->sch_token; ++ fc |= QDIO_SIGA_QEBSM_FLAG; ++ } ++ ++ cc = do_siga_sync(schid, output, input, fc); + if (cc) + DBF_ERROR("%4x SIGA-S:%2d", SCH_NO(q), cc); + return cc; +@@ -313,8 +322,8 @@ static inline int qdio_siga_sync_all(str + + static int qdio_siga_output(struct qdio_q *q, unsigned int *busy_bit) + { +- unsigned long schid; +- unsigned int fc = 0; ++ unsigned long schid = *((u32 *) &q->irq_ptr->schid); ++ unsigned int fc = QDIO_SIGA_WRITE; + u64 start_time = 0; + int cc; + +@@ -323,11 +332,8 @@ static int qdio_siga_output(struct qdio_ + + if (is_qebsm(q)) { + schid = q->irq_ptr->sch_token; +- fc |= 0x80; ++ fc |= QDIO_SIGA_QEBSM_FLAG; + } +- else +- schid = *((u32 *)&q->irq_ptr->schid); +- + again: + cc = do_siga_output(schid, q->mask, busy_bit, fc); + +@@ -347,12 +353,19 @@ again: + + static inline int qdio_siga_input(struct qdio_q *q) + { ++ unsigned long schid = *((u32 *) &q->irq_ptr->schid); ++ unsigned int fc = QDIO_SIGA_READ; + int cc; + + DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "siga-r:%1d", q->nr); + qperf_inc(q, siga_read); + +- cc = do_siga_input(q->irq_ptr->schid, q->mask); ++ if (is_qebsm(q)) { ++ schid = q->irq_ptr->sch_token; ++ fc |= QDIO_SIGA_QEBSM_FLAG; ++ } ++ ++ cc = do_siga_input(schid, q->mask, fc); + if (cc) + DBF_ERROR("%4x SIGA-R:%2d", SCH_NO(q), cc); + return cc; diff --git a/queue-2.6.36/radio-aimslab.c-fix-gcc-4.5-bug.patch b/queue-2.6.36/radio-aimslab.c-fix-gcc-4.5-bug.patch new file mode 100644 index 00000000000..402f0c91f43 --- /dev/null +++ b/queue-2.6.36/radio-aimslab.c-fix-gcc-4.5-bug.patch @@ -0,0 +1,98 @@ +From e3c92215198cb6aa00ad38db2780faa6b72e0a3f Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Thu, 6 Jan 2011 08:16:04 -0200 +Subject: [media] radio-aimslab.c: Fix gcc 4.5+ bug + +From: Mauro Carvalho Chehab + +commit e3c92215198cb6aa00ad38db2780faa6b72e0a3f upstream. + +gcc 4.5+ doesn't properly evaluate some inlined expressions. +A previous patch were proposed by Andrew Morton using noinline. +However, the entire inlined function is bogus, so let's just +remove it and be happy. + +Reported-by: Andrew Morton +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/radio/radio-aimslab.c | 23 ++++++----------------- + 1 file changed, 6 insertions(+), 17 deletions(-) + +--- a/drivers/media/radio/radio-aimslab.c ++++ b/drivers/media/radio/radio-aimslab.c +@@ -31,7 +31,6 @@ + #include /* Modules */ + #include /* Initdata */ + #include /* request_region */ +-#include /* udelay */ + #include /* kernel radio structs */ + #include /* for KERNEL_VERSION MACRO */ + #include /* outb, outb_p */ +@@ -71,27 +70,17 @@ static struct rtrack rtrack_card; + + /* local things */ + +-static void sleep_delay(long n) +-{ +- /* Sleep nicely for 'n' uS */ +- int d = n / msecs_to_jiffies(1000); +- if (!d) +- udelay(n); +- else +- msleep(jiffies_to_msecs(d)); +-} +- + static void rt_decvol(struct rtrack *rt) + { + outb(0x58, rt->io); /* volume down + sigstr + on */ +- sleep_delay(100000); ++ msleep(100); + outb(0xd8, rt->io); /* volume steady + sigstr + on */ + } + + static void rt_incvol(struct rtrack *rt) + { + outb(0x98, rt->io); /* volume up + sigstr + on */ +- sleep_delay(100000); ++ msleep(100); + outb(0xd8, rt->io); /* volume steady + sigstr + on */ + } + +@@ -120,7 +109,7 @@ static int rt_setvol(struct rtrack *rt, + + if (vol == 0) { /* volume = 0 means mute the card */ + outb(0x48, rt->io); /* volume down but still "on" */ +- sleep_delay(2000000); /* make sure it's totally down */ ++ msleep(2000); /* make sure it's totally down */ + outb(0xd0, rt->io); /* volume steady, off */ + rt->curvol = 0; /* track the volume state! */ + mutex_unlock(&rt->lock); +@@ -155,7 +144,7 @@ static void send_0_byte(struct rtrack *r + outb_p(128+64+16+8+ 1, rt->io); /* on + wr-enable + data low */ + outb_p(128+64+16+8+2+1, rt->io); /* clock */ + } +- sleep_delay(1000); ++ msleep(1); + } + + static void send_1_byte(struct rtrack *rt) +@@ -169,7 +158,7 @@ static void send_1_byte(struct rtrack *r + outb_p(128+64+16+8+4+2+1, rt->io); /* clock */ + } + +- sleep_delay(1000); ++ msleep(1); + } + + static int rt_setfreq(struct rtrack *rt, unsigned long freq) +@@ -427,7 +416,7 @@ static int __init rtrack_init(void) + + /* this ensures that the volume is all the way down */ + outb(0x48, rt->io); /* volume down but still "on" */ +- sleep_delay(2000000); /* make sure it's totally down */ ++ msleep(2000); /* make sure it's totally down */ + outb(0xc0, rt->io); /* steady volume, mute card */ + + return 0; diff --git a/queue-2.6.36/series b/queue-2.6.36/series index d897263bd80..601a9a0b3c0 100644 --- a/queue-2.6.36/series +++ b/queue-2.6.36/series @@ -60,3 +60,25 @@ ath9k_hw-do-pa-offset-calibration-only-on-longcal-interval.patch ath9k_hw-disabled-paprd-for-ar9003.patch ath9k_hw-fix-system-hang-when-resuming-from-s3-s4.patch ath9k-fix-race-conditions-when-stop-device.patch +qdio-use-proper-qebsm-operand-for-siga-r-and-siga-s.patch +fix-medium-error-problems-with-some-arrays-which-can-cause-data-corruption.patch +libsas-fix-runaway-error-handler-problem.patch +mpt2sas-fix-integrated-raid-unsynced-on-shutdown-problem.patch +fix-incorrect-value-of-scsi_max_sg_chain_segments-due-to-include-file-ordering.patch +mpt2sas-fix-device-removal-handshake-for-zoned-devices.patch +mpt2sas-fix-internal-device-reset-for-older-firmware-prior-to-mpi-rev-k.patch +mpt2sas-fix-the-race-between-broadcast-asyn-event-and-scsi-command-completion.patch +mpt2sas-correct-resizing-calculation-for-max_queue_depth.patch +mpt2sas-kernel-panic-during-large-topology-discovery.patch +mpt2sas-add-missing-initialization-of-scsih_cmds.patch +cfg80211-pass-the-reg-hint-initiator-to-helpers.patch +cfg80211-fix-allowing-country-ies-for-wiphy_flag_strict_regulatory.patch +radio-aimslab.c-fix-gcc-4.5-bug.patch +em28xx-fix-audio-input-for-terratec-grabby.patch +alsa-hda-create-mixers-on-alc887.patch +alsa-au88x0-limit-number-of-channels-to-fix-oops-via-oss-emu.patch +alsa-fix-invalid-hardware.h-include-in-ac97c-for-avr32-architecture.patch +alsa-hda-fix-dmesg-output-of-hdmi-supported-bits.patch +alsa-hda-fix-memory-leaks-in-conexant-jack-arrays.patch +input-i8042-introduce-notimeout-blacklist-for-dell-vostro-v13.patch +input-bcm5974-add-support-for-macbookair3.patch