[arch-commits] CVS update of extra/kernels/kernel26suspend2 (5 files)
Thomas Baechler
thomas at archlinux.org
Fri May 4 16:37:00 UTC 2007
Date: Friday, May 4, 2007 @ 12:37:00
Author: thomas
Path: /home/cvs-extra/extra/kernels/kernel26suspend2
Added: current-suspend2-2.6.21.patch.bz2 (1.1) patch_realtek.patch (1.1)
sis900.patch (1.1)
Modified: PKGBUILD (1.15 -> 1.16) kernel26.install (1.6 -> 1.7)
probably final 2.6.21.1-1
-----------------------------------+
PKGBUILD | 66 ++++++----
current-suspend2-2.6.21.patch.bz2 | <<Binary file>>
kernel26.install | 2
patch_realtek.patch | 226 ++++++++++++++++++++++++++++++++++++
sis900.patch | 53 ++++++++
5 files changed, 319 insertions(+), 29 deletions(-)
Index: extra/kernels/kernel26suspend2/PKGBUILD
diff -u extra/kernels/kernel26suspend2/PKGBUILD:1.15 extra/kernels/kernel26suspend2/PKGBUILD:1.16
--- extra/kernels/kernel26suspend2/PKGBUILD:1.15 Mon Apr 30 17:39:18 2007
+++ extra/kernels/kernel26suspend2/PKGBUILD Fri May 4 12:37:00 2007
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD,v 1.15 2007/04/30 21:39:18 thomas Exp $
+# $Id: PKGBUILD,v 1.16 2007/05/04 16:37:00 thomas Exp $
# Maintainer: Thomas Baechler <thomas at archlinux.org>
pkgname=kernel26suspend2
_basekernel=2.6.21
pkgver=2.6.21.1
pkgrel=1
pkgdesc="The Linux Kernel with suspend2 (http://www.suspend2.net) support"
-_suspend2ver=2.2.9.13-for-2.6.21-rc7
+#_suspend2ver=2.2.9.13-for-2.6.21-rc7
arch=('i686')
url="http://www.kernel.org"
backup=('etc/mkinitcpio.d/kernel26suspend2-fallback.conf' \
@@ -20,7 +20,8 @@
logo_linux_vga16.ppm
kernel26suspend2.preset
mkinitcpio-$pkgname.conf
- http://www.suspend2.net/downloads/all/suspend2-${_suspend2ver}.patch.bz2
+ #http://www.suspend2.net/downloads/all/suspend2-${_suspend2ver}.patch.bz2
+ current-suspend2-2.6.21.patch.bz2
http://www.tud.ttu.ee/~t030562/nobile/include/cpufreq-speedstep-dothan-3.patch
acpi-dsdt-initrd-v0.8.4-2.6.21.patch
toshiba-bluetooth.patch
@@ -31,30 +32,34 @@
atkbd.patch
alsa.patch.bz2
alsa-include.patch.bz2
+ patch_realtek.patch
+ sis900.patch
http://heanet.dl.sourceforge.net/sourceforge/squashfs/squashfs3.2-r2.tar.gz
ftp://ftp.fsl.cs.sunysb.edu/pub/unionfs/unionfs-2.x/linux-2.6.21-u2.diff.gz)
md5sums=('1b515f588078dfa7f4bab2634bd17e80'
- 'c4c368f173af267a564948065ffc1689'
- 'ea0c20c24f866395450b3a8859d6cba1'
- 'e0c94fe663dca9f6ba510a0d563acc6c'
- '5a62bcc7e96601052c7405459b483826'
- 'ed6b42fea2f5d27f7eb920746ccc1ebb'
- 'a995ec849ea43d3c89d607bbdd1e7d09'
- 'e140dce8ad579f30f6f721c78209c7fe'
- '2f922c5d8bea6bcbb17983daa68f348f'
- '6becc4ecbfcd5d2c9f25fa85bd46c175'
- 'eb57406fe52ff1c078978ca8956e914a'
- '493137566bc397ec762c86e64bd96849'
- '695d8578a0334fa9bb140917561f03d4'
- 'f6978eca251dfca21ffa46f1169583a4'
- '3ed791c3af3099489faf0d22cbcc55a8'
- 'a64a44d781e6b134a2758cc433248029'
- '197453581bf03bd8f6cb50a4cbcc8685'
- '3f72c692c7c9cf596680bc3ce0cb84ec'
- 'e15b5400b4de044442b7f80494e96018'
- '5e00933ee60f7e1af44225e785de6820'
- 'bf360b92eba9e6d5610196ce2e02fcd1'
- '4964894a3f406d600226b62de570605b')
+ 'c4c368f173af267a564948065ffc1689'
+ 'f1676b080d9e8e4549d527286445e91a'
+ 'e0c94fe663dca9f6ba510a0d563acc6c'
+ '5a62bcc7e96601052c7405459b483826'
+ 'ed6b42fea2f5d27f7eb920746ccc1ebb'
+ 'a995ec849ea43d3c89d607bbdd1e7d09'
+ 'e140dce8ad579f30f6f721c78209c7fe'
+ '2f922c5d8bea6bcbb17983daa68f348f'
+ '17ae1cca6e8453b1798f69446bbe8a7b'
+ 'eb57406fe52ff1c078978ca8956e914a'
+ '493137566bc397ec762c86e64bd96849'
+ '695d8578a0334fa9bb140917561f03d4'
+ 'f6978eca251dfca21ffa46f1169583a4'
+ '3ed791c3af3099489faf0d22cbcc55a8'
+ 'a64a44d781e6b134a2758cc433248029'
+ '197453581bf03bd8f6cb50a4cbcc8685'
+ '3f72c692c7c9cf596680bc3ce0cb84ec'
+ 'e15b5400b4de044442b7f80494e96018'
+ '5e00933ee60f7e1af44225e785de6820'
+ '00bc768e40b48bbbcea4466289af29fc'
+ 'f0c3200fde468a1ed37b363f0fb60c9c'
+ 'bf360b92eba9e6d5610196ce2e02fcd1'
+ '4964894a3f406d600226b62de570605b')
build() {
[ "${CARCH}" = "i686" ] && KARCH=i386
@@ -81,12 +86,17 @@
# status is 070428!
patch -Np1 -i ../alsa.patch || return 1
patch -Np0 -i ../alsa-include.patch || return 1
- # add sqashfs
+ # fix patch_realtek for new asus and lenovo
+ patch -Np1 -i ../patch_realtek.patch || return 1
+ # fix sis900 oops
+ patch -Np1 -i ../sis900.patch || return 1
+ # add squashfs
patch -Np1 -i ../squashfs3.2-r2/kernel-patches/linux-2.6.20/squashfs3.2-patch
# add unionfs
patch -Np1 -i ../linux-2.6.21-u2.diff || return 1
# add suspend2 support
- patch -Np1 -i ../suspend2-${_suspend2ver}.patch || return 1
+ #patch -Np1 -i ../suspend2-${_suspend2ver}.patch || return 1
+ patch -Np1 -i ../current-suspend2-2.6.21.patch || return 1
# Add dothan speedstep support
patch -Np1 -i ../cpufreq-speedstep-dothan-3.patch || return 1
# remove the extraversion from Makefile
@@ -108,8 +118,8 @@
# load configuration
yes "" | make config
# STOP HERE:
- msg "Stopping build..."
- return 1
+ #msg "Stopping build..."
+ #return 1
# build!
make bzImage modules || return 1
mkdir -p $startdir/pkg/{lib/modules,boot}
Index: extra/kernels/kernel26suspend2/current-suspend2-2.6.21.patch.bz2
<<Binary file>>
Index: extra/kernels/kernel26suspend2/kernel26.install
diff -u extra/kernels/kernel26suspend2/kernel26.install:1.6 extra/kernels/kernel26suspend2/kernel26.install:1.7
--- extra/kernels/kernel26suspend2/kernel26.install:1.6 Mon Apr 30 17:39:19 2007
+++ extra/kernels/kernel26suspend2/kernel26.install Fri May 4 12:37:00 2007
@@ -1,7 +1,7 @@
# arg 1: the new package version
# arg 2: the old package version
-KERNEL_VERSION=2.6.20-suspend2
+KERNEL_VERSION=2.6.21-suspend2
post_install () {
# updating module dependencies
Index: extra/kernels/kernel26suspend2/patch_realtek.patch
diff -u /dev/null extra/kernels/kernel26suspend2/patch_realtek.patch:1.1
--- /dev/null Fri May 4 12:37:00 2007
+++ extra/kernels/kernel26suspend2/patch_realtek.patch Fri May 4 12:37:00 2007
@@ -0,0 +1,226 @@
+--- a/sound/pci/hda/patch_realtek.c.old 2007-04-29 12:15:17.000000000 +0200
++++ a/sound/pci/hda/patch_realtek.c 2007-04-25 16:48:02.000000000 +0200
+@@ -117,6 +117,7 @@
+ ALC861VD_3ST,
+ ALC861VD_3ST_DIG,
+ ALC861VD_6ST_DIG,
++ ALC861VD_LENOVO,
+ ALC861VD_AUTO,
+ ALC861VD_MODEL_LAST,
+ };
+@@ -137,6 +138,7 @@
+ ALC882_3ST_DIG,
+ ALC882_6ST_DIG,
+ ALC882_ARIMA,
++ ALC882_W2JC,
+ ALC882_AUTO,
+ ALC885_MACPRO,
+ ALC882_MODEL_LAST,
+@@ -635,6 +635,13 @@
+ { }
+ };
+
++static struct hda_verb alc_gpio3_init_verbs[] = {
++ {0x01, AC_VERB_SET_GPIO_MASK, 0x03},
++ {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x03},
++ {0x01, AC_VERB_SET_GPIO_DATA, 0x03},
++ { }
++};
++
+ /* 32-bit subsystem ID for BIOS loading in HD Audio codec.
+ * 31 ~ 16 : Manufacture ID
+ * 15 ~ 8 : SKU ID
+@@ -660,6 +667,9 @@
+ case 3:
+ snd_hda_sequence_write(codec, alc_gpio2_init_verbs);
+ break;
++ case 7:
++ snd_hda_sequence_write(codec, alc_gpio3_init_verbs);
++ break;
+ case 5:
+ case 6:
+ if (ass & 4) { /* bit 2 : 0 = Desktop, 1 = Laptop */
+@@ -4764,6 +4655,21 @@
+ { } /* end */
+ };
+
++static struct snd_kcontrol_new alc882_w2jc_mixer[] = {
++ HDA_CODEC_VOLUME("Front Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
++ HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
++ HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
++ HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
++ HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
++ HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
++ HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
++ HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
++ HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
++ HDA_CODEC_VOLUME("PC Speaker Playback Volume", 0x0b, 0x05, HDA_INPUT),
++ HDA_CODEC_MUTE("PC Speaker Playback Switch", 0x0b, 0x05, HDA_INPUT),
++ { } /* end */
++};
++
+ static struct snd_kcontrol_new alc882_chmode_mixer[] = {
+ {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+@@ -5083,6 +4988,7 @@
+ [ALC882_3ST_DIG] = "3stack-dig",
+ [ALC882_6ST_DIG] = "6stack-dig",
+ [ALC882_ARIMA] = "arima",
++ [ALC882_W2JC] = "w2jc",
+ [ALC885_MACPRO] = "macpro",
+ [ALC882_AUTO] = "auto",
+ };
+@@ -5093,6 +4999,7 @@
+ SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG),
+ SND_PCI_QUIRK(0x161f, 0x2054, "Arima W820", ALC882_ARIMA),
+ SND_PCI_QUIRK(0x1043, 0x81d8, "Asus P5WD", ALC882_6ST_DIG),
++ SND_PCI_QUIRK(0x1043, 0x1971, "Asus W2JC", ALC882_W2JC),
+ {}
+ };
+
+@@ -5129,6 +5036,17 @@
+ .channel_mode = alc882_sixstack_modes,
+ .input_mux = &alc882_capture_source,
+ },
++ [ALC882_W2JC] = {
++ .mixers = { alc882_w2jc_mixer, alc882_chmode_mixer },
++ .init_verbs = { alc882_init_verbs, alc882_eapd_verbs, alc880_gpio1_init_verbs },
++ .num_dacs = ARRAY_SIZE(alc882_dac_nids),
++ .dac_nids = alc882_dac_nids,
++ .num_channel_mode = ARRAY_SIZE(alc880_threestack_modes),
++ .channel_mode = alc880_threestack_modes,
++ .need_dac_fix = 1,
++ .input_mux = &alc882_capture_source,
++ .dig_out_nid = ALC882_DIGOUT_NID,
++ },
+ [ALC885_MACPRO] = {
+ .mixers = { alc882_macpro_mixer },
+ .init_verbs = { alc882_macpro_init_verbs },
+@@ -8687,6 +8510,27 @@
+ { } /* end */
+ };
+
++static struct snd_kcontrol_new alc861vd_lenovo_mixer[] = {
++ HDA_CODEC_VOLUME("Front Playback Volume", 0x02, 0x0, HDA_OUTPUT),
++// HDA_BIND_MUTE("Front Playback Switch", 0x0c, 2, HDA_INPUT),
++ HDA_CODEC_MUTE("Front Playback Switch", 0x14, 0x0, HDA_OUTPUT),
++
++ HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
++
++ HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
++ HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
++ HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
++
++ HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT),
++ HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
++ HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
++
++ HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
++ HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
++
++ { } /* end */
++};
++
+ /*
+ * generic initialization of ADC, input mixers and output mixers
+ */
+@@ -8708,6 +8552,9 @@
+ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
+
+ /* Capture mixer: unmute Mic, F-Mic, Line, CD inputs */
++ {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
++ {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
++ {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
+ {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
+ {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5)},
+ {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(6)},
+@@ -8812,6 +8656,50 @@
+ { }
+ };
+
++static struct hda_verb alc861vd_eapd_verbs[] = {
++ {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2},
++
++ { }
++};
++
++static struct hda_verb alc861vd_lenovo_unsol_verbs[] = {
++ {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
++ {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
++ {0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)},
++
++ {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
++ {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_MIC_EVENT},
++ {}
++};
++
++/* toggle speaker-output according to the hp-jack state */
++static void alc861vd_lenovo_automute(struct hda_codec *codec)
++{
++ unsigned int present;
++
++ present = snd_hda_codec_read(codec, 0x1b, 0,
++ AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
++ snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0,
++ 0x80, present ? 0x80 : 0);
++ snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
++ 0x80, present ? 0x80 : 0);
++
++ present = snd_hda_codec_read(codec, 0x18, 0,
++ AC_VERB_GET_PIN_SENSE, 0) & 0x80000000;
++ snd_hda_codec_write(codec, 0x0b, 0, AC_VERB_SET_AMP_GAIN_MUTE,
++ 0x7000 | (0x01 << 8) | (present ? 0x80 : 0));
++}
++
++static void alc861vd_lenovo_unsol_event(struct hda_codec *codec, unsigned int res)
++{
++ /* Looks like the unsol event is incompatible with the standard
++ * definition. 4bit tag is placed at 28 bit!
++ */
++ if (((res >> 26) == 0x01) || ((res >> 26) == ALC880_HP_EVENT)
++ || ((res >> 26) == ALC880_MIC_EVENT))
++ alc861vd_lenovo_automute(codec);
++}
++
+ /* pcm configuration: identiacal with ALC880 */
+ #define alc861vd_pcm_analog_playback alc880_pcm_analog_playback
+ #define alc861vd_pcm_analog_capture alc880_pcm_analog_capture
+@@ -8826,6 +8714,7 @@
+ [ALC861VD_3ST] = "3stack",
+ [ALC861VD_3ST_DIG] = "3stack-digout",
+ [ALC861VD_6ST_DIG] = "6stack-digout",
++ [ALC861VD_LENOVO] = "lenovo",
+ [ALC861VD_AUTO] = "auto",
+ };
+
+@@ -8835,7 +8724,8 @@
+ SND_PCI_QUIRK(0x10de, 0x03f0, "Realtek ALC660 demo", ALC660VD_3ST),
+ SND_PCI_QUIRK(0x1019, 0xa88d, "Realtek ALC660 demo", ALC660VD_3ST),
+
+- SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo 3000 C200", ALC861VD_3ST),
++ SND_PCI_QUIRK(0x17aa, 0x3802, "Lenovo 3000 C200", ALC861VD_LENOVO),
++ SND_PCI_QUIRK(0x17aa, 0x2066, "Lenovo", ALC861VD_LENOVO),
+ {}
+ };
+
+@@ -8884,6 +8774,20 @@
+ .channel_mode = alc861vd_6stack_modes,
+ .input_mux = &alc861vd_capture_source,
+ },
++ [ALC861VD_LENOVO] = {
++ .mixers = { alc861vd_lenovo_mixer },
++ .init_verbs = { alc861vd_volume_init_verbs,
++ alc861vd_3stack_init_verbs, alc861vd_eapd_verbs, alc861vd_lenovo_unsol_verbs },
++ .num_dacs = ARRAY_SIZE(alc660vd_dac_nids),
++ .dac_nids = alc660vd_dac_nids,
++ .num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids),
++ .adc_nids = alc861vd_adc_nids,
++ .num_channel_mode = ARRAY_SIZE(alc861vd_3stack_2ch_modes),
++ .channel_mode = alc861vd_3stack_2ch_modes,
++ .input_mux = &alc861vd_capture_source,
++ .unsol_event = alc861vd_lenovo_unsol_event,
++ .init_hook = alc861vd_lenovo_automute,
++ },
+ };
+
+ /*
Index: extra/kernels/kernel26suspend2/sis900.patch
diff -u /dev/null extra/kernels/kernel26suspend2/sis900.patch:1.1
--- /dev/null Fri May 4 12:37:00 2007
+++ extra/kernels/kernel26suspend2/sis900.patch Fri May 4 12:37:00 2007
@@ -0,0 +1,53 @@
+From: Neil Horman <nhorman at tuxdriver.com>
+Date: Thu, 26 Apr 2007 17:47:36 +0000 (-0400)
+Subject: sis900: Allocate rx replacement buffer before rx operation
+X-Git-Url: http://git2.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=dc5a144991ba803bc8afded105c9db1dea0e57ab
+
+sis900: Allocate rx replacement buffer before rx operation
+
+Just found a hole in my last patch. It was reported to me that shortly after we
+integrated this patch. The report was of an oops that took place inside of
+netif_rx when using the sis900 driver. Looking at my origional patch I noted
+that there was a spot between the new skb_alloc and the refill_rx_ring label
+where skb got reassigned to the pointer currently held in the rx_ring for the
+purposes of receiveing the frame. The result of this is however that the buffer
+that gets passed to netif_rx (if it is called), then gets placed right back into
+the rx_ring. So if you receive frames fast enough the skb being processed by
+the network stack can get corrupted. The reporter is testing out the fix I've
+written for this below (I'm not near my hardware at the moment to test myself),
+but I wanted to post it for review ASAP. I'll post test results when I hear
+them, but I think this is a pretty straightforward fix. It just uses a separate
+pointer to do the rx operation, so that we don't improperly reassign the pointer
+that we use to refill the rx ring.
+
+Signed-off-by: Neil Horman <nhorman at tuxdriver.com>
+Signed-off-by: Jeff Garzik <jeff at garzik.org>
+---
+
+diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
+index dea0126..2cb2e15 100644
+--- a/drivers/net/sis900.c
++++ b/drivers/net/sis900.c
+@@ -1753,6 +1753,7 @@ static int sis900_rx(struct net_device *net_dev)
+ sis_priv->rx_ring[entry].cmdsts = RX_BUF_SIZE;
+ } else {
+ struct sk_buff * skb;
++ struct sk_buff * rx_skb;
+
+ pci_unmap_single(sis_priv->pci_dev,
+ sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE,
+@@ -1786,10 +1787,10 @@ static int sis900_rx(struct net_device *net_dev)
+ }
+
+ /* give the socket buffer to upper layers */
+- skb = sis_priv->rx_skbuff[entry];
+- skb_put(skb, rx_size);
+- skb->protocol = eth_type_trans(skb, net_dev);
+- netif_rx(skb);
++ rx_skb = sis_priv->rx_skbuff[entry];
++ skb_put(rx_skb, rx_size);
++ rx_skb->protocol = eth_type_trans(rx_skb, net_dev);
++ netif_rx(rx_skb);
+
+ /* some network statistics */
+ if ((rx_status & BCAST) == MCAST)
More information about the arch-commits
mailing list