Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1292639 > unrolled thread
| Started by | Mans Rullgard <mans@mansr.com> |
|---|---|
| First post | 2015-12-16 00:30 +0100 |
| Last post | 2015-12-17 16:00 +0100 |
| Articles | 8 on this page of 88 — 6 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Mans Rullgard <mans@mansr.com> - 2015-12-16 00:30 +0100
[PATCH 3/3] ata: sata_dwc_460ex: get rid of global data Mans Rullgard <mans@mansr.com> - 2015-12-16 00:30 +0100
Re: [PATCH 3/3] ata: sata_dwc_460ex: get rid of global data Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-17 16:10 +0100
Re: [PATCH 3/3] ata: sata_dwc_460ex: get rid of global data Måns Rullgård <mans@mansr.com> - 2015-12-17 16:20 +0100
Re: [PATCH 3/3] ata: sata_dwc_460ex: get rid of global data Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-17 16:40 +0100
Re: [PATCH 3/3] ata: sata_dwc_460ex: get rid of global data Måns Rullgård <mans@mansr.com> - 2015-12-17 17:00 +0100
[PATCH 2/3] ata: sata_dwc_460ex: add phy support Mans Rullgard <mans@mansr.com> - 2015-12-16 00:30 +0100
Re: [PATCH 2/3] ata: sata_dwc_460ex: add phy support Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-12-16 12:20 +0100
Re: [PATCH 2/3] ata: sata_dwc_460ex: add phy support Måns Rullgård <mans@mansr.com> - 2015-12-16 12:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-16 00:40 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-17 16:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-17 16:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-17 17:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-17 17:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-17 18:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-17 19:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-17 20:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-18 02:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-18 02:40 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-18 11:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-18 12:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-18 12:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-18 13:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-18 13:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-18 13:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-18 18:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-18 19:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-18 23:40 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-19 00:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-19 03:40 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-19 16:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-19 17:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-19 18:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-19 18:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-19 18:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-19 18:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-19 18:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-19 20:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-19 21:40 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-19 21:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-19 21:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-20 18:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-20 18:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-20 19:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-20 19:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-20 21:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-20 22:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 02:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-21 20:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 20:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-21 22:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 22:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-22 01:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-22 12:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-21 18:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-21 18:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-21 19:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 19:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 19:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-21 20:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 20:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-21 20:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-21 20:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-21 21:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-21 21:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 21:40 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-21 19:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 01:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 02:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 02:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-21 09:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 13:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andy.shevchenko@gmail.com> - 2015-12-21 18:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 19:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-21 20:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 21:00 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 13:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-21 14:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 16:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-21 17:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-21 19:20 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-18 13:40 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-18 13:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-18 15:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Måns Rullgård <mans@mansr.com> - 2015-12-18 15:30 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-18 13:50 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Julian Margetson <runaway@candw.ms> - 2015-12-17 19:10 +0100
Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-12-17 16:00 +0100
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
| From | Måns Rullgård <mans@mansr.com> |
|---|---|
| Date | 2015-12-21 19:20 +0100 |
| Message-ID | <qIddU-1tP-23@gated-at.bofh.it> |
| In reply to | #1296064 |
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes: > On Mon, 2015-12-21 at 15:24 +0000, Måns Rullgård wrote: >> Julian Margetson <runaway@candw.ms> writes: >> >> >> Oh, that one again. My patch still applies. Here it is as applied >> to >> that revision of the file. >> >> From what I can tell, that bug has always been there. Probably >> nobody >> ever tested the driver in a PREEMPT or SMP build, nor with lock >> debugging enabled. > > I guess it's a time to submit this one to upstream with proper Fixes: > tag (which I suppose the initial commit of the driver). Done. -- Måns Rullgård -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Julian Margetson <runaway@candw.ms> |
|---|---|
| Date | 2015-12-18 13:40 +0100 |
| Subject | Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel |
| Message-ID | <qH2ud-5E7-5@gated-at.bofh.it> |
| In reply to | #1294728 |
On 12/18/2015 8:04 AM, Måns Rullgård wrote:
> Julian Margetson <runaway@candw.ms> writes:
>
>> On 12/17/2015 8:06 PM, Måns Rullgård wrote:
>>> Julian Margetson <runaway@candw.ms> writes:
>>>
>>>> On 12/17/2015 3:53 PM, Måns Rullgård wrote:
>>>>> Julian Margetson <runaway@candw.ms> writes:
>>>>>
>>>>>> On 12/17/2015 2:51 PM, Måns Rullgård wrote:
>>>>>>> Julian Margetson <runaway@candw.ms> writes:
>>>>>>>
>>>>>>>> On 12/17/2015 1:59 PM, Måns Rullgård wrote:
>>>>>>>>> Julian Margetson <runaway@candw.ms> writes:
>>>>>>>>>
>>>>>>>>>> I have been running my machine mostly configured for pciex1 thus with
>>>>>>>>>> the sata_dwc disabled.
>>>>>>>>>> The changes to sata_dwc-460ex do cause an oops.
>>>>>>>>>> I will try to give more detailed info over this weekend .
>>>>>>>>> The driver as is upstream would do that since it unconditionally
>>>>>>>>> dereferences a null pointer in the probe function. My patch fixes that
>>>>>>>>> as a side-effect.
>>>>>>>>>
>>>>>>>> patching file drivers/ata/Kconfig
>>>>>>>>
>>>>>>>> Hunk #1 FAILED at 296.
>>>>>>> [...]
>>>>>>>
>>>>>>>> root@julian-VirtualBox:/usr/src/linux-3.18.25#
>>>>>>> The patch is against 4.4-rc5.
>>>>>>>
>>>>>> CC drivers/ata/sata_dwc_460ex.o
>>>>>>
>>>>>> drivers/ata/sata_dwc_460ex.c:198:15: error: variable ‘sata_dwc_dma_dws’ has initializer but incomplete type
>>>>>>
>>>>>> static struct dw_dma_slave sata_dwc_dma_dws = {
>>>>>> ^
>>>>> It builds, albeit with an unrelated warning, using the attached config.
>>>>> Maybe there's a missing config dependency somewhere.
>>>>>
>>>> I am attempting to cross compile under Ubuntu 14.04 X86 in Virtualbox
>>>> with your .config.
>>>> 4.4.0-rc5 builds ok with no patches applied .
>>>> Once your patch is applied it fails to build .
>>>>
>>>> CC drivers/ata/sata_dwc_460ex.o
>>>> drivers/ata/sata_dwc_460ex.c:198:15: error: variable ‘sata_dwc_dma_dws’ has initializer but incomplete type
>>>> static struct dw_dma_slave sata_dwc_dma_dws = {
>>>> ^
>>> Bizarre. This is what it looks like here:
>>>
>>> mru@unicorn:/tmp/linux-sata$ git status
>>> On branch sata-dwc
>>> nothing to commit, working directory clean
>>> mru@unicorn:/tmp/linux-sata$ git describe
>>> v4.4-rc5
>>> mru@unicorn:/tmp/linux-sata$ sha1sum /tmp/0001-ata-sata_dwc_460ex-use-dmas-DT-property-to-find-dma-.patch
>>> e300971aa483390f82de2e9120dc16e460e74feb /tmp/0001-ata-sata_dwc_460ex-use-dmas-DT-property-to-find-dma-.patch
>>> mru@unicorn:/tmp/linux-sata$ git am /tmp/0001-ata-sata_dwc_460ex-use-dmas-DT-property-to-find-dma-.patch
>>> Applying: ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
>>> mru@unicorn:/tmp/linux-sata$ sha1sum .config
>>> 4e7615b8d2fa9a1c4b4ae9ffc363aefcaf3789ca .config
>>> mru@unicorn:/tmp/linux-sata$ make ARCH=powerpc CROSS_COMPILE=powerpc64-none-linux-gnu- oldconfig
>>> HOSTCC scripts/basic/fixdep
>>> HOSTCC scripts/kconfig/conf.o
>>> SHIPPED scripts/kconfig/zconf.tab.c
>>> SHIPPED scripts/kconfig/zconf.lex.c
>>> SHIPPED scripts/kconfig/zconf.hash.c
>>> HOSTCC scripts/kconfig/zconf.tab.o
>>> HOSTLD scripts/kconfig/conf
>>> scripts/kconfig/conf --oldconfig Kconfig
>>> #
>>> # configuration written to .config
>>> #
>>> mru@unicorn:/tmp/linux-sata$ make ARCH=powerpc CROSS_COMPILE=powerpc64-none-linux-gnu- drivers/ata/sata_dwc_460ex.o
>>> scripts/kconfig/conf --silentoldconfig Kconfig
>>> CHK include/config/kernel.release
>>> UPD include/config/kernel.release
>>> WRAP arch/powerpc/include/generated/asm/clkdev.h
>>> WRAP arch/powerpc/include/generated/asm/div64.h
>>> WRAP arch/powerpc/include/generated/asm/irq_regs.h
>>> WRAP arch/powerpc/include/generated/asm/irq_work.h
>>> WRAP arch/powerpc/include/generated/asm/local64.h
>>> WRAP arch/powerpc/include/generated/asm/mcs_spinlock.h
>>> WRAP arch/powerpc/include/generated/asm/preempt.h
>>> WRAP arch/powerpc/include/generated/asm/rwsem.h
>>> WRAP arch/powerpc/include/generated/asm/vtime.h
>>> CHK include/generated/uapi/linux/version.h
>>> UPD include/generated/uapi/linux/version.h
>>> CHK include/generated/utsrelease.h
>>> UPD include/generated/utsrelease.h
>>> CC kernel/bounds.s
>>> CHK include/generated/bounds.h
>>> UPD include/generated/bounds.h
>>> CHK include/generated/timeconst.h
>>> UPD include/generated/timeconst.h
>>> CC arch/powerpc/kernel/asm-offsets.s
>>> CHK include/generated/asm-offsets.h
>>> UPD include/generated/asm-offsets.h
>>> CALL scripts/checksyscalls.sh
>>> HOSTCC scripts/dtc/dtc.o
>>> HOSTCC scripts/dtc/flattree.o
>>> HOSTCC scripts/dtc/fstree.o
>>> HOSTCC scripts/dtc/data.o
>>> HOSTCC scripts/dtc/livetree.o
>>> HOSTCC scripts/dtc/treesource.o
>>> HOSTCC scripts/dtc/srcpos.o
>>> HOSTCC scripts/dtc/checks.o
>>> HOSTCC scripts/dtc/util.o
>>> SHIPPED scripts/dtc/dtc-lexer.lex.c
>>> SHIPPED scripts/dtc/dtc-parser.tab.h
>>> HOSTCC scripts/dtc/dtc-lexer.lex.o
>>> SHIPPED scripts/dtc/dtc-parser.tab.c
>>> HOSTCC scripts/dtc/dtc-parser.tab.o
>>> HOSTLD scripts/dtc/dtc
>>> CC scripts/mod/empty.o
>>> HOSTCC scripts/mod/mk_elfconfig
>>> MKELF scripts/mod/elfconfig.h
>>> HOSTCC scripts/mod/modpost.o
>>> CC scripts/mod/devicetable-offsets.s
>>> GEN scripts/mod/devicetable-offsets.h
>>> HOSTCC scripts/mod/file2alias.o
>>> HOSTCC scripts/mod/sumversion.o
>>> HOSTLD scripts/mod/modpost
>>> HOSTCC scripts/kallsyms
>>> CC drivers/ata/sata_dwc_460ex.o
>>> drivers/ata/sata_dwc_460ex.c: In function 'dma_dwc_xfer_setup':
>>> drivers/ata/sata_dwc_460ex.c:383:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>>> dma_addr_t addr = (dma_addr_t)&hsdev->sata_dwc_regs->dmadr;
>>> ^
>>> mru@unicorn:/tmp/linux-sata$
>>>
>>> Patch file and .config attached.
>>>
>>> Looking into that warning, I doubt it works as is, but that's not caused
>>> by my patch. I can try to come up with a fix, but again, I can't test it.
>>>
>> Builds now. Using my own .config.
> What changed?
I may have messed up the patch initially .
>
>> [ 4.784199] sata-dwc 4bffd1000.sata: id 0, controller version 1.82
>> [ 4.791186] scsi host0: sata-dwc
>> [ 4.794830] ata1: SATA max UDMA/133 irq 36
>> [ 4.799463] sata_sil 0001:00:04.0: Applying R_ERR on DMA activate FIS errata fix
>> [ 4.807959] scsi host1: sata_sil
>> [ 4.811662] scsi host2: sata_sil
>> [ 4.815242] ata2: SATA max UDMA/100 mmio m512@0xd84280000 tf 0xd84280080 irq 21
>> [ 4.822990] ata3: SATA max UDMA/100 mmio m512@0xd84280000 tf 0xd842800c0 irq 21
>>
>> [ 5.143502] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> [ 5.164367] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
>> [ 5.185174] ppc-of-ohci 4bffd0000.usb: irq 32, io mem 0x4bffd0000
>> [ 5.206125] Unable to handle kernel paging request for data at address 0x00000000
>> [ 5.228546] Faulting instruction address: 0xc043a2c8
>> [ 5.248577] Vector: 300 (Data Access) at [eddafae0]
>> [ 5.268658] pc: c043a2c8: sata_dwc_qc_issue+0xb8/0x204
> Well, that's not good. Can you translate that address to a line of code?
>
need some guidance on method .
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Måns Rullgård <mans@mansr.com> |
|---|---|
| Date | 2015-12-18 13:50 +0100 |
| Message-ID | <qH2DV-5IP-27@gated-at.bofh.it> |
| In reply to | #1294746 |
Julian Margetson <runaway@candw.ms> writes: >>> Builds now. Using my own .config. >> What changed? > I may have messed up the patch initially . Probably. Let's pretend it never happened. >>> [ 4.784199] sata-dwc 4bffd1000.sata: id 0, controller version 1.82 >>> [ 4.791186] scsi host0: sata-dwc >>> [ 4.794830] ata1: SATA max UDMA/133 irq 36 >>> [ 4.799463] sata_sil 0001:00:04.0: Applying R_ERR on DMA activate FIS errata fix >>> [ 4.807959] scsi host1: sata_sil >>> [ 4.811662] scsi host2: sata_sil >>> [ 4.815242] ata2: SATA max UDMA/100 mmio m512@0xd84280000 tf 0xd84280080 irq 21 >>> [ 4.822990] ata3: SATA max UDMA/100 mmio m512@0xd84280000 tf 0xd842800c0 irq 21 >>> >>> [ 5.143502] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) >>> [ 5.164367] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310) >>> [ 5.185174] ppc-of-ohci 4bffd0000.usb: irq 32, io mem 0x4bffd0000 >>> [ 5.206125] Unable to handle kernel paging request for data at address 0x00000000 >>> [ 5.228546] Faulting instruction address: 0xc043a2c8 >>> [ 5.248577] Vector: 300 (Data Access) at [eddafae0] >>> [ 5.268658] pc: c043a2c8: sata_dwc_qc_issue+0xb8/0x204 >> Well, that's not good. Can you translate that address to a line of code? >> > need some guidance on method . Enable CONFIG_DEBUG_INFO, then use this command: $ addr2line -e vmlinux 0xc043a2c8 Obviously substitute the actual crashing address if it changes. -- Måns Rullgård -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Subject | Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel |
| Message-ID | <qH4cG-6Lj-29@gated-at.bofh.it> |
| In reply to | #1294766 |
On Fri, 2015-12-18 at 09:52 -0400, Julian Margetson wrote:
> On 12/18/2015 8:45 AM, Måns Rullgård wrote:
> > Julian Margetson <runaway@candw.ms> writes:
> > > > > [ 4.784199] sata-dwc 4bffd1000.sata: id 0, controller
> > > > > version 1.82
> > > > > [ 4.791186] scsi host0: sata-dwc
> > > > > [ 4.794830] ata1: SATA max UDMA/133 irq 36
> > > > > [ 4.799463] sata_sil 0001:00:04.0: Applying R_ERR on DMA
> > > > > activate FIS errata fix
> > > > > [ 4.807959] scsi host1: sata_sil
> > > > > [ 4.811662] scsi host2: sata_sil
> > > > > [ 4.815242] ata2: SATA max UDMA/100 mmio m512@0xd84280000
> > > > > tf 0xd84280080 irq 21
> > > > > [ 4.822990] ata3: SATA max UDMA/100 mmio m512@0xd84280000
> > > > > tf 0xd842800c0 irq 21
> > > > >
> > > > > [ 5.143502] ata1: SATA link up 3.0 Gbps (SStatus 123
> > > > > SControl 300)
> > > > > [ 5.164367] ata2: SATA link up 1.5 Gbps (SStatus 113
> > > > > SControl 310)
> > > > > [ 5.185174] ppc-of-ohci 4bffd0000.usb: irq 32, io mem
> > > > > 0x4bffd0000
> > > > > [ 5.206125] Unable to handle kernel paging request for
> > > > > data at address 0x00000000
> > > > > [ 5.228546] Faulting instruction address: 0xc043a2c8
> > > > > [ 5.248577] Vector: 300 (Data Access) at [eddafae0]
> > > > > [ 5.268658] pc: c043a2c8: sata_dwc_qc_issue+0xb8/0x204
> > > > Well, that's not good. Can you translate that address to a
> > > > line of code?
> > > >
> > > need some guidance on method .
> > Enable CONFIG_DEBUG_INFO, then use this command:
> >
> > $ addr2line -e vmlinux 0xc043a2c8
> >
> > Obviously substitute the actual crashing address if it changes.
> >
> addr2line -e vmlinux 0xc044b41c
> arch/powerpc/lib/copy_32.S:?
memcpy I suppose. Might be copy to unmapped memory.
Anyway, can you enable debug options as I suggested including debug for
sata driver ('dw_dmac_core.dyndbg dw_dmac.dyndbg sata_dwc_460ex.dydbg'
to the cmdline and CONFIG_DYNAMIC_DEBUG=y)?
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Måns Rullgård <mans@mansr.com> |
|---|---|
| Date | 2015-12-18 15:30 +0100 |
| Message-ID | <qH4cH-6Lj-41@gated-at.bofh.it> |
| In reply to | #1294766 |
Julian Margetson <runaway@candw.ms> writes: > On 12/18/2015 8:45 AM, Måns Rullgård wrote: >> Julian Margetson <runaway@candw.ms> writes: >> >>>>> Builds now. Using my own .config. >>>> What changed? >>> I may have messed up the patch initially . >> Probably. Let's pretend it never happened. >> >>>>> [ 4.784199] sata-dwc 4bffd1000.sata: id 0, controller version 1.82 >>>>> [ 4.791186] scsi host0: sata-dwc >>>>> [ 4.794830] ata1: SATA max UDMA/133 irq 36 >>>>> [ 4.799463] sata_sil 0001:00:04.0: Applying R_ERR on DMA activate FIS errata fix >>>>> [ 4.807959] scsi host1: sata_sil >>>>> [ 4.811662] scsi host2: sata_sil >>>>> [ 4.815242] ata2: SATA max UDMA/100 mmio m512@0xd84280000 tf 0xd84280080 irq 21 >>>>> [ 4.822990] ata3: SATA max UDMA/100 mmio m512@0xd84280000 tf 0xd842800c0 irq 21 >>>>> >>>>> [ 5.143502] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) >>>>> [ 5.164367] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310) >>>>> [ 5.185174] ppc-of-ohci 4bffd0000.usb: irq 32, io mem 0x4bffd0000 >>>>> [ 5.206125] Unable to handle kernel paging request for data at address 0x00000000 >>>>> [ 5.228546] Faulting instruction address: 0xc043a2c8 >>>>> [ 5.248577] Vector: 300 (Data Access) at [eddafae0] >>>>> [ 5.268658] pc: c043a2c8: sata_dwc_qc_issue+0xb8/0x204 >>>> Well, that's not good. Can you translate that address to a line of code? >>>> >>> need some guidance on method . >> Enable CONFIG_DEBUG_INFO, then use this command: >> >> $ addr2line -e vmlinux 0xc043a2c8 >> >> Obviously substitute the actual crashing address if it changes. >> > addr2line -e vmlinux 0xc044b41c > arch/powerpc/lib/copy_32.S:? There's obviously a mismatch somewhere since we know that sata_dwc_qc_issue isn't in copy_32.S. Please post the full crash report you got this address from. -- Måns Rullgård -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2015-12-18 13:50 +0100 |
| Subject | Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel |
| Message-ID | <qH2DW-5IP-69@gated-at.bofh.it> |
| In reply to | #1294746 |
On Fri, 2015-12-18 at 08:33 -0400, Julian Margetson wrote:
> On 12/18/2015 8:04 AM, Måns Rullgård wrote:
> > Julian Margetson <runaway@candw.ms> writes:
> >
> > > On 12/17/2015 8:06 PM, Måns Rullgård wrote:
> > > > Julian Margetson <runaway@candw.ms> writes:
> > > >
> > > > > On 12/17/2015 3:53 PM, Måns Rullgård wrote:
> > > > > > Julian Margetson <runaway@candw.ms> writes:
> > > > > >
> > > > > > > On 12/17/2015 2:51 PM, Måns Rullgård wrote:
> > > > > > > > Julian Margetson <runaway@candw.ms> writes:
> > > > > > > >
> > > > > > > > > On 12/17/2015 1:59 PM, Måns Rullgård wrote:
> > > > > > > > > > Julian Margetson <runaway@candw.ms> writes:
> > > > > > > > > >
> > > > > > > > > > > I have been running my machine mostly configured
> > > > > > > > > > > for pciex1 thus with
> > > > > > > > > > > the sata_dwc disabled.
> > > > > > > > > > > The changes to sata_dwc-460ex do cause an oops.
> > > > > > > > > > > I will try to give more detailed info over this
> > > > > > > > > > > weekend .
> > > > > > > > > > The driver as is upstream would do that since it
> > > > > > > > > > unconditionally
> > > > > > > > > > dereferences a null pointer in the probe
> > > > > > > > > > function. My patch fixes that
> > > > > > > > > > as a side-effect.
> > > > > > > > > >
> > > > > > > > > patching file drivers/ata/Kconfig
> > > > > > > > >
> > > > > > > > > Hunk #1 FAILED at 296.
> > > > > > > > [...]
> > > > > > > >
> > > > > > > > > root@julian-VirtualBox:/usr/src/linux-3.18.25#
> > > > > > > > The patch is against 4.4-rc5.
> > > > > > > >
> > > > > > > CC drivers/ata/sata_dwc_460ex.o
> > > > > > >
> > > > > > > drivers/ata/sata_dwc_460ex.c:198:15: error: variable
> > > > > > > ‘sata_dwc_dma_dws’ has initializer but incomplete
> > > > > > > type
> > > > > > >
> > > > > > > static struct dw_dma_slave sata_dwc_dma_dws = {
> > > > > > > ^
> > > > > > It builds, albeit with an unrelated warning, using the
> > > > > > attached config.
> > > > > > Maybe there's a missing config dependency somewhere.
> > > > > >
> > > > > I am attempting to cross compile under Ubuntu 14.04 X86 in
> > > > > Virtualbox
> > > > > with your .config.
> > > > > 4.4.0-rc5 builds ok with no patches applied .
> > > > > Once your patch is applied it fails to build .
> > > > >
> > > > > CC drivers/ata/sata_dwc_460ex.o
> > > > > drivers/ata/sata_dwc_460ex.c:198:15: error: variable
> > > > > ‘sata_dwc_dma_dws’ has initializer but incomplete type
> > > > > static struct dw_dma_slave sata_dwc_dma_dws = {
> > > > > ^
> > > > Bizarre. This is what it looks like here:
> > > >
> > > > mru@unicorn:/tmp/linux-sata$ git status
> > > > On branch sata-dwc
> > > > nothing to commit, working directory clean
> > > > mru@unicorn:/tmp/linux-sata$ git describe
> > > > v4.4-rc5
> > > > mru@unicorn:/tmp/linux-sata$ sha1sum /tmp/0001-ata-
> > > > sata_dwc_460ex-use-dmas-DT-property-to-find-dma-.patch
> > > > e300971aa483390f82de2e9120dc16e460e74feb /tmp/0001-ata-
> > > > sata_dwc_460ex-use-dmas-DT-property-to-find-dma-.patch
> > > > mru@unicorn:/tmp/linux-sata$ git am /tmp/0001-ata-
> > > > sata_dwc_460ex-use-dmas-DT-property-to-find-dma-.patch
> > > > Applying: ata: sata_dwc_460ex: use "dmas" DT property to find
> > > > dma channel
> > > > mru@unicorn:/tmp/linux-sata$ sha1sum .config
> > > > 4e7615b8d2fa9a1c4b4ae9ffc363aefcaf3789ca .config
> > > > mru@unicorn:/tmp/linux-sata$ make ARCH=powerpc
> > > > CROSS_COMPILE=powerpc64-none-linux-gnu- oldconfig
> > > > HOSTCC scripts/basic/fixdep
> > > > HOSTCC scripts/kconfig/conf.o
> > > > SHIPPED scripts/kconfig/zconf.tab.c
> > > > SHIPPED scripts/kconfig/zconf.lex.c
> > > > SHIPPED scripts/kconfig/zconf.hash.c
> > > > HOSTCC scripts/kconfig/zconf.tab.o
> > > > HOSTLD scripts/kconfig/conf
> > > > scripts/kconfig/conf --oldconfig Kconfig
> > > > #
> > > > # configuration written to .config
> > > > #
> > > > mru@unicorn:/tmp/linux-sata$ make ARCH=powerpc
> > > > CROSS_COMPILE=powerpc64-none-linux-gnu-
> > > > drivers/ata/sata_dwc_460ex.o
> > > > scripts/kconfig/conf --silentoldconfig Kconfig
> > > > CHK include/config/kernel.release
> > > > UPD include/config/kernel.release
> > > > WRAP arch/powerpc/include/generated/asm/clkdev.h
> > > > WRAP arch/powerpc/include/generated/asm/div64.h
> > > > WRAP arch/powerpc/include/generated/asm/irq_regs.h
> > > > WRAP arch/powerpc/include/generated/asm/irq_work.h
> > > > WRAP arch/powerpc/include/generated/asm/local64.h
> > > > WRAP arch/powerpc/include/generated/asm/mcs_spinlock.h
> > > > WRAP arch/powerpc/include/generated/asm/preempt.h
> > > > WRAP arch/powerpc/include/generated/asm/rwsem.h
> > > > WRAP arch/powerpc/include/generated/asm/vtime.h
> > > > CHK include/generated/uapi/linux/version.h
> > > > UPD include/generated/uapi/linux/version.h
> > > > CHK include/generated/utsrelease.h
> > > > UPD include/generated/utsrelease.h
> > > > CC kernel/bounds.s
> > > > CHK include/generated/bounds.h
> > > > UPD include/generated/bounds.h
> > > > CHK include/generated/timeconst.h
> > > > UPD include/generated/timeconst.h
> > > > CC arch/powerpc/kernel/asm-offsets.s
> > > > CHK include/generated/asm-offsets.h
> > > > UPD include/generated/asm-offsets.h
> > > > CALL scripts/checksyscalls.sh
> > > > HOSTCC scripts/dtc/dtc.o
> > > > HOSTCC scripts/dtc/flattree.o
> > > > HOSTCC scripts/dtc/fstree.o
> > > > HOSTCC scripts/dtc/data.o
> > > > HOSTCC scripts/dtc/livetree.o
> > > > HOSTCC scripts/dtc/treesource.o
> > > > HOSTCC scripts/dtc/srcpos.o
> > > > HOSTCC scripts/dtc/checks.o
> > > > HOSTCC scripts/dtc/util.o
> > > > SHIPPED scripts/dtc/dtc-lexer.lex.c
> > > > SHIPPED scripts/dtc/dtc-parser.tab.h
> > > > HOSTCC scripts/dtc/dtc-lexer.lex.o
> > > > SHIPPED scripts/dtc/dtc-parser.tab.c
> > > > HOSTCC scripts/dtc/dtc-parser.tab.o
> > > > HOSTLD scripts/dtc/dtc
> > > > CC scripts/mod/empty.o
> > > > HOSTCC scripts/mod/mk_elfconfig
> > > > MKELF scripts/mod/elfconfig.h
> > > > HOSTCC scripts/mod/modpost.o
> > > > CC scripts/mod/devicetable-offsets.s
> > > > GEN scripts/mod/devicetable-offsets.h
> > > > HOSTCC scripts/mod/file2alias.o
> > > > HOSTCC scripts/mod/sumversion.o
> > > > HOSTLD scripts/mod/modpost
> > > > HOSTCC scripts/kallsyms
> > > > CC drivers/ata/sata_dwc_460ex.o
> > > > drivers/ata/sata_dwc_460ex.c: In function 'dma_dwc_xfer_setup':
> > > > drivers/ata/sata_dwc_460ex.c:383:20: warning: cast from pointer
> > > > to integer of different size [-Wpointer-to-int-cast]
> > > > dma_addr_t addr = (dma_addr_t)&hsdev->sata_dwc_regs->dmadr;
> > > > ^
> > > > mru@unicorn:/tmp/linux-sata$
> > > >
> > > > Patch file and .config attached.
> > > >
> > > > Looking into that warning, I doubt it works as is, but that's
> > > > not caused
> > > > by my patch. I can try to come up with a fix, but again, I
> > > > can't test it.
> > > >
> > > Builds now. Using my own .config.
> > What changed?
> I may have messed up the patch initially .
> >
> > > [ 4.784199] sata-dwc 4bffd1000.sata: id 0, controller version
> > > 1.82
> > > [ 4.791186] scsi host0: sata-dwc
> > > [ 4.794830] ata1: SATA max UDMA/133 irq 36
> > > [ 4.799463] sata_sil 0001:00:04.0: Applying R_ERR on DMA
> > > activate FIS errata fix
> > > [ 4.807959] scsi host1: sata_sil
> > > [ 4.811662] scsi host2: sata_sil
> > > [ 4.815242] ata2: SATA max UDMA/100 mmio m512@0xd84280000 tf
> > > 0xd84280080 irq 21
> > > [ 4.822990] ata3: SATA max UDMA/100 mmio m512@0xd84280000 tf
> > > 0xd842800c0 irq 21
> > >
> > > [ 5.143502] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl
> > > 300)
> > > [ 5.164367] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl
> > > 310)
> > > [ 5.185174] ppc-of-ohci 4bffd0000.usb: irq 32, io mem
> > > 0x4bffd0000
> > > [ 5.206125] Unable to handle kernel paging request for data at
> > > address 0x00000000
> > > [ 5.228546] Faulting instruction address: 0xc043a2c8
> > > [ 5.248577] Vector: 300 (Data Access) at [eddafae0]
> > > [ 5.268658] pc: c043a2c8: sata_dwc_qc_issue+0xb8/0x204
> > Well, that's not good. Can you translate that address to a line of
> > code?
> >
> need some guidance on method .
Your toolchain has to have addr2line binary. It does a job if you
compile kernel with enough debug information (you may try to use make
CONFIG_DEBUG_INFO=y IIRC and then your specific addr2line binary).
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Julian Margetson <runaway@candw.ms> |
|---|---|
| Date | 2015-12-17 19:10 +0100 |
| Subject | Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel |
| Message-ID | <qGL0n-2Bm-25@gated-at.bofh.it> |
| In reply to | #1294046 |
On 12/17/2015 12:53 PM, Andy Shevchenko wrote:
> On Thu, 2015-12-17 at 16:04 +0000, Måns Rullgård wrote:
>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>>
>>> On Thu, 2015-12-17 at 15:13 +0000, Måns Rullgård wrote:
>>>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>>>>
>>>>> On Tue, 2015-12-15 at 23:34 +0000, Måns Rullgård wrote:
>>>>>> Mans Rullgard <mans@mansr.com> writes:
>>>>>>
>>>>>>> Currently this driver only works with a DesignWare DMA
>>>>>>> engine
>>>>>>> which it registers manually using the second "reg" address
>>>>>>> range and interrupt number from the DT node.
>>>>>>>
>>>>>>> This patch makes the driver instead use the "dmas" property
>>>>>>> if
>>>>>>> present, otherwise optionally falling back on the old way
>>>>>>> so
>>>>>>> existing device trees can continue to work.
>>>>>>>
>>>>>>> With this change, there is no longer any reason to depend
>>>>>>> on
>>>>>>> the 460EX machine type so drop that from Kconfig.
>>>>>>>
>>>>>>> Signed-off-by: Mans Rullgard <mans@mansr.com>
>>>>>>> ---
>>>>>>> drivers/ata/Kconfig | 10 ++-
>>>>>>> drivers/ata/sata_dwc_460ex.c | 192
>>>>>>> +++++++++++++++++++++++++++--
>>>>>>> --------------
>>>>>>> 2 files changed, 131 insertions(+), 71 deletions(-)
>>>>>> The corresponding patch for the canyonlands devicetree looks
>>>>>> something
>>>>>> like this. I don't have any such hardware or even a manual,
>>>>>> so I
>>>>>> don't
>>>>>> know what values to use for the various required DT
>>>>>> properties of
>>>>>> the
>>>>>> DMA controller node, nor can I test it. The SATA driver
>>>>>> works
>>>>>> with a
>>>>>> different DMA controller on a Sigma Designs chip.
>>>>>>
>>>>>> diff --git a/arch/powerpc/boot/dts/canyonlands.dts
>>>>>> b/arch/powerpc/boot/dts/canyonlands.dts
>>>>>> index 3dc75de..959f36e 100644
>>>>>> --- a/arch/powerpc/boot/dts/canyonlands.dts
>>>>>> +++ b/arch/powerpc/boot/dts/canyonlands.dts
>>>>>> @@ -190,12 +190,22 @@
>>>>>> /* DMA */ 0x2 &UIC0
>>>>>> 0xc
>>>>>> 0x4>;
>>>>>> };
>>>>>>
>>>>>> + DMA0: dma@bffd0800 {
>>>>>> + compatible = "snps,dma-spear1340";
>>>>>> + reg = <4 0xbffd0800 0x400>;
>>>>>> + interrupt-parent = <&UIC3>;
>>>>>> + interrupts = <0x5 0x4>;
>>>>>> + #dma-cells = <3>;
>>>>>> + /* required properties here */
>>>>> You have to move the master assignments and other custom
>>>>> dw_dmac
>>>>> properties. Maybe at some point I will fix that in
>>>>> dw/platform.c.
>>>>>
>>>>>> + };
>>>> The current sata_dwc driver calls dw_dma_probe() with null pdata
>>>> which causes the dw_dma driver to auto-detect most
>>>> parameters. It
>>>> looks like simply omitting those properties here results in the
>>>> same
>>>> thing, although in this case dw_dma_parse_dt() leaves a
>>>> devm-allocated pdata struct adrift. Deferring the allocation of
>>>> that
>>>> and changing the DT binding doc to make these properties optional
>>>> for
>>>> auto-detect-capable hardware should just work.
>>> Yeah, I would like to allow autoconfiguration in case of DT as well
>>> and
>>> translate it to use unified device property API.
>>>
>>>> Something like this:
>>> If it works for you, please, submit as a patch. Thanks.
>> I can't test it since I have no such hardware.
> It's currently broken, last person who seems to have it is
> (was?) Julian Margetson [1]
>
> [1] https://patchwork.ozlabs.org/patch/439850/
>
I have been running my machine mostly configured for pciex1 thus with
the sata_dwc disabled.
The changes to sata_dwc-460ex do cause an oops.
I will try to give more detailed info over this weekend .
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Date | 2015-12-17 16:00 +0100 |
| Subject | Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel |
| Message-ID | <qGIcb-Ma-37@gated-at.bofh.it> |
| In reply to | #1292639 |
On Tue, 2015-12-15 at 23:25 +0000, Mans Rullgard wrote:
> Currently this driver only works with a DesignWare DMA engine which
> it
> registers manually using the second "reg" address range and interrupt
> number from the DT node.
>
> This patch makes the driver instead use the "dmas" property if
> present,
> otherwise optionally falling back on the old way so existing device
> trees can continue to work.
>
> With this change, there is no longer any reason to depend on the
> 460EX
> machine type so drop that from Kconfig.
Looks good for me (from dw_dmac usage prospective).
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> ---
> drivers/ata/Kconfig | 10 ++-
> drivers/ata/sata_dwc_460ex.c | 192 +++++++++++++++++++++++++++----
> ------------
> 2 files changed, 131 insertions(+), 71 deletions(-)
>
> diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
> index 3fc2a56..193c673 100644
> --- a/drivers/ata/Kconfig
> +++ b/drivers/ata/Kconfig
> @@ -296,14 +296,20 @@ config ATA_PIIX
>
> config SATA_DWC
> tristate "DesignWare Cores SATA support"
> - depends on 460EX
> - select DW_DMAC
> help
> This option enables support for the on-chip SATA
> controller of the
> AppliedMicro processor 460EX.
>
> If unsure, say N.
>
> +config SATA_DWC_OLD_DMA
> + bool "Support old device trees"
> + depends on SATA_DWC && 460EX
> + select DW_DMAC
> + help
> + This option enables support for old device trees without
> the
> + "dmas" property.
> +
> config SATA_DWC_DEBUG
> bool "Debugging driver version"
> depends on SATA_DWC
> diff --git a/drivers/ata/sata_dwc_460ex.c
> b/drivers/ata/sata_dwc_460ex.c
> index 9020349..9985749 100644
> --- a/drivers/ata/sata_dwc_460ex.c
> +++ b/drivers/ata/sata_dwc_460ex.c
> @@ -30,6 +30,7 @@
> #include <linux/kernel.h>
> #include <linux/module.h>
> #include <linux/device.h>
> +#include <linux/dmaengine.h>
> #include <linux/of_address.h>
> #include <linux/of_irq.h>
> #include <linux/of_platform.h>
> @@ -42,10 +43,6 @@
> #include <scsi/scsi_host.h>
> #include <scsi/scsi_cmnd.h>
>
> -/* Supported DMA engine drivers */
> -#include <linux/platform_data/dma-dw.h>
> -#include <linux/dma/dw.h>
> -
> /* These two are defined in "libata.h" */
> #undef DRV_NAME
> #undef DRV_VERSION
> @@ -148,7 +145,9 @@ struct sata_dwc_device {
> struct ata_host *host;
> u8 __iomem *reg_base;
> struct sata_dwc_regs *sata_dwc_regs; /* DW
> Synopsys SATA specific */
> +#ifdef CONFIG_SATA_DWC_OLD_DMA
> struct dw_dma_chip *dma;
> +#endif
> };
>
> #define SATA_DWC_QCMD_MAX 32
> @@ -159,7 +158,6 @@ struct sata_dwc_device_port {
> int dma_pending[SATA_DWC_QCMD_MAX];
>
> /* DMA info */
> - struct dw_dma_slave *dws;
> struct dma_chan *chan;
> struct dma_async_tx_descriptor *desc[SATA_DWC_QCMD_MA
> X];
> u32 dma_interrupt_count;
> @@ -198,13 +196,6 @@ struct sata_dwc_host_priv {
>
> static struct sata_dwc_host_priv host_pvt;
>
> -static struct dw_dma_slave sata_dwc_dma_dws = {
> - .src_id = 0,
> - .dst_id = 0,
> - .src_master = 0,
> - .dst_master = 1,
> -};
> -
> /*
> * Prototypes
> */
> @@ -215,6 +206,90 @@ static void sata_dwc_dma_xfer_complete(struct
> ata_port *ap, u32 check_status);
> static void sata_dwc_port_stop(struct ata_port *ap);
> static void sata_dwc_clear_dmacr(struct sata_dwc_device_port
> *hsdevp, u8 tag);
>
> +#ifdef CONFIG_SATA_DWC_OLD_DMA
> +
> +#include <linux/platform_data/dma-dw.h>
> +#include <linux/dma/dw.h>
> +
> +static struct dw_dma_slave sata_dwc_dma_dws = {
> + .src_id = 0,
> + .dst_id = 0,
> + .src_master = 0,
> + .dst_master = 1,
> +};
> +
> +static bool sata_dwc_dma_filter(struct dma_chan *chan, void *param)
> +{
> + struct dw_dma_slave *dws = &sata_dwc_dma_dws;
> +
> + if (dws->dma_dev != chan->device->dev)
> + return false;
> +
> + chan->private = dws;
> + return true;
> +}
> +
> +static int sata_dwc_dma_get_channel_old(struct sata_dwc_device_port
> *hsdevp)
> +{
> + struct sata_dwc_device *hsdev = hsdevp->hsdev;
> + struct dw_dma_slave *dws = &sata_dwc_dma_dws;
> + dma_cap_mask_t mask;
> +
> + dws->dma_dev = hsdev->dev;
> +
> + dma_cap_zero(mask);
> + dma_cap_set(DMA_SLAVE, mask);
> +
> + /* Acquire DMA channel */
> + hsdevp->chan = dma_request_channel(mask,
> sata_dwc_dma_filter, hsdevp);
> + if (!hsdevp->chan) {
> + dev_err(hsdev->dev, "%s: dma channel unavailable\n",
> + __func__);
> + return -EAGAIN;
> + }
> +
> + return 0;
> +}
> +
> +static int sata_dwc_dma_init_old(struct platform_device *pdev,
> + struct sata_dwc_device *hsdev)
> +{
> + struct device_node *np = pdev->dev.of_node;
> + int err;
> +
> + hsdev->dma = devm_kzalloc(&pdev->dev, sizeof(*hsdev->dma),
> GFP_KERNEL);
> + if (!hsdev->dma)
> + return -ENOMEM;
> +
> + hsdev->dma->dev = &pdev->dev;
> +
> + /* Get SATA DMA interrupt number */
> + hsdev->dma->irq = irq_of_parse_and_map(np, 1);
> + if (hsdev->dma->irq == NO_IRQ) {
> + dev_err(&pdev->dev, "no SATA DMA irq\n");
> + return -ENODEV;
> + }
> +
> + /* Get physical SATA DMA register base address */
> + hsdev->dma->regs = of_iomap(np, 1);
> + if (!hsdev->dma->regs) {
> + dev_err(&pdev->dev,
> + "ioremap failed for AHBDMA register
> address\n");
> + return -ENODEV;
> + }
> +
> + /* Initialize AHB DMAC */
> + err = dw_dma_probe(hsdev->dma, NULL);
> + if (err) {
> + iounmap(hsdev->dma->regs);
> + return err;
> + }
> +
> + return 0;
> +}
> +
> +#endif
> +
> static const char *get_prot_descript(u8 protocol)
> {
> switch ((enum ata_tf_protocols)protocol) {
> @@ -783,18 +858,6 @@ static void sata_dwc_enable_interrupts(struct
> sata_dwc_device *hsdev)
> in_le32(&hsdev->sata_dwc_regs->errmr));
> }
>
> -static bool sata_dwc_dma_filter(struct dma_chan *chan, void *param)
> -{
> - struct sata_dwc_device_port *hsdevp = param;
> - struct dw_dma_slave *dws = hsdevp->dws;
> -
> - if (dws->dma_dev != chan->device->dev)
> - return false;
> -
> - chan->private = dws;
> - return true;
> -}
> -
> static void sata_dwc_setup_port(struct ata_ioports *port, unsigned
> long base)
> {
> port->cmd_addr = (void __iomem *)base + 0x00;
> @@ -817,6 +880,26 @@ static void sata_dwc_setup_port(struct
> ata_ioports *port, unsigned long base)
> port->ctl_addr = (void __iomem *)base + 0x20;
> }
>
> +static int sata_dwc_dma_get_channel(struct sata_dwc_device_port
> *hsdevp)
> +{
> + struct sata_dwc_device *hsdev = hsdevp->hsdev;
> + struct device *dev = hsdev->dev;
> +
> +#ifdef CONFIG_SATA_DWC_OLD_DMA
> + if (!of_find_property(dev->of_node, "dmas", NULL))
> + return sata_dwc_dma_get_channel_old(hsdevp);
> +#endif
> +
> + hsdevp->chan = dma_request_slave_channel(dev, "sata-dma");
> + if (IS_ERR(hsdevp->chan)) {
> + dev_err(dev, "failed to allocate dma channel:
> %ld\n",
> + PTR_ERR(hsdevp->chan));
> + return PTR_ERR(hsdevp->chan);
> + }
> +
> + return 0;
> +}
> +
> /*
> * Function : sata_dwc_port_start
> * arguments : struct ata_ioports *port
> @@ -829,7 +912,6 @@ static int sata_dwc_port_start(struct ata_port
> *ap)
> struct sata_dwc_device *hsdev;
> struct sata_dwc_device_port *hsdevp = NULL;
> struct device *pdev;
> - dma_cap_mask_t mask;
> int i;
>
> hsdev = HSDEV_FROM_AP(ap);
> @@ -853,20 +935,9 @@ static int sata_dwc_port_start(struct ata_port
> *ap)
> }
> hsdevp->hsdev = hsdev;
>
> - hsdevp->dws = &sata_dwc_dma_dws;
> - hsdevp->dws->dma_dev = hsdev->dev;
> -
> - dma_cap_zero(mask);
> - dma_cap_set(DMA_SLAVE, mask);
> -
> - /* Acquire DMA channel */
> - hsdevp->chan = dma_request_channel(mask,
> sata_dwc_dma_filter, hsdevp);
> - if (!hsdevp->chan) {
> - dev_err(hsdev->dev, "%s: dma channel unavailable\n",
> - __func__);
> - err = -EAGAIN;
> + err = sata_dwc_dma_get_channel(hsdevp);
> + if (err)
> goto CLEANUP_ALLOC;
> - }
>
> for (i = 0; i < SATA_DWC_QCMD_MAX; i++)
> hsdevp->cmd_issued[i] = SATA_DWC_CMD_ISSUED_NOT;
> @@ -1225,33 +1296,9 @@ static int sata_dwc_probe(struct
> platform_device *ofdev)
> dev_notice(&ofdev->dev, "id %d, controller version
> %c.%c%c\n",
> idr, ver[0], ver[1], ver[2]);
>
> - /* Get SATA DMA interrupt number */
> - hsdev->dma->irq = irq_of_parse_and_map(np, 1);
> - if (hsdev->dma->irq == NO_IRQ) {
> - dev_err(&ofdev->dev, "no SATA DMA irq\n");
> - err = -ENODEV;
> - goto error_iomap;
> - }
> -
> - /* Get physical SATA DMA register base address */
> - hsdev->dma->regs = of_iomap(np, 1);
> - if (!hsdev->dma->regs) {
> - dev_err(&ofdev->dev,
> - "ioremap failed for AHBDMA register
> address\n");
> - err = -ENODEV;
> - goto error_iomap;
> - }
> -
> /* Save dev for later use in dev_xxx() routines */
> hsdev->dev = &ofdev->dev;
>
> - hsdev->dma->dev = &ofdev->dev;
> -
> - /* Initialize AHB DMAC */
> - err = dw_dma_probe(hsdev->dma, NULL);
> - if (err)
> - goto error_dma_iomap;
> -
> /* Enable SATA Interrupts */
> sata_dwc_enable_interrupts(hsdev);
>
> @@ -1263,6 +1310,14 @@ static int sata_dwc_probe(struct
> platform_device *ofdev)
> goto error_out;
> }
>
> +#ifdef CONFIG_SATA_DWC_OLD_DMA
> + if (!of_find_property(np, "dmas", NULL)) {
> + err = sata_dwc_dma_init_old(ofdev, hsdev);
> + if (err)
> + goto error_out;
> + }
> +#endif
> +
> /*
> * Now, register with libATA core, this will also initiate
> the
> * device discovery process, invoking our port_start()
> handler &
> @@ -1276,11 +1331,6 @@ static int sata_dwc_probe(struct
> platform_device *ofdev)
> return 0;
>
> error_out:
> - /* Free SATA DMA resources */
> - dw_dma_remove(hsdev->dma);
> -error_dma_iomap:
> - iounmap(hsdev->dma->regs);
> -error_iomap:
> iounmap(base);
> return err;
> }
> @@ -1293,10 +1343,14 @@ static int sata_dwc_remove(struct
> platform_device *ofdev)
>
> ata_host_detach(host);
>
> +#ifdef CONFIG_SATA_DWC_OLD_DMA
> /* Free SATA DMA resources */
> - dw_dma_remove(hsdev->dma);
> + if (hsdev->dma) {
> + dw_dma_remove(hsdev->dma);
> + iounmap(hsdev->dma->regs);
> + }
> +#endif
>
> - iounmap(hsdev->dma->regs);
> iounmap(hsdev->reg_base);
> dev_dbg(&ofdev->dev, "done\n");
> return 0;
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
Back to top | Article view | linux.kernel
csiph-web