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? > The patch provides its own function to use the proper 16-bit mode. > > Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx> > --- > drivers/ata/pata_platform.c | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c > index ecbc3bf..79dd223 100644 > --- a/drivers/ata/pata_platform.c > +++ b/drivers/ata/pata_platform.c > @@ -43,13 +43,28 @@ static int pata_platform_set_mode(struct ata_link *link, struct ata_device **unu > return 0; > } > > +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. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html