On 09/26/2009 11:30 AM, James Bottomley wrote:
On Wed, 2009-09-23 at 12:04 -0500, Mike Christie wrote:
On 09/21/2009 09:52 PM, Jayamohan Kallickal wrote:
This patch contains changes to use pci_pools for iscsi hdr
instead of pci_alloc_consistent. Here we alloc and free to pool
for every IO
v3:
- Remove cleanup loop in beiscsi_session_destroy
- Fixup for allocation failure handling in beiscsi_alloc_pdu
- Removed unused variable in beiscsi_session_destroy.
Signed-off-by: Jayamohan Kallickal<jayamohank@xxxxxxxxxxxxxxxxx>
Thanks for fixing those issues.
Reviewed-by: Mike Christie<michaelc@xxxxxxxxxxx>
Actually, this isn't building correctly for me in my 32 bit environment:
drivers/scsi/be2iscsi/be_main.c: In function ‘beiscsi_alloc_pdu’:
drivers/scsi/be2iscsi/be_main.c:2885: warning: passing argument 3 of
‘dma_pool_alloc’ from incompatible pointer type
The problem is this unsigned long long definition of a64: dma_addr_t is
only a long (32 bits) on this platform.
This patch fixes the problem for me ... I'll just fold it in if
everyone's OK with it.
James
---
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 4299a46..4f1aca3 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -2881,13 +2881,15 @@ static int beiscsi_alloc_pdu(struct iscsi_task *task, uint8_t opcode)
struct hwi_controller *phwi_ctrlr;
itt_t itt;
struct beiscsi_session *beiscsi_sess = beiscsi_conn->beiscsi_sess;
+ dma_addr_t paddr;
io_task->cmd_bhs = pci_pool_alloc(beiscsi_sess->bhs_pool,
- GFP_KERNEL,
- &io_task->bhs_pa.u.a64.address);
+ GFP_KERNEL,&paddr);
+
if (!io_task->cmd_bhs)
return -ENOMEM;
+ io_task->bhs_pa.u.a64.address = paddr;
io_task->pwrb_handle = alloc_wrb_handle(phba,
beiscsi_conn->beiscsi_conn_cid,
task->itt);
Looks ok to me.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html