Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 124607
b: refs/heads/master
c: c85f8cb
h: refs/heads/master
i:
  124605: 5c98abc
  124603: fd3d15f
  124599: 7f24659
  124591: b3a1e0e
  124575: 39f749b
  124543: 8c744bc
v: v3
  • Loading branch information
Chandra Seetharaman authored and James Bottomley committed Dec 29, 2008
1 parent fd00243 commit 4c71520
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9eece961fc646e2652086dae42650d002e2d27e2
refs/heads/master: c85f8cb9254e60cd25a094329c9dc9185c2140e7
15 changes: 11 additions & 4 deletions trunk/drivers/scsi/device_handler/scsi_dh_rdac.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <scsi/scsi_dh.h>

#define RDAC_NAME "rdac"
#define RDAC_RETRY_COUNT 5

/*
* LSI mode page stuff
Expand Down Expand Up @@ -478,21 +479,27 @@ static int send_mode_select(struct scsi_device *sdev, struct rdac_dh_data *h)
{
struct request *rq;
struct request_queue *q = sdev->request_queue;
int err = SCSI_DH_RES_TEMP_UNAVAIL;
int err, retry_cnt = RDAC_RETRY_COUNT;

retry:
err = SCSI_DH_RES_TEMP_UNAVAIL;
rq = rdac_failover_get(sdev, h);
if (!rq)
goto done;

sdev_printk(KERN_INFO, sdev, "queueing MODE_SELECT command.\n");
sdev_printk(KERN_INFO, sdev, "%s MODE_SELECT command.\n",
(retry_cnt == RDAC_RETRY_COUNT) ? "queueing" : "retrying");

err = blk_execute_rq(q, NULL, rq, 1);
if (err != SCSI_DH_OK)
blk_put_request(rq);
if (err != SCSI_DH_OK) {
err = mode_select_handle_sense(sdev, h->sense);
if (err == SCSI_DH_RETRY && retry_cnt--)
goto retry;
}
if (err == SCSI_DH_OK)
h->state = RDAC_STATE_ACTIVE;

blk_put_request(rq);
done:
return err;
}
Expand Down

0 comments on commit 4c71520

Please sign in to comment.