public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cxgb3i: fixed programing of the dma page sizes
@ 2011-06-17 23:10 kxie-ut6Up61K2wZBDgjK7y7TUQ
  2011-06-24 18:46 ` Mike Christie
  0 siblings, 1 reply; 2+ messages in thread
From: kxie-ut6Up61K2wZBDgjK7y7TUQ @ 2011-06-17 23:10 UTC (permalink / raw)
  To: linux-scsi-u79uwXL29TY76Z2rM5mHXA,
	open-iscsi-/JYPxA39Uh5TLH3MbocFFw
  Cc: kxie-ut6Up61K2wZBDgjK7y7TUQ,
	James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk,
	michaelc-hcNo3dDEHLuVc3sceRu5cw

[PATCH] cxgb3i: fixed programing of the dma page sizes

From: Karen Xie <kxie-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>

Fixed missing programming of the pages sizes for DMA. 

Signed-off-by: Karen Xie <kxie-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
---
 drivers/scsi/cxgbi/cxgb3i/cxgb3i.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
index fc2cdb6..ffb9eea 100644
--- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
+++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
@@ -1245,7 +1245,7 @@ static int cxgb3i_ddp_init(struct cxgbi_device *cdev)
 	struct cxgbi_ddp_info *ddp = tdev->ulp_iscsi;
 	struct ulp_iscsi_info uinfo;
 	unsigned int pgsz_factor[4];
-	int err;
+	int i, err;
 
 	if (ddp) {
 		kref_get(&ddp->refcnt);
@@ -1271,6 +1271,8 @@ static int cxgb3i_ddp_init(struct cxgbi_device *cdev)
 
 	uinfo.tagmask = ddp->idx_mask << PPOD_IDX_SHIFT;
 	cxgbi_ddp_page_size_factor(pgsz_factor);
+	for (i = 0; i < 4; i++)
+		uinfo.pgsz_factor[i] = pgsz_factor[i];
 	uinfo.ulimit = uinfo.llimit + (ddp->nppods << PPOD_SIZE_SHIFT);
 
 	err = tdev->ctl(tdev, ULP_ISCSI_SET_PARAMS, &uinfo);

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cxgb3i: fixed programing of the dma page sizes
  2011-06-17 23:10 [PATCH] cxgb3i: fixed programing of the dma page sizes kxie-ut6Up61K2wZBDgjK7y7TUQ
@ 2011-06-24 18:46 ` Mike Christie
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Christie @ 2011-06-24 18:46 UTC (permalink / raw)
  To: kxie; +Cc: linux-scsi, open-iscsi, James.Bottomley

On 06/17/2011 06:10 PM, kxie@chelsio.com wrote:
> [PATCH] cxgb3i: fixed programing of the dma page sizes
> 
> From: Karen Xie <kxie@chelsio.com>
> 
> Fixed missing programming of the pages sizes for DMA. 
> 
> Signed-off-by: Karen Xie <kxie@chelsio.com>
> ---
>  drivers/scsi/cxgbi/cxgb3i/cxgb3i.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
> index fc2cdb6..ffb9eea 100644
> --- a/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
> +++ b/drivers/scsi/cxgbi/cxgb3i/cxgb3i.c
> @@ -1245,7 +1245,7 @@ static int cxgb3i_ddp_init(struct cxgbi_device *cdev)
>  	struct cxgbi_ddp_info *ddp = tdev->ulp_iscsi;
>  	struct ulp_iscsi_info uinfo;
>  	unsigned int pgsz_factor[4];
> -	int err;
> +	int i, err;
>  
>  	if (ddp) {
>  		kref_get(&ddp->refcnt);
> @@ -1271,6 +1271,8 @@ static int cxgb3i_ddp_init(struct cxgbi_device *cdev)
>  
>  	uinfo.tagmask = ddp->idx_mask << PPOD_IDX_SHIFT;
>  	cxgbi_ddp_page_size_factor(pgsz_factor);
> +	for (i = 0; i < 4; i++)
> +		uinfo.pgsz_factor[i] = pgsz_factor[i];
>  	uinfo.ulimit = uinfo.llimit + (ddp->nppods << PPOD_SIZE_SHIFT);
>  
>  	err = tdev->ctl(tdev, ULP_ISCSI_SET_PARAMS, &uinfo);

Looks ok.

Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-24 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-17 23:10 [PATCH] cxgb3i: fixed programing of the dma page sizes kxie-ut6Up61K2wZBDgjK7y7TUQ
2011-06-24 18:46 ` Mike Christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox