AnsweredAssumed Answered

BF548 ATAPI issues

Question asked by kai.ps on Jun 2, 2012
Latest reply on Jul 18, 2012 by kai.ps

Hey,

 

I am currently working on a custom board equipped with a bluetechnix CM-BF548 trying to get a IDE hard-disk up&running.

Unfortunately, it doesn't work completely and behaves quite strange!

It's runs witha uclinux 2011R1-RC3, but the latest svn gives the same behaviour.

 

Probing the module directly into the kernel results in quite a lot of ATA bus errors:

 

root:/> modprobe pata_bf54x

register bfin atapi driver

scsi0 : pata-bf54x

ata1: PATA max UDMA/66 irq 68

ata1.00: CFA: TRANSCEND, 20110519, max UDMA/66

ata1.00: 3913024 sectors, multi 0: LBA

ata1.00: configured for UDMA/66

blk_queue_max_segments: set to minimum 1

scsi 0:0:0:0: Direct-Access     ATA      TRANSCEND        2011 PQ: 0 ANSI: 5

sd 0:0:0:0: [sda] 3913024 512-byte logical blocks: (2.00 GB/1.86 GiB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6

ata1.00: BMDMA stat 0x4

ata1.00: failed command: READ DMA

ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in

         res 51/84:00:08:00:00/00:00:00:00:00/e0 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY ERR }

ata1.00: error: { ICRC ABRT }

ata1: soft resetting link

ata1.00: configured for UDMA/66

ata1: EH complete

ata1.00: limiting speed to UDMA/44:PIO4

ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6

ata1.00: BMDMA stat 0x4

ata1.00: failed command: READ DMA

ata1.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 0 dma 4096 in

         res 51/84:00:08:00:00/00:00:00:00:00/e0 Emask 0x10 (ATA bus error)

ata1.00: status: { DRDY ERR }

ata1.00: error: { ICRC ABRT }

ata1: soft resetting link

[snip]

 

So I tried using the PIO mode, giving quite a nice log:

root:/> modprobe pata_bf54x bfin_atapi_mode=p

register bfin atapi driver

scsi0 : pata-bf54x

ata1: PATA max PIO4 irq 68

ata1.00: CFA: TRANSCEND, 20110519, max UDMA/66

ata1.00: 3913024 sectors, multi 0: LBA

ata1.00: configured for PIO4

blk_queue_max_segments: set to minimum 1

scsi 0:0:0:0: Direct-Access     ATA      TRANSCEND        2011 PQ: 0 ANSI: 5

sd 0:0:0:0: [sda] 3913024 512-byte logical blocks: (2.00 GB/1.86 GiB)

sd 0:0:0:0: [sda] Write Protect is off

sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't

support DPO or FUA

sda: unknown partition table

sd 0:0:0:0: [sda] Attached SCSI disk

root:/>

 

but as shown in the log, the partition table can't be read and can't be succesfully changed with fdisk.

Using the mass-storage gadget I can partition and format the disk via the PC, the partition table is ok for the DSP after that, but only for the time to the next reboot. Modifying files on PC/DSP with a cross-check worked too.

 

I don't know whats wrong - the DMA errors suggest either a hardware problem or a kernel issue, but the PIO mode seems to work so far, which would lead me to the conclusion that the hardware is ok - is it?

That would be the most important part right now.

If the hardware would be faulty, all  the data I stored on it would be in some buffers...

 

Do you have any suggestions where the mistake could be or what checks I could do to find that out?

 

Thanks for your time,

Kai

Outcomes