From: Johannes Thumshirn <jthumshirn@suse.de>
To: Christoph Hellwig <hch@infradead.org>
Cc: Nagarajkumar Narayanan <nagarajkumar.narayanan@seagate.com>,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH resend] mpt2sas: setpci reset kernel panic fix
Date: Fri, 19 Jun 2015 13:39:11 +0200 [thread overview]
Message-ID: <20150619113911.GD10784@c203.arch.suse.de> (raw)
In-Reply-To: <20150619111512.GA12992@infradead.org>
On Fri, Jun 19, 2015 at 04:15:12AM -0700, Christoph Hellwig wrote:
> > @@ -79,7 +79,8 @@ static int _scsih_scan_finished(struct Scsi_Host *shost, unsigned long time);
> >
> > /* global parameters */
> > LIST_HEAD(mpt2sas_ioc_list);
> > -
> > +/* global ioc lock for list operations */
> > +spinlock_t gioc_lock;
> > /* local parameters */
> > static u8 scsi_io_cb_idx = -1;
> > static u8 tm_cb_idx = -1;
> > @@ -279,6 +280,20 @@ static struct pci_device_id scsih_pci_table[] = {
> > MODULE_DEVICE_TABLE(pci, scsih_pci_table);
> >
> > /**
> > + * mpt2sas_initialize_gioc_lock - initialize the gobal ioc lock
> > + */
> > +void
> > +mpt2sas_initialize_gioc_lock(void)
> > +{
> > + static int gioc_lock_initialize;
> > +
> > + if (!gioc_lock_initialize) {
> > + spin_lock_init(&gioc_lock);
> > + gioc_lock_initialize = 1;
> > + }
> > +}
>
> Just use DEFINE_SPINLOCK() to initialize the lock at compile time.
Or yes, even better.
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
next prev parent reply other threads:[~2015-06-19 11:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-19 11:16 [PATCH resend] mpt2sas: setpci reset kernel panic fix Nagarajkumar Narayanan
2015-06-19 11:15 ` Christoph Hellwig
2015-06-19 11:39 ` Johannes Thumshirn [this message]
2015-06-19 11:38 ` Johannes Thumshirn
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=20150619113911.GD10784@c203.arch.suse.de \
--to=jthumshirn@suse.de \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=nagarajkumar.narayanan@seagate.com \
/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