Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208306
b: refs/heads/master
c: 0f8a6a1
h: refs/heads/master
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Aug 7, 2010
1 parent 8d1178b commit c080417
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 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: fe3b7527dbf1e717ccb3492bb2d84481ca7be6f9
refs/heads/master: 0f8a6a1e7b7162a51daee7df28f1b898da1a4165
27 changes: 15 additions & 12 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -3816,9 +3816,22 @@ static void calc_bucket_map(int bucket[], int num_buckets,
}
}

static void __devinit cciss_wait_for_mode_change_ack(ctlr_info_t *h)
{
int i;

/* under certain very rare conditions, this can take awhile.
* (e.g.: hot replace a failed 144GB drive in a RAID 5 set right
* as we enter this code.) */
for (i = 0; i < MAX_CONFIG_WAIT; i++) {
if (!(readl(h->vaddr + SA5_DOORBELL) & CFGTBL_ChangeReq))
break;
msleep(10);
}
}

static void __devinit cciss_put_controller_into_performant_mode(ctlr_info_t *h)
{
int l = 0;
__u32 trans_support;
__u32 trans_offset;
/*
Expand Down Expand Up @@ -3895,17 +3908,7 @@ static void __devinit cciss_put_controller_into_performant_mode(ctlr_info_t *h)

h->transMethod = CFGTBL_Trans_Performant;
writel(CFGTBL_ChangeReq, h->vaddr + SA5_DOORBELL);
/* under certain very rare conditions, this can take awhile.
* (e.g.: hot replace a failed 144GB drive in a RAID 5 set right
* as we enter this code.) */
for (l = 0; l < MAX_CONFIG_WAIT; l++) {
register_value = readl(h->vaddr + SA5_DOORBELL);
if (!(register_value & CFGTBL_ChangeReq))
break;
/* delay and try again */
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(10);
}
cciss_wait_for_mode_change_ack(h);
register_value = readl(&(h->cfgtable->TransportActive));
if (!(register_value & CFGTBL_Trans_Performant)) {
printk(KERN_WARNING "cciss: unable to get board into"
Expand Down

0 comments on commit c080417

Please sign in to comment.