Re: [PATCH 4/4] pata_platform: Use 16-bit wide data transfer

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

 



Sat, 23 Aug 2014 12:53:26 -0400 от Tejun Heo <tj@xxxxxxxxxx>:
> Hello,
> 
> On Sat, Aug 23, 2014 at 02:46:12PM +0400, Alexander Shiyan wrote:
> > In some cases, system bus can be configured for 16-bit mode, in this
> > case using of read/write functions for the 32 bit values causes two
> > cycles of 16 bits, which is incorrect.
> 
> Shouldn't we distinguish them instead of forcing 16bit transfer on
> all?

I do not see any reason to distinguish. This embodiment can be used with
16-bit and 32-bit bus, and even for 64-bit ;)

...
> > +static unsigned int pata_platform_xfer_noirq(struct ata_device *dev,
> > +					     unsigned char *buf,
> > +					     unsigned int buflen, int rw)
> > +{
> > +	unsigned long flags;
> > +	unsigned int consumed;
> > +
> > +	local_irq_save(flags);
> > +	/* Use 16-bit transfer */
> > +	consumed = ata_sff_data_xfer(dev, buf, buflen, rw);
> > +	local_irq_restore(flags);
> > +
> > +	return consumed;
> > +}
> 
> This doesn't seem like a good location for this function.  Please
> rename the existing noirq function to xfer32_noriq and add generic
> xfer_noirq for 16bit xfers.

Ok.

---

��.n��������+%������w��{.n�����{��'^�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥





[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux