Re: [PATCH v3 0/7] mmc: bcm2835: Add new driver for the sdhost controller

2017-03-15 Thread Peter Robinson
On Wed, Mar 15, 2017 at 8:21 AM, Gerd Hoffmann  wrote:
>   Hi,
>
>> First the flipping of the mmc host driver for the SD card slot will
>> cause issues for users that build it as a module. When I tested this
>> on Fedora the first update I ended up with a system that didn't boot.
>
> Yep, switching drivers is a pain point here indeed.
>
> Possibly we could fix that by adding a MODULE_SOFTDEP() to the iproc
> driver?  Comments?  Better ideas?
>
>> Also i often see the device hang for a long period when systemd probes
>> for rfkill status, sometimes it needs to be reset but it generally
>> gets there.
>
> What device is that?  rpi3 with wifi?

Yes, RPi3, with the brcmfmac43430-sdio.txt added so the firmware
loads, interface works.

>> [6.529079] Hardware name: Generic DT based system
>> [6.529106] [] (unwind_backtrace) from []
>> (show_stack+0x18/0x1c)
>> [6.529122] [] (show_stack) from []
>> (dump_stack+0x80/0xa0)
>> [6.529137] [] (dump_stack) from [] 
>> (__warn+0xe4/0x104)
>> [6.529150] [] (__warn) from []
>> (warn_slowpath_fmt+0x3c/0x4c)
>> [6.529166] [] (warn_slowpath_fmt) from []
>> (check_flush_dependency+0xac/0x134)
>> [6.529184] [] (check_flush_dependency) from []
>> (flush_work+0xa0/0x178)
>> [6.529201] [] (flush_work) from []
>> (drain_all_pages+0x1a8/0x1cc)
>> [6.529221] [] (drain_all_pages) from []
>> (start_isolate_page_range+0x168/0x1b4)
>> [6.529239] [] (start_isolate_page_range) from
>> [] (alloc_contig_range+0xd4/0x314)
>> [6.529258] [] (alloc_contig_range) from []
>> (cma_alloc+0x188/0x300)
>> [6.529275] [] (cma_alloc) from []
>> (__alloc_from_contiguous+0x40/0xd8)
>> [6.529290] [] (__alloc_from_contiguous) from
>> [] (cma_allocator_alloc+0x3c/0x44)
>> [6.529303] [] (cma_allocator_alloc) from []
>> (__dma_alloc+0x1d4/0x2f0)
>> [6.529317] [] (__dma_alloc) from []
>> (arm_dma_alloc+0x3c/0x48)
>> [6.529331] [] (arm_dma_alloc) from []
>> (dma_pool_alloc+0x124/0x240)
>> [6.529356] [] (dma_pool_alloc) from []
>> (bcm2835_dma_create_cb_chain+0xb0/0x1dc [bcm2835_dma])
>> [6.529385] [] (bcm2835_dma_create_cb_chain
>> [bcm2835_dma]) from [] (bcm2835_dma_prep_slave_sg+0xf0/0x25c
>> [bcm2835_dma])
>> [6.529418] [] (bcm2835_dma_prep_slave_sg [bcm2835_dma])
>> from [] (bcm2835_request+0x2a4/0x3f4 [bcm2835])
>> [6.529548] [] (bcm2835_request [bcm2835]) from
>> [] (mmc_start_request+0x1f8/0x264 [mmc_core])
>> [6.529756] [] (mmc_start_request [mmc_core]) from
>> [] (mmc_start_areq+0x2c8/0x318 [mmc_core])
>> [6.529890] [] (mmc_start_areq [mmc_core]) from
>> [] (mmc_blk_issue_rw_rq+0xc0/0x308 [mmc_block])
>> [6.529943] [] (mmc_blk_issue_rw_rq [mmc_block]) from
>> [] (mmc_blk_issue_rq+0x418/0x428 [mmc_block])
>> [6.529997] [] (mmc_blk_issue_rq [mmc_block]) from
>> [] (mmc_queue_thread+0x148/0x1bc [mmc_block])
>> [6.530031] [] (mmc_queue_thread [mmc_block]) from
>> [] (kthread+0x120/0x138)
>> [6.530049] [] (kthread) from []
>> (ret_from_fork+0x14/0x3c)
>> [6.530055] ---[ end trace 221a5a14ca55fa22 ]---
>> [6.545765]  mmcblk0: p1 p2 p3 p4
>> [6.566015] random: fast init done
>> [6.623699] mmc1: new high speed SDIO card at address 0001
>
> Looks more like a cma allocator issue on a quick glance.

Possibly, but only started once I added the dma drive into the initrd
and happens right when the MMC driver loads, we're not even past
switch root which is long before loading the vc4 driver which is the
main cma consumer.


Re: [PATCH v3 0/7] mmc: bcm2835: Add new driver for the sdhost controller

2017-03-15 Thread Peter Robinson
On Wed, Mar 15, 2017 at 8:21 AM, Gerd Hoffmann  wrote:
>   Hi,
>
>> First the flipping of the mmc host driver for the SD card slot will
>> cause issues for users that build it as a module. When I tested this
>> on Fedora the first update I ended up with a system that didn't boot.
>
> Yep, switching drivers is a pain point here indeed.
>
> Possibly we could fix that by adding a MODULE_SOFTDEP() to the iproc
> driver?  Comments?  Better ideas?
>
>> Also i often see the device hang for a long period when systemd probes
>> for rfkill status, sometimes it needs to be reset but it generally
>> gets there.
>
> What device is that?  rpi3 with wifi?

Yes, RPi3, with the brcmfmac43430-sdio.txt added so the firmware
loads, interface works.

>> [6.529079] Hardware name: Generic DT based system
>> [6.529106] [] (unwind_backtrace) from []
>> (show_stack+0x18/0x1c)
>> [6.529122] [] (show_stack) from []
>> (dump_stack+0x80/0xa0)
>> [6.529137] [] (dump_stack) from [] 
>> (__warn+0xe4/0x104)
>> [6.529150] [] (__warn) from []
>> (warn_slowpath_fmt+0x3c/0x4c)
>> [6.529166] [] (warn_slowpath_fmt) from []
>> (check_flush_dependency+0xac/0x134)
>> [6.529184] [] (check_flush_dependency) from []
>> (flush_work+0xa0/0x178)
>> [6.529201] [] (flush_work) from []
>> (drain_all_pages+0x1a8/0x1cc)
>> [6.529221] [] (drain_all_pages) from []
>> (start_isolate_page_range+0x168/0x1b4)
>> [6.529239] [] (start_isolate_page_range) from
>> [] (alloc_contig_range+0xd4/0x314)
>> [6.529258] [] (alloc_contig_range) from []
>> (cma_alloc+0x188/0x300)
>> [6.529275] [] (cma_alloc) from []
>> (__alloc_from_contiguous+0x40/0xd8)
>> [6.529290] [] (__alloc_from_contiguous) from
>> [] (cma_allocator_alloc+0x3c/0x44)
>> [6.529303] [] (cma_allocator_alloc) from []
>> (__dma_alloc+0x1d4/0x2f0)
>> [6.529317] [] (__dma_alloc) from []
>> (arm_dma_alloc+0x3c/0x48)
>> [6.529331] [] (arm_dma_alloc) from []
>> (dma_pool_alloc+0x124/0x240)
>> [6.529356] [] (dma_pool_alloc) from []
>> (bcm2835_dma_create_cb_chain+0xb0/0x1dc [bcm2835_dma])
>> [6.529385] [] (bcm2835_dma_create_cb_chain
>> [bcm2835_dma]) from [] (bcm2835_dma_prep_slave_sg+0xf0/0x25c
>> [bcm2835_dma])
>> [6.529418] [] (bcm2835_dma_prep_slave_sg [bcm2835_dma])
>> from [] (bcm2835_request+0x2a4/0x3f4 [bcm2835])
>> [6.529548] [] (bcm2835_request [bcm2835]) from
>> [] (mmc_start_request+0x1f8/0x264 [mmc_core])
>> [6.529756] [] (mmc_start_request [mmc_core]) from
>> [] (mmc_start_areq+0x2c8/0x318 [mmc_core])
>> [6.529890] [] (mmc_start_areq [mmc_core]) from
>> [] (mmc_blk_issue_rw_rq+0xc0/0x308 [mmc_block])
>> [6.529943] [] (mmc_blk_issue_rw_rq [mmc_block]) from
>> [] (mmc_blk_issue_rq+0x418/0x428 [mmc_block])
>> [6.529997] [] (mmc_blk_issue_rq [mmc_block]) from
>> [] (mmc_queue_thread+0x148/0x1bc [mmc_block])
>> [6.530031] [] (mmc_queue_thread [mmc_block]) from
>> [] (kthread+0x120/0x138)
>> [6.530049] [] (kthread) from []
>> (ret_from_fork+0x14/0x3c)
>> [6.530055] ---[ end trace 221a5a14ca55fa22 ]---
>> [6.545765]  mmcblk0: p1 p2 p3 p4
>> [6.566015] random: fast init done
>> [6.623699] mmc1: new high speed SDIO card at address 0001
>
> Looks more like a cma allocator issue on a quick glance.

Possibly, but only started once I added the dma drive into the initrd
and happens right when the MMC driver loads, we're not even past
switch root which is long before loading the vc4 driver which is the
main cma consumer.


Re: [PATCH v3 0/7] mmc: bcm2835: Add new driver for the sdhost controller

2017-03-15 Thread Gerd Hoffmann
  Hi,

> First the flipping of the mmc host driver for the SD card slot will
> cause issues for users that build it as a module. When I tested this
> on Fedora the first update I ended up with a system that didn't boot.

Yep, switching drivers is a pain point here indeed.

Possibly we could fix that by adding a MODULE_SOFTDEP() to the iproc
driver?  Comments?  Better ideas?

> Also i often see the device hang for a long period when systemd probes
> for rfkill status, sometimes it needs to be reset but it generally
> gets there.

What device is that?  rpi3 with wifi?

> [6.529079] Hardware name: Generic DT based system
> [6.529106] [] (unwind_backtrace) from []
> (show_stack+0x18/0x1c)
> [6.529122] [] (show_stack) from []
> (dump_stack+0x80/0xa0)
> [6.529137] [] (dump_stack) from [] (__warn+0xe4/0x104)
> [6.529150] [] (__warn) from []
> (warn_slowpath_fmt+0x3c/0x4c)
> [6.529166] [] (warn_slowpath_fmt) from []
> (check_flush_dependency+0xac/0x134)
> [6.529184] [] (check_flush_dependency) from []
> (flush_work+0xa0/0x178)
> [6.529201] [] (flush_work) from []
> (drain_all_pages+0x1a8/0x1cc)
> [6.529221] [] (drain_all_pages) from []
> (start_isolate_page_range+0x168/0x1b4)
> [6.529239] [] (start_isolate_page_range) from
> [] (alloc_contig_range+0xd4/0x314)
> [6.529258] [] (alloc_contig_range) from []
> (cma_alloc+0x188/0x300)
> [6.529275] [] (cma_alloc) from []
> (__alloc_from_contiguous+0x40/0xd8)
> [6.529290] [] (__alloc_from_contiguous) from
> [] (cma_allocator_alloc+0x3c/0x44)
> [6.529303] [] (cma_allocator_alloc) from []
> (__dma_alloc+0x1d4/0x2f0)
> [6.529317] [] (__dma_alloc) from []
> (arm_dma_alloc+0x3c/0x48)
> [6.529331] [] (arm_dma_alloc) from []
> (dma_pool_alloc+0x124/0x240)
> [6.529356] [] (dma_pool_alloc) from []
> (bcm2835_dma_create_cb_chain+0xb0/0x1dc [bcm2835_dma])
> [6.529385] [] (bcm2835_dma_create_cb_chain
> [bcm2835_dma]) from [] (bcm2835_dma_prep_slave_sg+0xf0/0x25c
> [bcm2835_dma])
> [6.529418] [] (bcm2835_dma_prep_slave_sg [bcm2835_dma])
> from [] (bcm2835_request+0x2a4/0x3f4 [bcm2835])
> [6.529548] [] (bcm2835_request [bcm2835]) from
> [] (mmc_start_request+0x1f8/0x264 [mmc_core])
> [6.529756] [] (mmc_start_request [mmc_core]) from
> [] (mmc_start_areq+0x2c8/0x318 [mmc_core])
> [6.529890] [] (mmc_start_areq [mmc_core]) from
> [] (mmc_blk_issue_rw_rq+0xc0/0x308 [mmc_block])
> [6.529943] [] (mmc_blk_issue_rw_rq [mmc_block]) from
> [] (mmc_blk_issue_rq+0x418/0x428 [mmc_block])
> [6.529997] [] (mmc_blk_issue_rq [mmc_block]) from
> [] (mmc_queue_thread+0x148/0x1bc [mmc_block])
> [6.530031] [] (mmc_queue_thread [mmc_block]) from
> [] (kthread+0x120/0x138)
> [6.530049] [] (kthread) from []
> (ret_from_fork+0x14/0x3c)
> [6.530055] ---[ end trace 221a5a14ca55fa22 ]---
> [6.545765]  mmcblk0: p1 p2 p3 p4
> [6.566015] random: fast init done
> [6.623699] mmc1: new high speed SDIO card at address 0001

Looks more like a cma allocator issue on a quick glance.

cheers,
  Gerd



Re: [PATCH v3 0/7] mmc: bcm2835: Add new driver for the sdhost controller

2017-03-15 Thread Gerd Hoffmann
  Hi,

> First the flipping of the mmc host driver for the SD card slot will
> cause issues for users that build it as a module. When I tested this
> on Fedora the first update I ended up with a system that didn't boot.

Yep, switching drivers is a pain point here indeed.

Possibly we could fix that by adding a MODULE_SOFTDEP() to the iproc
driver?  Comments?  Better ideas?

> Also i often see the device hang for a long period when systemd probes
> for rfkill status, sometimes it needs to be reset but it generally
> gets there.

What device is that?  rpi3 with wifi?

> [6.529079] Hardware name: Generic DT based system
> [6.529106] [] (unwind_backtrace) from []
> (show_stack+0x18/0x1c)
> [6.529122] [] (show_stack) from []
> (dump_stack+0x80/0xa0)
> [6.529137] [] (dump_stack) from [] (__warn+0xe4/0x104)
> [6.529150] [] (__warn) from []
> (warn_slowpath_fmt+0x3c/0x4c)
> [6.529166] [] (warn_slowpath_fmt) from []
> (check_flush_dependency+0xac/0x134)
> [6.529184] [] (check_flush_dependency) from []
> (flush_work+0xa0/0x178)
> [6.529201] [] (flush_work) from []
> (drain_all_pages+0x1a8/0x1cc)
> [6.529221] [] (drain_all_pages) from []
> (start_isolate_page_range+0x168/0x1b4)
> [6.529239] [] (start_isolate_page_range) from
> [] (alloc_contig_range+0xd4/0x314)
> [6.529258] [] (alloc_contig_range) from []
> (cma_alloc+0x188/0x300)
> [6.529275] [] (cma_alloc) from []
> (__alloc_from_contiguous+0x40/0xd8)
> [6.529290] [] (__alloc_from_contiguous) from
> [] (cma_allocator_alloc+0x3c/0x44)
> [6.529303] [] (cma_allocator_alloc) from []
> (__dma_alloc+0x1d4/0x2f0)
> [6.529317] [] (__dma_alloc) from []
> (arm_dma_alloc+0x3c/0x48)
> [6.529331] [] (arm_dma_alloc) from []
> (dma_pool_alloc+0x124/0x240)
> [6.529356] [] (dma_pool_alloc) from []
> (bcm2835_dma_create_cb_chain+0xb0/0x1dc [bcm2835_dma])
> [6.529385] [] (bcm2835_dma_create_cb_chain
> [bcm2835_dma]) from [] (bcm2835_dma_prep_slave_sg+0xf0/0x25c
> [bcm2835_dma])
> [6.529418] [] (bcm2835_dma_prep_slave_sg [bcm2835_dma])
> from [] (bcm2835_request+0x2a4/0x3f4 [bcm2835])
> [6.529548] [] (bcm2835_request [bcm2835]) from
> [] (mmc_start_request+0x1f8/0x264 [mmc_core])
> [6.529756] [] (mmc_start_request [mmc_core]) from
> [] (mmc_start_areq+0x2c8/0x318 [mmc_core])
> [6.529890] [] (mmc_start_areq [mmc_core]) from
> [] (mmc_blk_issue_rw_rq+0xc0/0x308 [mmc_block])
> [6.529943] [] (mmc_blk_issue_rw_rq [mmc_block]) from
> [] (mmc_blk_issue_rq+0x418/0x428 [mmc_block])
> [6.529997] [] (mmc_blk_issue_rq [mmc_block]) from
> [] (mmc_queue_thread+0x148/0x1bc [mmc_block])
> [6.530031] [] (mmc_queue_thread [mmc_block]) from
> [] (kthread+0x120/0x138)
> [6.530049] [] (kthread) from []
> (ret_from_fork+0x14/0x3c)
> [6.530055] ---[ end trace 221a5a14ca55fa22 ]---
> [6.545765]  mmcblk0: p1 p2 p3 p4
> [6.566015] random: fast init done
> [6.623699] mmc1: new high speed SDIO card at address 0001

Looks more like a cma allocator issue on a quick glance.

cheers,
  Gerd



Re: [PATCH v3 0/7] mmc: bcm2835: Add new driver for the sdhost controller

2017-03-14 Thread Peter Robinson
Hi Gerd,

> Next version if the bcm2835 sdhost patch series.
>
> New in v3:
>  * squashed in cleanups by Stefan.
>  * use one dma channel only.
>  * improve commit messages.
>
> New in v2:
>  * DMA fixed.
>  * updated docs (kconfig, file comment, commit message) clarifying
>the two sd controller situation.
>  * some code cleanups, as pointed out by Stefan.
>  * dt bindings use mmc@... now.
>  * added patches to update defconfigs.
>  * added patch for rpi3 device tree, so wifi is actually enabled.
>
> please review & test,
>   Gerd
>
> Eric Anholt (2):
>   dt-bindings: Add binding for brcm,bcm2835-sdhost.
>   mmc: bcm2835: Add new driver for the sdhost controller.
>
> Gerd Hoffmann (5):
>   mmc: bcm2835: add sdhost controller to devicetree
>   arm: set CONFIG_MMC_BCM2835=y in bcm2835_defconfig and
> multi_v7_defconfig
>   arm64: set CONFIG_MMC_BCM2835=y in defconfig
>   ARM: dts: bcm283x: switch from  to 
>   ARM: dts: bcm2837: add  and 

I know there's a v4, which is the one I tested, but I don't see it on
the rpi list. A few things I've found.

First the flipping of the mmc host driver for the SD card slot will
cause issues for users that build it as a module. When I tested this
on Fedora the first update I ended up with a system that didn't boot.
I'm handling in Fedora with a dracut snippet which will pull both in
both until that settles down.

Also i often see the device hang for a long period when systemd probes
for rfkill status, sometimes it needs to be reset but it generally
gets there.

Finally also seeing the following crash with the patches on 4.11rc2

[6.337148] sdhci: Secure Digital Host Controller Interface driver
[6.349263] sdhci: Copyright(c) Pierre Ossman
[6.362401] sdhci-pltfm: SDHCI platform and OF driver helper
[6.381331] sdhost-bcm2835 3f202000.mmc: loaded - DMA enabled (>1)
[6.412548] mmc1: SDHCI controller on 3f30.sdhci
[3f30.sdhci] using PIO
[6.445766] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[6.460651] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[6.473431] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[6.487820] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[6.509590] mmc0: host does not support reading read-only switch,
assuming write-enable
[6.511929] mmc0: new high speed SDHC card at address 
[6.527859] mmcblk0: mmc0: SL16G 14.8 GiB
[6.528991] [ cut here ]
[6.529018] WARNING: CPU: 2 PID: 326 at kernel/workqueue.c:2417
check_flush_dependency+0xac/0x134
[6.529033] workqueue: PF_MEMALLOC task 326(mmcqd/0) is flushing
!WQ_MEM_RECLAIM events:drain_local_pages_wq
[6.529036] Modules linked in: mmc_block(+) sdhci_iproc sdhci_pltfm
sdhci pwm_bcm2835 bcm2835 i2c_bcm2835 mmc_core bcm2835_dma i2c_dev
[6.529075] CPU: 2 PID: 326 Comm: mmcqd/0 Not tainted
4.11.0-0.rc2.git0.1.fc26.armv7hl #1
[6.529079] Hardware name: Generic DT based system
[6.529106] [] (unwind_backtrace) from []
(show_stack+0x18/0x1c)
[6.529122] [] (show_stack) from []
(dump_stack+0x80/0xa0)
[6.529137] [] (dump_stack) from [] (__warn+0xe4/0x104)
[6.529150] [] (__warn) from []
(warn_slowpath_fmt+0x3c/0x4c)
[6.529166] [] (warn_slowpath_fmt) from []
(check_flush_dependency+0xac/0x134)
[6.529184] [] (check_flush_dependency) from []
(flush_work+0xa0/0x178)
[6.529201] [] (flush_work) from []
(drain_all_pages+0x1a8/0x1cc)
[6.529221] [] (drain_all_pages) from []
(start_isolate_page_range+0x168/0x1b4)
[6.529239] [] (start_isolate_page_range) from
[] (alloc_contig_range+0xd4/0x314)
[6.529258] [] (alloc_contig_range) from []
(cma_alloc+0x188/0x300)
[6.529275] [] (cma_alloc) from []
(__alloc_from_contiguous+0x40/0xd8)
[6.529290] [] (__alloc_from_contiguous) from
[] (cma_allocator_alloc+0x3c/0x44)
[6.529303] [] (cma_allocator_alloc) from []
(__dma_alloc+0x1d4/0x2f0)
[6.529317] [] (__dma_alloc) from []
(arm_dma_alloc+0x3c/0x48)
[6.529331] [] (arm_dma_alloc) from []
(dma_pool_alloc+0x124/0x240)
[6.529356] [] (dma_pool_alloc) from []
(bcm2835_dma_create_cb_chain+0xb0/0x1dc [bcm2835_dma])
[6.529385] [] (bcm2835_dma_create_cb_chain
[bcm2835_dma]) from [] (bcm2835_dma_prep_slave_sg+0xf0/0x25c
[bcm2835_dma])
[6.529418] [] (bcm2835_dma_prep_slave_sg [bcm2835_dma])
from [] (bcm2835_request+0x2a4/0x3f4 [bcm2835])
[6.529548] [] (bcm2835_request [bcm2835]) from
[] (mmc_start_request+0x1f8/0x264 [mmc_core])
[6.529756] [] (mmc_start_request [mmc_core]) from
[] (mmc_start_areq+0x2c8/0x318 [mmc_core])
[6.529890] [] (mmc_start_areq [mmc_core]) from
[] (mmc_blk_issue_rw_rq+0xc0/0x308 [mmc_block])
[6.529943] [] (mmc_blk_issue_rw_rq [mmc_block]) from
[] (mmc_blk_issue_rq+0x418/0x428 [mmc_block])
[6.529997] [] (mmc_blk_issue_rq [mmc_block]) from
[] (mmc_queue_thread+0x148/0x1bc [mmc_block])
[6.530031] [] (mmc_queue_thread [mmc_block]) from
[] (kthread+0x120/0x138)
[6.530049] [] (kthread) from []
(ret_from_fork+0x14/0x3c)
[

Re: [PATCH v3 0/7] mmc: bcm2835: Add new driver for the sdhost controller

2017-03-14 Thread Peter Robinson
Hi Gerd,

> Next version if the bcm2835 sdhost patch series.
>
> New in v3:
>  * squashed in cleanups by Stefan.
>  * use one dma channel only.
>  * improve commit messages.
>
> New in v2:
>  * DMA fixed.
>  * updated docs (kconfig, file comment, commit message) clarifying
>the two sd controller situation.
>  * some code cleanups, as pointed out by Stefan.
>  * dt bindings use mmc@... now.
>  * added patches to update defconfigs.
>  * added patch for rpi3 device tree, so wifi is actually enabled.
>
> please review & test,
>   Gerd
>
> Eric Anholt (2):
>   dt-bindings: Add binding for brcm,bcm2835-sdhost.
>   mmc: bcm2835: Add new driver for the sdhost controller.
>
> Gerd Hoffmann (5):
>   mmc: bcm2835: add sdhost controller to devicetree
>   arm: set CONFIG_MMC_BCM2835=y in bcm2835_defconfig and
> multi_v7_defconfig
>   arm64: set CONFIG_MMC_BCM2835=y in defconfig
>   ARM: dts: bcm283x: switch from  to 
>   ARM: dts: bcm2837: add  and 

I know there's a v4, which is the one I tested, but I don't see it on
the rpi list. A few things I've found.

First the flipping of the mmc host driver for the SD card slot will
cause issues for users that build it as a module. When I tested this
on Fedora the first update I ended up with a system that didn't boot.
I'm handling in Fedora with a dracut snippet which will pull both in
both until that settles down.

Also i often see the device hang for a long period when systemd probes
for rfkill status, sometimes it needs to be reset but it generally
gets there.

Finally also seeing the following crash with the patches on 4.11rc2

[6.337148] sdhci: Secure Digital Host Controller Interface driver
[6.349263] sdhci: Copyright(c) Pierre Ossman
[6.362401] sdhci-pltfm: SDHCI platform and OF driver helper
[6.381331] sdhost-bcm2835 3f202000.mmc: loaded - DMA enabled (>1)
[6.412548] mmc1: SDHCI controller on 3f30.sdhci
[3f30.sdhci] using PIO
[6.445766] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[6.460651] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[6.473431] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[6.487820] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[6.509590] mmc0: host does not support reading read-only switch,
assuming write-enable
[6.511929] mmc0: new high speed SDHC card at address 
[6.527859] mmcblk0: mmc0: SL16G 14.8 GiB
[6.528991] [ cut here ]
[6.529018] WARNING: CPU: 2 PID: 326 at kernel/workqueue.c:2417
check_flush_dependency+0xac/0x134
[6.529033] workqueue: PF_MEMALLOC task 326(mmcqd/0) is flushing
!WQ_MEM_RECLAIM events:drain_local_pages_wq
[6.529036] Modules linked in: mmc_block(+) sdhci_iproc sdhci_pltfm
sdhci pwm_bcm2835 bcm2835 i2c_bcm2835 mmc_core bcm2835_dma i2c_dev
[6.529075] CPU: 2 PID: 326 Comm: mmcqd/0 Not tainted
4.11.0-0.rc2.git0.1.fc26.armv7hl #1
[6.529079] Hardware name: Generic DT based system
[6.529106] [] (unwind_backtrace) from []
(show_stack+0x18/0x1c)
[6.529122] [] (show_stack) from []
(dump_stack+0x80/0xa0)
[6.529137] [] (dump_stack) from [] (__warn+0xe4/0x104)
[6.529150] [] (__warn) from []
(warn_slowpath_fmt+0x3c/0x4c)
[6.529166] [] (warn_slowpath_fmt) from []
(check_flush_dependency+0xac/0x134)
[6.529184] [] (check_flush_dependency) from []
(flush_work+0xa0/0x178)
[6.529201] [] (flush_work) from []
(drain_all_pages+0x1a8/0x1cc)
[6.529221] [] (drain_all_pages) from []
(start_isolate_page_range+0x168/0x1b4)
[6.529239] [] (start_isolate_page_range) from
[] (alloc_contig_range+0xd4/0x314)
[6.529258] [] (alloc_contig_range) from []
(cma_alloc+0x188/0x300)
[6.529275] [] (cma_alloc) from []
(__alloc_from_contiguous+0x40/0xd8)
[6.529290] [] (__alloc_from_contiguous) from
[] (cma_allocator_alloc+0x3c/0x44)
[6.529303] [] (cma_allocator_alloc) from []
(__dma_alloc+0x1d4/0x2f0)
[6.529317] [] (__dma_alloc) from []
(arm_dma_alloc+0x3c/0x48)
[6.529331] [] (arm_dma_alloc) from []
(dma_pool_alloc+0x124/0x240)
[6.529356] [] (dma_pool_alloc) from []
(bcm2835_dma_create_cb_chain+0xb0/0x1dc [bcm2835_dma])
[6.529385] [] (bcm2835_dma_create_cb_chain
[bcm2835_dma]) from [] (bcm2835_dma_prep_slave_sg+0xf0/0x25c
[bcm2835_dma])
[6.529418] [] (bcm2835_dma_prep_slave_sg [bcm2835_dma])
from [] (bcm2835_request+0x2a4/0x3f4 [bcm2835])
[6.529548] [] (bcm2835_request [bcm2835]) from
[] (mmc_start_request+0x1f8/0x264 [mmc_core])
[6.529756] [] (mmc_start_request [mmc_core]) from
[] (mmc_start_areq+0x2c8/0x318 [mmc_core])
[6.529890] [] (mmc_start_areq [mmc_core]) from
[] (mmc_blk_issue_rw_rq+0xc0/0x308 [mmc_block])
[6.529943] [] (mmc_blk_issue_rw_rq [mmc_block]) from
[] (mmc_blk_issue_rq+0x418/0x428 [mmc_block])
[6.529997] [] (mmc_blk_issue_rq [mmc_block]) from
[] (mmc_queue_thread+0x148/0x1bc [mmc_block])
[6.530031] [] (mmc_queue_thread [mmc_block]) from
[] (kthread+0x120/0x138)
[6.530049] [] (kthread) from []
(ret_from_fork+0x14/0x3c)
[

[PATCH v3 0/7] mmc: bcm2835: Add new driver for the sdhost controller

2017-02-21 Thread Gerd Hoffmann
  Hi,

Next version if the bcm2835 sdhost patch series.

New in v3:
 * squashed in cleanups by Stefan.
 * use one dma channel only.
 * improve commit messages.

New in v2:
 * DMA fixed.
 * updated docs (kconfig, file comment, commit message) clarifying
   the two sd controller situation.
 * some code cleanups, as pointed out by Stefan.
 * dt bindings use mmc@... now.
 * added patches to update defconfigs.
 * added patch for rpi3 device tree, so wifi is actually enabled.

please review & test,
  Gerd

Eric Anholt (2):
  dt-bindings: Add binding for brcm,bcm2835-sdhost.
  mmc: bcm2835: Add new driver for the sdhost controller.

Gerd Hoffmann (5):
  mmc: bcm2835: add sdhost controller to devicetree
  arm: set CONFIG_MMC_BCM2835=y in bcm2835_defconfig and
multi_v7_defconfig
  arm64: set CONFIG_MMC_BCM2835=y in defconfig
  ARM: dts: bcm283x: switch from  to 
  ARM: dts: bcm2837: add  and 

 .../bindings/mmc/brcm,bcm2835-sdhost.txt   |   23 +
 arch/arm/boot/dts/bcm2835-rpi.dtsi |6 +
 arch/arm/boot/dts/bcm283x.dtsi |   10 +
 arch/arm/configs/bcm2835_defconfig |1 +
 arch/arm/configs/multi_v7_defconfig|1 +
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   |   17 +
 arch/arm64/configs/defconfig   |1 +
 drivers/mmc/host/Kconfig   |   14 +
 drivers/mmc/host/Makefile  |1 +
 drivers/mmc/host/bcm2835.c | 1471 
 10 files changed, 1545 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
 create mode 100644 drivers/mmc/host/bcm2835.c

-- 
1.8.3.1



[PATCH v3 0/7] mmc: bcm2835: Add new driver for the sdhost controller

2017-02-21 Thread Gerd Hoffmann
  Hi,

Next version if the bcm2835 sdhost patch series.

New in v3:
 * squashed in cleanups by Stefan.
 * use one dma channel only.
 * improve commit messages.

New in v2:
 * DMA fixed.
 * updated docs (kconfig, file comment, commit message) clarifying
   the two sd controller situation.
 * some code cleanups, as pointed out by Stefan.
 * dt bindings use mmc@... now.
 * added patches to update defconfigs.
 * added patch for rpi3 device tree, so wifi is actually enabled.

please review & test,
  Gerd

Eric Anholt (2):
  dt-bindings: Add binding for brcm,bcm2835-sdhost.
  mmc: bcm2835: Add new driver for the sdhost controller.

Gerd Hoffmann (5):
  mmc: bcm2835: add sdhost controller to devicetree
  arm: set CONFIG_MMC_BCM2835=y in bcm2835_defconfig and
multi_v7_defconfig
  arm64: set CONFIG_MMC_BCM2835=y in defconfig
  ARM: dts: bcm283x: switch from  to 
  ARM: dts: bcm2837: add  and 

 .../bindings/mmc/brcm,bcm2835-sdhost.txt   |   23 +
 arch/arm/boot/dts/bcm2835-rpi.dtsi |6 +
 arch/arm/boot/dts/bcm283x.dtsi |   10 +
 arch/arm/configs/bcm2835_defconfig |1 +
 arch/arm/configs/multi_v7_defconfig|1 +
 arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts   |   17 +
 arch/arm64/configs/defconfig   |1 +
 drivers/mmc/host/Kconfig   |   14 +
 drivers/mmc/host/Makefile  |1 +
 drivers/mmc/host/bcm2835.c | 1471 
 10 files changed, 1545 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/mmc/brcm,bcm2835-sdhost.txt
 create mode 100644 drivers/mmc/host/bcm2835.c

-- 
1.8.3.1