linux-mips
[Top] [All Lists]

Re: [patch] 2.4: Revert interface removal

To: Ralf Baechle <ralf@oss.sgi.com>, "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>, linux-mips@oss.sgi.com
Subject: Re: [patch] 2.4: Revert interface removal
From: Carsten Langgaard <carstenl@mips.com>
Date: Tue, 06 Aug 2002 11:05:54 +0200
References: <Pine.GSO.3.96.1020805105624.18894C-100000@delta.ds2.pg.gda.pl> <20020805124154.B6365@dea.linux-mips.net> <3D4E5BFE.595DA175@mips.com> <3D4E6743.58776F67@mips.com> <3D4E77CD.A4E7B78B@mips.com> <20020805164729.A11853@dea.linux-mips.net> <3D4F70E0.5DCC7AD4@mips.com>
Sender: owner-linux-mips@oss.sgi.com
Carsten Langgaard wrote:

> Ralf Baechle wrote:
>
> > On Mon, Aug 05, 2002 at 03:04:13PM +0200, Carsten Langgaard wrote:
> >
> > > Ok, I finally figured out what the problem is.
> > > The attached patch fix the problems, please apply.
> >
> > Applied, along with the 64-bit and 2.5 bits your patch was missing.
> >
>

Another reason why I didn't send the patch against the 64-bit is that the pci 
handling is not completely
identical.
So the patch should actually look like this for things to work.



>
> I was waiting for you to fix the bus_to_baddr in the 64-bit, I can see
> you have have done something about it now, but I'm afraid you didn't get
> it quite right.
> Here is a patch to fix the typos.
>
> /Carsten
>
> --
> _    _ ____  ___   Carsten Langgaard  Mailto:carstenl@mips.com
> |\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
> | \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
>   TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
>                    Denmark            http://www.mips.com
>
>   ------------------------------------------------------------------------
> Index: include/asm-mips64/pci.h
> ===================================================================
> RCS file: /cvs/linux/include/asm-mips64/pci.h,v
> retrieving revision 1.16.2.9
> diff -u -r1.16.2.9 pci.h
> --- include/asm-mips64/pci.h    2002/08/06 02:21:50     1.16.2.9
> +++ include/asm-mips64/pci.h    2002/08/06 06:36:35
> @@ -213,8 +213,8 @@
>                         out_of_line_bug();
>
>                 dma_cache_wback_inv((unsigned long)sg->address, sg->length);
> -               sg->address = bus_to_baddr(hwdev->bus->number) |
> -                             virt_to_bus(sg->address);
> +               sg->address = bus_to_baddr(hwdev->bus->number,
> +                                          virt_to_bus(sg->address));
>         }
>
>         return nents;
> @@ -251,7 +251,7 @@
>         if (direction == PCI_DMA_NONE)
>                 out_of_line_bug();
>
> -       dma_cache_wback_inv((unsigned long)__va(dma_handle - 
> bus_to_baddr(hwdev->bus->number)), size);
> +       dma_cache_wback_inv((unsigned 
> long)__va(bus_to_baddr(hwdev->bus->number, dma_handle)), size);
>  }
>
>  /*

--
_    _ ____  ___   Carsten Langgaard   Mailto:carstenl@mips.com
|\  /|||___)(___   MIPS Denmark        Direct: +45 4486 5527
| \/ |||    ____)  Lautrupvang 4B      Switch: +45 4486 5555
  TECHNOLOGIES     2750 Ballerup       Fax...: +45 4486 5556
                   Denmark             http://www.mips.com


Index: include/asm-mips64/pci.h
===================================================================
RCS file: /cvs/linux/include/asm-mips64/pci.h,v
retrieving revision 1.16.2.9
diff -u -r1.16.2.9 pci.h
--- include/asm-mips64/pci.h    2002/08/06 02:21:50     1.16.2.9
+++ include/asm-mips64/pci.h    2002/08/06 09:01:25
@@ -213,8 +213,8 @@
                        out_of_line_bug();
 
                dma_cache_wback_inv((unsigned long)sg->address, sg->length);
-               sg->address = bus_to_baddr(hwdev->bus->number) |
-                             virt_to_bus(sg->address);
+               sg->address = bus_to_baddr(hwdev->bus->number,
+                                          virt_to_bus(sg->address));
        }
 
        return nents;
@@ -251,7 +251,7 @@
        if (direction == PCI_DMA_NONE)
                out_of_line_bug();
 
-       dma_cache_wback_inv((unsigned long)__va(dma_handle - 
bus_to_baddr(hwdev->bus->number)), size);
+       dma_cache_wback_inv((unsigned 
long)__va(bus_to_baddr(hwdev->bus->number, dma_handle)), size);
 }
 
 /*
@@ -341,7 +341,7 @@
  * returns, or alternatively stop on the first sg_dma_len(sg) which
  * is 0.
  */
-#define sg_dma_address(sg)     ((sg)->dma_address)
+#define sg_dma_address(sg)     ((sg)->address)
 #define sg_dma_len(sg)         ((sg)->length)
 
 #endif /* __KERNEL__ */
<Prev in Thread] Current Thread [Next in Thread>