summaryrefslogtreecommitdiffstats
path: root/drivers/block/rsxx/dev.c
diff options
context:
space:
mode:
authorPhilip J Kelleher <pjk1939@linux.vnet.ibm.com>2013-06-18 14:36:26 -0500
committerJens Axboe <axboe@kernel.dk>2013-06-19 13:52:09 +0200
commit0ab4743ebc18c23bddf3e288cfc6221ec71533ac (patch)
tree0977d5fe4a55f914e3bc9e2f4a7847ff555d5417 /drivers/block/rsxx/dev.c
parenta3299ab18591d36ad5622f5064619123c439b779 (diff)
downloadblackbird-op-linux-0ab4743ebc18c23bddf3e288cfc6221ec71533ac.tar.gz
blackbird-op-linux-0ab4743ebc18c23bddf3e288cfc6221ec71533ac.zip
rsxx: Restructured DMA cancel scheme.
Before, DMAs would never be cancelled if there was a data stall or an EEH Permenant failure which would cause an unrecoverable I/O hang. The DMA cancellation mechanism has been modified to fix these issues and allows DMAs to be cancelled during the above mentioned events. Signed-off-by: Philip J Kelleher <pjk1939@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rsxx/dev.c')
-rw-r--r--drivers/block/rsxx/dev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c
index 4346d17d2949..604ad2dafa43 100644
--- a/drivers/block/rsxx/dev.c
+++ b/drivers/block/rsxx/dev.c
@@ -155,7 +155,8 @@ static void bio_dma_done_cb(struct rsxx_cardinfo *card,
atomic_set(&meta->error, 1);
if (atomic_dec_and_test(&meta->pending_dmas)) {
- disk_stats_complete(card, meta->bio, meta->start_time);
+ if (!card->eeh_state && card->gendisk)
+ disk_stats_complete(card, meta->bio, meta->start_time);
bio_endio(meta->bio, atomic_read(&meta->error) ? -EIO : 0);
kmem_cache_free(bio_meta_pool, meta);
@@ -196,7 +197,8 @@ static void rsxx_make_request(struct request_queue *q, struct bio *bio)
atomic_set(&bio_meta->pending_dmas, 0);
bio_meta->start_time = jiffies;
- disk_stats_start(card, bio);
+ if (!unlikely(card->halt))
+ disk_stats_start(card, bio);
dev_dbg(CARD_TO_DEV(card), "BIO[%c]: meta: %p addr8: x%llx size: %d\n",
bio_data_dir(bio) ? 'W' : 'R', bio_meta,
OpenPOWER on IntegriCloud