From: Bart Van Assche <bart.vanassche@wdc.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Damien Le Moal <Damien.LeMoal@wdc.com>,
Akhil Bhansali <Akhil.Bhansali@wdc.com>,
Bart Van Assche <bart.vanassche@wdc.com>,
Hannes Reinecke <hare@suse.de>,
Johannes Thumshirn <jthumshirn@suse.de>
Subject: [PATCH 31/55] skd: Drop second argument of skd_recover_requests()
Date: Thu, 17 Aug 2017 13:13:14 -0700 [thread overview]
Message-ID: <20170817201338.16537-32-bart.vanassche@wdc.com> (raw)
In-Reply-To: <20170817201338.16537-1-bart.vanassche@wdc.com>
Since all callers pass zero as second argument to skd_recover_requests(),
drop that second argument.
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
---
drivers/block/skd_main.c | 23 +++++++++--------------
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 008fa7231159..a363d5f6bcb5 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -437,7 +437,7 @@ static void skd_release_special(struct skd_device *skdev,
struct skd_special_context *skspcl);
static void skd_disable_interrupts(struct skd_device *skdev);
static void skd_isr_fwstate(struct skd_device *skdev);
-static void skd_recover_requests(struct skd_device *skdev, int requeue);
+static void skd_recover_requests(struct skd_device *skdev);
static void skd_soft_reset(struct skd_device *skdev);
const char *skd_drive_state_to_str(int state);
@@ -930,7 +930,7 @@ static void skd_timer_tick_not_online(struct skd_device *skdev)
skdev->timer_countdown--;
return;
}
- skd_recover_requests(skdev, 0);
+ skd_recover_requests(skdev);
break;
case SKD_DRVR_STATE_BUSY:
@@ -1027,13 +1027,13 @@ static void skd_timer_tick_not_online(struct skd_device *skdev)
/* It never came out of soft reset. Try to
* recover the requests and then let them
* fail. This is to mitigate hung processes. */
- skd_recover_requests(skdev, 0);
+ skd_recover_requests(skdev);
else {
dev_err(&skdev->pdev->dev, "Disable BusMaster (%x)\n",
skdev->drive_state);
pci_disable_device(skdev->pdev);
skd_disable_interrupts(skdev);
- skd_recover_requests(skdev, 0);
+ skd_recover_requests(skdev);
}
/*start the queue so we can respond with error to requests */
@@ -2935,7 +2935,7 @@ static void skd_isr_fwstate(struct skd_device *skdev)
break;
}
if (skdev->state == SKD_DRVR_STATE_RESTARTING)
- skd_recover_requests(skdev, 0);
+ skd_recover_requests(skdev);
if (skdev->state == SKD_DRVR_STATE_WAIT_BOOT) {
skdev->timer_countdown = SKD_STARTING_TIMO;
skdev->state = SKD_DRVR_STATE_STARTING;
@@ -3009,7 +3009,7 @@ static void skd_isr_fwstate(struct skd_device *skdev)
case FIT_SR_DRIVE_FAULT:
skd_drive_fault(skdev);
- skd_recover_requests(skdev, 0);
+ skd_recover_requests(skdev);
blk_start_queue(skdev->queue);
break;
@@ -3018,7 +3018,7 @@ static void skd_isr_fwstate(struct skd_device *skdev)
dev_info(&skdev->pdev->dev, "state=0x%x sense=0x%x\n", state,
sense);
skd_drive_disappeared(skdev);
- skd_recover_requests(skdev, 0);
+ skd_recover_requests(skdev);
blk_start_queue(skdev->queue);
break;
default:
@@ -3032,7 +3032,7 @@ static void skd_isr_fwstate(struct skd_device *skdev)
skd_skdev_state_to_str(skdev->state), skdev->state);
}
-static void skd_recover_requests(struct skd_device *skdev, int requeue)
+static void skd_recover_requests(struct skd_device *skdev)
{
int i;
@@ -3049,12 +3049,7 @@ static void skd_recover_requests(struct skd_device *skdev, int requeue)
if (skreq->n_sg > 0)
skd_postop_sg_list(skdev, skreq);
- if (requeue &&
- (unsigned long) ++skreq->req->special <
- SKD_MAX_RETRIES)
- blk_requeue_request(skdev->queue, skreq->req);
- else
- skd_end_request(skdev, skreq, BLK_STS_IOERR);
+ skd_end_request(skdev, skreq, BLK_STS_IOERR);
skreq->req = NULL;
--
2.14.0
next prev parent reply other threads:[~2017-08-17 20:14 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-17 20:12 [PATCH 00/55] Convert skd driver to blk-mq Bart Van Assche
2017-08-17 20:12 ` [PATCH 01/55] block: Relax a check in blk_start_queue() Bart Van Assche
2017-08-17 20:12 ` [PATCH 02/55] skd: Avoid that module unloading triggers a use-after-free Bart Van Assche
2017-08-17 20:12 ` [PATCH 03/55] skd: Submit requests to firmware before triggering the doorbell Bart Van Assche
2017-08-17 20:12 ` [PATCH 04/55] skd: Switch to GPLv2 Bart Van Assche
2017-08-17 20:12 ` [PATCH 05/55] skd: Update maintainer information Bart Van Assche
2017-08-17 20:12 ` [PATCH 06/55] skd: Remove unneeded #include directives Bart Van Assche
2017-08-17 20:12 ` [PATCH 07/55] skd: Remove ESXi code Bart Van Assche
2017-08-17 20:12 ` [PATCH 08/55] skd: Remove unnecessary blank lines Bart Van Assche
2017-08-17 20:12 ` [PATCH 09/55] skd: Avoid that gcc 7 warns about fall-through when building with W=1 Bart Van Assche
2017-08-17 20:12 ` [PATCH 10/55] skd: Fix spelling in a source code comment Bart Van Assche
2017-08-17 20:12 ` [PATCH 11/55] skd: Fix a function name in a comment Bart Van Assche
2017-08-17 20:12 ` [PATCH 12/55] skd: Remove set-but-not-used local variables Bart Van Assche
2017-08-17 20:12 ` [PATCH 13/55] skd: Remove a set-but-not-used variable from struct skd_device Bart Van Assche
2017-08-17 20:12 ` [PATCH 14/55] skd: Remove useless barrier() calls Bart Van Assche
2017-08-17 20:12 ` [PATCH 15/55] skd: Switch from the pr_*() to the dev_*() logging functions Bart Van Assche
2017-08-17 20:12 ` [PATCH 16/55] skd: Fix endianness annotations Bart Van Assche
2017-08-17 20:13 ` [PATCH 17/55] skd: Document locking assumptions Bart Van Assche
2017-08-17 20:13 ` [PATCH 18/55] skd: Introduce the symbolic constant SKD_MAX_REQ_PER_MSG Bart Van Assche
2017-08-17 20:13 ` [PATCH 19/55] skd: Introduce SKD_SKCOMP_SIZE Bart Van Assche
2017-08-17 20:13 ` [PATCH 20/55] skd: Fix size argument in skd_free_skcomp() Bart Van Assche
2017-08-17 20:13 ` [PATCH 21/55] skd: Reorder the code in skd_process_request() Bart Van Assche
2017-08-17 20:13 ` [PATCH 22/55] skd: Simplify the code for deciding whether or not to send a FIT msg Bart Van Assche
2017-08-17 20:13 ` [PATCH 23/55] skd: Simplify the code for allocating DMA message buffers Bart Van Assche
2017-08-17 20:13 ` [PATCH 24/55] skd: Use a structure instead of hardcoding structure offsets Bart Van Assche
2017-08-17 20:13 ` [PATCH 25/55] skd: Check structure sizes at build time Bart Van Assche
2017-08-17 20:13 ` [PATCH 26/55] skd: Use __packed only when needed Bart Van Assche
2017-08-17 20:13 ` [PATCH 27/55] skd: Make the skd_isr() code more brief Bart Van Assche
2017-08-17 20:13 ` [PATCH 28/55] skd: Use ARRAY_SIZE() where appropriate Bart Van Assche
2017-08-17 20:13 ` [PATCH 29/55] skd: Simplify the code for handling data direction Bart Van Assche
2017-08-17 20:13 ` [PATCH 30/55] skd: Remove superfluous initializations from skd_isr_completion_posted() Bart Van Assche
2017-08-17 20:13 ` Bart Van Assche [this message]
2017-08-17 20:13 ` [PATCH 32/55] skd: Use for_each_sg() Bart Van Assche
2017-08-17 20:13 ` [PATCH 33/55] skd: Remove a redundant init_timer() call Bart Van Assche
2017-08-17 20:13 ` [PATCH 34/55] skd: Remove superfluous occurrences of the 'volatile' keyword Bart Van Assche
2017-08-17 20:13 ` [PATCH 35/55] skd: Use kcalloc() instead of kzalloc() with multiply Bart Van Assche
2017-08-17 20:13 ` [PATCH 36/55] skb: Use symbolic names for SCSI opcodes Bart Van Assche
2017-08-17 20:13 ` [PATCH 37/55] skd: Move a function definition Bart Van Assche
2017-08-17 20:13 ` [PATCH 38/55] skd: Rework request failing code path Bart Van Assche
2017-08-17 20:13 ` [PATCH 39/55] skd: Convert explicit skd_request_fn() calls Bart Van Assche
2017-08-17 20:13 ` [PATCH 40/55] skd: Remove SG IO support Bart Van Assche
2017-08-17 20:13 ` [PATCH 41/55] skd: Remove dead code Bart Van Assche
2017-08-17 20:13 ` [PATCH 42/55] skd: Initialize skd_special_context.req.n_sg to one Bart Van Assche
2017-08-17 20:13 ` [PATCH 43/55] skd: Enable request tags for the block layer queue Bart Van Assche
2017-08-17 20:13 ` [PATCH 44/55] skd: Convert several per-device scalar variables into atomics Bart Van Assche
2017-08-17 20:13 ` [PATCH 45/55] skd: Introduce skd_process_request() Bart Van Assche
2017-08-17 20:13 ` [PATCH 46/55] skd: Split skd_recover_requests() Bart Van Assche
2017-08-17 20:13 ` [PATCH 47/55] skd: Move skd_free_sg_list() up Bart Van Assche
2017-08-17 20:13 ` [PATCH 48/55] skd: Coalesce struct request and struct skd_request_context Bart Van Assche
2017-08-17 20:13 ` [PATCH 49/55] skd: Convert to blk-mq Bart Van Assche
2017-08-17 20:13 ` [PATCH 50/55] skd: Switch to block layer timeout mechanism Bart Van Assche
2017-08-17 20:13 ` [PATCH 51/55] skd: Remove skd_device.in_flight Bart Van Assche
2017-08-17 20:13 ` [PATCH 52/55] skd: Reduce memory usage Bart Van Assche
2017-08-17 20:13 ` [PATCH 53/55] skd: Remove several local variables Bart Van Assche
2017-08-17 20:13 ` [PATCH 54/55] skd: Optimize locking Bart Van Assche
2017-08-17 20:13 ` [PATCH 55/55] skd: Bump driver version Bart Van Assche
2017-08-17 20:45 ` Jens Axboe
2017-08-17 20:44 ` [PATCH 00/55] Convert skd driver to blk-mq Jens Axboe
2017-08-18 14:46 ` Jens Axboe
2017-08-18 15:05 ` Bart Van Assche
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=20170817201338.16537-32-bart.vanassche@wdc.com \
--to=bart.vanassche@wdc.com \
--cc=Akhil.Bhansali@wdc.com \
--cc=Damien.LeMoal@wdc.com \
--cc=axboe@kernel.dk \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jthumshirn@suse.de \
--cc=linux-block@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