LKML Archive on lore.kernel.org
 help / color / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Michael Schmitz <schmitzmic@gmail.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Ahmed S. Darwish" <a.darwish@linutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	scsi <linux-scsi@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi/NCR5380: Remove in_interrupt() test
Date: Fri, 4 Dec 2020 09:38:25 +0100
Message-ID: <CAMuHMdUYwUPWzhBD+MWJsjBvmb31T0=2j8d0_-f9Q0ocfBAs9A@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.23.453.2012040953030.6@nippy.intranet>

Hi Finn,

On Fri, Dec 4, 2020 at 12:11 AM Finn Thain <fthain@telegraphics.com.au> wrote:
> > --- a/drivers/scsi/g_NCR5380.c
> > +++ b/drivers/scsi/g_NCR5380.c
> > @@ -529,14 +529,14 @@ static inline int generic_NCR5380_precv(struct NCR5380_hostdata *hostdata,
> >               if (start == len - 128) {
> >                       /* Ignore End of DMA interrupt for the final buffer */
> >                       if (NCR5380_poll_politely(hostdata, hostdata->c400_ctl_status,
> > -                                               CSR_HOST_BUF_NOT_RDY, 0, HZ / 64) < 0)
> > +                                               CSR_HOST_BUF_NOT_RDY, 0, 0) < 0)
>
> You've put your finger on a known problem with certain
> NCR5380_poll_politely() call sites. That is, the nominal timeout, HZ / 64,
> is meaningless because it is ignored in atomic context. So you may as well
> specify 0 jiffies at these call sites. (There will be a 1 jiffy timeout
> applied regardless.)

Notwithstanding HZ / 64 breaks if HZ < 64.

Possible values of HZ in the kernel:

24
32
48
64
100
128
200
250
256
300
500
1000
1024
1200

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply index

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  6:46 Finn Thain
2020-12-01 17:05 ` Sebastian Andrzej Siewior
2020-12-03 23:08   ` Finn Thain
2020-12-04  8:38     ` Geert Uytterhoeven [this message]
2020-12-04 16:08     ` Ahmed S. Darwish
2020-12-01 18:01 ` Michael Schmitz
2020-12-04 15:32 ` [PATCH v2] scsi: NCR5380: Remove context check Ahmed S. Darwish
2020-12-05  4:28   ` Finn Thain
2020-12-06  7:51     ` [PATCH v3] " Ahmed S. Darwish
2020-12-08  0:12       ` Finn Thain
2020-12-08  1:26       ` Martin K. Petersen
2020-12-09 17:23       ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMuHMdUYwUPWzhBD+MWJsjBvmb31T0=2j8d0_-f9Q0ocfBAs9A@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=a.darwish@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=fthain@telegraphics.com.au \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=schmitzmic@gmail.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lkml.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lkml.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lkml.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lkml.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lkml.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lkml.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lkml.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lkml.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lkml.kernel.org/lkml/8 lkml/git/8.git
	git clone --mirror https://lkml.kernel.org/lkml/9 lkml/git/9.git
	git clone --mirror https://lkml.kernel.org/lkml/10 lkml/git/10.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lkml.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git