From: Alexey Dobriyan <adobriyan@gmail.com>
To: Gerd Knorr <kraxel@bytesex.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
video4linux list <video4linux-list@redhat.com>
Subject: Re: [patch] v4l: saa7134 byteorder fix
Date: Thu, 12 May 2005 01:13:43 +0400 [thread overview]
Message-ID: <200505120113.44082.adobriyan@gmail.com> (raw)
In-Reply-To: <20050511195910.GA23126@bytesex>
On Wednesday 11 May 2005 23:59, Gerd Knorr wrote:
> Fix byteorder bug in the saa7134 driver. With that ObviouslyCorrect[tm]
> patch applied the driver reportly works on powerpc.
> --- linux-2.6.12-rc3.orig/drivers/media/video/saa7134/saa7134-core.c
> +++ linux-2.6.12-rc3/drivers/media/video/saa7134/saa7134-core.c
> - *ptr = sg_dma_address(list) - list->offset;
> + *ptr = cpu_to_le32(sg_dma_address(list) - list->offset);
Clearly mark pointers to little-endian things.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
diff -uprN linux-vanilla/drivers/media/video/saa7134/saa7134-core.c linux-saa/drivers/media/video/saa7134/saa7134-core.c
--- linux-vanilla/drivers/media/video/saa7134/saa7134-core.c 2005-05-10 03:13:22.000000000 +0400
+++ linux-saa/drivers/media/video/saa7134/saa7134-core.c 2005-05-12 00:27:23.000000000 +0400
@@ -316,7 +316,7 @@ unsigned long saa7134_buffer_base(struct
int saa7134_pgtable_alloc(struct pci_dev *pci, struct saa7134_pgtable *pt)
{
- u32 *cpu;
+ __le32 *cpu;
dma_addr_t dma_addr;
cpu = pci_alloc_consistent(pci, SAA7134_PGTABLE_SIZE, &dma_addr);
@@ -332,7 +332,7 @@ int saa7134_pgtable_build(struct pci_dev
struct scatterlist *list, unsigned int length,
unsigned int startpage)
{
- u32 *ptr;
+ __le32 *ptr;
unsigned int i,p;
BUG_ON(NULL == pt || NULL == pt->cpu);
diff -uprN linux-vanilla/drivers/media/video/saa7134/saa7134.h linux-saa/drivers/media/video/saa7134/saa7134.h
--- linux-vanilla/drivers/media/video/saa7134/saa7134.h 2005-05-10 03:13:22.000000000 +0400
+++ linux-saa/drivers/media/video/saa7134/saa7134.h 2005-05-12 00:26:20.000000000 +0400
@@ -241,7 +241,7 @@ struct saa7134_dma;
/* saa7134 page table */
struct saa7134_pgtable {
unsigned int size;
- u32 *cpu;
+ __le32 *cpu;
dma_addr_t dma;
};
prev parent reply other threads:[~2005-05-11 21:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-11 19:59 [patch] v4l: saa7134 byteorder fix Gerd Knorr
2005-05-11 21:13 ` Alexey Dobriyan [this message]
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=200505120113.44082.adobriyan@gmail.com \
--to=adobriyan@gmail.com \
--cc=kraxel@bytesex.org \
--cc=linux-kernel@vger.kernel.org \
--cc=video4linux-list@redhat.com \
/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.