Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] dec_esp.c repair mmu_sglist breakage
@ 2002-09-28  1:59 Florian Lohoff
  2002-09-28 10:38 ` Karsten Merker
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Lohoff @ 2002-09-28  1:59 UTC (permalink / raw)
  To: linux-mips, ralf

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dec_esp.c repair mmu_sglist breakage
  2002-09-28  1:59 [PATCH] dec_esp.c repair mmu_sglist breakage Florian Lohoff
@ 2002-09-28 10:38 ` Karsten Merker
  2002-09-28 18:49   ` Maciej W. Rozycki
  0 siblings, 1 reply; 4+ messages in thread
From: Karsten Merker @ 2002-09-28 10:38 UTC (permalink / raw)
  To: linux-mips

On Sat, Sep 28, 2002 at 03:59:47AM +0200, Florian Lohoff wrote:

> 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 tested the patch on my DS 5000/150 and it works there, too.
Could you please check it into the cvs? Without it the kernel
is de facto unusable on DECstations.

Regards,
Karsten
-- 
#include <standard_disclaimer>
Nach Paragraph 28 Abs. 3 Bundesdatenschutzgesetz widerspreche ich der Nutzung
oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder
Meinungsforschung.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dec_esp.c repair mmu_sglist breakage
  2002-09-28 10:38 ` Karsten Merker
@ 2002-09-28 18:49   ` Maciej W. Rozycki
  2002-09-28 20:19     ` Florian Lohoff
  0 siblings, 1 reply; 4+ messages in thread
From: Maciej W. Rozycki @ 2002-09-28 18:49 UTC (permalink / raw)
  To: Karsten Merker, Florian Lohoff; +Cc: linux-mips

On Sat, 28 Sep 2002, Karsten Merker wrote:

> > 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 tested the patch on my DS 5000/150 and it works there, too.

 Thanks for the report -- since I have no means to test the SCSI driver I
was going to ask people for testing to have another confirmation.  I'm not
sure why it got broken (I'll check the details to find out) as the changes
were to revert to the original behaviour, but since struct mmu_sglist got
deprecated, I'm happy to see an update to struct scatterlist.  Since the
change works for both of you, I'm checking it in now. 

> Could you please check it into the cvs? Without it the kernel
> is de facto unusable on DECstations.

 Well, it depends on the actual configuration -- I haven't noticed
anything wrong. ;-)

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dec_esp.c repair mmu_sglist breakage
  2002-09-28 18:49   ` Maciej W. Rozycki
@ 2002-09-28 20:19     ` Florian Lohoff
  0 siblings, 0 replies; 4+ messages in thread
From: Florian Lohoff @ 2002-09-28 20:19 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Karsten Merker, linux-mips

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

On Sat, Sep 28, 2002 at 08:49:52PM +0200, Maciej W. Rozycki wrote:
> On Sat, 28 Sep 2002, Karsten Merker wrote:
> 
> > > 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 tested the patch on my DS 5000/150 and it works there, too.
> 
>  Thanks for the report -- since I have no means to test the SCSI driver I
> was going to ask people for testing to have another confirmation.  I'm not
> sure why it got broken (I'll check the details to find out) as the changes
> were to revert to the original behaviour, but since struct mmu_sglist got

It wasnt reverted - The problem was that the original Framework NCR53C9x
and dec_esp.c used the different structs which were not the same (Order
changed) after the change so it broke.

> deprecated, I'm happy to see an update to struct scatterlist.  Since the
> change works for both of you, I'm checking it in now. 

Flo
-- 
Florian Lohoff                  flo@rfc822.org             +49-5201-669912
                        Heisenberg may have been here.

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-09-28 20:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-28  1:59 [PATCH] dec_esp.c repair mmu_sglist breakage Florian Lohoff
2002-09-28 10:38 ` Karsten Merker
2002-09-28 18:49   ` Maciej W. Rozycki
2002-09-28 20:19     ` Florian Lohoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox