* [blktests PATCHv2] Fix block/011 to not use sysfs for device disabling
@ 2018-06-04 22:51 Keith Busch
2018-06-04 23:26 ` Jens Axboe
2018-06-05 0:11 ` Omar Sandoval
0 siblings, 2 replies; 3+ messages in thread
From: Keith Busch @ 2018-06-04 22:51 UTC (permalink / raw)
To: Omar Sandoval, linux-block; +Cc: Johannes Thumshirn, Keith Busch
The PCI sysfs interface may not be a dependable method for toggling the
PCI device state to trigger the timeouts. This patch goes directly to
the config space to make device failure occur.
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
v1 -> v2:
Toggling only PCI Command Register BME bit, rather than including MEM.
tests/block/011 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/block/011 b/tests/block/011
index 62e89f7..2461442 100755
--- a/tests/block/011
+++ b/tests/block/011
@@ -21,7 +21,7 @@ DESCRIPTION="disable PCI device while doing I/O"
TIMED=1
requires() {
- _have_fio
+ _have_fio && _have_program setpci
}
device_requires() {
@@ -43,10 +43,11 @@ test_device() {
_run_fio_rand_io --filename="$TEST_DEV" --size="$size" \
--ignore_error=EIO,ENXIO,ENODEV &
+ # toggle PCI Command Register's Bus Master Enabling
while kill -0 $! 2>/dev/null; do
- echo 0 > "/sys/bus/pci/devices/${pdev}/enable"
+ setpci -s "${pdev}" 4.w=0:4
sleep .2
- echo 1 > "/sys/bus/pci/devices/${pdev}/enable"
+ setpci -s "${pdev}" 4.w=4:4
sleep .2
done
--
2.14.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [blktests PATCHv2] Fix block/011 to not use sysfs for device disabling
2018-06-04 22:51 [blktests PATCHv2] Fix block/011 to not use sysfs for device disabling Keith Busch
@ 2018-06-04 23:26 ` Jens Axboe
2018-06-05 0:11 ` Omar Sandoval
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2018-06-04 23:26 UTC (permalink / raw)
To: Keith Busch, Omar Sandoval, linux-block; +Cc: Johannes Thumshirn
On 6/4/18 4:51 PM, Keith Busch wrote:
> The PCI sysfs interface may not be a dependable method for toggling the
> PCI device state to trigger the timeouts. This patch goes directly to
> the config space to make device failure occur.
Reviewed-by: Jens Axboe <axboe@kernel.dk>
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [blktests PATCHv2] Fix block/011 to not use sysfs for device disabling
2018-06-04 22:51 [blktests PATCHv2] Fix block/011 to not use sysfs for device disabling Keith Busch
2018-06-04 23:26 ` Jens Axboe
@ 2018-06-05 0:11 ` Omar Sandoval
1 sibling, 0 replies; 3+ messages in thread
From: Omar Sandoval @ 2018-06-05 0:11 UTC (permalink / raw)
To: Keith Busch; +Cc: linux-block, Johannes Thumshirn
On Mon, Jun 04, 2018 at 04:51:41PM -0600, Keith Busch wrote:
> The PCI sysfs interface may not be a dependable method for toggling the
> PCI device state to trigger the timeouts. This patch goes directly to
> the config space to make device failure occur.
>
> Signed-off-by: Keith Busch <keith.busch@intel.com>
> ---
> v1 -> v2:
>
> Toggling only PCI Command Register BME bit, rather than including MEM.
Thanks, Keith, applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-05 0:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-04 22:51 [blktests PATCHv2] Fix block/011 to not use sysfs for device disabling Keith Busch
2018-06-04 23:26 ` Jens Axboe
2018-06-05 0:11 ` Omar Sandoval
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).