2005-12-22 04:52:02

by Al Viro

[permalink] [raw]
Subject: [PATCH 33/36] m68k: drivers/scsi/mac53c94.c __iomem annotations

From: Al Viro <[email protected]>
Date: 1133866874 -0500

Signed-off-by: Al Viro <[email protected]>

---

drivers/scsi/mac53c94.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

c142eb4b3a51224952b8760cff73051398dac312
diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c
index 932dcf0..a853fb4 100644
--- a/drivers/scsi/mac53c94.c
+++ b/drivers/scsi/mac53c94.c
@@ -531,9 +531,9 @@ static int mac53c94_remove(struct macio_
free_irq(fp->intr, fp);

if (fp->regs)
- iounmap((void *) fp->regs);
+ iounmap(fp->regs);
if (fp->dma)
- iounmap((void *) fp->dma);
+ iounmap(fp->dma);
kfree(fp->dma_cmd_space);

scsi_host_put(host);
--
0.99.9.GIT


2005-12-24 21:56:35

by Brad Boyer

[permalink] [raw]
Subject: Re: [PATCH 33/36] m68k: drivers/scsi/mac53c94.c __iomem annotations


This is a ppc only driver at the moment. The m68k mac version is mac_esp.
I've been thinking about retrofitting this driver to use on the models
that can do DMA, but that will require me to finish some of the work I
have pending on the macio layer to get it working for nubus models.

Brad Boyer
[email protected]

On Thu, Dec 22, 2005 at 04:51:49AM +0000, Al Viro wrote:
> From: Al Viro <[email protected]>
> Date: 1133866874 -0500
>
> Signed-off-by: Al Viro <[email protected]>
>
> ---
>
> drivers/scsi/mac53c94.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> c142eb4b3a51224952b8760cff73051398dac312
> diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c
> index 932dcf0..a853fb4 100644
> --- a/drivers/scsi/mac53c94.c
> +++ b/drivers/scsi/mac53c94.c
> @@ -531,9 +531,9 @@ static int mac53c94_remove(struct macio_
> free_irq(fp->intr, fp);
>
> if (fp->regs)
> - iounmap((void *) fp->regs);
> + iounmap(fp->regs);
> if (fp->dma)
> - iounmap((void *) fp->dma);
> + iounmap(fp->dma);
> kfree(fp->dma_cmd_space);
>
> scsi_host_put(host);
> --
> 0.99.9.GIT
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2005-12-24 22:32:32

by Al Viro

[permalink] [raw]
Subject: Re: [PATCH 33/36] m68k: drivers/scsi/mac53c94.c __iomem annotations

On Sat, Dec 24, 2005 at 01:56:33PM -0800, Brad Boyer wrote:
>
> This is a ppc only driver at the moment. The m68k mac version is mac_esp.
> I've been thinking about retrofitting this driver to use on the models
> that can do DMA, but that will require me to finish some of the work I
> have pending on the macio layer to get it working for nubus models.

Ah, OK... Will move to ppc queue next time I rediff that stuff...

Speaking of mac_esp, there's a pending patch for NCR53C9x.c fixing PIO
breakage in esp_do_data().
/* read fifo */
for(j=0;j<fifocnt;j++)
SCptr->SCp.ptr[i++] = esp_read(eregs->esp_fdata);

is not a good thing to do when we set .ptr to (char *)virt_to_phys_(....).

It works mostly by accident on e.g. 840AV, until you get a minimally
non-trivial memory mapping. The same thing happens on the write side.
Fix is obvious (find phys_to_virt(SCptr->SCp.ptr) in the PIO branch
and use it). I've put that in -bird, will show up in tonight's snapshot...

BTW, what's the situation with DMA on 840AV? If you have any patches
to test, I've got such box and being what it is, it's not tied by any
work...

2005-12-24 22:44:14

by Brad Boyer

[permalink] [raw]
Subject: Re: [PATCH 33/36] m68k: drivers/scsi/mac53c94.c __iomem annotations

On Sat, Dec 24, 2005 at 10:32:30PM +0000, Al Viro wrote:
> Speaking of mac_esp, there's a pending patch for NCR53C9x.c fixing PIO
> breakage in esp_do_data().
> /* read fifo */
> for(j=0;j<fifocnt;j++)
> SCptr->SCp.ptr[i++] = esp_read(eregs->esp_fdata);
>
> is not a good thing to do when we set .ptr to (char *)virt_to_phys_(....).
>
> It works mostly by accident on e.g. 840AV, until you get a minimally
> non-trivial memory mapping. The same thing happens on the write side.
> Fix is obvious (find phys_to_virt(SCptr->SCp.ptr) in the PIO branch
> and use it). I've put that in -bird, will show up in tonight's snapshot...

It's only partly by accident. Early on in the development, someone put in
a fixed mapping with physical == virtual for the I/O space. Lots of the
drivers for internal devices on m68k macs take advantage of this and
use the physical addresses as pointers. They should be fixed, I guess.

> BTW, what's the situation with DMA on 840AV? If you have any patches
> to test, I've got such box and being what it is, it's not tied by any
> work...

No, I haven't done much of anything with it. I do have a Q840AV, but the
DMA engine I really wanted to get working was the one on the IIfx. The
disk performance of the mac_scsi driver makes the IIfx nearly useless.
I almost got it working, but I can't figure out how to get the interrupts
for the DMA completion to work properly. The DMA for the AV models is
several steps down on my list at the moment. There are a couple other
people that have looked at it, but noone is especially active.

Brad Boyer
[email protected]