From: Christoph Hellwig <hch@infradead.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] eata: remove driver_lock
Date: Thu, 31 Jul 2014 10:30:02 -0700 [thread overview]
Message-ID: <20140731173002.GA24495@infradead.org> (raw)
In-Reply-To: <20140726162559.GA25106@infradead.org>
Can I also get a second review?
On Sat, Jul 26, 2014 at 09:25:59AM -0700, Christoph Hellwig wrote:
> Can I get a quick review for this one?
>
> On Mon, Jul 14, 2014 at 10:26:33AM +0200, Christoph Hellwig wrote:
> > port_detect is only called from the module_init routine and thus implicitly
> > serialized, so remove the driver lock which was held over potentially
> > sleeping function calls.
> >
> > Signed-off-by: Christoph Hellwig <hch@lst.de>
> > Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
> > Tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
> > ---
> > drivers/scsi/eata.c | 9 ---------
> > 1 file changed, 9 deletions(-)
> >
> > diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
> > index 03372cf..980898e 100644
> > --- a/drivers/scsi/eata.c
> > +++ b/drivers/scsi/eata.c
> > @@ -837,7 +837,6 @@ struct hostdata {
> > static struct Scsi_Host *sh[MAX_BOARDS];
> > static const char *driver_name = "EATA";
> > static char sha[MAX_BOARDS];
> > -static DEFINE_SPINLOCK(driver_lock);
> >
> > /* Initialize num_boards so that ihdlr can work while detect is in progress */
> > static unsigned int num_boards = MAX_BOARDS;
> > @@ -1097,8 +1096,6 @@ static int port_detect(unsigned long port_base, unsigned int j,
> > goto fail;
> > }
> >
> > - spin_lock_irq(&driver_lock);
> > -
> > if (do_dma(port_base, 0, READ_CONFIG_PIO)) {
> > #if defined(DEBUG_DETECT)
> > printk("%s: detect, do_dma failed at 0x%03lx.\n", name,
> > @@ -1265,10 +1262,7 @@ static int port_detect(unsigned long port_base, unsigned int j,
> > }
> > #endif
> >
> > - spin_unlock_irq(&driver_lock);
> > sh[j] = shost = scsi_register(tpnt, sizeof(struct hostdata));
> > - spin_lock_irq(&driver_lock);
> > -
> > if (shost == NULL) {
> > printk("%s: unable to register host, detaching.\n", name);
> > goto freedma;
> > @@ -1345,8 +1339,6 @@ static int port_detect(unsigned long port_base, unsigned int j,
> > else
> > sprintf(dma_name, "DMA %u", dma_channel);
> >
> > - spin_unlock_irq(&driver_lock);
> > -
> > for (i = 0; i < shost->can_queue; i++)
> > ha->cp[i].cp_dma_addr = pci_map_single(ha->pdev,
> > &ha->cp[i],
> > @@ -1439,7 +1431,6 @@ static int port_detect(unsigned long port_base, unsigned int j,
> > freeirq:
> > free_irq(irq, &sha[j]);
> > freelock:
> > - spin_unlock_irq(&driver_lock);
> > release_region(port_base, REGION_SIZE);
> > fail:
> > return 0;
> > --
> > 1.9.1
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> ---end quoted text---
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
---end quoted text---
next prev parent reply other threads:[~2014-07-31 17:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-14 8:26 [PATCH] eata: remove driver_lock Christoph Hellwig
2014-07-26 16:25 ` Christoph Hellwig
2014-07-26 16:45 ` Martin K. Petersen
2014-07-31 17:30 ` Christoph Hellwig [this message]
2014-08-05 15:20 ` Hannes Reinecke
2014-08-10 12:42 ` Arthur Marsh
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=20140731173002.GA24495@infradead.org \
--to=hch@infradead.org \
--cc=hch@lst.de \
--cc=linux-scsi@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).