[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-scsi
Subject:    Re: [PATCH 2/2] be2iscsi: Moving to pci_pools v3
From:       "Jayamohan Kalickal" <jayamohank () serverengines ! com>
Date:       2009-09-29 17:37:32
Message-ID: 20090929173732.c79692d1 () mailhost ! serverengines ! com
[Download RAW message or body]

Looks OK to me
-Jay

  _____  
From: James Bottomley [mailto:James.Bottomley@suse.de]
To: Mike Christie [mailto:michaelc@cs.wisc.edu]
Cc: Jayamohan Kalickal [mailto:jayamohank@serverengines.com], \
                linux-scsi@vger.kernel.org
Sent: Sat, 26 Sep 2009 09:30:22 -0700
Subject: Re: [PATCH 2/2] be2iscsi: Moving to pci_pools v3

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@serverengines.com>
> 
> Thanks for fixing those issues.
> 
> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>

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);

___________________________________________________________________________________
This message, together with any attachment(s), contains confidential and proprietary \
information of ServerEngines Corporation and is intended only for the designated \
recipient(s) named above. Any unauthorized review, printing, retention, copying, \
disclosure or distribution is strictly prohibited.  If you are not the intended \
recipient of this message, please immediately advise the sender by reply email \
message and delete all copies of this message and any attachment(s). Thank you.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic