Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195578
b: refs/heads/master
c: 89009fb
h: refs/heads/master
v: v3
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Apr 11, 2010
1 parent 2b92c1f commit 4265467
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 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: f891dcfdc11d2004253861f51d627bfda6773c76
refs/heads/master: 89009fbb7d2df37536c8dc932fdead4189783f92
12 changes: 7 additions & 5 deletions trunk/drivers/scsi/mpt2sas/mpt2sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,7 @@ _base_release_memory_pools(struct MPT2SAS_ADAPTER *ioc)
ioc->config_page, ioc->config_page_dma);
}

kfree(ioc->scsi_lookup);
free_pages((ulong)ioc->scsi_lookup, ioc->scsi_lookup_pages);
kfree(ioc->hpr_lookup);
kfree(ioc->internal_lookup);
}
Expand Down Expand Up @@ -2113,11 +2113,13 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)
ioc->name, (unsigned long long) ioc->request_dma));
total_sz += sz;

ioc->scsi_lookup = kcalloc(ioc->scsiio_depth,
sizeof(struct request_tracker), GFP_KERNEL);
sz = ioc->scsiio_depth * sizeof(struct request_tracker);
ioc->scsi_lookup_pages = get_order(sz);
ioc->scsi_lookup = (struct request_tracker *)__get_free_pages(
GFP_KERNEL, ioc->scsi_lookup_pages);
if (!ioc->scsi_lookup) {
printk(MPT2SAS_ERR_FMT "scsi_lookup: kcalloc failed\n",
ioc->name);
printk(MPT2SAS_ERR_FMT "scsi_lookup: get_free_pages failed, "
"sz(%d)\n", ioc->name, (int)sz);
goto out;
}

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/scsi/mpt2sas/mpt2sas_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,8 @@ struct MPT2SAS_ADAPTER {
dma_addr_t request_dma;
u32 request_dma_sz;
struct request_tracker *scsi_lookup;
spinlock_t scsi_lookup_lock;
ulong scsi_lookup_pages;
spinlock_t scsi_lookup_lock;
struct list_head free_list;
int pending_io_count;
wait_queue_head_t reset_wq;
Expand All @@ -688,7 +689,7 @@ struct MPT2SAS_ADAPTER {
u16 max_sges_in_chain_message;
u16 chains_needed_per_io;
u16 chain_offset_value_for_main_message;
u16 chain_depth;
u32 chain_depth;

/* hi-priority queue */
u16 hi_priority_smid;
Expand Down

0 comments on commit 4265467

Please sign in to comment.