Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204068
b: refs/heads/master
c: 6c311b5
h: refs/heads/master
v: v3
  • Loading branch information
Stephen M. Cameron authored and James Bottomley committed Jul 27, 2010
1 parent 00e3467 commit 94508dd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 25 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: ec18d2abad04091c5125b0a37ad80a00099d8ac0
refs/heads/master: 6c311b5725b9500bdd0f527cd97496b11999fbbd
54 changes: 30 additions & 24 deletions trunk/drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -3808,36 +3808,16 @@ static void calc_bucket_map(int bucket[], int num_buckets,
}
}

static __devinit void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
static __devinit void hpsa_enter_performant_mode(struct ctlr_info *h)
{
u32 trans_support;
int i;
unsigned long register_value;
int bft[8] = {5, 6, 8, 10, 12, 20, 28, 35}; /* for scatter/gathers */
/* 5 = 1 s/g entry or 4k
* 6 = 2 s/g entry or 8k
* 8 = 4 s/g entry or 16k
* 10 = 6 s/g entry or 24k
*/
int bft[8] = {5, 6, 8, 10, 12, 20, 28, 35}; /* for scatter/gathers */
int i = 0;
unsigned long register_value;

trans_support = readl(&(h->cfgtable->TransportSupport));
if (!(trans_support & PERFORMANT_MODE))
return;

h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands));
h->max_sg_entries = 32;
/* Performant mode ring buffer and supporting data structures */
h->reply_pool_size = h->max_commands * sizeof(u64);
h->reply_pool = pci_alloc_consistent(h->pdev, h->reply_pool_size,
&(h->reply_pool_dhandle));

/* Need a block fetch table for performant mode */
h->blockFetchTable = kmalloc(((h->max_sg_entries+1) *
sizeof(u32)), GFP_KERNEL);

if ((h->reply_pool == NULL)
|| (h->blockFetchTable == NULL))
goto clean_up;

h->reply_pool_wraparound = 1; /* spec: init to 1 */

Expand Down Expand Up @@ -3867,6 +3847,32 @@ static __devinit void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
" performant mode\n");
return;
}
}

static __devinit void hpsa_put_ctlr_into_performant_mode(struct ctlr_info *h)
{
u32 trans_support;

trans_support = readl(&(h->cfgtable->TransportSupport));
if (!(trans_support & PERFORMANT_MODE))
return;

h->max_commands = readl(&(h->cfgtable->MaxPerformantModeCommands));
h->max_sg_entries = 32;
/* Performant mode ring buffer and supporting data structures */
h->reply_pool_size = h->max_commands * sizeof(u64);
h->reply_pool = pci_alloc_consistent(h->pdev, h->reply_pool_size,
&(h->reply_pool_dhandle));

/* Need a block fetch table for performant mode */
h->blockFetchTable = kmalloc(((h->max_sg_entries+1) *
sizeof(u32)), GFP_KERNEL);

if ((h->reply_pool == NULL)
|| (h->blockFetchTable == NULL))
goto clean_up;

hpsa_enter_performant_mode(h);

/* Change the access methods to the performant access methods */
h->access = SA5_performant_access;
Expand Down

0 comments on commit 94508dd

Please sign in to comment.