From: Tim Blechmann <tim@klingt.org>
To: Greg KH <gregkh@suse.de>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
torvalds@linux-foundation.org, akpm@linux-foundation.org,
alan@lxorguk.ukuu.org.uk, Takashi Iwai <tiwai@suse.de>
Subject: Re: [05/27] ALSA: lx6464es - fix device communication via command bus
Date: Wed, 07 Dec 2011 18:13:08 +0100 [thread overview]
Message-ID: <1561513.9b6lVaYVip@moka> (raw)
In-Reply-To: <20111207165600.831023370@clark.kroah.org>
it is not really necessary to apply this patch to 2.6.32, as the problem was
introduced by a change to the memcpy_*_io functions that was introduced in
2.6.34.
otoh, it doesn't harm, either.
On Wednesday 07 December 2011 08:54:38 Greg KH wrote:
> 2.6.32-longterm review patch. If anyone has any objections, please let me
> know.
>
> ------------------
>
> From: Tim Blechmann <tim@klingt.org>
>
> commit a29878553a9a7b4c06f93c7e383527cf014d4ceb upstream.
>
> commit 6175ddf06b6172046a329e3abfd9c901a43efd2e optimized the mem*io
> functions that have been used to send commands to the device. these
> optimizations somehow corrupted the communication with the lx6464es,
> that resulted the device to be unusable with kernels after 2.6.33.
>
> this patch emulates the memcpy_*_io functions via a loop to avoid these
> problems.
>
> Signed-off-by: Tim Blechmann <tim@klingt.org>
> LKML-Reference: <4ECB5257.4040600@ladisch.de>
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
> sound/pci/lx6464es/lx_core.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> --- a/sound/pci/lx6464es/lx_core.c
> +++ b/sound/pci/lx6464es/lx_core.c
> @@ -80,8 +80,12 @@ unsigned long lx_dsp_reg_read(struct lx6
>
> void lx_dsp_reg_readbuf(struct lx6464es *chip, int port, u32 *data, u32
> len) {
> - void __iomem *address = lx_dsp_register(chip, port);
> - memcpy_fromio(data, address, len*sizeof(u32));
> + u32 __iomem *address = lx_dsp_register(chip, port);
> + int i;
> +
> + /* we cannot use memcpy_fromio */
> + for (i = 0; i != len; ++i)
> + data[i] = ioread32(address + i);
> }
>
>
> @@ -94,8 +98,12 @@ void lx_dsp_reg_write(struct lx6464es *c
> void lx_dsp_reg_writebuf(struct lx6464es *chip, int port, const u32 *data,
> u32 len)
> {
> - void __iomem *address = lx_dsp_register(chip, port);
> - memcpy_toio(address, data, len*sizeof(u32));
> + u32 __iomem *address = lx_dsp_register(chip, port);
> + int i;
> +
> + /* we cannot use memcpy_to */
> + for (i = 0; i != len; ++i)
> + iowrite32(data[i], address + i);
> }
next prev parent reply other threads:[~2011-12-07 17:13 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 16:56 [00/27] 2.6.32.50-longterm review Greg KH
2011-12-07 16:54 ` [01/27] i2c-algo-bit: Generate correct i2c address sequence for 10-bit target Greg KH
2011-12-07 16:54 ` [02/27] eCryptfs: Extend array bounds for all filename chars Greg KH
2011-12-07 16:54 ` Greg KH
2011-12-07 16:54 ` [03/27] PCI hotplug: shpchp: dont blindly claim non-AMD 0x7450 device IDs Greg KH
2011-12-07 16:54 ` [04/27] ARM: 7161/1: errata: no automatic store buffer drain Greg KH
2011-12-07 16:54 ` [05/27] ALSA: lx6464es - fix device communication via command bus Greg KH
2011-12-07 17:13 ` Tim Blechmann [this message]
2011-12-07 16:54 ` [06/27] SUNRPC: Ensure we return EAGAIN in xs_nospace if congestion is cleared Greg KH
2011-12-07 16:54 ` [07/27] timekeeping: add arch_offset hook to ktime_get functions Greg KH
2011-12-07 16:54 ` [08/27] p54spi: Add missing spin_lock_init Greg KH
2011-12-07 16:54 ` [09/27] p54spi: Fix workqueue deadlock Greg KH
2011-12-07 16:54 ` [10/27] nl80211: fix MAC address validation Greg KH
2011-12-07 16:54 ` [11/27] gro: reset vlan_tci on reuse Greg KH
2011-12-07 16:54 ` [12/27] staging: usbip: bugfix for deadlock Greg KH
2011-12-07 16:54 ` [13/27] staging: comedi: fix oops for USB DAQ devices Greg KH
2011-12-07 16:54 ` [14/27] Staging: comedi: fix signal handling in read and write Greg KH
2011-12-07 16:54 ` [15/27] USB: whci-hcd: fix endian conversion in qset_clear() Greg KH
2011-12-07 16:54 ` [16/27] usb: ftdi_sio: add PID for Propox ISPcable III Greg KH
2011-12-07 16:54 ` [17/27] usb: option: add SIMCom SIM5218 Greg KH
2011-12-07 16:54 ` [18/27] USB: usb-storage: unusual_devs entry for Kingston DT 101 G2 Greg KH
2011-12-07 16:54 ` [19/27] SCSI: scsi_lib: fix potential NULL dereference Greg KH
2011-12-07 16:54 ` [20/27] SCSI: Silencing killing requests for dead queue Greg KH
2011-12-07 16:54 ` [21/27] cifs: fix cifs stable patch cifs-fix-oplock-break-handling-try-2.patch Greg KH
2011-12-07 16:54 ` [22/27] sched, x86: Avoid unnecessary overflow in sched_clock Greg KH
2011-12-07 16:54 ` [23/27] x86/mpparse: Account for bus types other than ISA and PCI Greg KH
2011-12-07 16:54 ` [24/27] oprofile, x86: Fix crash when unloading module (nmi timer mode) Greg KH
2011-12-07 16:54 ` [25/27] genirq: Fix race condition when stopping the irq thread Greg KH
2011-12-07 16:54 ` [26/27] tick-broadcast: Stop active broadcast device when replacing it Greg KH
2011-12-07 16:55 ` [27/27] clockevents: Set noop handler in clockevents_exchange_device() Greg KH
2011-12-29 12:09 ` Jonathan Nieder
2011-12-30 1:05 ` Linus Torvalds
2011-12-30 1:05 ` Linus Torvalds
2011-12-30 15:07 ` Tim Gardner
[not found] ` <CA++bM2uqcWFM6=WdmrusmugQw2nH_KDyySKH+1qyr8GK0Cq14A@mail.gmail.com>
2012-01-05 10:27 ` Feng Tang
2012-01-10 14:23 ` Thomas Gleixner
2012-01-10 14:23 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1561513.9b6lVaYVip@moka \
--to=tim@klingt.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.