Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1292639 > unrolled thread

[PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

Started byMans Rullgard <mans@mansr.com>
First post2015-12-16 00:30 +0100
Last post2015-12-17 16:00 +0100
Articles 20 on this page of 88 — 6 participants

Back to article view | Back to linux.kernel


Contents

  [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 2 of 5 — ← Prev page 1 [2] 3 4 5  Next page →


#1294680

FromMåns Rullgård <mans@mansr.com>
Date2015-12-18 12:30 +0100
Message-ID<qH1ot-4X1-3@gated-at.bofh.it>
In reply to#1294627
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> On Thu, 2015-12-17 at 17:41 -0400, Julian Margetson wrote:
>> 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 = {
>>                ^
>> drivers/ata/sata_dwc_460ex.c:199:2: error: unknown field ‘src_id’
>> specified in initializer
>>   .src_id = 0,
>
> This clearly means that header file that defines the struct
> dw_dma_slave is not included.

And yet two lines above there's this:

#include <linux/platform_data/dma-dw.h>

This unconditionally defines struct dw_dma_slave.

Moreover, the line number in the error message above does not match any
version of the file with my patches applied.  I suspect something went
wrong when Julian patched his tree.

> After the patch it seems you have to explicitly enable DW_DMAC, so,
> either via make nconfig, or by adding
> CONFIG_DW_DMAC=y

The option for enabling the compatibility code selects DW_DMAC.  There
is a missing select DMA_ENGINE, but that won't make any difference here,
and my .config has it enabled anyhow.

-- 
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]


#1294718 — Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

FromJulian Margetson <runaway@candw.ms>
Date2015-12-18 12:50 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qH1HP-55K-19@gated-at.bofh.it>
In reply to#1294137
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.

[    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
[    5.289439]     lr: c0427c34: ata_qc_issue+0x338/0x3a0
[    5.309708]     sp: eddafb90
[    5.327573]    msr: 21000
[    5.345108]    dar: 0
[    5.362242]  dsisr: 0
[    5.379257]   current = 0xedda85c0
[    5.397452]     pid   = 81, comm = scsi_eh_0
[    5.416599] enter ? for help
[    5.434346] [eddafbe0] c0427c34 ata_qc_issue+0x338/0x3a0
[    5.454892] [eddafc10] c0427f0c ata_exec_internal_sg+0x270/0x47c
[    5.476090] [eddafc80] c042818c ata_exec_internal+0x74/0x7c
[    5.496645] [eddafcc0] c042839c ata_dev_read_id+0x150/0x4e0
[    5.517001] [eddafd40] c0434b4c ata_eh_recover+0xfac/0x1088
[    5.537210] [eddafdd0] c043516c ata_do_eh+0x4c/0x9c
[    5.556724] [eddafe00] c0434e10 ata_scsi_port_error_handler+0x148/0x3a4
[    5.578026] [eddafe30] c04350f0 ata_scsi_error+0x84/0xb4
[    5.597878] [eddafe60] c0410844 scsi_error_handler+0xa4/0x44c
[    5.618242] [eddafed0] c0038938 kthread+0xc8/0xcc
[    5.637383] [eddaff40] c000ad90 ret_from_kernel_thread+0x5c/0x64
[    5.657798] mon>  <no input ...>
[    7.675523] Oops: Kernel access of bad area, sig: 11 [#1]
[    7.695357] PREEMPT Canyonlands
[    7.712998] Modules linked in:
[    7.730338] CPU: 0 PID: 81 Comm: scsi_eh_0 Not tainted 
4.4.0-rc5-Sam460ex #2
[    7.751933] task: edda85c0 ti: eddae000 task.ti: eddae000
[    7.771844] NIP: c043a2c8 LR: c0427c34 CTR: c043a210
[    7.791229] REGS: eddafae0 TRAP: 0300   Not tainted (4.4.0-rc5-Sam460ex)
[    7.812519] MSR: 00021000 <CE,ME>  CR: 24000022  XER: 20000000
[    7.833197] DEAR: 00000000 ESR: 00000000
GPR00: c0427c34 eddafb90 edda85c0 00000000 00000000 00000000 ee3c1724 
00000000
GPR08: ffffffff 00000004 00000002 eddafc10 22000022 00000000 00000001 
c09314dc
GPR16: fafbfcfd 00000000 00000001 00000000 00000000 00029000 00000200 
eddafc18
GPR24: 000000ec 00000000 00000000 edcba7d0 edcae200 00000000 ee3c0000 
ee3c1700
[    7.939668] NIP [c043a2c8] sata_dwc_qc_issue+0xb8/0x204
[    7.959417] LR [c0427c34] ata_qc_issue+0x338/0x3a0
[    7.978735] Call Trace:
[    7.995605] [eddafb90] [00000006] 0x6 (unreliable)
[    8.015009] [eddafbe0] [c0427c34] ata_qc_issue+0x338/0x3a0
[    8.035078] [eddafc10] [c0427f0c] ata_exec_internal_sg+0x270/0x47c
[    8.055763] [eddafc80] [c042818c] ata_exec_internal+0x74/0x7c
[    8.075824] [eddafcc0] [c042839c] ata_dev_read_id+0x150/0x4e0
[    8.095822] [eddafd40] [c0434b4c] ata_eh_recover+0xfac/0x1088
[    8.115762] [eddafdd0] [c043516c] ata_do_eh+0x4c/0x9c
[    8.134973] [eddafe00] [c0434e10] ata_scsi_port_error_handler+0x148/0x3a4
[    8.155945] [eddafe30] [c04350f0] ata_scsi_error+0x84/0xb4
[    8.175503] [eddafe60] [c0410844] scsi_error_handler+0xa4/0x44c
[    8.195428] [eddafed0] [c0038938] kthread+0xc8/0xcc
[    8.214218] [eddaff40] [c000ad90] ret_from_kernel_thread+0x5c/0x64
[    8.234351] Instruction dump:
[    8.251202] 91010018 9121001c 39200000 99210030 39200040 807c0104 
91210028 9121002c
[    8.273517] 39200004 91410008 91210020 91210024 <81230000> 81290084 
2f890000 419e0010
[    8.296123] ---[ end trace 63c0d319677b6964 ]---
[    8.315133]
[    8.330746] note: scsi_eh_0[81] exited with preempt_count 1
[    8.402946] ata2.00: ATA-8: WDC WD5000AAKS-00V1A0, 05.01D05, max UDMA/133
[    8.444867] ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 0/32)
[    8.474873] usb 1-1: new high-speed USB device number 2 using ppc-of-ehci
[    8.521159] ata2.00: configured for UDMA/100


[   11.324174] usb-storage 1-1.7:1.0: USB Mass Storage device detected
[   11.351056] scsi host3: usb-storage 1-1.7:1.0
[   12.377078] scsi 3:0:0:0: Direct-Access     Generic  Ultra HS-COMBO   
1.98 PQ: 0 ANSI: 0
[   12.406742] sd 3:0:0:0: Attached scsi generic sg0 type 0
[   12.434765] sd 3:0:0:0: [sda] Attached SCSI removable disk

Boot ends here and wont go any further.


--
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]


#1294728

FromMåns Rullgård <mans@mansr.com>
Date2015-12-18 13:10 +0100
Message-ID<qH21c-5rz-15@gated-at.bofh.it>
In reply to#1294718
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?

> [    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?

-- 
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]


#1294744 — Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2015-12-18 13:30 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qH2ky-5zs-17@gated-at.bofh.it>
In reply to#1294728
On Fri, 2015-12-18 at 12:04 +0000, 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?

(Just in case a hint: diffconfig helps to do the job)

> 
> > [    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?

Besides that, can you enable DYNAMIC_DEBUG in the config and append
'dw_dmac_core.dyndbg dw_dmac.dyndbg' to the kernel cmdline?

-- 
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]


#1294784

FromMåns Rullgård <mans@mansr.com>
Date2015-12-18 13:50 +0100
Message-ID<qH2DW-5IP-63@gated-at.bofh.it>
In reply to#1294744
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

>> > [    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?
>
> Besides that, can you enable DYNAMIC_DEBUG in the config and append
> 'dw_dmac_core.dyndbg dw_dmac.dyndbg' to the kernel cmdline?

Enabling debug messages in the sata_dwc driver might also be informative.

-- 
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]


#1295051

FromMåns Rullgård <mans@mansr.com>
Date2015-12-18 18:20 +0100
Message-ID<qH6Rb-5l-7@gated-at.bofh.it>
In reply to#1294784
Julian Margetson <runaway@candw.ms> writes:

> On 12/18/2015 8:49 AM, Måns Rullgård wrote:
>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>>
>>>>> [    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?
>>> Besides that, can you enable DYNAMIC_DEBUG in the config and append
>>> 'dw_dmac_core.dyndbg dw_dmac.dyndbg' to the kernel cmdline?
>> Enabling debug messages in the sata_dwc driver might also be informative.
>>
> Changed the sata-dwc to a module .
>
> [   18.475140] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
> [   18.535698] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL

That's strange.  The only way that can happen is if
dmaengine_prep_slave_sg() return NULL, and that really shouldn't be
happening.  Did you turn on debug messages in dw_dma?  You can enable
some extra debug messages by adding "#define VERBOSE_DEBUG" at the top
of drivers/dma/dw/core.c

-- 
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]


#1295090 — Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

FromAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Date2015-12-18 19:50 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qH8gh-QC-1@gated-at.bofh.it>
In reply to#1295051
On Fri, 2015-12-18 at 17:18 +0000, Måns Rullgård wrote:
> Julian Margetson <runaway@candw.ms> writes:
> 
> > On 12/18/2015 8:49 AM, Måns Rullgård wrote:
> > > Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
> > > 
> > > > > > [    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?
> > > > Besides that, can you enable DYNAMIC_DEBUG in the config and
> > > > append
> > > > 'dw_dmac_core.dyndbg dw_dmac.dyndbg' to the kernel cmdline?
> > > Enabling debug messages in the sata_dwc driver might also be
> > > informative.
> > > 
> > Changed the sata-dwc to a module .
> > 
> > [   18.475140] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag:
> > dma_dwc_xfer_setup returns NULL
> > [   18.535698] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag:
> > dma_dwc_xfer_setup returns NULL
> 
> That's strange.  The only way that can happen is if
> dmaengine_prep_slave_sg() return NULL, and that really shouldn't be
> happening.  Did you turn on debug messages in dw_dma?  You can enable
> some extra debug messages by adding "#define VERBOSE_DEBUG" at the
> top
> of drivers/dma/dw/core.c

There are options also for DMA Engine such as CONFIG_DMADEVICES_DEBUG

> 

-- 
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]


#1295226

FromMåns Rullgård <mans@mansr.com>
Date2015-12-18 23:40 +0100
Message-ID<qHbQR-3fx-1@gated-at.bofh.it>
In reply to#1295051
Julian Margetson <runaway@candw.ms> writes:

> On 12/18/2015 1:18 PM, Måns Rullgård wrote:
>> Julian Margetson <runaway@candw.ms> writes:
>>
>>> On 12/18/2015 8:49 AM, Måns Rullgård wrote:
>>>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>>>>
>>>>>>> [    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?
>>>>> Besides that, can you enable DYNAMIC_DEBUG in the config and append
>>>>> 'dw_dmac_core.dyndbg dw_dmac.dyndbg' to the kernel cmdline?
>>>> Enabling debug messages in the sata_dwc driver might also be informative.
>>>>
>>> Changed the sata-dwc to a module .
>>>
>>> [   18.475140] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>> [   18.535698] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>> That's strange.  The only way that can happen is if
>> dmaengine_prep_slave_sg() return NULL, and that really shouldn't be
>> happening.  Did you turn on debug messages in dw_dma?  You can enable
>> some extra debug messages by adding "#define VERBOSE_DEBUG" at the top
>> of drivers/dma/dw/core.c
>>
>
> [   17.526173] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
> [   17.600124] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
> [   17.662978] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL

Could you post the entire kernel log?  There might be important
information before the errors start.

-- 
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]


#1295239

FromMåns Rullgård <mans@mansr.com>
Date2015-12-19 00:20 +0100
Message-ID<qHctz-3Iq-5@gated-at.bofh.it>
In reply to#1295226
Julian Margetson <runaway@candw.ms> writes:

> On 12/18/2015 6:33 PM, Måns Rullgård wrote:
>> Julian Margetson <runaway@candw.ms> writes:
>>
>>> On 12/18/2015 1:18 PM, Måns Rullgård wrote:
>>>> Julian Margetson <runaway@candw.ms> writes:
>>>>
>>>>> On 12/18/2015 8:49 AM, Måns Rullgård wrote:
>>>>>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>>>>>>
>>>>>>>>> [    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?
>>>>>>> Besides that, can you enable DYNAMIC_DEBUG in the config and append
>>>>>>> 'dw_dmac_core.dyndbg dw_dmac.dyndbg' to the kernel cmdline?
>>>>>> Enabling debug messages in the sata_dwc driver might also be informative.
>>>>>>
>>>>> Changed the sata-dwc to a module .
>>>>>
>>>>> [   18.475140] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>>> [   18.535698] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>> That's strange.  The only way that can happen is if
>>>> dmaengine_prep_slave_sg() return NULL, and that really shouldn't be
>>>> happening.  Did you turn on debug messages in dw_dma?  You can enable
>>>> some extra debug messages by adding "#define VERBOSE_DEBUG" at the top
>>>> of drivers/dma/dw/core.c
>>>>
>>> [   17.526173] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>> [   17.600124] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>> [   17.662978] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>> Could you post the entire kernel log?  There might be important
>> information before the errors start.
>>
>
>
> =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.12.18 15:01:48 =~=~=~=~=~=~=~=~=~=~=~=
> [    0.000000] Using Canyonlands machine description
> [    0.000000] Initializing cgroup subsys cpu
> [    0.000000] Linux version 4.4.0-rc5-Sam460ex (root@julian-VirtualBox) (gcc version 4.8.2 (Ubuntu 4.8.2-16ubuntu3) ) #8 PREEMPT Fri Dec 18 13:36:34 AST 2015
> [    0.000000] Zone ranges:
> [    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
> [    0.000000]   Normal   empty
> [    0.000000]   HighMem  [mem 0x0000000030000000-0x000000007fffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000000000000-0x000000007fffffff]
> [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
> [    0.000000] MMU: Allocated 1088 bytes of context maps for 255 contexts
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
> [    0.000000] Kernel command line: root=/dev/sda8 console=ttyS0,115200 console=tty0 dw_dmac_core.dyndbg dw_dmac.dyndbg

[...]

> [   13.643415] systemd[1]: Mounted Configuration File System.
> [   17.526173] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
> [   17.600124] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
> [   17.662978] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL

This log is weird.  The sata_dwc_probe() function prints several things
(one using dev_notice()), for instance this:

	/* Read the ID and Version Registers */
	idr = in_le32(&hsdev->sata_dwc_regs->idr);
	versionr = in_le32(&hsdev->sata_dwc_regs->versionr);
	dev_notice(&ofdev->dev, "id %d, controller version %c.%c%c\n",
		   idr, ver[0], ver[1], ver[2]);

The dw_dma_probe() function also prints a line:

	dev_info(chip->dev, "DesignWare DMA Controller, %d channels\n",
		 pdata->nr_channels);

These messages are nowhere to be seen in your log, nor are numerous
others that really must appear before before sata_dwc_qc_prep_by_tag()
can be called.

I'd like to note that the driver works on my Sigma Designs based system
using a different DMA controller, so it's not completely broken.  The
DMA driver could still be faulty, but that still doesn't explain the
missing kernel messages.

-- 
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]


#1295270 — Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2015-12-19 03:40 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHfB7-5yW-3@gated-at.bofh.it>
In reply to#1295239
On Sat, Dec 19, 2015 at 1:16 AM, Måns Rullgård <mans@mansr.com> wrote:
> Julian Margetson <runaway@candw.ms> writes:
>
>> On 12/18/2015 6:33 PM, Måns Rullgård wrote:
>>> Julian Margetson <runaway@candw.ms> writes:
>>>
>>>> On 12/18/2015 1:18 PM, Måns Rullgård wrote:
>>>>> Julian Margetson <runaway@candw.ms> writes:
>>>>>
>>>>>> On 12/18/2015 8:49 AM, Måns Rullgård wrote:
>>>>>>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>>>>>>>
>>>>>>>>>> [    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?
>>>>>>>> Besides that, can you enable DYNAMIC_DEBUG in the config and append
>>>>>>>> 'dw_dmac_core.dyndbg dw_dmac.dyndbg' to the kernel cmdline?
>>>>>>> Enabling debug messages in the sata_dwc driver might also be informative.
>>>>>>>
>>>>>> Changed the sata-dwc to a module .
>>>>>>
>>>>>> [   18.475140] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>>>> [   18.535698] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>>> That's strange.  The only way that can happen is if
>>>>> dmaengine_prep_slave_sg() return NULL, and that really shouldn't be
>>>>> happening.  Did you turn on debug messages in dw_dma?  You can enable
>>>>> some extra debug messages by adding "#define VERBOSE_DEBUG" at the top
>>>>> of drivers/dma/dw/core.c
>>>>>
>>>> [   17.526173] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>> [   17.600124] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>> [   17.662978] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>> Could you post the entire kernel log?  There might be important
>>> information before the errors start.
>>>
>>
>>
>> =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.12.18 15:01:48 =~=~=~=~=~=~=~=~=~=~=~=
>> [    0.000000] Using Canyonlands machine description
>> [    0.000000] Initializing cgroup subsys cpu
>> [    0.000000] Linux version 4.4.0-rc5-Sam460ex (root@julian-VirtualBox) (gcc version 4.8.2 (Ubuntu 4.8.2-16ubuntu3) ) #8 PREEMPT Fri Dec 18 13:36:34 AST 2015
>> [    0.000000] Zone ranges:
>> [    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
>> [    0.000000]   Normal   empty
>> [    0.000000]   HighMem  [mem 0x0000000030000000-0x000000007fffffff]
>> [    0.000000] Movable zone start for each node
>> [    0.000000] Early memory node ranges
>> [    0.000000]   node   0: [mem 0x0000000000000000-0x000000007fffffff]
>> [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
>> [    0.000000] MMU: Allocated 1088 bytes of context maps for 255 contexts
>> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
>> [    0.000000] Kernel command line: root=/dev/sda8 console=ttyS0,115200 console=tty0 dw_dmac_core.dyndbg dw_dmac.dyndbg

I would suggest to use console=tty1 instead of console=tty0.

>
> [...]
>
>> [   13.643415] systemd[1]: Mounted Configuration File System.
>> [   17.526173] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>> [   17.600124] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>> [   17.662978] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>
> This log is weird.  The sata_dwc_probe() function prints several things
> (one using dev_notice()), for instance this:
>
>         /* Read the ID and Version Registers */
>         idr = in_le32(&hsdev->sata_dwc_regs->idr);
>         versionr = in_le32(&hsdev->sata_dwc_regs->versionr);
>         dev_notice(&ofdev->dev, "id %d, controller version %c.%c%c\n",
>                    idr, ver[0], ver[1], ver[2]);
>
> The dw_dma_probe() function also prints a line:
>
>         dev_info(chip->dev, "DesignWare DMA Controller, %d channels\n",
>                  pdata->nr_channels);
>
> These messages are nowhere to be seen in your log, nor are numerous
> others that really must appear before before sata_dwc_qc_prep_by_tag()
> can be called.
>

It would be better to add 'ignore_loglevel' to the cmdline as well.

> I'd like to note that the driver works on my Sigma Designs based system
> using a different DMA controller, so it's not completely broken.  The
> DMA driver could still be faulty, but that still doesn't explain the
> missing kernel messages.
>
> --
> 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/



-- 
With Best Regards,
Andy Shevchenko
--
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]


#1295393

FromMåns Rullgård <mans@mansr.com>
Date2015-12-19 16:50 +0100
Message-ID<qHrVE-52J-5@gated-at.bofh.it>
In reply to#1295270
Julian Margetson <runaway@candw.ms> writes:

> On 12/18/2015 10:34 PM, Andy Shevchenko wrote:
>> On Sat, Dec 19, 2015 at 1:16 AM, Måns Rullgård <mans@mansr.com> wrote:
>>> Julian Margetson <runaway@candw.ms> writes:
>>>
>>>> On 12/18/2015 6:33 PM, Måns Rullgård wrote:
>>>>> Julian Margetson <runaway@candw.ms> writes:
>>>>>
>>>>>> On 12/18/2015 1:18 PM, Måns Rullgård wrote:
>>>>>>> Julian Margetson <runaway@candw.ms> writes:
>>>>>>>
>>>>>>>> On 12/18/2015 8:49 AM, Måns Rullgård wrote:
>>>>>>>>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>>>>>>>>>
>>>>>>>>>>>> [    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?
>>>>>>>>>> Besides that, can you enable DYNAMIC_DEBUG in the config and append
>>>>>>>>>> 'dw_dmac_core.dyndbg dw_dmac.dyndbg' to the kernel cmdline?
>>>>>>>>> Enabling debug messages in the sata_dwc driver might also be informative.
>>>>>>>>>
>>>>>>>> Changed the sata-dwc to a module .
>>>>>>>>
>>>>>>>> [   18.475140] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>>>>>> [   18.535698] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>>>>> That's strange.  The only way that can happen is if
>>>>>>> dmaengine_prep_slave_sg() return NULL, and that really shouldn't be
>>>>>>> happening.  Did you turn on debug messages in dw_dma?  You can enable
>>>>>>> some extra debug messages by adding "#define VERBOSE_DEBUG" at the top
>>>>>>> of drivers/dma/dw/core.c
>>>>>>>
>>>>>> [   17.526173] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>>>> [   17.600124] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>>>> [   17.662978] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>>> Could you post the entire kernel log?  There might be important
>>>>> information before the errors start.
>>>>>
>>>>
>>>> =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.12.18 15:01:48 =~=~=~=~=~=~=~=~=~=~=~=
>>>> [    0.000000] Using Canyonlands machine description
>>>> [    0.000000] Initializing cgroup subsys cpu
>>>> [    0.000000] Linux version 4.4.0-rc5-Sam460ex (root@julian-VirtualBox) (gcc version 4.8.2 (Ubuntu 4.8.2-16ubuntu3) ) #8 PREEMPT Fri Dec 18 13:36:34 AST 2015
>>>> [    0.000000] Zone ranges:
>>>> [    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
>>>> [    0.000000]   Normal   empty
>>>> [    0.000000]   HighMem  [mem 0x0000000030000000-0x000000007fffffff]
>>>> [    0.000000] Movable zone start for each node
>>>> [    0.000000] Early memory node ranges
>>>> [    0.000000]   node   0: [mem 0x0000000000000000-0x000000007fffffff]
>>>> [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
>>>> [    0.000000] MMU: Allocated 1088 bytes of context maps for 255 contexts
>>>> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
>>>> [    0.000000] Kernel command line: root=/dev/sda8 console=ttyS0,115200 console=tty0 dw_dmac_core.dyndbg dw_dmac.dyndbg
>> I would suggest to use console=tty1 instead of console=tty0.
>>
>>> [...]
>>>
>>>> [   13.643415] systemd[1]: Mounted Configuration File System.
>>>> [   17.526173] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>> [   17.600124] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>>> [   17.662978] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: dma_dwc_xfer_setup returns NULL
>>> This log is weird.  The sata_dwc_probe() function prints several things
>>> (one using dev_notice()), for instance this:
>>>
>>>          /* Read the ID and Version Registers */
>>>          idr = in_le32(&hsdev->sata_dwc_regs->idr);
>>>          versionr = in_le32(&hsdev->sata_dwc_regs->versionr);
>>>          dev_notice(&ofdev->dev, "id %d, controller version %c.%c%c\n",
>>>                     idr, ver[0], ver[1], ver[2]);
>>>
>>> The dw_dma_probe() function also prints a line:
>>>
>>>          dev_info(chip->dev, "DesignWare DMA Controller, %d channels\n",
>>>                   pdata->nr_channels);
>>>
>>> These messages are nowhere to be seen in your log, nor are numerous
>>> others that really must appear before before sata_dwc_qc_prep_by_tag()
>>> can be called.
>>>
>> It would be better to add 'ignore_loglevel' to the cmdline as well.

OK, I've found something.  The dma setup errors are benign, caused by
the driver calling dmaengine_prep_slave_sg() even for non-dma
operations.  The real error is the lock recursion that's reported
later.  I wasn't seeing it since I was running a UP non-preempt kernel.
With lock debugging enabled, I get the same error.  This patch should
fix it.

---8<---
From 94c4769d2171ce66079fd486a45e09dd64db62c0 Mon Sep 17 00:00:00 2001
From: Mans Rullgard <mans@mansr.com>
Date: Sat, 19 Dec 2015 15:26:23 +0000
Subject: [PATCH] ata: sata_dwc_460ex: remove incorrect locking

This lock is already taken in ata_scsi_queuecmd() a few levels up the
call stack so attempting to take it here is an error.  Moreover, it is
pointless in the first place since it only protects a single, atomic
assignment.

Signed-off-by: Mans Rullgard <mans@mansr.com>
---
 drivers/ata/sata_dwc_460ex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index 799df86..5696f39 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1001,16 +1001,14 @@ static void sata_dwc_exec_command_by_tag(struct ata_port *ap,
 					 struct ata_taskfile *tf,
 					 u8 tag, u32 cmd_issued)
 {
-	unsigned long flags;
 	struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
 	struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap);
 
 	dev_dbg(ap->dev, "%s cmd(0x%02x): %s tag=%d\n", __func__, tf->command,
 		ata_get_cmd_descript(tf->command), tag);
 
-	spin_lock_irqsave(&ap->host->lock, flags);
 	hsdevp->cmd_issued[tag] = cmd_issued;
-	spin_unlock_irqrestore(&ap->host->lock, flags);
+
 	/*
 	 * Clear SError before executing a new command.
 	 * sata_dwc_scr_write and read can not be used here. Clearing the PM
-- 
2.6.3

-- 
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]


#1295406

FromMåns Rullgård <mans@mansr.com>
Date2015-12-19 17:50 +0100
Message-ID<qHsRI-5Ed-19@gated-at.bofh.it>
In reply to#1295393

[Multipart message — attachments visible in raw view] — view raw

Julian Margetson <runaway@candw.ms> writes:

> On 12/19/2015 11:40 AM, Måns Rullgård wrote:
>> OK, I've found something.  The dma setup errors are benign, caused by
>> the driver calling dmaengine_prep_slave_sg() even for non-dma
>> operations.  The real error is the lock recursion that's reported
>> later.  I wasn't seeing it since I was running a UP non-preempt kernel.
>> With lock debugging enabled, I get the same error.  This patch should
>> fix it.
>>
>> ---8<---
>> >From 94c4769d2171ce66079fd486a45e09dd64db62c0 Mon Sep 17 00:00:00 2001
>> From: Mans Rullgard<mans@mansr.com>
>> Date: Sat, 19 Dec 2015 15:26:23 +0000
>> Subject: [PATCH] ata: sata_dwc_460ex: remove incorrect locking
>>
>> This lock is already taken in ata_scsi_queuecmd() a few levels up the
>> call stack so attempting to take it here is an error.  Moreover, it is
>> pointless in the first place since it only protects a single, atomic
>> assignment.
>>
>> Signed-off-by: Mans Rullgard<mans@mansr.com>
>> ---
>>   drivers/ata/sata_dwc_460ex.c | 4 +---
>>   1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
>> index 799df86..5696f39 100644
>> --- a/drivers/ata/sata_dwc_460ex.c
>> +++ b/drivers/ata/sata_dwc_460ex.c
>> @@ -1001,16 +1001,14 @@ static void sata_dwc_exec_command_by_tag(struct ata_port *ap,
>>   					 struct ata_taskfile *tf,
>>   					 u8 tag, u32 cmd_issued)
>>   {
>> -	unsigned long flags;
>>   	struct sata_dwc_device_port *hsdevp = HSDEVP_FROM_AP(ap);
>>   	struct sata_dwc_device *hsdev = HSDEV_FROM_AP(ap);
>>     	dev_dbg(ap->dev, "%s cmd(0x%02x): %s tag=%d\n", __func__,
>> tf->command,
>>   		ata_get_cmd_descript(tf->command), tag);
>>   -	spin_lock_irqsave(&ap->host->lock, flags);
>>   	hsdevp->cmd_issued[tag] = cmd_issued;
>> -	spin_unlock_irqrestore(&ap->host->lock, flags);
>> +
>>   	/*
>>   	 * Clear SError before executing a new command.
>>   	 * sata_dwc_scr_write and read can not be used here. Clearing the PM
> having a problem applying the patch .
>
> patching file drivers/ata/sata_dwc_460ex.c
> Hunk #1 FAILED at 1001 (different line endings).

OK, attaching it instead.

-- 
Måns Rullgård

[toc] | [prev] | [next] | [standalone]


#1295410 — Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2015-12-19 18:00 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHt1o-5HC-25@gated-at.bofh.it>
In reply to#1295393
On Sat, Dec 19, 2015 at 5:40 PM, Måns Rullgård <mans@mansr.com> wrote:

> OK, I've found something.  The dma setup errors are benign, caused by
> the driver calling dmaengine_prep_slave_sg() even for non-dma
> operations.

I suppose the following is a quick fix to avoid preparing descriptor
for non-DMA operations (not tested anyhow)

a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1041,6 +1041,9 @@ static void sata_dwc_qc_prep_by_tag(struct
ata_queued_cmd *qc, u8 tag)
                __func__, ap->port_no, get_dma_dir_descript(qc->dma_dir),
                 qc->n_elem);

+       if (!is_slave_direction(qc->dma_dir))
+               return;
+
        desc = dma_dwc_xfer_setup(qc);
        if (!desc) {
                dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns NULL\n",

> The real error is the lock recursion that's reported
> later.  I wasn't seeing it since I was running a UP non-preempt kernel.
> With lock debugging enabled, I get the same error.  This patch should
> fix it.

> -       spin_lock_irqsave(&ap->host->lock, flags);
>         hsdevp->cmd_issued[tag] = cmd_issued;
> -       spin_unlock_irqrestore(&ap->host->lock, flags);

> +

This will create a second empty line, though I don't care it is so minor.

-- 
With Best Regards,
Andy Shevchenko
--
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]


#1295413

FromMåns Rullgård <mans@mansr.com>
Date2015-12-19 18:10 +0100
Message-ID<qHtb3-60a-7@gated-at.bofh.it>
In reply to#1295410
Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Sat, Dec 19, 2015 at 5:40 PM, Måns Rullgård <mans@mansr.com> wrote:
>
>> OK, I've found something.  The dma setup errors are benign, caused by
>> the driver calling dmaengine_prep_slave_sg() even for non-dma
>> operations.
>
> I suppose the following is a quick fix to avoid preparing descriptor
> for non-DMA operations (not tested anyhow)
>
> a/drivers/ata/sata_dwc_460ex.c
> +++ b/drivers/ata/sata_dwc_460ex.c
> @@ -1041,6 +1041,9 @@ static void sata_dwc_qc_prep_by_tag(struct
> ata_queued_cmd *qc, u8 tag)
>                 __func__, ap->port_no, get_dma_dir_descript(qc->dma_dir),
>                  qc->n_elem);
>
> +       if (!is_slave_direction(qc->dma_dir))
> +               return;
> +
>         desc = dma_dwc_xfer_setup(qc);
>         if (!desc) {
>                 dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns NULL\n",

I already have a better patch sitting here.

>> The real error is the lock recursion that's reported
>> later.  I wasn't seeing it since I was running a UP non-preempt kernel.
>> With lock debugging enabled, I get the same error.  This patch should
>> fix it.
>
>> -       spin_lock_irqsave(&ap->host->lock, flags);
>>         hsdevp->cmd_issued[tag] = cmd_issued;
>> -       spin_unlock_irqrestore(&ap->host->lock, flags);
>
>> +
>
> This will create a second empty line, though I don't care it is so minor.

The patch leaves one blank line before the following block comment.  I
think it looks better that way.

-- 
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]


#1295414 — Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

FromJulian Margetson <runaway@candw.ms>
Date2015-12-19 18:10 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHtb4-60a-13@gated-at.bofh.it>
In reply to#1295413
On 12/19/2015 1:05 PM, Måns Rullgård wrote:
> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
>
>> On Sat, Dec 19, 2015 at 5:40 PM, Måns Rullgård <mans@mansr.com> wrote:
>>
>>> OK, I've found something.  The dma setup errors are benign, caused by
>>> the driver calling dmaengine_prep_slave_sg() even for non-dma
>>> operations.
>> I suppose the following is a quick fix to avoid preparing descriptor
>> for non-DMA operations (not tested anyhow)
>>
>> a/drivers/ata/sata_dwc_460ex.c
>> +++ b/drivers/ata/sata_dwc_460ex.c
>> @@ -1041,6 +1041,9 @@ static void sata_dwc_qc_prep_by_tag(struct
>> ata_queued_cmd *qc, u8 tag)
>>                  __func__, ap->port_no, get_dma_dir_descript(qc->dma_dir),
>>                   qc->n_elem);
>>
>> +       if (!is_slave_direction(qc->dma_dir))
>> +               return;
>> +
>>          desc = dma_dwc_xfer_setup(qc);
>>          if (!desc) {
>>                  dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns NULL\n",
> I already have a better patch sitting here.
>
>>> The real error is the lock recursion that's reported
>>> later.  I wasn't seeing it since I was running a UP non-preempt kernel.
>>> With lock debugging enabled, I get the same error.  This patch should
>>> fix it.
>>> -       spin_lock_irqsave(&ap->host->lock, flags);
>>>          hsdevp->cmd_issued[tag] = cmd_issued;
>>> -       spin_unlock_irqrestore(&ap->host->lock, flags);
>>> +
>> This will create a second empty line, though I don't care it is so minor.
> The patch leaves one blank line before the following block comment.  I
> think it looks better that way.
>

Still can't get the patch applied .

--
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]


#1295416 — Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2015-12-19 18:20 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHtkJ-63n-5@gated-at.bofh.it>
In reply to#1295414
On Sat, Dec 19, 2015 at 7:09 PM, Julian Margetson <runaway@candw.ms> wrote:
> Still can't get the patch applied .

It might be faster if you just edit (remove 3 lines) directly in the file.


-- 
With Best Regards,
Andy Shevchenko
--
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]


#1295422

FromMåns Rullgård <mans@mansr.com>
Date2015-12-19 18:30 +0100
Message-ID<qHtuq-66C-17@gated-at.bofh.it>
In reply to#1295414

[Multipart message — attachments visible in raw view] — view raw

Julian Margetson <runaway@candw.ms> writes:

> On 12/19/2015 1:05 PM, Måns Rullgård wrote:
>> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
>>
>>> On Sat, Dec 19, 2015 at 5:40 PM, Måns Rullgård <mans@mansr.com> wrote:
>>>
>>>> OK, I've found something.  The dma setup errors are benign, caused by
>>>> the driver calling dmaengine_prep_slave_sg() even for non-dma
>>>> operations.
>>> I suppose the following is a quick fix to avoid preparing descriptor
>>> for non-DMA operations (not tested anyhow)
>>>
>>> a/drivers/ata/sata_dwc_460ex.c
>>> +++ b/drivers/ata/sata_dwc_460ex.c
>>> @@ -1041,6 +1041,9 @@ static void sata_dwc_qc_prep_by_tag(struct
>>> ata_queued_cmd *qc, u8 tag)
>>>                  __func__, ap->port_no, get_dma_dir_descript(qc->dma_dir),
>>>                   qc->n_elem);
>>>
>>> +       if (!is_slave_direction(qc->dma_dir))
>>> +               return;
>>> +
>>>          desc = dma_dwc_xfer_setup(qc);
>>>          if (!desc) {
>>>                  dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns NULL\n",
>> I already have a better patch sitting here.
>>
>>>> The real error is the lock recursion that's reported
>>>> later.  I wasn't seeing it since I was running a UP non-preempt kernel.
>>>> With lock debugging enabled, I get the same error.  This patch should
>>>> fix it.
>>>> -       spin_lock_irqsave(&ap->host->lock, flags);
>>>>          hsdevp->cmd_issued[tag] = cmd_issued;
>>>> -       spin_unlock_irqrestore(&ap->host->lock, flags);
>>>> +
>>> This will create a second empty line, though I don't care it is so minor.
>> The patch leaves one blank line before the following block comment.  I
>> think it looks better that way.
>>
>
> Still can't get the patch applied .

Sorry, didn't realise it conflicted with an intervening patch I had in
my tree.  Try this one.

-- 
Måns Rullgård

[toc] | [prev] | [next] | [standalone]


#1295434

FromMåns Rullgård <mans@mansr.com>
Date2015-12-19 20:10 +0100
Message-ID<qHv3b-7az-3@gated-at.bofh.it>
In reply to#1295422
Julian Margetson <runaway@candw.ms> writes:

> On 12/19/2015 1:19 PM, Måns Rullgård wrote:
>> Julian Margetson <runaway@candw.ms> writes:
>>
>>> On 12/19/2015 1:05 PM, Måns Rullgård wrote:
>>>> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
>>>>
>>>>> On Sat, Dec 19, 2015 at 5:40 PM, Måns Rullgård <mans@mansr.com> wrote:
>>>>>
>>>>>> OK, I've found something.  The dma setup errors are benign, caused by
>>>>>> the driver calling dmaengine_prep_slave_sg() even for non-dma
>>>>>> operations.
>>>>> I suppose the following is a quick fix to avoid preparing descriptor
>>>>> for non-DMA operations (not tested anyhow)
>>>>>
>>>>> a/drivers/ata/sata_dwc_460ex.c
>>>>> +++ b/drivers/ata/sata_dwc_460ex.c
>>>>> @@ -1041,6 +1041,9 @@ static void sata_dwc_qc_prep_by_tag(struct
>>>>> ata_queued_cmd *qc, u8 tag)
>>>>>                   __func__, ap->port_no, get_dma_dir_descript(qc->dma_dir),
>>>>>                    qc->n_elem);
>>>>>
>>>>> +       if (!is_slave_direction(qc->dma_dir))
>>>>> +               return;
>>>>> +
>>>>>           desc = dma_dwc_xfer_setup(qc);
>>>>>           if (!desc) {
>>>>>                   dev_err(ap->dev, "%s: dma_dwc_xfer_setup returns NULL\n",
>>>> I already have a better patch sitting here.
>>>>
>>>>>> The real error is the lock recursion that's reported
>>>>>> later.  I wasn't seeing it since I was running a UP non-preempt kernel.
>>>>>> With lock debugging enabled, I get the same error.  This patch should
>>>>>> fix it.
>>>>>> -       spin_lock_irqsave(&ap->host->lock, flags);
>>>>>>           hsdevp->cmd_issued[tag] = cmd_issued;
>>>>>> -       spin_unlock_irqrestore(&ap->host->lock, flags);
>>>>>> +
>>>>> This will create a second empty line, though I don't care it is so minor.
>>>> The patch leaves one blank line before the following block comment.  I
>>>> think it looks better that way.
>>>>
>>> Still can't get the patch applied .
>> Sorry, didn't realise it conflicted with an intervening patch I had in
>> my tree.  Try this one.
>>
>
>
> =~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2015.12.19 14:44:52 =~=~=~=~=~=~=~=~=~=~=~=
>
> U-Boot 2015.a (May 16 2015 - 14:20:11)
>
> CPU:   AMCC PowerPC 460EX Rev. B at 1155 MHz (PLB=231 OPB=115 EBC=115)
>        No Security/Kasumi support
>        Bootstrap Option H - Boot ROM Location I2C (Addr 0x52)
>        Internal PCI arbiter enabled
>        32 kB I-Cache 32 kB D-Cache
> Board: Sam460ex/cr, PCIe 4x + SATA-2
> I2C:   ready
> DRAM:  2 GiB (ECC not enabled, 462 MHz, CL4)
> PCI:   Bus Dev VenId DevId Class Int
>         00  04  1095  3512  0104  00
>         00  06  126f  0501  0380  00
> PCIE1: successfully set as root-complex
>         02  00  1002  683f  0300  ff
> Net:   ppc_4xx_eth0
> FPGA:  Revision 03 (2010-10-07)
> SM502: found
> PERMD2:not found
> VGA:   1
> VESA:  OK
> [    0.000000] Using Canyonlands machine description
> [    0.000000] Initializing cgroup subsys cpu
> [    0.000000] Linux version 4.4.0-rc5-Sam460ex (root@julian-VirtualBox) (gcc version 4.8.2 (Ubuntu 4.8.2-16ubuntu3) ) #1 PREEMPT Sat Dec 19 14:25:55 AST 2015
> [    0.000000] Zone ranges:
> [    0.000000]   DMA      [mem 0x0000000000000000-0x000000002fffffff]
> [    0.000000]   Normal   empty
> [    0.000000]   HighMem  [mem 0x0000000030000000-0x000000007fffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000000000000-0x000000007fffffff]
> [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]
> [    0.000000] MMU: Allocated 1088 bytes of context maps for 255 contexts
> [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522752
> [    0.000000] Kernel command line: root=/dev/sda8 console=ttyS0,115200 console=tty1 dw_dmac_core.dyndbg dw_dmac.dyndbg

Please add ignore_log_level.

-- 
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]


#1295456 — Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2015-12-19 21:40 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHwsi-7Xj-21@gated-at.bofh.it>
In reply to#1295434
On Sat, Dec 19, 2015 at 10:16 PM, Julian Margetson <runaway@candw.ms> wrote:
> On 12/19/2015 3:07 PM, Måns Rullgård wrote:
>> Julian Margetson <runaway@candw.ms> writes:

>>> Total pages: 522752
>>> [    0.000000] Kernel command line: root=/dev/sda8 console=ttyS0,115200
>>> console=tty1 dw_dmac_core.dyndbg dw_dmac.dyndbg
>>
>> Please add ignore_log_level.
>>
> Had to truncate the kernel command line to add it.

I guess Måns meant 'ignore_loglevel'

-- 
With Best Regards,
Andy Shevchenko
--
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]


#1295460

FromMåns Rullgård <mans@mansr.com>
Date2015-12-19 21:50 +0100
Message-ID<qHwBY-814-11@gated-at.bofh.it>
In reply to#1295456
Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Sat, Dec 19, 2015 at 10:16 PM, Julian Margetson <runaway@candw.ms> wrote:
>> On 12/19/2015 3:07 PM, Måns Rullgård wrote:
>>> Julian Margetson <runaway@candw.ms> writes:
>
>>>> Total pages: 522752
>>>> [    0.000000] Kernel command line: root=/dev/sda8 console=ttyS0,115200
>>>> console=tty1 dw_dmac_core.dyndbg dw_dmac.dyndbg
>>>
>>> Please add ignore_log_level.
>>>
>> Had to truncate the kernel command line to add it.
>
> I guess Måns meant 'ignore_loglevel'

Obviously.  I can never remember where the underscores go.

-- 
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]


Page 2 of 5 — ← Prev page 1 [2] 3 4 5  Next page →

Back to top | Article view | linux.kernel


csiph-web