From: Dan Carpenter <dan.carpenter@oracle.com>
To: "James E.J. Bottomley" <JBottomley@parallels.com>,
Nick Cheng <nick.cheng@areca.com.tw>
Cc: Jingoo Han <jg1.han@samsung.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Jiri Kosina <jkosina@suse.cz>,
linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [SCSI] arcmsr: upper 32 of dma address lost
Date: Fri, 07 Feb 2014 13:07:13 +0000 [thread overview]
Message-ID: <20140207130713.GX26776@mwanda> (raw)
In-Reply-To: <20140207130028.GA6971@elgon.mountain>
On Fri, Feb 07, 2014 at 04:00:28PM +0300, Dan Carpenter wrote:
> The original code always set the upper 32 bits to zero because it was
> doing a shift of the wrong variable.
>
Actually let me redo this. I want to add a cast to prevent a static
checker warning on 32 bit systems. Sorry, for the noise.
regards,
dan carpenter
> Fixes: 1a4f550a09f8 ('[SCSI] arcmsr: 1.20.00.15: add SATA RAID plus other fixes')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
> index 4f6a30b8e5f9..9cfd399c47c0 100644
> --- a/drivers/scsi/arcmsr/arcmsr_hba.c
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c
> @@ -2500,16 +2500,15 @@ static int arcmsr_polling_ccbdone(struct AdapterControlBlock *acb,
> static int arcmsr_iop_confirm(struct AdapterControlBlock *acb)
> {
> uint32_t cdb_phyaddr, cdb_phyaddr_hi32;
> - dma_addr_t dma_coherent_handle;
> +
> /*
> ********************************************************************
> ** here we need to tell iop 331 our freeccb.HighPart
> ** if freeccb.HighPart is not zero
> ********************************************************************
> */
> - dma_coherent_handle = acb->dma_coherent_handle;
> - cdb_phyaddr = (uint32_t)(dma_coherent_handle);
> - cdb_phyaddr_hi32 = (uint32_t)((cdb_phyaddr >> 16) >> 16);
> + cdb_phyaddr = (uint32_t)(acb->dma_coherent_handle);
> + cdb_phyaddr_hi32 = (uint32_t)(acb->dma_coherent_handle >> 32);
> acb->cdb_phyaddr_hi32 = cdb_phyaddr_hi32;
> /*
> ***********************************************************************
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "James E.J. Bottomley" <JBottomley@parallels.com>,
Nick Cheng <nick.cheng@areca.com.tw>
Cc: Jingoo Han <jg1.han@samsung.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Jiri Kosina <jkosina@suse.cz>,
linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [SCSI] arcmsr: upper 32 of dma address lost
Date: Fri, 7 Feb 2014 16:07:13 +0300 [thread overview]
Message-ID: <20140207130713.GX26776@mwanda> (raw)
In-Reply-To: <20140207130028.GA6971@elgon.mountain>
On Fri, Feb 07, 2014 at 04:00:28PM +0300, Dan Carpenter wrote:
> The original code always set the upper 32 bits to zero because it was
> doing a shift of the wrong variable.
>
Actually let me redo this. I want to add a cast to prevent a static
checker warning on 32 bit systems. Sorry, for the noise.
regards,
dan carpenter
> Fixes: 1a4f550a09f8 ('[SCSI] arcmsr: 1.20.00.15: add SATA RAID plus other fixes')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c
> index 4f6a30b8e5f9..9cfd399c47c0 100644
> --- a/drivers/scsi/arcmsr/arcmsr_hba.c
> +++ b/drivers/scsi/arcmsr/arcmsr_hba.c
> @@ -2500,16 +2500,15 @@ static int arcmsr_polling_ccbdone(struct AdapterControlBlock *acb,
> static int arcmsr_iop_confirm(struct AdapterControlBlock *acb)
> {
> uint32_t cdb_phyaddr, cdb_phyaddr_hi32;
> - dma_addr_t dma_coherent_handle;
> +
> /*
> ********************************************************************
> ** here we need to tell iop 331 our freeccb.HighPart
> ** if freeccb.HighPart is not zero
> ********************************************************************
> */
> - dma_coherent_handle = acb->dma_coherent_handle;
> - cdb_phyaddr = (uint32_t)(dma_coherent_handle);
> - cdb_phyaddr_hi32 = (uint32_t)((cdb_phyaddr >> 16) >> 16);
> + cdb_phyaddr = (uint32_t)(acb->dma_coherent_handle);
> + cdb_phyaddr_hi32 = (uint32_t)(acb->dma_coherent_handle >> 32);
> acb->cdb_phyaddr_hi32 = cdb_phyaddr_hi32;
> /*
> ***********************************************************************
next prev parent reply other threads:[~2014-02-07 13:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-07 13:00 [patch] [SCSI] arcmsr: upper 32 of dma address lost Dan Carpenter
2014-02-07 13:00 ` Dan Carpenter
2014-02-07 13:07 ` Dan Carpenter [this message]
2014-02-07 13:07 ` Dan Carpenter
2014-02-10 15:18 ` [patch v2] " Dan Carpenter
2014-02-10 15:18 ` Dan Carpenter
2014-02-10 15:22 ` James Bottomley
2014-02-10 15:22 ` James Bottomley
2014-02-10 15:29 ` Dan Carpenter
2014-02-10 15:29 ` Dan Carpenter
2014-02-11 16:06 ` [patch v3] " Dan Carpenter
2014-02-11 16:06 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140207130713.GX26776@mwanda \
--to=dan.carpenter@oracle.com \
--cc=JBottomley@parallels.com \
--cc=jg1.han@samsung.com \
--cc=jkosina@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nick.cheng@areca.com.tw \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.