-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhpsa-do-not-poll-for-aborted-command-completions
58 lines (52 loc) · 1.91 KB
/
hpsa-do-not-poll-for-aborted-command-completions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
hpsa: do not wait for aborted commands to complete after abort
From: Stephen M. Cameron <[email protected]>
After an abort command completes successfully there is no need
or sense in trying to wait for the aborted command to complete.
It will have already completed (either normally, or as aborted)
before the abort command completes. Trying to wait for it to
complete later doesn't make sense -- it would only be waiting for
the command to be re-used for something else and for *that* to
complete, which would be crazy.
Signed-off-by: Stephen M. Cameron <[email protected]>
---
drivers/scsi/hpsa.c | 22 ++--------------------
1 file changed, 2 insertions(+), 20 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index bb4b2e9..218371a 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4457,7 +4457,7 @@ static int hpsa_send_abort_both_ways(struct ctlr_info *h,
static int hpsa_eh_abort_handler(struct scsi_cmnd *sc)
{
- int i, rc;
+ int rc;
struct ctlr_info *h;
struct hpsa_scsi_dev_t *dev;
struct CommandList *abort; /* pointer to command to be aborted */
@@ -4526,26 +4526,8 @@ static int hpsa_eh_abort_handler(struct scsi_cmnd *sc)
return FAILED;
}
dev_info(&h->pdev->dev, "%s REQUEST SUCCEEDED.\n", msg);
-
- /* If the abort(s) above completed and actually aborted the
- * command, then the command to be aborted should already be
- * completed. If not, wait around a bit more to see if they
- * manage to complete normally.
- */
-#define ABORT_COMPLETE_WAIT_SECS 30
- for (i = 0; i < ABORT_COMPLETE_WAIT_SECS * 10; i++) {
- refcount = atomic_read(&abort->refcount);
- if (refcount < 2) {
- cmd_free(h, abort);
- return SUCCESS;
- } else {
- msleep(100);
- }
- }
- dev_warn(&h->pdev->dev, "%s FAILED. Aborted command has not completed after %d seconds.\n",
- msg, ABORT_COMPLETE_WAIT_SECS);
cmd_free(h, abort);
- return FAILED;
+ return SUCCESS;
}
/*