fast cfcard issues

AmigaOne X1000 platform specific issues related to Linux only.

fast cfcard issues

Postby sailorMH » Tue Apr 16, 2019 12:16 pm

When linux kernels became distributed in zImage format ( from 4.19 ) I noticed, that my cfcard has I/O errors with zipped images. It means, reading from cfcard is too slow.
Then I try faster card. zImages boot fine from it, but fast cfcard is not visible from linux after boot.

With xeno advice I made some test and found this:

card X: new one (originally formated ext2/32G , later ext2/4G, FAT16/4G, FAT16/256M)
SanDisk Extreme, 32GB, up to 120MB/s read speed; up to 85MB/s write speed, VPG-20, UDMA 7 ( specs from SanDisk site)

card Y: old one (formatted ext2/4G)
SanDisk Ultra, 4GB, up to 25MB/s read; write speed lower, Compatible with CompactFlash supporting host devices ( specs from SanDisk site)

- card X can be used for zImages, card Y not (I/O errors)

- card Y is visible from all booted systems ( Debian8 or Fienix ) with all tested kernels
- card X is visible only in systems booted with kernels 4.2, 4.4, 4.5, 4.7, 4.9.0-alpha1
and not visible with kernels 4.9.85, 4.14, 4.19, 4.20, 5.0, 5.1, 5.1-rc5

then I compared dmesg from 4.9.0-alpha1 and 4.9.85. The most suspicious I found this:

kernel 4.9.0-alpha1: card X recognized like pata_of_platform
Code: Select all
pata_of_platform f0000000.cf: pio-mode unspecified, assuming PIO0

then SCSI subsystem mark it scsi host6 and SD driver as sd 6:0:0:0:
Code: Select all
scsi 6:0:0:0: Direct-Access ATA SDCFXS-032G 6.01 PQ: 0 ANSI: 5
sd 6:0:0:0: [sdd] 62537328 512-byte logical blocks: (32.0 GB/29.8 GiB)


kernel 4.9.85: card X recognized like electra-cf and SCSI subsystem don't recognize it
Code: Select all
electra-cf f0000000.cf: at mem 0xf0000000 io 0xf1000000 irq 17


I am not the kernel guru, but this is only main difference what I found.
Also I don't know, on what depend selection pata_of_platform vs. electra-cf - speed, size, UDMA capability?

Now I will test which exact kernel version 4.9.x is first with this issue, and also check what type (pata_of_platform vs. electra-cf) is old card Y on new kernel.
Attachments
debian-X-4.9.85.dmesg.upr.gz
removed timestamps
(11.46 KiB) Downloaded 36 times
debian-X-4.9.0-a1.dmesg.upr.gz
removed timestamps
(11.47 KiB) Downloaded 38 times
Last edited by sailorMH on Tue Apr 16, 2019 3:04 pm, edited 1 time in total.
Pegasos 2: MorphOS, AmigaOS, MintPPC 11, NetBSD, MacOS X (molk), Debian 8
AmigaOne X1000: AmigaOS, MintPPC 11, Debian 8, Lubuntu 16.04
Powermac G5 Quad: MacOS X, Debian 8, Lubuntu 16.04
User avatar
sailorMH
 
Posts: 82
Joined: Wed Aug 28, 2013 7:01 pm
Location: Czech republic

Re: fast cfcard issues

Postby sailorMH » Tue Apr 16, 2019 12:21 pm

I also found discussion about electra-cf here in kernel 4.8 topics, but I don't know if it is important with this issue
http://forum.hyperion-entertainment.com/viewtopic.php?t=3494&start=10
Pegasos 2: MorphOS, AmigaOS, MintPPC 11, NetBSD, MacOS X (molk), Debian 8
AmigaOne X1000: AmigaOS, MintPPC 11, Debian 8, Lubuntu 16.04
Powermac G5 Quad: MacOS X, Debian 8, Lubuntu 16.04
User avatar
sailorMH
 
Posts: 82
Joined: Wed Aug 28, 2013 7:01 pm
Location: Czech republic

Re: fast cfcard issues

Postby xeno74 » Tue Apr 16, 2019 8:24 pm

Hi SailorMH,

Many thanks for the test results. I will try to figure out where the problem is.

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 5224
Joined: Fri Mar 23, 2012 8:58 am

Re: fast cfcard issues

Postby sailorMH » Tue Apr 16, 2019 9:54 pm

Hi Xeno74,

I have some addendum:

with newer kernels (4.9+) where newer cf X not visible, old cf Y is allways visible, and recognized like electra-cf:
Code: Select all
[    3.798096] electra-cf f0000000.cf: at mem 0xf0000000 io 0xf1000000 irq 17
[    4.766555] ata7: PATA max PIO0 cmd 0x811000 ctl 0x81100e irq 17
[    4.947416] ata7.00: CFA: SanDisk SDCFHSNJC-004G, HDX 7.08, max PIO4
[    4.947419] ata7.00: 7813120 sectors, multi 0: LBA48
[    4.949757] ata7.00: configured for PIO0
[    7.522051] scsi 6:0:0:0: Direct-Access     ATA      SanDisk SDCFHSNJ 7.08 PQ: 0 ANSI: 5
[    7.549443] sd 6:0:0:0: [sdd] 7813120 512-byte logical blocks: (4.00 GB/3.73 GiB)
[    7.568702] sd 6:0:0:0: Attached scsi generic sg4 type 0
[    7.588086] sd 6:0:0:0: [sdd] Write Protect is off
[    7.626325] sd 6:0:0:0: [sdd] Mode Sense: 00 3a 00 00
[    7.626374] sd 6:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    7.671833] sd 6:0:0:0: [sdd] Attached SCSI removable disk

It means, that problem can be connected with speed/size/other attributes of cf and not with electra-cf/pata_of_platform
Attachments
debian-Y-4.9.85.zip
(36.67 KiB) Downloaded 39 times
Pegasos 2: MorphOS, AmigaOS, MintPPC 11, NetBSD, MacOS X (molk), Debian 8
AmigaOne X1000: AmigaOS, MintPPC 11, Debian 8, Lubuntu 16.04
Powermac G5 Quad: MacOS X, Debian 8, Lubuntu 16.04
User avatar
sailorMH
 
Posts: 82
Joined: Wed Aug 28, 2013 7:01 pm
Location: Czech republic

Re: fast cfcard issues

Postby sailorMH » Wed Apr 17, 2019 10:25 am

some more observation - with 4.9 and newer kernels, both cfcards recognized as electra_cf, pcmcia socket recognize inserted cards, only newer card Y not recognized by scsi / ata:

card X, debian/4.9.85 ( the same with 5.1):
Code: Select all
electra-cf f0000000.cf: at mem 0xf0000000 io 0xf1000000 irq 17
pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0
pcmcia 0.0: pcmcia: registering new device pcmcia0.0 (IRQ: 17)


card Y, debian/4.9.85 ( the same with 5.1):
Code: Select all
electra-cf f0000000.cf: at mem 0xf0000000 io 0xf1000000 irq 17
pcmcia_socket pcmcia_socket0: pccard: PCMCIA card inserted into slot 0
pcmcia 0.0: pcmcia: registering new device pcmcia0.0 (IRQ: 17)
scsi host6: pata_pcmcia
ata7: PATA max PIO0 cmd 0x811000 ctl 0x81100e irq 17
ata7.00: CFA: SanDisk SDCFHSNJC-004G, HDX 7.08, max PIO4
ata7.00: 7813120 sectors, multi 0: LBA48
ata7.00: configured for PIO0
scsi 6:0:0:0: Direct-Access     ATA      SanDisk SDCFHSNJ 7.08 PQ: 0 ANSI: 5
sd 6:0:0:0: [sdd] 7813120 512-byte logical blocks: (4.00 GB/3.73 GiB)
sd 6:0:0:0: Attached scsi generic sg4 type 0
sd 6:0:0:0: [sdd] Write Protect is off
sd 6:0:0:0: [sdd] Mode Sense: 00 3a 00 00
sd 6:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 6:0:0:0: [sdd] Attached SCSI removable disk
Pegasos 2: MorphOS, AmigaOS, MintPPC 11, NetBSD, MacOS X (molk), Debian 8
AmigaOne X1000: AmigaOS, MintPPC 11, Debian 8, Lubuntu 16.04
Powermac G5 Quad: MacOS X, Debian 8, Lubuntu 16.04
User avatar
sailorMH
 
Posts: 82
Joined: Wed Aug 28, 2013 7:01 pm
Location: Czech republic

Re: fast cfcard issues

Postby xeno74 » Wed Apr 17, 2019 11:30 am

Hi SailorMH,

Thanks a lot for the observation and for the log files. I compiled a new RC5 of kernel 5.1 today.

New:

  • pata_of_platform-v2 patch for testing new CF cards connected to the onboard CompactFlash Card Slot
  • Disabling the kernel config options CONFIG_PATA_PCMCIA, CONFIG_PCMCIA, and CONFIG_ELECTRA_CF for the pata_of_platform-v2 patch

It also includes:

  • compressed kernel (zImage) and uncompressed kernel (vmlinux)

Download: linux-image-5.1-rc5-2-X1000.tar.gz

I successfully tested it with my 256MB SanDisk CF card connected to the onboard CompactFlash Card Slot today.

Screenshot:

Image

Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 5224
Joined: Fri Mar 23, 2012 8:58 am

Re: fast cfcard issues

Postby sailorMH » Wed Apr 17, 2019 9:57 pm

Hi Xeno74,

IT WORKS !!!

both cfcards visible - here is boot with the new one X:
Screenshot-fienix-X-5.2-rc5-2.png


Code: Select all
[    3.018015] pata_of_platform f0000000.cf: pio-mode unspecified, assuming PIO0
[    3.018882] scsi host6: pata_of_platform
[    3.019171] ata7: PATA max PIO0 no IRQ, using PIO polling mmio cmd 0xf0000800 ctl 0xf000080e
[    3.188183] ata7.00: CFA: SDCFXS-032G, HDX16.01, max PIO4
[    3.217996] ata7.00: 62537328 sectors, multi 0: LBA48
[    3.252392] ata7.00: configured for PIO
[    5.184643] scsi 6:0:0:0: Direct-Access     ATA      SDCFXS-032G      6.01 PQ: 0 ANSI: 5
[    5.210884] sd 6:0:0:0: [sdd] 62537328 512-byte logical blocks: (32.0 GB/29.8 GiB)
[    5.261471] sd 6:0:0:0: Attached scsi generic sg4 type 0


many thanks
M
Pegasos 2: MorphOS, AmigaOS, MintPPC 11, NetBSD, MacOS X (molk), Debian 8
AmigaOne X1000: AmigaOS, MintPPC 11, Debian 8, Lubuntu 16.04
Powermac G5 Quad: MacOS X, Debian 8, Lubuntu 16.04
User avatar
sailorMH
 
Posts: 82
Joined: Wed Aug 28, 2013 7:01 pm
Location: Czech republic

Re: fast cfcard issues

Postby xeno74 » Thu Apr 18, 2019 8:40 am

sailorMH wrote:Hi Xeno74,

IT WORKS !!!

both cfcards visible - here is boot with the new one X:


Hi SailorMH,

Great news! I am happy. I will use the pata_of_platform-v2 patch for all new X1000 Linux kernels.

Thanks for reporting this issue! :-)

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 5224
Joined: Fri Mar 23, 2012 8:58 am

Re: fast cfcard issues

Postby sailorMH » Thu Apr 18, 2019 8:45 am

xeno74 wrote:Great news! I am happy. I will use the pata_of_platform-v2 patch for all new X1000 Linux kernels.

thank you for quick fix and good work.

M
Pegasos 2: MorphOS, AmigaOS, MintPPC 11, NetBSD, MacOS X (molk), Debian 8
AmigaOne X1000: AmigaOS, MintPPC 11, Debian 8, Lubuntu 16.04
Powermac G5 Quad: MacOS X, Debian 8, Lubuntu 16.04
User avatar
sailorMH
 
Posts: 82
Joined: Wed Aug 28, 2013 7:01 pm
Location: Czech republic

Re: fast cfcard issues

Postby xeno74 » Fri Apr 19, 2019 9:12 am

Hi SailorMH,

I created the patch pata_of_platform-v2_4.20 for the stable kernel 4.20 yesterday. Then I compiled the stable kernel 4.20.17 for testing.

Could you please test the stable kernel 4.20.17 with your CF cards?

Download: linux-image-4.20.17-X1000_X5000.tar.gz

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 5224
Joined: Fri Mar 23, 2012 8:58 am

Next

Return to Platform: AmigaOne X1000 - Linux Only

Who is online

Users browsing this forum: No registered users and 4 guests

cron