Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1283674

Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips

From Ondrej Zary <linux@rainbow-software.org>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips
Date 2015-12-04 10:40 +0100
Message-ID <qBV0l-Sz-7@gated-at.bofh.it> (permalink)
References <qw6Bc-vx-5@gated-at.bofh.it> <qBLaF-34j-3@gated-at.bofh.it> <qBUxl-Hj-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Friday 04 December 2015, Finn Thain wrote:
> 
> On Fri, 4 Dec 2015, Ondrej Zary wrote:
> 
> > Add I/O register mapping for DTC chips and enable PDMA mode.
> > 
> > These chips have 16-bit wide HOST BUFFER register (counter register at 
> > offset 0x0d increments by 2 on each HOST BUFFER read).
> > 
> > Large PIO transfers crash at least the DTCT-436P chip (all reads result 
> > in 0xFF) so this patch actually makes it work.
> > 
> > The chip also crashes when we bang the C400 host status register too
> > heavily after PDMA write - a small udelay is needed.
> > 
> > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> > ---
> > # hdparm -t --direct /dev/sdb
> > 
> > /dev/sdb:
> >  Timing O_DIRECT disk reads:   4 MB in  3.78 seconds =   1.06 MB/sec
> > 
> > 
> >  drivers/scsi/NCR5380.h   |    1 +
> >  drivers/scsi/g_NCR5380.c |   47 +++++++++++++++++++++++-----------------------
> >  2 files changed, 25 insertions(+), 23 deletions(-)
> > 
> > diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
> > index 5092580..e3b8149 100644
> > --- a/drivers/scsi/NCR5380.h
> > +++ b/drivers/scsi/NCR5380.h
> > @@ -222,6 +222,7 @@
> >  
> >  #define FLAG_NO_DMA_FIXUP		1	/* No DMA errata workarounds */
> >  #define FLAG_NO_PSEUDO_DMA		8	/* Inhibit DMA */
> > +#define FLAG_16BIT			16	/* 16-bit PDMA */
> 
> Can we give this a better name? FLAG_16BIT could be taken to mean "16-bit 
> ISA card" but do we really want a flag for that? How about 
> FLAG_16BIT_BUF_REG or FLAG_WORD_IO_BUF?
> 
> All active flags appear in the console log, thanks to prepare_info(). It 
> might be helpful to include this one; FLAG_DTC3181E is likely to 
> disappear.

Thinking more about this, we can probably detect the host buffer register
width instead of adding another flag. Read the counter, then read once from
the host buffer and read the counter again to see if it increments by 1 or 2.
Or maybe even 4 for PCI cards.

-- 
Ondrej Zary
--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Ondrej Zary <linux@rainbow-software.org> - 2015-12-04 00:10 +0100
  Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Julian Calaby <julian.calaby@gmail.com> - 2015-12-04 01:20 +0100
    Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Finn Thain <fthain@telegraphics.com.au> - 2015-12-04 09:40 +0100
      Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Julian Calaby <julian.calaby@gmail.com> - 2015-12-05 02:40 +0100
        Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Finn Thain <fthain@telegraphics.com.au> - 2015-12-05 03:20 +0100
          Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Julian Calaby <julian.calaby@gmail.com> - 2015-12-05 03:40 +0100
  Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Finn Thain <fthain@telegraphics.com.au> - 2015-12-04 10:10 +0100
    Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Ondrej Zary <linux@rainbow-software.org> - 2015-12-04 10:40 +0100
  Re: [RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips Finn Thain <fthain@telegraphics.com.au> - 2015-12-04 10:30 +0100

csiph-web