From: Florian Lohoff <flo@rfc822.org>
To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH] dec_esp.c repair mmu_sglist breakage
Date: Sat, 28 Sep 2002 03:59:47 +0200 [thread overview]
Message-ID: <20020928015947.GE7706@paradigm.rfc822.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
Hi,
through the whole issue of the mmu_sglist confusion and the broken
reimplantation of mmu_sglist the dec_esp broke. Here is a fix
to really remove the mmu_sglist and use scatterlist instead. With
this the Decstation on this desk at least finds its partitions
again and does not crash.
I vote for removal of the struct mmu_sglist as at least it now
breaks on compile time and not confusion at runtime.
Flo
Index: drivers/scsi/dec_esp.c
===================================================================
RCS file: /home/cvs/linux/drivers/scsi/dec_esp.c,v
retrieving revision 1.10.2.3
diff -u -r1.10.2.3 dec_esp.c
--- drivers/scsi/dec_esp.c 23 Aug 2002 09:49:51 -0000 1.10.2.3
+++ drivers/scsi/dec_esp.c 28 Sep 2002 01:57:16 -0000
@@ -443,13 +443,13 @@
static void dma_mmu_get_scsi_sgl(struct NCR_ESP *esp, Scsi_Cmnd * sp)
{
- int sz = sp->SCp.buffers_residual;
- struct mmu_sglist *sg = (struct mmu_sglist *) sp->SCp.buffer;
+ int sz = sp->SCp.buffers_residual;
+ struct scatterlist *sg = sp->SCp.buffer;
- while (sz >= 0) {
- sg[sz].dvma_addr = PHYSADDR(sg[sz].addr);
- sz--;
- }
+ while (sz >= 0) {
+ sg[sz].dma_address = PHYSADDR(sg[sz].address);
+ sz--;
+ }
sp->SCp.ptr = (char *) ((unsigned long) sp->SCp.buffer->dma_address);
}
Index: include/asm-mips/scatterlist.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/scatterlist.h,v
retrieving revision 1.4.2.3
diff -u -r1.4.2.3 scatterlist.h
--- include/asm-mips/scatterlist.h 23 Aug 2002 09:50:00 -0000 1.4.2.3
+++ include/asm-mips/scatterlist.h 28 Sep 2002 01:57:16 -0000
@@ -10,13 +10,6 @@
unsigned int length;
};
-struct mmu_sglist {
- char *addr;
- char *__dont_touch;
- unsigned int len;
- dma_addr_t dvma_addr;
-};
-
#define ISA_DMA_THRESHOLD (0x00ffffff)
#endif /* __ASM_SCATTERLIST_H */
--
Florian Lohoff flo@rfc822.org +49-5201-669912
Heisenberg may have been here.
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next reply other threads:[~2002-09-28 2:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-28 1:59 Florian Lohoff [this message]
2002-09-28 10:38 ` [PATCH] dec_esp.c repair mmu_sglist breakage Karsten Merker
2002-09-28 18:49 ` Maciej W. Rozycki
2002-09-28 20:19 ` Florian Lohoff
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=20020928015947.GE7706@paradigm.rfc822.org \
--to=flo@rfc822.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox