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


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

FromJulian Margetson <runaway@candw.ms>
Date2015-12-19 21:50 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHwBY-814-19@gated-at.bofh.it>
In reply to#1295460
On 12/19/2015 4:41 PM, Måns Rullgård wrote:
> 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.
>
:-)


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


#1295636

FromMåns Rullgård <mans@mansr.com>
Date2015-12-20 18:20 +0100
Message-ID<qHPOi-3sH-17@gated-at.bofh.it>
In reply to#1295460

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

Julian Margetson <runaway@candw.ms> writes:

> On 12/19/2015 4:41 PM, Måns Rullgård wrote:
>> 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.
>
> [   18.362244] sd 3:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/465 GiB)
> [   18.372454] sd 3:0:0:0: Attached scsi generic sg3 type 0
> [   18.405433] sd 3:0:0:0: [sdc] Write Protect is off
> [   18.420654] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
> [   18.461731] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> [   18.502918] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: port=0 dma dir=from device n_elem=1
> [   18.511807] dma dma0chan0: dwc_prep_slave_sg
> [   18.516083] dma dma0chan0: scanned 1 descriptors on freelist
> [   18.521753] sata-dwc 4bffd1000.sata: dma_dwc_xfer_setup sg: 0xedeaa800, count: 1 addr: 0xfffffffff6a14400
> [   18.531327] sata-dwc 4bffd1000.sata: sata_dwc_qc_issue: tag=0 ap->link.sactive = 0x00000001 sactive=0x00000001
> [   18.541359] sata-dwc 4bffd1000.sata: sata_dwc_exec_command_by_tag cmd(0x60): READ FPDMA QUEUED tag=0
> [   18.553703] sata-dwc 4bffd1000.sata: sata_dwc_isr intpr=0x00000082 active_tag=-84148995
> [   18.561717] sata-dwc 4bffd1000.sata: sata_dwc_isr: NEWFP tag=0
> [   18.567561] sata-dwc 4bffd1000.sata: sata_dwc_bmdma_start_by_tag qc=ed2340b8 tag: 0 cmd: 0x60 dma_dir: from device start_dma? 1
> [   18.579043] sata-dwc 4bffd1000.sata: taskfile cmd: 0x60 protocol: ATA NCQ flags: 0x17 device: 40
> [   18.587836] sata-dwc 4bffd1000.sata: feature: 0x08 nsect: 0x0 lbal: 0x0 lbam: 0x0 lbah: 0x0
> [   18.596196] sata-dwc 4bffd1000.sata: hob_feature: 0x00 hob_nsect: 0x0 hob_lbal: 0x0 hob_lbam: 0x0 hob_lbah: 0x0
> [   18.606292] dma dma0chan0: dwc_tx_submit: queued 2
> [   18.611091] dma dma0chan0: dwc_dostart_first_queued: started 2
> [   48.748614] ata3: lost interrupt (Status 0x40)

Now we're getting somewhere.  The dma transfer is set up and initiated,
but then nothing happens.  Comparing the old sata_dwc driver, from
before the switch to dmaengine, with the dw_dma driver, I noticed an
obvious problem: the descriptors are filled in using the wrong byte
order.  This patch might fix that.

-- 
Måns Rullgård

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


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

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2015-12-20 18:50 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHQhk-3Cr-17@gated-at.bofh.it>
In reply to#1295636
On Sun, Dec 20, 2015 at 7:11 PM, Måns Rullgård <mans@mansr.com> wrote:
> Julian Margetson <runaway@candw.ms> writes:
>
>> On 12/19/2015 4:41 PM, Måns Rullgård wrote:
>>> 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:

>> [   18.606292] dma dma0chan0: dwc_tx_submit: queued 2
>> [   18.611091] dma dma0chan0: dwc_dostart_first_queued: started 2
>> [   48.748614] ata3: lost interrupt (Status 0x40)
>
> Now we're getting somewhere.  The dma transfer is set up and initiated,
> but then nothing happens.  Comparing the old sata_dwc driver, from
> before the switch to dmaengine, with the dw_dma driver, I noticed an
> obvious problem: the descriptors are filled in using the wrong byte
> order.

So, it means we have IO in little endian, but DMA reads data from
memory in big endian?

>  This patch might fix that.

In case it works I have to test it on AVR32.

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


#1295645

FromMåns Rullgård <mans@mansr.com>
Date2015-12-20 19:00 +0100
Message-ID<qHQr0-3FJ-9@gated-at.bofh.it>
In reply to#1295641
Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Sun, Dec 20, 2015 at 7:11 PM, Måns Rullgård <mans@mansr.com> wrote:
>> Julian Margetson <runaway@candw.ms> writes:
>>
>>> On 12/19/2015 4:41 PM, Måns Rullgård wrote:
>>>> 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:
>
>>> [   18.606292] dma dma0chan0: dwc_tx_submit: queued 2
>>> [   18.611091] dma dma0chan0: dwc_dostart_first_queued: started 2
>>> [   48.748614] ata3: lost interrupt (Status 0x40)
>>
>> Now we're getting somewhere.  The dma transfer is set up and initiated,
>> but then nothing happens.  Comparing the old sata_dwc driver, from
>> before the switch to dmaengine, with the dw_dma driver, I noticed an
>> obvious problem: the descriptors are filled in using the wrong byte
>> order.
>
> So, it means we have IO in little endian, but DMA reads data from
> memory in big endian?

No, it means the IO is little endian, and the DMA reads from memory in
little endian while the host CPU is big endian.

>>  This patch might fix that.
>
> In case it works I have to test it on AVR32.

Unless I made a mistake, there should be no difference there.  Still got
to test it of course.

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


#1295667

FromMåns Rullgård <mans@mansr.com>
Date2015-12-20 19:50 +0100
Message-ID<qHRdo-4eM-19@gated-at.bofh.it>
In reply to#1295636
Julian Margetson <runaway@candw.ms> writes:

> On 12/20/2015 1:11 PM, Måns Rullgård wrote:
>> Julian Margetson <runaway@candw.ms> writes:
>>
>>> On 12/19/2015 4:41 PM, Måns Rullgård wrote:
>>>> 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.
>>> [   18.362244] sd 3:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/465 GiB)
>>> [   18.372454] sd 3:0:0:0: Attached scsi generic sg3 type 0
>>> [   18.405433] sd 3:0:0:0: [sdc] Write Protect is off
>>> [   18.420654] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
>>> [   18.461731] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
>>> [   18.502918] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: port=0 dma dir=from device n_elem=1
>>> [   18.511807] dma dma0chan0: dwc_prep_slave_sg
>>> [   18.516083] dma dma0chan0: scanned 1 descriptors on freelist
>>> [   18.521753] sata-dwc 4bffd1000.sata: dma_dwc_xfer_setup sg: 0xedeaa800, count: 1 addr: 0xfffffffff6a14400
>>> [   18.531327] sata-dwc 4bffd1000.sata: sata_dwc_qc_issue: tag=0 ap->link.sactive = 0x00000001 sactive=0x00000001
>>> [   18.541359] sata-dwc 4bffd1000.sata: sata_dwc_exec_command_by_tag cmd(0x60): READ FPDMA QUEUED tag=0
>>> [   18.553703] sata-dwc 4bffd1000.sata: sata_dwc_isr intpr=0x00000082 active_tag=-84148995
>>> [   18.561717] sata-dwc 4bffd1000.sata: sata_dwc_isr: NEWFP tag=0
>>> [   18.567561] sata-dwc 4bffd1000.sata: sata_dwc_bmdma_start_by_tag qc=ed2340b8 tag: 0 cmd: 0x60 dma_dir: from device start_dma? 1
>>> [   18.579043] sata-dwc 4bffd1000.sata: taskfile cmd: 0x60 protocol: ATA NCQ flags: 0x17 device: 40
>>> [   18.587836] sata-dwc 4bffd1000.sata: feature: 0x08 nsect: 0x0 lbal: 0x0 lbam: 0x0 lbah: 0x0
>>> [   18.596196] sata-dwc 4bffd1000.sata: hob_feature: 0x00 hob_nsect: 0x0 hob_lbal: 0x0 hob_lbam: 0x0 hob_lbah: 0x0
>>> [   18.606292] dma dma0chan0: dwc_tx_submit: queued 2
>>> [   18.611091] dma dma0chan0: dwc_dostart_first_queued: started 2
>>> [   48.748614] ata3: lost interrupt (Status 0x40)
>> Now we're getting somewhere.  The dma transfer is set up and initiated,
>> but then nothing happens.  Comparing the old sata_dwc driver, from
>> before the switch to dmaengine, with the dw_dma driver, I noticed an
>> obvious problem: the descriptors are filled in using the wrong byte
>> order.  This patch might fix that.
>
> [   18.534844] ata3.00: configured for UDMA/133
> [   18.538182] scsi 3:0:0:0: Direct-Access     ATA      WDC WD5000AAKS-0 3B01 PQ: 0 ANSI: 5
> [   18.539025] sd 3:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/465 GiB)
> [   18.539236] sd 3:0:0:0: [sdc] Write Protect is off
> [   18.539245] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
> [   18.539338] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> [   18.540049] sd 3:0:0:0: Attached scsi generic sg3 type 0
> [   18.540362] sata-dwc 4bffd1000.sata: sata_dwc_qc_prep_by_tag: port=0 dma dir=from device n_elem=1
> [   18.540370] dma dma0chan0: dwc_prep_slave_sg
> [   18.540378] dma dma0chan0: scanned 1 descriptors on freelist
> [   18.540387] sata-dwc 4bffd1000.sata: dma_dwc_xfer_setup sg: 0xed37f200, count: 1 addr: 0xfffffffff6a18400
> [   18.540395] sata-dwc 4bffd1000.sata: sata_dwc_qc_issue: tag=0 ap->link.sactive = 0x00000001 sactive=0x00000001
> [   18.540426] sata-dwc 4bffd1000.sata: sata_dwc_exec_command_by_tag cmd(0x60): READ FPDMA QUEUED tag=0
> [   18.556592] sata-dwc 4bffd1000.sata: sata_dwc_isr intpr=0x00000082 active_tag=-84148995
> [   18.556599] sata-dwc 4bffd1000.sata: sata_dwc_isr: NEWFP tag=0
> [   18.556609] sata-dwc 4bffd1000.sata: sata_dwc_bmdma_start_by_tag qc=ed2180b8 tag: 0 cmd: 0x60 dma_dir: from device start_dma? 1
> [   18.556616] sata-dwc 4bffd1000.sata: taskfile cmd: 0x60 protocol: ATA NCQ flags: 0x17 device: 40
> [   18.556623] sata-dwc 4bffd1000.sata: feature: 0x08 nsect: 0x0 lbal: 0x0 lbam: 0x0 lbah: 0x0
> [   18.556631] sata-dwc 4bffd1000.sata: hob_feature: 0x00 hob_nsect: 0x0 hob_lbal: 0x0 hob_lbam: 0x0 hob_lbah: 0x0
> [   18.556639] dma dma0chan0: dwc_tx_submit: queued 2
> [   18.556646] dma dma0chan0: dwc_dostart_first_queued: started 2
> [   48.748634] ata3: lost interrupt (Status 0x40)
> [   48.753465] sata-dwc 4bffd1000.sata: sata_dwc_scr_read: id=3 reg=1 val=val=0x00000000
> [   48.761369] ata3.00: exception Emask 0x0 SAct 0x1 SErr 0x0 action 0x6 frozen
> [   48.769671] ata3.00: failed command: READ FPDMA QUEUED

Well, that didn't help.  I still think it's part of the problem, but
something else must be wrong as well.  The various Master Select fields
look like a good place to start.  Also, the manual says the LLP_SRC_EN
and LLP_DST_EN flags should be cleared on the last in a chain of blocks.
The old sata_dwc driver does this whereas dw_dma does not.

It might be worthwhile to try reverting drivers/ata/sata_dwc_460ex.c to
v4.0 (leaving the rest at 4.4-rc5) just to make sure that's a good
reference.  I've verified that this builds.

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


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

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2015-12-20 21:20 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHSCv-5gG-27@gated-at.bofh.it>
In reply to#1295667
On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com> wrote:
> Julian Margetson <runaway@candw.ms> writes:
>> On 12/20/2015 1:11 PM, Måns Rullgård wrote:
>>> Julian Margetson <runaway@candw.ms> writes:

>> [   48.769671] ata3.00: failed command: READ FPDMA QUEUED
>
> Well, that didn't help.  I still think it's part of the problem, but
> something else must be wrong as well.  The various Master Select fields
> look like a good place to start.

Master number (which is here would be either 1 or 0) should not affect
as long as they are connected to the same AHB bus (I would be
surprised if they are not).

>  Also, the manual says the LLP_SRC_EN
> and LLP_DST_EN flags should be cleared on the last in a chain of blocks.
> The old sata_dwc driver does this whereas dw_dma does not.

Easy to fix, however I can't get how it might affect.

> It might be worthwhile to try reverting drivers/ata/sata_dwc_460ex.c to
> v4.0 (leaving the rest at 4.4-rc5) just to make sure that's a good
> reference.  I've verified that this builds.

It would be nice.

I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
items on this board, however registers for SATA program it to 64. I
remember that I got no interrupt when I programmed transfer width
wrongly (64 bits against 32 bits) when I ported dw_dmac to be used on
Intel SoCs.


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


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

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2015-12-20 22:00 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qHTfc-5yd-17@gated-at.bofh.it>
In reply to#1295674
On Sun, Dec 20, 2015 at 10:17 PM, Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com> wrote:
>> Julian Margetson <runaway@candw.ms> writes:
>>> On 12/20/2015 1:11 PM, Måns Rullgård wrote:
>>>> Julian Margetson <runaway@candw.ms> writes:
>
>>> [   48.769671] ata3.00: failed command: READ FPDMA QUEUED
>>
>> Well, that didn't help.  I still think it's part of the problem, but
>> something else must be wrong as well.  The various Master Select fields
>> look like a good place to start.
>
> Master number (which is here would be either 1 or 0) should not affect
> as long as they are connected to the same AHB bus (I would be
> surprised if they are not).
>
>>  Also, the manual says the LLP_SRC_EN
>> and LLP_DST_EN flags should be cleared on the last in a chain of blocks.
>> The old sata_dwc driver does this whereas dw_dma does not.
>
> Easy to fix, however I can't get how it might affect.
>
>> It might be worthwhile to try reverting drivers/ata/sata_dwc_460ex.c to
>> v4.0 (leaving the rest at 4.4-rc5) just to make sure that's a good
>> reference.  I've verified that this builds.
>
> It would be nice.
>
> I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
> items on this board, however registers for SATA program it to 64. I
> remember that I got no interrupt when I programmed transfer width
> wrongly (64 bits against 32 bits) when I ported dw_dmac to be used on
> Intel SoCs.

One more thing, I have a patch to monitor DMA IO, we may check what
exactly the values are written / read  in DMA. I can share it
tomorrow.

P.S. I also noticed that original driver enables interrupt per each
block and sets protection control bits.

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


#1295731

FromMåns Rullgård <mans@mansr.com>
Date2015-12-21 02:20 +0100
Message-ID<qHXiN-8gH-3@gated-at.bofh.it>
In reply to#1295683
Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Sun, Dec 20, 2015 at 10:17 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
>> On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com> wrote:
>>> Julian Margetson <runaway@candw.ms> writes:
>>>> On 12/20/2015 1:11 PM, Måns Rullgård wrote:
>>>>> Julian Margetson <runaway@candw.ms> writes:
>>
>>>> [   48.769671] ata3.00: failed command: READ FPDMA QUEUED
>>>
>>> Well, that didn't help.  I still think it's part of the problem, but
>>> something else must be wrong as well.  The various Master Select fields
>>> look like a good place to start.
>>
>> Master number (which is here would be either 1 or 0) should not affect
>> as long as they are connected to the same AHB bus (I would be
>> surprised if they are not).
>>
>>>  Also, the manual says the LLP_SRC_EN
>>> and LLP_DST_EN flags should be cleared on the last in a chain of blocks.
>>> The old sata_dwc driver does this whereas dw_dma does not.
>>
>> Easy to fix, however I can't get how it might affect.
>>
>>> It might be worthwhile to try reverting drivers/ata/sata_dwc_460ex.c to
>>> v4.0 (leaving the rest at 4.4-rc5) just to make sure that's a good
>>> reference.  I've verified that this builds.
>>
>> It would be nice.
>>
>> I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
>> items on this board, however registers for SATA program it to 64. I
>> remember that I got no interrupt when I programmed transfer width
>> wrongly (64 bits against 32 bits) when I ported dw_dmac to be used on
>> Intel SoCs.
>
> One more thing, I have a patch to monitor DMA IO, we may check what
> exactly the values are written / read  in DMA. I can share it
> tomorrow.
>
> P.S. I also noticed that original driver enables interrupt per each
> block

And then ignores all but the transfer complete interrupt.

> and sets protection control bits.

With no indication what the value it sets is supposed to mean.

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


#1296156 — 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-21 20:10 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qIe0i-220-19@gated-at.bofh.it>
In reply to#1295731
On Mon, 2015-12-21 at 01:19 +0000, Måns Rullgård wrote:
> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> 
> > P.S. I also noticed that original driver enables interrupt per each
> > block
> 
> And then ignores all but the transfer complete interrupt.
> 
> > and sets protection control bits.
> 
> With no indication what the value it sets is supposed to mean.

Okay, let's summarize what we have:

0. AR: Get a working reference for PPC 460EX SATA driver
1. AR: Clear LLP_EN bits at the last block of LLP transfer
2. AR: Rename masters to 'memory' and 'peripheral' and change them per
DMA direction
3. AR: Set LMS (LLP master) to 'memory' when do LLP transfers
4. CHECK: PROTCTL bit (documentation says that recommended value is
0x01)
5. CHECK: Other bits in CFG register (FIFO_MODE, FCMODE)
6. CHECK: Block interrupts vs. one interrupt at the end of block chain
(Måns, I missed how any of them is ignored)
7. AR: Test everything on Intel SoCs such as Baytrail, CherryTrail, etc
(SPI, UART, dmatest), AVR32 (MMC, dmatest), PPC 460EX (Onboard SATA)


I can share my working branch with a set of patches regarding to
dw_dmac. We may do our work based on that code and after I'll submit
everything to upstream. Does it sound okay for you, guys?

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


#1296167

FromMåns Rullgård <mans@mansr.com>
Date2015-12-21 20:30 +0100
Message-ID<qIejE-28Y-9@gated-at.bofh.it>
In reply to#1296156
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> On Mon, 2015-12-21 at 01:19 +0000, Måns Rullgård wrote:
>> Andy Shevchenko <andy.shevchenko@gmail.com> writes:
>> 
>> > P.S. I also noticed that original driver enables interrupt per each
>> > block
>> 
>> And then ignores all but the transfer complete interrupt.
>> 
>> > and sets protection control bits.
>> 
>> With no indication what the value it sets is supposed to mean.
>
> Okay, let's summarize what we have:
>
> 0. AR: Get a working reference for PPC 460EX SATA driver

Do we consider Julian's latest result working?

> 1. AR: Clear LLP_EN bits at the last block of LLP transfer

Patch sent.

> 2. AR: Rename masters to 'memory' and 'peripheral' and change them per
> DMA direction

Good idea.  I'd call them memory and device though to match existing
dmaengine nomenclature.

> 3. AR: Set LMS (LLP master) to 'memory' when do LLP transfers

I started working on a patch for that already.

> 4. CHECK: PROTCTL bit (documentation says that recommended value is
> 0x01)

Any idea what the value of 0x3 used by the old sata driver means?
Presumably that's decided by the bus.

> 5. CHECK: Other bits in CFG register (FIFO_MODE, FCMODE)
> 6. CHECK: Block interrupts vs. one interrupt at the end of block chain
> (Måns, I missed how any of them is ignored)

The interrupt handler looks at the StatusTfr and StatusErr registers and
ignores StatusBlock.

> 7. AR: Test everything on Intel SoCs such as Baytrail, CherryTrail, etc
> (SPI, UART, dmatest), AVR32 (MMC, dmatest), PPC 460EX (Onboard SATA)

I can test on AVR32.  That is as far as I know the only system I have
with this DMA engine.

> I can share my working branch with a set of patches regarding to
> dw_dmac. We may do our work based on that code and after I'll submit
> everything to upstream. Does it sound okay for you, guys?

I'm going away for the holidays, so I won't be able to do any serious
work on this until January, but I'll keep an eye on emails and may even
reply occasionally.  Before I go, I'll publish my patches so far
whatever shape they're in.

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


#1296204 — 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-21 22:00 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qIfIJ-2Wh-3@gated-at.bofh.it>
In reply to#1296167
On Mon, 2015-12-21 at 19:27 +0000, Måns Rullgård wrote:
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
> 
> > On Mon, 2015-12-21 at 01:19 +0000, Måns Rullgård wrote:
> > > Andy Shevchenko <andy.shevchenko@gmail.com> writes:
> > >  
> > > > P.S. I also noticed that original driver enables interrupt per
> > > > each
> > > > block
> > > 
> > > And then ignores all but the transfer complete interrupt.
> > > 
> > > > and sets protection control bits.
> > > 
> > > With no indication what the value it sets is supposed to mean.
> > 
> > Okay, let's summarize what we have:
> > 
> > 0. AR: Get a working reference for PPC 460EX SATA driver
> 
> Do we consider Julian's latest result working?

I think so.

> 
> > 1. AR: Clear LLP_EN bits at the last block of LLP transfer
> 
> Patch sent.

Acked.

> 
> > 2. AR: Rename masters to 'memory' and 'peripheral' and change them
> > per
> > DMA direction
> 
> Good idea.  I'd call them memory and device though to match existing
> dmaengine nomenclature.

I remember how I called in my patch. So, there is no problem to rename,
but will see.

> 
> > 3. AR: Set LMS (LLP master) to 'memory' when do LLP transfers
> 
> I started working on a patch for that already.

Thanks.

> 
> > 4. CHECK: PROTCTL bit (documentation says that recommended value is
> > 0x01)
> 
> Any idea what the value of 0x3 used by the old sata driver means?
> Presumably that's decided by the bus.

Nope, documentation says that it is direct representation of hprot[3:1]
wires on the master interface. Also it refers to AMBA spec, so, if you
have access to AMBA spec I think we might get it from there.

> 
> > 5. CHECK: Other bits in CFG register (FIFO_MODE, FCMODE)
> > 6. CHECK: Block interrupts vs. one interrupt at the end of block
> > chain
> > (Måns, I missed how any of them is ignored)
> 
> The interrupt handler looks at the StatusTfr and StatusErr registers
> and
> ignores StatusBlock.

I have to refresh my memory, since BLOCK interrupts should be enabled
(unmasked) separately. I have forgotten which type of interrupt is
generated in this case, BLOCK, or XFER after each block, or only one
XFER at the last block (LLP.LOC = 0) and BLOCK are ignored. So, will
check later.

> 
> > 7. AR: Test everything on Intel SoCs such as Baytrail, CherryTrail,
> > etc
> > (SPI, UART, dmatest), AVR32 (MMC, dmatest), PPC 460EX (Onboard
> > SATA)
> 
> I can test on AVR32.  That is as far as I know the only system I have
> with this DMA engine.

If you have Intel Haswell, BayTrail, Braswell, CherryTrail, Broadwell,
you have it as well as long you have LPSS block there. (Most of them
are Atoms).

> 
> > I can share my working branch with a set of patches regarding to
> > dw_dmac. We may do our work based on that code and after I'll
> > submit
> > everything to upstream. Does it sound okay for you, guys?
> 
> I'm going away for the holidays, so I won't be able to do any serious
> work on this until January, but I'll keep an eye on emails and may
> even
> reply occasionally.  Before I go, I'll publish my patches so far
> whatever shape they're in.

Okay, thanks! I will include them in my branch which I'm going to
publish on GitHUB.

Happy holidays!

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


#1296210

FromMåns Rullgård <mans@mansr.com>
Date2015-12-21 22:10 +0100
Message-ID<qIfSq-3eT-13@gated-at.bofh.it>
In reply to#1296204
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

>> > 4. CHECK: PROTCTL bit (documentation says that recommended value is
>> > 0x01)
>> 
>> Any idea what the value of 0x3 used by the old sata driver means?
>> Presumably that's decided by the bus.
>
> Nope, documentation says that it is direct representation of hprot[3:1]
> wires on the master interface. Also it refers to AMBA spec, so, if you
> have access to AMBA spec I think we might get it from there.

That's assuming AMCC didn't change something.

>> > 5. CHECK: Other bits in CFG register (FIFO_MODE, FCMODE)
>> > 6. CHECK: Block interrupts vs. one interrupt at the end of block
>> > chain
>> > (Måns, I missed how any of them is ignored)
>> 
>> The interrupt handler looks at the StatusTfr and StatusErr registers
>> and ignores StatusBlock.
>
> I have to refresh my memory, since BLOCK interrupts should be enabled
> (unmasked) separately. I have forgotten which type of interrupt is
> generated in this case, BLOCK, or XFER after each block, or only one
> XFER at the last block (LLP.LOC = 0) and BLOCK are ignored. So, will
> check later.

I interpreted the, admittedly a bit vague, documentation as meaning
BLOCK interrupts are signalled after each block and XFER interrupts
after the last block.

>> > 7. AR: Test everything on Intel SoCs such as Baytrail, CherryTrail,
>> > etc (SPI, UART, dmatest), AVR32 (MMC, dmatest), PPC 460EX (Onboard
>> > SATA)
>> 
>> I can test on AVR32.  That is as far as I know the only system I have
>> with this DMA engine.
>
> If you have Intel Haswell, BayTrail, Braswell, CherryTrail, Broadwell,
> you have it as well as long you have LPSS block there. (Most of them
> are Atoms).

I don't have any of those (or any Atom hardware).

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


#1296354

FromMåns Rullgård <mans@mansr.com>
Date2015-12-22 01:10 +0100
Message-ID<qIiGC-50N-7@gated-at.bofh.it>
In reply to#1296204
Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> On Mon, 2015-12-21 at 19:27 +0000, Måns Rullgård wrote:
>> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>> 
>> > I can share my working branch with a set of patches regarding to
>> > dw_dmac. We may do our work based on that code and after I'll
>> > submit
>> > everything to upstream. Does it sound okay for you, guys?
>> 
>> I'm going away for the holidays, so I won't be able to do any serious
>> work on this until January, but I'll keep an eye on emails and may
>> even reply occasionally.  Before I go, I'll publish my patches so far
>> whatever shape they're in.
>
> Okay, thanks! I will include them in my branch which I'm going to
> publish on GitHUB.

Here's what I have: https://bitbucket.org/mansr/linux-dwc
Bitbucket because Github won't let me have more than one Linux
repo.

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


#1296718 — 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-22 12:00 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qIsPE-2RN-3@gated-at.bofh.it>
In reply to#1296354
On Tue, 2015-12-22 at 00:08 +0000, Måns Rullgård wrote:
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
> 
> > On Mon, 2015-12-21 at 19:27 +0000, Måns Rullgård wrote:
> > > Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
> > > 
> > > > I can share my working branch with a set of patches regarding
> > > > to
> > > > dw_dmac. We may do our work based on that code and after I'll
> > > > submit
> > > > everything to upstream. Does it sound okay for you, guys?
> > > 
> > > I'm going away for the holidays, so I won't be able to do any
> > > serious
> > > work on this until January, but I'll keep an eye on emails and
> > > may
> > > even reply occasionally.  Before I go, I'll publish my patches so
> > > far
> > > whatever shape they're in.
> > 
> > Okay, thanks! I will include them in my branch which I'm going to
> > publish on GitHUB.
> 
> Here's what I have: https://bitbucket.org/mansr/linux-dwc
> Bitbucket because Github won't let me have more than one Linux
> repo.

Thanks, got it.

Will base my stuff on what you had done already.

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


#1296081 — 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-21 18:00 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qIbYv-zb-35@gated-at.bofh.it>
In reply to#1295683

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

On Sun, 2015-12-20 at 22:55 +0200, Andy Shevchenko wrote:
> On Sun, Dec 20, 2015 at 10:17 PM, Andy Shevchenko
> <andy.shevchenko@gmail.com> wrote:
> > On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com>
> > wrote:
> > I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
> > items on this board, however registers for SATA program it to 64. I
> > remember that I got no interrupt when I programmed transfer width
> > wrongly (64 bits against 32 bits) when I ported dw_dmac to be used
> > on
> > Intel SoCs.
> 
> One more thing, I have a patch to monitor DMA IO, we may check what
> exactly the values are written / read  in DMA. I can share it
> tomorrow.

As promised the patch I have to debug IO of DW DMA. Didn't check though
if it applies cleanly on top of recent vanilla kernel.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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


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

FromJulian Margetson <runaway@candw.ms>
Date2015-12-21 18:30 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qIcrx-Yd-33@gated-at.bofh.it>
In reply to#1296081
On 12/21/2015 12:48 PM, Andy Shevchenko wrote:
> On Sun, 2015-12-20 at 22:55 +0200, Andy Shevchenko wrote:
>> On Sun, Dec 20, 2015 at 10:17 PM, Andy Shevchenko
>> <andy.shevchenko@gmail.com> wrote:
>>> On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com>
>>> wrote:
>>> I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
>>> items on this board, however registers for SATA program it to 64. I
>>> remember that I got no interrupt when I programmed transfer width
>>> wrongly (64 bits against 32 bits) when I ported dw_dmac to be used
>>> on
>>> Intel SoCs.
>> One more thing, I have a patch to monitor DMA IO, we may check what
>> exactly the values are written / read  in DMA. I can share it
>> tomorrow.
> As promised the patch I have to debug IO of DW DMA. Didn't check though
> if it applies cleanly on top of recent vanilla kernel.
>
patch -p1 -R <../0001-dw_dmac-debug-dma-controller-IO.patch
patching file drivers/dma/dw/core.c
Hunk #1 succeeded at 543 (offset -27 lines).
Hunk #2 FAILED at 1571.
Hunk #3 FAILED at 1717.
2 out of 3 hunks FAILED -- saving rejects to file drivers/dma/dw/core.c.rej
patching file drivers/dma/dw/regs.h
Hunk #1 succeeded at 114 (offset -16 lines).
Hunk #2 succeeded at 262 (offset -39 lines).
Hunk #3 succeeded at 293 (offset -40 lines).
root@julian-VirtualBox:/usr/src/linux-test# patch -p1 
<../0001-dw_dmac-debug-dma-controller-IO.patch
patching file drivers/dma/dw/core.c
Hunk #1 succeeded at 543 (offset -27 lines).
Hunk #2 FAILED at 1572.
Hunk #3 FAILED at 1716.
2 out of 3 hunks FAILED -- saving rejects to file drivers/dma/dw/core.c.rej
patching file drivers/dma/dw/regs.h
Hunk #1 succeeded at 114 (offset -16 lines).
Hunk #2 succeeded at 264 (offset -39 lines).
Hunk #3 succeeded at 307 (offset -40 lines).


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


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

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2015-12-21 19:00 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qIcUy-17Y-23@gated-at.bofh.it>
In reply to#1296081
On Mon, Dec 21, 2015 at 7:26 PM, Julian Margetson <runaway@candw.ms> wrote:
> On 12/21/2015 12:48 PM, Andy Shevchenko wrote:
>>
>> On Sun, 2015-12-20 at 22:55 +0200, Andy Shevchenko wrote:
>>>
>>> On Sun, Dec 20, 2015 at 10:17 PM, Andy Shevchenko
>>> <andy.shevchenko@gmail.com> wrote:
>>>>
>>>> On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com>
>>>> wrote:
>>>> I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
>>>> items on this board, however registers for SATA program it to 64. I
>>>> remember that I got no interrupt when I programmed transfer width
>>>> wrongly (64 bits against 32 bits) when I ported dw_dmac to be used
>>>> on
>>>> Intel SoCs.
>>>
>>> One more thing, I have a patch to monitor DMA IO, we may check what
>>> exactly the values are written / read  in DMA. I can share it
>>> tomorrow.
>>
>> As promised the patch I have to debug IO of DW DMA. Didn't check though
>> if it applies cleanly on top of recent vanilla kernel.

So, the original driver (with patch from Måns) works, right?

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


#1296134

FromMåns Rullgård <mans@mansr.com>
Date2015-12-21 19:30 +0100
Message-ID<qIdnA-1xE-5@gated-at.bofh.it>
In reply to#1296125
Andy Shevchenko <andy.shevchenko@gmail.com> writes:

> On Mon, Dec 21, 2015 at 7:26 PM, Julian Margetson <runaway@candw.ms> wrote:
>> On 12/21/2015 12:48 PM, Andy Shevchenko wrote:
>>>
>>> On Sun, 2015-12-20 at 22:55 +0200, Andy Shevchenko wrote:
>>>>
>>>> On Sun, Dec 20, 2015 at 10:17 PM, Andy Shevchenko
>>>> <andy.shevchenko@gmail.com> wrote:
>>>>>
>>>>> On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com>
>>>>> wrote:
>>>>> I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
>>>>> items on this board, however registers for SATA program it to 64. I
>>>>> remember that I got no interrupt when I programmed transfer width
>>>>> wrongly (64 bits against 32 bits) when I ported dw_dmac to be used
>>>>> on
>>>>> Intel SoCs.
>>>>
>>>> One more thing, I have a patch to monitor DMA IO, we may check what
>>>> exactly the values are written / read  in DMA. I can share it
>>>> tomorrow.
>>>
>>> As promised the patch I have to debug IO of DW DMA. Didn't check though
>>> if it applies cleanly on top of recent vanilla kernel.
>
> So, the original driver (with patch from Måns) works, right?

Looks that way to me.  At least it's able to read the partition table.
What happens after that is hard to tell, but I don't see any obvious
errors.

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


#1296139

FromMåns Rullgård <mans@mansr.com>
Date2015-12-21 19:30 +0100
Message-ID<qIdnB-1xE-31@gated-at.bofh.it>
In reply to#1296125
Julian Margetson <runaway@candw.ms> writes:

> On 12/21/2015 1:55 PM, Andy Shevchenko wrote:
>> On Mon, Dec 21, 2015 at 7:26 PM, Julian Margetson <runaway@candw.ms> wrote:
>>> On 12/21/2015 12:48 PM, Andy Shevchenko wrote:
>>>> On Sun, 2015-12-20 at 22:55 +0200, Andy Shevchenko wrote:
>>>>> On Sun, Dec 20, 2015 at 10:17 PM, Andy Shevchenko
>>>>> <andy.shevchenko@gmail.com> wrote:
>>>>>> On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com>
>>>>>> wrote:
>>>>>> I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
>>>>>> items on this board, however registers for SATA program it to 64. I
>>>>>> remember that I got no interrupt when I programmed transfer width
>>>>>> wrongly (64 bits against 32 bits) when I ported dw_dmac to be used
>>>>>> on
>>>>>> Intel SoCs.
>>>>> One more thing, I have a patch to monitor DMA IO, we may check what
>>>>> exactly the values are written / read  in DMA. I can share it
>>>>> tomorrow.
>>>> As promised the patch I have to debug IO of DW DMA. Didn't check though
>>>> if it applies cleanly on top of recent vanilla kernel.
>> So, the original driver (with patch from Måns) works, right?
>>
> The hard drive is recognized .
> These system gets unresponsive with USB devices like the mouse and
> keyboard not responding  when I start Gparted.

Did you disable the SATA and DMA debug 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]


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

FromJulian Margetson <runaway@candw.ms>
Date2015-12-21 20:10 +0100
SubjectRe: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel
Message-ID<qIe0i-220-17@gated-at.bofh.it>
In reply to#1296139
On 12/21/2015 2:27 PM, Måns Rullgård wrote:
> Julian Margetson <runaway@candw.ms> writes:
>
>> On 12/21/2015 1:55 PM, Andy Shevchenko wrote:
>>> On Mon, Dec 21, 2015 at 7:26 PM, Julian Margetson <runaway@candw.ms> wrote:
>>>> On 12/21/2015 12:48 PM, Andy Shevchenko wrote:
>>>>> On Sun, 2015-12-20 at 22:55 +0200, Andy Shevchenko wrote:
>>>>>> On Sun, Dec 20, 2015 at 10:17 PM, Andy Shevchenko
>>>>>> <andy.shevchenko@gmail.com> wrote:
>>>>>>> On Sun, Dec 20, 2015 at 8:49 PM, Måns Rullgård <mans@mansr.com>
>>>>>>> wrote:
>>>>>>> I noticed thanks to DWC_PARAMS that burst size is hardcoded to 32
>>>>>>> items on this board, however registers for SATA program it to 64. I
>>>>>>> remember that I got no interrupt when I programmed transfer width
>>>>>>> wrongly (64 bits against 32 bits) when I ported dw_dmac to be used
>>>>>>> on
>>>>>>> Intel SoCs.
>>>>>> One more thing, I have a patch to monitor DMA IO, we may check what
>>>>>> exactly the values are written / read  in DMA. I can share it
>>>>>> tomorrow.
>>>>> As promised the patch I have to debug IO of DW DMA. Didn't check though
>>>>> if it applies cleanly on top of recent vanilla kernel.
>>> So, the original driver (with patch from Måns) works, right?
>>>
>> The hard drive is recognized .
>> These system gets unresponsive with USB devices like the mouse and
>> keyboard not responding  when I start Gparted.
> Did you disable the SATA and DMA debug messages?
>
Ah. Will try with debug disabled.


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

Back to top | Article view | linux.kernel


csiph-web