xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [sh_eth.c] Problem in dma_map_single()
@ 2016-04-12  7:54 Wonseok Ko
  2016-04-12 16:35 ` Julien Grall
  2016-04-12 17:10 ` Konrad Rzeszutek Wilk
  0 siblings, 2 replies; 9+ messages in thread
From: Wonseok Ko @ 2016-04-12  7:54 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 523 bytes --]

Hi,

I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
doesn't work. The root cause of the problem is that driver cannot satisfy
the condition of dma_capable(). I found the same problem in the mailing
list, but the problem is still remaining I guess. previous mail: (
http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)

Does anyone give me advise?

My environment as below:
- dom0 linux version: 4.3
- xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)


Thanks,
Wonseok.

[-- Attachment #1.2: Type: text/html, Size: 1795 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [sh_eth.c] Problem in dma_map_single()
  2016-04-12  7:54 [sh_eth.c] Problem in dma_map_single() Wonseok Ko
@ 2016-04-12 16:35 ` Julien Grall
  2016-04-12 17:10 ` Konrad Rzeszutek Wilk
  1 sibling, 0 replies; 9+ messages in thread
From: Julien Grall @ 2016-04-12 16:35 UTC (permalink / raw)
  To: Wonseok Ko, xen-devel; +Cc: sstabellini

(CC Stefano and Konrad)

On 12/04/2016 08:54, Wonseok Ko wrote:
> Hi,
>
> I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> doesn't work. The root cause of the problem is that driver cannot
> satisfy the condition of dma_capable(). I found the same problem in the
> mailing list, but the problem is still remaining I guess. previous mail:
> (http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
>
> Does anyone give me advise?
>
> My environment as below:
> - dom0 linux version: 4.3
> - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
>
>
> Thanks,
> Wonseok.
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [sh_eth.c] Problem in dma_map_single()
  2016-04-12  7:54 [sh_eth.c] Problem in dma_map_single() Wonseok Ko
  2016-04-12 16:35 ` Julien Grall
@ 2016-04-12 17:10 ` Konrad Rzeszutek Wilk
  2016-04-13  5:18   ` Wonseok Ko
  2016-04-14  7:12   ` Wonseok Ko
  1 sibling, 2 replies; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-04-12 17:10 UTC (permalink / raw)
  To: Wonseok Ko; +Cc: xen-devel

On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> Hi,
> 
> I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> doesn't work. The root cause of the problem is that driver cannot satisfy
> the condition of dma_capable(). I found the same problem in the mailing

So what can be done about making it dma_capable() ?

> list, but the problem is still remaining I guess. previous mail: (
> http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> 
> Does anyone give me advise?
> 
> My environment as below:
> - dom0 linux version: 4.3
> - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> 
> 
> Thanks,
> Wonseok.

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [sh_eth.c] Problem in dma_map_single()
  2016-04-12 17:10 ` Konrad Rzeszutek Wilk
@ 2016-04-13  5:18   ` Wonseok Ko
  2016-04-14 13:52     ` Konrad Rzeszutek Wilk
  2016-04-14  7:12   ` Wonseok Ko
  1 sibling, 1 reply; 9+ messages in thread
From: Wonseok Ko @ 2016-04-13  5:18 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1802 bytes --]

Hi Konrad,

In dma_capable(), it checks that mask, size and address of device.

Currently, it dosen't pass to first condition code as below:

if (!dev->dma_mask)

                return 0;

It shows the device doesn't have dma_mask bit. So I tried to set the
dma_mask bit in sh_eth.c

My approaches:
1. I tried to set a mask bit(dev->dma_mask) to use
dma_coerce_mask_and_coherent()
in sh_eth_drv_probe(), but it doesn't work.
2. forced set dev->dma_mask without kernel api. I passed to dma_capable()
but driver cannot work.

sh_eth driver want to get valid DMA descriptor to set DMA descriptor
address for Rx and Tx.
I tried to set the some bits(such as dma_mask) to get valid dma address
forcibly, in this configuration sh_eth cannot work.

My question is if I want to get valid dma address with xen swiotlb(suchas
map_page, set_dma_mask and so on)?




Thanks,
Wonseok.

2016-04-13 2:10 GMT+09:00 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>:

> On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> > Hi,
> >
> > I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> > doesn't work. The root cause of the problem is that driver cannot satisfy
> > the condition of dma_capable(). I found the same problem in the mailing
>
> So what can be done about making it dma_capable() ?
>
> > list, but the problem is still remaining I guess. previous mail: (
> > http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> >
> > Does anyone give me advise?
> >
> > My environment as below:
> > - dom0 linux version: 4.3
> > - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> >
> >
> > Thanks,
> > Wonseok.
>
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xen.org
> > http://lists.xen.org/xen-devel
>
>

[-- Attachment #1.2: Type: text/html, Size: 4809 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [sh_eth.c] Problem in dma_map_single()
  2016-04-12 17:10 ` Konrad Rzeszutek Wilk
  2016-04-13  5:18   ` Wonseok Ko
@ 2016-04-14  7:12   ` Wonseok Ko
  1 sibling, 0 replies; 9+ messages in thread
From: Wonseok Ko @ 2016-04-14  7:12 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1014 bytes --]

Hi Konrad,
Did you read the reply? How do I fix it?
Thanks,Wonseok
Sent from Outlook Mobile




On Tue, Apr 12, 2016 at 10:10 AM -0700, "Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com> wrote:










On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> Hi,
> 
> I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> doesn't work. The root cause of the problem is that driver cannot satisfy
> the condition of dma_capable(). I found the same problem in the mailing

So what can be done about making it dma_capable() ?

> list, but the problem is still remaining I guess. previous mail: (
> http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> 
> Does anyone give me advise?
> 
> My environment as below:
> - dom0 linux version: 4.3
> - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> 
> 
> Thanks,
> Wonseok.

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel







[-- Attachment #1.2: Type: text/html, Size: 1574 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [sh_eth.c] Problem in dma_map_single()
  2016-04-13  5:18   ` Wonseok Ko
@ 2016-04-14 13:52     ` Konrad Rzeszutek Wilk
  2016-04-15  3:39       ` Wonseok Ko
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-04-14 13:52 UTC (permalink / raw)
  To: Wonseok Ko; +Cc: xen-devel

On Wed, Apr 13, 2016 at 02:18:09PM +0900, Wonseok Ko wrote:
> Hi Konrad,
> 
> In dma_capable(), it checks that mask, size and address of device.
> 
> Currently, it dosen't pass to first condition code as below:
> 
> if (!dev->dma_mask)
> 
>                 return 0;
> 
> It shows the device doesn't have dma_mask bit. So I tried to set the
> dma_mask bit in sh_eth.c
> 
> My approaches:
> 1. I tried to set a mask bit(dev->dma_mask) to use
> dma_coerce_mask_and_coherent()
> in sh_eth_drv_probe(), but it doesn't work.

Are there any errors? What does dma_mask end up being?
> 2. forced set dev->dma_mask without kernel api. I passed to dma_capable()
> but driver cannot work.

Aha, what did you set it to? Do you have a diff?
> 
> sh_eth driver want to get valid DMA descriptor to set DMA descriptor
> address for Rx and Tx.

Right, which it would plug in its driver registers so the card
can pick it up.
> I tried to set the some bits(such as dma_mask) to get valid dma address
> forcibly, in this configuration sh_eth cannot work.

Uh, not sure I understand. Or are you repeating what you mentioned
earlier?
> 
> My question is if I want to get valid dma address with xen swiotlb(suchas
> map_page, set_dma_mask and so on)?

Well it all should work just fine - perhaps if you provide some
diff's and such I can help you along?

> 
> 
> 
> 
> Thanks,
> Wonseok.
> 
> 2016-04-13 2:10 GMT+09:00 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>:
> 
> > On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> > > Hi,
> > >
> > > I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> > > doesn't work. The root cause of the problem is that driver cannot satisfy
> > > the condition of dma_capable(). I found the same problem in the mailing
> >
> > So what can be done about making it dma_capable() ?
> >
> > > list, but the problem is still remaining I guess. previous mail: (
> > > http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> > >
> > > Does anyone give me advise?
> > >
> > > My environment as below:
> > > - dom0 linux version: 4.3
> > > - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> > >
> > >
> > > Thanks,
> > > Wonseok.
> >
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@lists.xen.org
> > > http://lists.xen.org/xen-devel
> >
> >

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [sh_eth.c] Problem in dma_map_single()
  2016-04-14 13:52     ` Konrad Rzeszutek Wilk
@ 2016-04-15  3:39       ` Wonseok Ko
  2016-05-17 21:10         ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 9+ messages in thread
From: Wonseok Ko @ 2016-04-15  3:39 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 3314 bytes --]

​Hi Konrad,​

Finally, I can use ethernet :D. It was my mistake. I thought the
SET_NETDEV_DEV() makes ndev == pdev->dev, but it's not true.

So I changed the dma configuration from:

dma_coerce_mask_and_coherent(*&pdev->dev*, DMA_BIT_MASK(32));
SET_NETDEV_DEV(ndev, &pdev->dev);


to:

dma_coerce_mask_and_coherent(*&ndev->dev*, DMA_BIT_MASK(32));
SET_NETDEV_DEV(ndev, &pdev->dev);


and then sh_eth works.

However I wanted to set dma_mask in pdev, I just thought about the original
data have a mask bit.
Do you know how do I set dma_mask in pdev?

Thank you for your help!

Thanks,
Wonseok.


Thanks,
Wonseok.

2016-04-14 22:52 GMT+09:00 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>:

> On Wed, Apr 13, 2016 at 02:18:09PM +0900, Wonseok Ko wrote:
> > Hi Konrad,
> >
> > In dma_capable(), it checks that mask, size and address of device.
> >
> > Currently, it dosen't pass to first condition code as below:
> >
> > if (!dev->dma_mask)
> >
> >                 return 0;
> >
> > It shows the device doesn't have dma_mask bit. So I tried to set the
> > dma_mask bit in sh_eth.c
> >
> > My approaches:
> > 1. I tried to set a mask bit(dev->dma_mask) to use
> > dma_coerce_mask_and_coherent()
> > in sh_eth_drv_probe(), but it doesn't work.
>
> Are there any errors? What does dma_mask end up being?
> > 2. forced set dev->dma_mask without kernel api. I passed to dma_capable()
> > but driver cannot work.
>
> Aha, what did you set it to? Do you have a diff?
> >
> > sh_eth driver want to get valid DMA descriptor to set DMA descriptor
> > address for Rx and Tx.
>
> Right, which it would plug in its driver registers so the card
> can pick it up.
> > I tried to set the some bits(such as dma_mask) to get valid dma address
> > forcibly, in this configuration sh_eth cannot work.
>
> Uh, not sure I understand. Or are you repeating what you mentioned
> earlier?
> >
> > My question is if I want to get valid dma address with xen swiotlb(suchas
> > map_page, set_dma_mask and so on)?
>
> Well it all should work just fine - perhaps if you provide some
> diff's and such I can help you along?
>
> >
> >
> >
> >
> > Thanks,
> > Wonseok.
> >
> > 2016-04-13 2:10 GMT+09:00 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com
> >:
> >
> > > On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> > > > Hi,
> > > >
> > > > I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> > > > doesn't work. The root cause of the problem is that driver cannot
> satisfy
> > > > the condition of dma_capable(). I found the same problem in the
> mailing
> > >
> > > So what can be done about making it dma_capable() ?
> > >
> > > > list, but the problem is still remaining I guess. previous mail: (
> > > > http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> > > >
> > > > Does anyone give me advise?
> > > >
> > > > My environment as below:
> > > > - dom0 linux version: 4.3
> > > > - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> > > >
> > > >
> > > > Thanks,
> > > > Wonseok.
> > >
> > > > _______________________________________________
> > > > Xen-devel mailing list
> > > > Xen-devel@lists.xen.org
> > > > http://lists.xen.org/xen-devel
> > >
> > >
>

[-- Attachment #1.2: Type: text/html, Size: 6814 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [sh_eth.c] Problem in dma_map_single()
  2016-04-15  3:39       ` Wonseok Ko
@ 2016-05-17 21:10         ` Konrad Rzeszutek Wilk
  2016-05-23 16:06           ` Wonseok Ko
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-05-17 21:10 UTC (permalink / raw)
  To: Wonseok Ko; +Cc: xen-devel

On Fri, Apr 15, 2016 at 12:39:42PM +0900, Wonseok Ko wrote:
> ​Hi Konrad,​
> 
> Finally, I can use ethernet :D. It was my mistake. I thought the
> SET_NETDEV_DEV() makes ndev == pdev->dev, but it's not true.
> 
> So I changed the dma configuration from:
> 
> dma_coerce_mask_and_coherent(*&pdev->dev*, DMA_BIT_MASK(32));
> SET_NETDEV_DEV(ndev, &pdev->dev);
> 
> 
> to:
> 
> dma_coerce_mask_and_coherent(*&ndev->dev*, DMA_BIT_MASK(32));
> SET_NETDEV_DEV(ndev, &pdev->dev);
> 
> 
> and then sh_eth works.
> 
> However I wanted to set dma_mask in pdev, I just thought about the original
> data have a mask bit.
> Do you know how do I set dma_mask in pdev?

That is some weird propogation. Is the pdev->dev the same as ndev->dev?

> Thank you for your help!
> 
> Thanks,
> Wonseok.
> 
> 
> Thanks,
> Wonseok.
> 
> 2016-04-14 22:52 GMT+09:00 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>:
> 
> > On Wed, Apr 13, 2016 at 02:18:09PM +0900, Wonseok Ko wrote:
> > > Hi Konrad,
> > >
> > > In dma_capable(), it checks that mask, size and address of device.
> > >
> > > Currently, it dosen't pass to first condition code as below:
> > >
> > > if (!dev->dma_mask)
> > >
> > >                 return 0;
> > >
> > > It shows the device doesn't have dma_mask bit. So I tried to set the
> > > dma_mask bit in sh_eth.c
> > >
> > > My approaches:
> > > 1. I tried to set a mask bit(dev->dma_mask) to use
> > > dma_coerce_mask_and_coherent()
> > > in sh_eth_drv_probe(), but it doesn't work.
> >
> > Are there any errors? What does dma_mask end up being?
> > > 2. forced set dev->dma_mask without kernel api. I passed to dma_capable()
> > > but driver cannot work.
> >
> > Aha, what did you set it to? Do you have a diff?
> > >
> > > sh_eth driver want to get valid DMA descriptor to set DMA descriptor
> > > address for Rx and Tx.
> >
> > Right, which it would plug in its driver registers so the card
> > can pick it up.
> > > I tried to set the some bits(such as dma_mask) to get valid dma address
> > > forcibly, in this configuration sh_eth cannot work.
> >
> > Uh, not sure I understand. Or are you repeating what you mentioned
> > earlier?
> > >
> > > My question is if I want to get valid dma address with xen swiotlb(suchas
> > > map_page, set_dma_mask and so on)?
> >
> > Well it all should work just fine - perhaps if you provide some
> > diff's and such I can help you along?
> >
> > >
> > >
> > >
> > >
> > > Thanks,
> > > Wonseok.
> > >
> > > 2016-04-13 2:10 GMT+09:00 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com
> > >:
> > >
> > > > On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> > > > > Hi,
> > > > >
> > > > > I'm trying to enable ethernet driver in Domain0 for R-Car H2, but it
> > > > > doesn't work. The root cause of the problem is that driver cannot
> > satisfy
> > > > > the condition of dma_capable(). I found the same problem in the
> > mailing
> > > >
> > > > So what can be done about making it dma_capable() ?
> > > >
> > > > > list, but the problem is still remaining I guess. previous mail: (
> > > > > http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> > > > >
> > > > > Does anyone give me advise?
> > > > >
> > > > > My environment as below:
> > > > > - dom0 linux version: 4.3
> > > > > - xen version: 4.6 commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Wonseok.
> > > >
> > > > > _______________________________________________
> > > > > Xen-devel mailing list
> > > > > Xen-devel@lists.xen.org
> > > > > http://lists.xen.org/xen-devel
> > > >
> > > >
> >

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [sh_eth.c] Problem in dma_map_single()
  2016-05-17 21:10         ` Konrad Rzeszutek Wilk
@ 2016-05-23 16:06           ` Wonseok Ko
  0 siblings, 0 replies; 9+ messages in thread
From: Wonseok Ko @ 2016-05-23 16:06 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 4256 bytes --]

Hi, Konrad


It's not same. I am attaching a macro as below.

#define SET_NETDEV_DEV(net, pdev)   ((net)->dev.parent = (pdev))

So that's why I was setting the dma mask to ndev.


Thanks,

Wonseok Ko


Thanks,
Wonseok.

2016-05-18 6:10 GMT+09:00 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>:

> On Fri, Apr 15, 2016 at 12:39:42PM +0900, Wonseok Ko wrote:
> > ​Hi Konrad,​
> >
> > Finally, I can use ethernet :D. It was my mistake. I thought the
> > SET_NETDEV_DEV() makes ndev == pdev->dev, but it's not true.
> >
> > So I changed the dma configuration from:
> >
> > dma_coerce_mask_and_coherent(*&pdev->dev*, DMA_BIT_MASK(32));
> > SET_NETDEV_DEV(ndev, &pdev->dev);
> >
> >
> > to:
> >
> > dma_coerce_mask_and_coherent(*&ndev->dev*, DMA_BIT_MASK(32));
> > SET_NETDEV_DEV(ndev, &pdev->dev);
> >
> >
> > and then sh_eth works.
> >
> > However I wanted to set dma_mask in pdev, I just thought about the
> original
> > data have a mask bit.
> > Do you know how do I set dma_mask in pdev?
>
> That is some weird propogation. Is the pdev->dev the same as ndev->dev?
>
> > Thank you for your help!
> >
> > Thanks,
> > Wonseok.
> >
> >
> > Thanks,
> > Wonseok.
> >
> > 2016-04-14 22:52 GMT+09:00 Konrad Rzeszutek Wilk <konrad.wilk@oracle.com
> >:
> >
> > > On Wed, Apr 13, 2016 at 02:18:09PM +0900, Wonseok Ko wrote:
> > > > Hi Konrad,
> > > >
> > > > In dma_capable(), it checks that mask, size and address of device.
> > > >
> > > > Currently, it dosen't pass to first condition code as below:
> > > >
> > > > if (!dev->dma_mask)
> > > >
> > > >                 return 0;
> > > >
> > > > It shows the device doesn't have dma_mask bit. So I tried to set the
> > > > dma_mask bit in sh_eth.c
> > > >
> > > > My approaches:
> > > > 1. I tried to set a mask bit(dev->dma_mask) to use
> > > > dma_coerce_mask_and_coherent()
> > > > in sh_eth_drv_probe(), but it doesn't work.
> > >
> > > Are there any errors? What does dma_mask end up being?
> > > > 2. forced set dev->dma_mask without kernel api. I passed to
> dma_capable()
> > > > but driver cannot work.
> > >
> > > Aha, what did you set it to? Do you have a diff?
> > > >
> > > > sh_eth driver want to get valid DMA descriptor to set DMA descriptor
> > > > address for Rx and Tx.
> > >
> > > Right, which it would plug in its driver registers so the card
> > > can pick it up.
> > > > I tried to set the some bits(such as dma_mask) to get valid dma
> address
> > > > forcibly, in this configuration sh_eth cannot work.
> > >
> > > Uh, not sure I understand. Or are you repeating what you mentioned
> > > earlier?
> > > >
> > > > My question is if I want to get valid dma address with xen
> swiotlb(suchas
> > > > map_page, set_dma_mask and so on)?
> > >
> > > Well it all should work just fine - perhaps if you provide some
> > > diff's and such I can help you along?
> > >
> > > >
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > Wonseok.
> > > >
> > > > 2016-04-13 2:10 GMT+09:00 Konrad Rzeszutek Wilk <
> konrad.wilk@oracle.com
> > > >:
> > > >
> > > > > On Tue, Apr 12, 2016 at 04:54:55PM +0900, Wonseok Ko wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I'm trying to enable ethernet driver in Domain0 for R-Car H2,
> but it
> > > > > > doesn't work. The root cause of the problem is that driver cannot
> > > satisfy
> > > > > > the condition of dma_capable(). I found the same problem in the
> > > mailing
> > > > >
> > > > > So what can be done about making it dma_capable() ?
> > > > >
> > > > > > list, but the problem is still remaining I guess. previous mail:
> (
> > > > > >
> http://lists.xen.org/archives/html/xen-devel/2014-10/msg03170.html)
> > > > > >
> > > > > > Does anyone give me advise?
> > > > > >
> > > > > > My environment as below:
> > > > > > - dom0 linux version: 4.3
> > > > > > - xen version: 4.6
> commit(40d7a7454835c2f7c639c78f6c09e7b6f0e4a4e2)
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > > Wonseok.
> > > > >
> > > > > > _______________________________________________
> > > > > > Xen-devel mailing list
> > > > > > Xen-devel@lists.xen.org
> > > > > > http://lists.xen.org/xen-devel
> > > > >
> > > > >
> > >
>

[-- Attachment #1.2: Type: text/html, Size: 6996 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-05-23 16:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-12  7:54 [sh_eth.c] Problem in dma_map_single() Wonseok Ko
2016-04-12 16:35 ` Julien Grall
2016-04-12 17:10 ` Konrad Rzeszutek Wilk
2016-04-13  5:18   ` Wonseok Ko
2016-04-14 13:52     ` Konrad Rzeszutek Wilk
2016-04-15  3:39       ` Wonseok Ko
2016-05-17 21:10         ` Konrad Rzeszutek Wilk
2016-05-23 16:06           ` Wonseok Ko
2016-04-14  7:12   ` Wonseok Ko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).