Re: [PATCH] s/isa//g in drivers/scsi/g_NCR5380.c and some cleanup (242)

Rasmus Andersen (rasmus@jaquet.dk)
Sun, 25 Feb 2001 15:54:38 +0100


On Sun, Feb 25, 2001 at 02:46:15PM +0000, Alan Cox wrote:
> > I am sorry but have I inverted the arguments to the memcpy_*io calls?
> > Or are you referring to something other than the arguments here?
>
> You seem to have swapped the source/dest over in memcpy_toio cases and I need
> to convince myself you did that correctly

Yes, that is neither obvious nor nice. My apologies, but I could not
find a better way.

Explanation: The memcpy_toio cases goes like this:

- isa_memcpy_toio(NCR53C400_host_buffer+NCR5380_map_name,src+start,128);
+ memcpy_toio(isa_remap_ptr+OFFSET_FROM_REMAPPING, src+start, 128);

isa_remap_ptr is the ioremap from NCR5380_map_name + NCR53C400_mem_base.
I would like to memcpy from NCR53C400_host_buffer+NCR5380_map_name thus
needing to add the difference between NCR53C400_host_buffer and the
NCR53C400_mem_base (used in isa_remap_ptr). Thus, in the hope that
this can be done linearly, I add OFFSET_FROM_REMAPPING
(NCR53C400_host_buffer - NCR53C400_mem_base). (BTW, this is also done
in the memcpy_fromio cases.)

I hope that the above is readable.

-- 
Regards,
        Rasmus(rasmus@jaquet.dk)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/