Re: [PATCH] drivers/block/xsysace - replace in(out)_8/in(out)_be16/in(out)_le16 with generic iowrite(read)8/16(be)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/21/2013 06:23 PM, Arnd Bergmann wrote:
 >>   static void ace_datain_8(struct ace_device *ace)
 >> @@ -248,7 +248,7 @@ static void ace_datain_8(struct ace_device *ace)
 >>   	u8 *dst = ace->data_ptr;
 >>   	int i = ACE_FIFO_SIZE;
 >>   	while (i--)
 >> -		*dst++ = in_8(r++);
 >> +		*dst++ = ioread8(r++);
 >>   	ace->data_ptr = dst;
 >>   }
 >
 > Why not just use ioread8_rep() to replace the loop?

My intention with this first patch was to do a simple iteration that is 
supposed to not break anything. As it it said in patch title - just 
replace accessors. And for now (for this patch) leave improper 
implemented functionality as it is.

And in the next patch I will introduce changes that you've suggested 
with "_rep" accessors.

Maybe I should have sent both patches at once so my intention would be 
clear.

 >
 > I guess the last two modifications are actually needed for correct
 > operation independent of CPU endianess. I don't what led to the
 > combination of big- and little-endian accessors, but my guess is
 > that it was trial-and-error together with cut-and-paste. The point
 > is that the single register access should match the endianess of
 > the device while the streaming access should match the endianess
 > of the CPU.

Completely agree.

-Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux