Modify

Opened 8 years ago

Closed 5 years ago

#7153 closed defect (invalid)

mmc_over_gpio driver causes crash on BCM47xx

Reported by: joerg@… Owned by: developers
Priority: response-needed Milestone: Backfire 10.03.1
Component: kernel Version: Trunk
Keywords: mmc gpio oom Cc:

Description

Hello,

on my WRT54GLv1.1, the mmc_over_gpio driver partly works, i.e it recognizes the card.

However, actually using the card causes all sorts of effects, most often triggering the oom-killer.

Steps to reproduce:

  • Attach an SD-Card to the GPIO-pins
  • create /etc/config/mmc_over_gpio with the content config 'mmc_over_gpio'

option 'name' 'default'
option 'enabled' '1'
option 'DI_pin' '2'
option 'DO_pin' '4'
option 'CLK_pin' '3'
option 'CS_pin' '7'
option 'mode' '0'

  • /etc/init.d/mmc_over_gpio start At this point, the card is regonized:

# dmesg |tail -9
gpio-mmc: Failed to request mmc_spi module.
mmc_spi spi32766.0: ASSUMING 3.2-3.4 V slot power
mmc_spi spi32766.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
gpio-mmc: MMC-Card "default" attached to GPIO pins di=2, do=4, clk=3, cs=7
mmc_spi spi32766.0: can't change chip-select polarity
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SD card on SPI
mmcblk0: mmc0:0000 SD02G 1.84 GiB

mmcblk0: p1

#ls -l /dev/mmcblk0*
brw-r--r-- 1 root root 179, 0 Jan 1 15:40 /dev/mmcblk0
brw-r--r-- 1 root root 179, 1 Jan 1 15:40 /dev/mmcblk0p1

  • Use the card: # dd if=/dev/mmcblk0 of=/dev/null bs=1k count=96
  • Wait for the crash

Additional notes:

  • This used to work fine with the mmc-driver for 2.4 kernels.
  • no b43 driver loaded

Attachments (0)

Change History (8)

comment:1 in reply to: ↑ description Changed 8 years ago by Niels Böhm <bitbucket@…>

Replying to joerg@…:

try executing this:

echo 0x9c > /proc/diag/gpiomask

before starting the driver.
The diag module (LED driver and stuff) fiddles with the GPIO lines as well (not only b43), since the router LEDs are connected to GPIO.

The mask 0x9c has bits 2, 3, 4 and 7 set, which correspond to the affected GPIO lines used by the SD card mod.

comment:2 Changed 7 years ago by nico

  • Priority changed from high to response-needed

Can you confirm the above solution fix your issue ?

comment:3 follow-up: Changed 7 years ago by anonymous

This bug is still around... I could reproduce it with 10.03.1-rc4 last week.

SD-card is detected fine, partitions are reported and mountable but a simple "ls" to list files on the card results in a crashed router and requires power off/on.

Box is a WRT54GL V1.1, using an ext2 partition (module in image, of course) on a 1.5 GB partition on a Sony SDHC card.

Oh: Setting GPIOmask did NOT help in my case. Same result.

comment:4 in reply to: ↑ 3 ; follow-up: Changed 7 years ago by anonymous

Did you set:

b43 gpiomask=0x9c

in /etc/modules.d/30-b43 ?

Make sure b43-legacy is NOT loaded. (only b43)

For me not even the partition is recognized…

comment:5 Changed 7 years ago by jow

Is this still the case with RC5 ?

comment:6 Changed 6 years ago by nbd

  • Resolution set to no_response
  • Status changed from new to closed

comment:7 in reply to: ↑ 4 Changed 5 years ago by anonymous

  • Resolution no_response deleted
  • Status changed from closed to reopened

For me not even the partition is recognized…

opkg install block-mount kmod-fs-ext4 e2fsprogs

comment:8 Changed 5 years ago by jow

  • Resolution set to invalid
  • Status changed from reopened to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.