i2c-cpm: Pass dev ptr to dma_*_coherent rather than NULL
Subsystems (2)
PATCH 1/1 i2c-cpm: Pass dev ptr to dma_*_coherent rather than NULL
Recent DMA changes result in a BUG() when NULL is passed to dma_alloc_coherent in place of a device.
---
This patch fixes the BUG() during boot that has appeared during the 2.6.30 window. It has been tested and appears correct on my 8280 based board.
Sent to both linuxppc-dev and linux-i2c, since I'm not sure where it belongs.
drivers/i2c/busses/i2c-cpm.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-)
drivers/i2c/busses/i2c-cpm.c +8 -6
@@ -532,7 +532,8 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)for (i =0 ; i <CPM_MAXBD ; i++) { cpm->rxbuf[i] =dma_alloc_coherent ( -NULL ,CPM_MAX_READ +1 , &cpm->rxdma[i],GFP_KERNEL ); + &cpm->ofdev->dev,CPM_MAX_READ +1 , &cpm->rxdma[i], +GFP_KERNEL );if (!cpm->rxbuf[i]) { ret = -ENOMEM ; goto out_muram;
@@ -540,7 +541,8 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)out_be32 (&rbdf[i].cbd_bufaddr, ((cpm->rxdma[i] +1 ) & ~1 )); cpm->txbuf[i] = (unsigned char *)dma_alloc_coherent ( -NULL ,CPM_MAX_READ +1 , &cpm->txdma[i],GFP_KERNEL ); + &cpm->ofdev->dev,CPM_MAX_READ +1 , &cpm->txdma[i], +GFP_KERNEL );if (!cpm->txbuf[i]) { ret = -ENOMEM ; goto out_muram;
@@ -585,10 +587,10 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) out_muram:for (i =0 ; i <CPM_MAXBD ; i++) {if (cpm->rxbuf[i]) -dma_free_coherent (NULL ,CPM_MAX_READ +1 , +dma_free_coherent (&cpm->ofdev->dev,CPM_MAX_READ +1 , cpm->rxbuf[i], cpm->rxdma[i]);if (cpm->txbuf[i]) -dma_free_coherent (NULL ,CPM_MAX_READ +1 , +dma_free_coherent (&cpm->ofdev->dev,CPM_MAX_READ +1 , cpm->txbuf[i], cpm->txdma[i]); }cpm_muram_free (cpm->dp_addr);
@@ -619,9 +621,9 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm)/* Free all memory */ for (i =0 ; i <CPM_MAXBD ; i++) { -dma_free_coherent (NULL ,CPM_MAX_READ +1 , +dma_free_coherent (&cpm->ofdev->dev,CPM_MAX_READ +1 , cpm->rxbuf[i], cpm->rxdma[i]); -dma_free_coherent (NULL ,CPM_MAX_READ +1 , +dma_free_coherent (&cpm->ofdev->dev,CPM_MAX_READ +1 , cpm->txbuf[i], cpm->txdma[i]); }
Signature · 1 line
1.5.6.5
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jochen Friedrich
Acked-byQuoted 2 lines · Mark Ware
Recent DMA changes result in a
BUG()when NULL is passed todma_alloc_coherentin place of a device.
This seems to have happened in 4ae0ff606e848fa4957ebf8f97e5db5fdeec27be.
Quoted 1 line
Signed-off-by Mark Ware <[email protected]>
Thanks,
Jochen
Kumar Gala
Acked-byQuoted 6 lines · Mark Ware
Recent DMA changes result in a
BUG()when NULL is passed todma_alloc_coherentin place of a device.Signed-off-by Mark Ware <[email protected]>---
Quoted 8 lines
This patch fixes the
BUG()during boot that has appeared during the 2.6.30 window. It has been tested and appears correct on my 8280 based board.
Sent to both linuxppc-dev and linux-i2c, since I'm not sure where it belongs.
drivers/i2c/busses/i2c-cpm.c| 14 ++++++++------1 files changed, 8 insertions(+), 6 deletions(-)
Ben, I'm expecting you to pick this up unless you tell me otherwise.
- k
A message that is not in the archive (sent off-list or not yet received): E2205842-8019-4CE4-812B-64ABD76F36F4-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org
Quoted 16 lines · Kumar Gala
Quoted 13 lines · Mark Ware
Recent DMA changes result in a
BUG()when NULL is passed todma_alloc_coherentin place of a device.Signed-off-by Mark Ware <[email protected]>---
This patch fixes the
BUG()during boot that has appeared during the 2.6.30 window. It has been tested and appears correct on my 8280 based board.
Sent to both linuxppc-dev and linux-i2c, since I'm not sure where it belongs.
Quoted 6 lines
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c| 14 ++++++++------1 files changed, 8 insertions(+), 6 deletions(-)Acked-by Kumar Gala <[email protected]>Ben, I'm expecting you to pick this up unless you tell me otherwise.
Yes.
Signature · 4 lines
Ben Q: What's a light-year? A: One-third less calories than a regular year.
Quoted 17 lines · Ben Dooks
Quoted 16 lines · Kumar Gala
Quoted 13 lines · Mark Ware
Recent DMA changes result in a
BUG()when NULL is passed todma_alloc_coherentin place of a device.Signed-off-by Mark Ware <[email protected]>---
This patch fixes the
BUG()during boot that has appeared during the 2.6.30 window. It has been tested and appears correct on my 8280 based board.
Sent to both linuxppc-dev and linux-i2c, since I'm not sure where it belongs.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c| 14 ++++++++------1 files changed, 8 insertions(+), 6 deletions(-)Acked-by Kumar Gala <[email protected]>Ben, I'm expecting you to pick this up unless you tell me otherwise.
Yes.
This go in yet?
- k
A message that is not in the archive (sent off-list or not yet received): AAD6564F-9D99-492B-8364-10A652F990DF-XVmvHMARGAS8U2dJNN8I7kB+6BGkLq7r@public.gmane.org
Quoted 24 lines · Kumar Gala
Quoted 21 lines · Ben Dooks
Quoted 20 lines · Kumar Gala
Quoted 16 lines · Mark Ware
Recent DMA changes result in a
BUG()when NULL is passed todma_alloc_coherentin place of a device.Signed-off-by Mark Ware <[email protected]>---
This patch fixes the
BUG()during boot that has appeared during the 2.6.30 window. It has been tested and appears correct on my 8280 based
board.
Sent to both linuxppc-dev and linux-i2c, since I'm not sure where it belongs.
drivers/i2c/busses/i2c-cpm.c| 14 ++++++++------1 files changed, 8 insertions(+), 6 deletions(-)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Acked-by Kumar Gala <[email protected]>Ben, I'm expecting you to pick this up unless you tell me otherwise.
Yes.
This go in yet?
I've had to do a manual apply due to some changes in the driver, so can someone please do a build of my git tree at:
git://aeryn.fluff.org.uk/bjdooks/linux.git i2c-for-2630-rc5
or tell me which arch and defconfig to build.
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 27 lines · Ben Dooks
Quoted 18 lines · Kumar Gala
Quoted 16 lines · Ben Dooks
Quoted 15 lines · Kumar Gala
Quoted 13 lines · Mark Ware
Recent DMA changes result in a
BUG()when NULL is passed todma_alloc_coherentin place of a device.Signed-off-by Mark Ware <[email protected]>---
This patch fixes the
BUG()during boot that has appeared during the 2.6.30 window. It has been tested and appears correct on my 8280 based board.
Sent to both linuxppc-dev and linux-i2c, since I'm not sure where it belongs.Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c| 14 ++++++++------1 files changed, 8 insertions(+), 6 deletions(-)Acked-by Kumar Gala <[email protected]>Ben, I'm expecting you to pick this up unless you tell me otherwise.
Yes.
This go in yet?
Quoted 8 lines
I've had to do a manual apply due to some changes in the driver, so can someone please do a build of my git tree at:
git://aeryn.fluff.org.uk/bjdooks/linux.giti2c-for-2630-rc5or tell me which arch and defconfig to build.
Fails to build, due to a typo. Once fixed (diff below), it builds and tests OK on my MPC8280 based hardware
Thanks.
Mark
drivers/i2c/busses/i2c-cpm.c +1 -1
@@ -585,7 +585,7 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) out_muram:for (i =0 ; i <CPM_MAXBD ; i++) {if (cpm->rxbuf[i]) -dma_free_coherent (&cpm->ofdev->devL,CPM_MAX_READ +1 , +dma_free_coherent (&cpm->ofdev->dev,CPM_MAX_READ +1 , cpm->rxbuf[i], cpm->rxdma[i]);if (cpm->txbuf[i]) dma_free_coherent(&cpm->ofdev->dev, CPM_MAX_READ + 1,
Quoted 27 lines · Ben Dooks
Quoted 18 lines · Kumar Gala
Quoted 16 lines · Ben Dooks
Quoted 15 lines · Kumar Gala
Quoted 13 lines · Mark Ware
Recent DMA changes result in a
BUG()when NULL is passed todma_alloc_coherentin place of a device.Signed-off-by Mark Ware <[email protected]>---
This patch fixes the
BUG()during boot that has appeared during the 2.6.30 window. It has been tested and appears correct on my 8280 based board.
Sent to both linuxppc-dev and linux-i2c, since I'm not sure where it belongs.Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c| 14 ++++++++------1 files changed, 8 insertions(+), 6 deletions(-)Acked-by Kumar Gala <[email protected]>Ben, I'm expecting you to pick this up unless you tell me otherwise.
Yes.
This go in yet?
Quoted 8 lines
I've had to do a manual apply due to some changes in the driver, so can someone please do a build of my git tree at:
git://aeryn.fluff.org.uk/bjdooks/linux.giti2c-for-2630-rc5or tell me which arch and defconfig to build.
Ping. Is there anything still blocking this?
Mark Ware
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 33 lines · Mark Ware
Quoted 32 lines · Ben Dooks
Quoted 19 lines · Kumar Gala
Quoted 17 lines · Ben Dooks
Quoted 16 lines · Kumar Gala
Quoted 14 lines · Mark Ware
Recent DMA changes result in a
BUG()when NULL is passed todma_alloc_coherentin place of a device.Signed-off-by Mark Ware <[email protected]>---
This patch fixes the
BUG()during boot that has appeared during the 2.6.30 window. It has been tested and appears correct on my 8280 based
board.
Sent to both linuxppc-dev and linux-i2c, since I'm not sure where it belongs.Quoted 7 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
drivers/i2c/busses/i2c-cpm.c| 14 ++++++++------1 files changed, 8 insertions(+), 6 deletions(-)Acked-by Kumar Gala <[email protected]>Ben, I'm expecting you to pick this up unless you tell me otherwise.
Yes.
This go in yet?
I've had to do a manual apply due to some changes in the driver, so can someone please do a build of my git tree at:
Quoted 6 lines
Quoted 4 lines
git://aeryn.fluff.org.uk/bjdooks/linux.giti2c-for-2630-rc5or tell me which arch and defconfig to build.
Ping. Is there anything still blocking this?
sorry, have been ill recently, will get this sorted and pushed.
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/) 'a smiley only costs 4 bytes'