Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1663402
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] i2c: ismt: fix wrong device address when unmap the data buffer |
| Date | 2017-06-12 12:30 +0200 |
| Message-ID | <tRuLD-Ua-7@gated-at.bofh.it> (permalink) |
| References | <tRowy-5la-5@gated-at.bofh.it> <tRtFV-fr-31@gated-at.bofh.it> <tRtZf-lF-9@gated-at.bofh.it> <tRtZf-lF-7@gated-at.bofh.it> <tRuLD-Ua-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jun 12, 2017 at 1:19 PM, Peter Rosin <peda@axentia.se> wrote: > On 2017-06-12 11:38, Andy Shevchenko wrote: >> On Mon, Jun 12, 2017 at 12:28 PM, Peter Rosin <peda@axentia.se> wrote: >>> On 2017-06-12 11:11, Andy Shevchenko wrote: >>>> On Mon, Jun 12, 2017 at 6:42 AM, Song liwei <liwei.song@windriver.com> wrote: >>>>> From: Liwei Song <liwei.song@windriver.com> >> >>>>> After finished I2C block read/write, when unmap the data buffer, >>>>> a wrong device address was pass to dma_unmap_single(), >> >>>>> the right >>>>> device address should be "dev" not "&adap->dev", the relation is >>>>> *(&adap->dev) == dev. >>>> >>>> This is confusing. You are telling that there are two copies of struct >>>> device here? >>> >>> Yes, there are two copies. >> >> No, there is not. See below. > > What I meant was that there are the struct device in pci_dev->dev and the > struct device in adap->dev. That seems like two copies of struct device > to me. They are not copies. That's my point. > I didn't mean that they are copies in the sense that they have the > same content, but in the sense that they are both struct device. > > I guess we can argue ourselves blue over this point. See above. >> There are two struct devices, > > Hmm, two struct devices, I seem to recall that from somewhere... :-) Okay, it's possible bad wording from my side. >> one is a real PCI device, which >> represents actual device what *does* DMA. >> This struct should be used according to DMA API. > When you put it like that, it's obvious that the patch is correct. I agreed with this in the first place! See my first reply. > I had > this feeling that little thought had gone into the choice to pick "dev" > over "&adap->dev", that's all. As I said, my concern is the commit message to the change which is totally confusing. -- With Best Regards, Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] i2c: ismt: fix wrong device address when unmap the data buffer Song liwei <liwei.song@windriver.com> - 2017-06-12 05:50 +0200
Re: [PATCH] i2c: ismt: fix wrong device address when unmap the data buffer Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-12 11:20 +0200
Re: [PATCH] i2c: ismt: fix wrong device address when unmap the data buffer Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-12 11:40 +0200
Re: [PATCH] i2c: ismt: fix wrong device address when unmap the data buffer Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-12 12:30 +0200
Re: [PATCH] i2c: ismt: fix wrong device address when unmap the data buffer Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-06-12 11:50 +0200
csiph-web