From: Keith Busch <keith.busch@intel.com>
To: Omar Sandoval <osandov@osandov.com>
Cc: linux-block@vger.kernel.org, Johannes Thumshirn <jthumshirn@suse.de>
Subject: Re: [PATCH blktests] Add surprise removal block test
Date: Wed, 25 Apr 2018 11:49:02 -0600 [thread overview]
Message-ID: <20180425174901.GB31318@localhost.localdomain> (raw)
In-Reply-To: <20180425155602.GB30070@vader>
On Wed, Apr 25, 2018 at 08:56:02AM -0700, Omar Sandoval wrote:
> On Tue, Apr 24, 2018 at 03:41:46PM -0600, Keith Busch wrote:
> > +_test_hotplug_slot() {
>
> I'd call this _test_dev_in_hotplug_slot().
Sounds good.
> > + parent="$(_get_pci_parent_from_blkdev)"
>
> I haven't been consistent about asking people to do this, but could you
> make these variables local? I.e.,
>
> local parent
> parent="$(_get_pci_parent_from_blkdev)"
> local slt_cap
> slt_cap=...
No problem.
> > + setpci -s ${parent} CAP_EXP+10.w=10:10
> > + sleep 10
> > + setpci -s ${parent} CAP_EXP+10.w=00:10
>
> For the sake of people of me who don't speak PCI, what do each of these
> commands do? :)
:) Will add to the change log.
This command finds the PCI Express Capability register of the slot the
device is in, then at offset 0x10 (the Link Control Register) writes a
1 to bit 4 (Link Disable). This is happening unbeknownst to any of the
drivers, just like a surprise removal. If this is a capable slot, the
drivers will find out about this through the pcie hotplug handler.
> Should we make the fio job --time_based instead of using
> --size so that we're sure it runs long enough for the sleep?
Right, that makes sense.
Will resend with the fix-ups, but probably not until tomorrow.
prev parent reply other threads:[~2018-04-25 17:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-24 21:41 [PATCH blktests] Add surprise removal block test Keith Busch
2018-04-24 22:04 ` Johannes Thumshirn
2018-04-24 22:09 ` Keith Busch
2018-04-25 15:56 ` Omar Sandoval
2018-04-25 17:49 ` Keith Busch [this message]
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=20180425174901.GB31318@localhost.localdomain \
--to=keith.busch@intel.com \
--cc=jthumshirn@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=osandov@osandov.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