diff mbox

[v3,3/8] MFD:rtsx: Declare that the DMA address limitation is 32bit explicitly

Message ID cd92be49bee917165009311d62e10a5f60a85a48.1356662293.git.wei_wang@realsil.com.cn (mailing list archive)
State New, archived
Headers show

Commit Message

wei_wang@realsil.com.cn Dec. 28, 2012, 2:41 a.m. UTC
From: Wei WANG <wei_wang@realsil.com.cn>

Realtek PCIe card reader only supports 32bit DMA

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
---
 drivers/mfd/rtsx_pcr.c |    4 ++++
 1 file changed, 4 insertions(+)

Comments

Dan Carpenter Jan. 3, 2013, 12:25 p.m. UTC | #1
On Fri, Dec 28, 2012 at 10:41:28AM +0800, wei_wang@realsil.com.cn wrote:
> From: Wei WANG <wei_wang@realsil.com.cn>
> 
> Realtek PCIe card reader only supports 32bit DMA
> 

Is this a bugfix?  If so what does the bug look like?

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
wei_wang@realsil.com.cn Jan. 4, 2013, 2:46 a.m. UTC | #2
? 2013?01?03? 20:25, Dan Carpenter ??:
> On Fri, Dec 28, 2012 at 10:41:28AM +0800, wei_wang@realsil.com.cn wrote:
>> From: Wei WANG <wei_wang@realsil.com.cn>
>>
>> Realtek PCIe card reader only supports 32bit DMA
>>
> Is this a bugfix?  If so what does the bug look like?
>
> regards,
> dan carpenter
>
Hi Dan:

No, this is not a bugfix. In default, the kernel will allocate 32bit
address for DMA. This declaration can improve the readability.

BR,
wei wang
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dan Carpenter Jan. 4, 2013, 5:50 a.m. UTC | #3
On Fri, Jan 04, 2013 at 10:46:22AM +0800, wwang wrote:
> ? 2013?01?03? 20:25, Dan Carpenter ??:
> > On Fri, Dec 28, 2012 at 10:41:28AM +0800, wei_wang@realsil.com.cn wrote:
> >> From: Wei WANG <wei_wang@realsil.com.cn>
> >>
> >> Realtek PCIe card reader only supports 32bit DMA
> >>
> > Is this a bugfix?  If so what does the bug look like?
> >
> > regards,
> > dan carpenter
> >
> Hi Dan:
> 
> No, this is not a bugfix. In default, the kernel will allocate 32bit
> address for DMA. This declaration can improve the readability.
> 

Ah ok.  Really none of the things I mentioned were stuff that
prevented the patch from being merged or couldn't be fixed in follow
on patches.

The thing is that the commit message should always say why a patch
is needed.

regards,
dan carpenter

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

Patch

diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
index fa2c2bc..1dc64bb 100644
--- a/drivers/mfd/rtsx_pcr.c
+++ b/drivers/mfd/rtsx_pcr.c
@@ -1010,6 +1010,10 @@  static int __devinit rtsx_pci_probe(struct pci_dev *pcidev,
 		pci_name(pcidev), (int)pcidev->vendor, (int)pcidev->device,
 		(int)pcidev->revision);
 
+	ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
+	if (ret < 0)
+		return ret;
+
 	ret = pci_enable_device(pcidev);
 	if (ret)
 		return ret;