lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yw1xio3watjj.fsf@unicorn.mansr.com>
Date:	Fri, 18 Dec 2015 11:24:32 +0000
From:	Måns Rullgård <mans@...sr.com>
To:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:	Julian Margetson <runaway@...dw.ms>, Tejun Heo <tj@...nel.org>,
	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

Andy Shevchenko <andriy.shevchenko@...ux.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@...dw.ms> writes:
>> > 
>> > > On 12/17/2015 2:51 PM, Måns Rullgård wrote:
>> > > > Julian Margetson <runaway@...dw.ms> writes:
>> > > > 
>> > > > > On 12/17/2015 1:59 PM, Måns Rullgård wrote:
>> > > > > > Julian Margetson <runaway@...dw.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@...ian-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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ