[#5216] fail to read/write SATA hard disk connected to bf537 IDE daughter board via SATA/IDE converter
Submitted By: Barry Song
Open Date
2009-06-08 04:23:31 Close Date
2009-07-24 01:26:35
Priority:
Medium Assignee:
Barry Song
Status:
Closed Fixed In Release:
N/A
Found In Release:
N/A Release:
Category:
N/A Board:
N/A
Processor:
BF537 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Fixed
Uboot version or rev.:
Toolchain version or rev.:
2009R1_RC6
App binary format:
N/A
Summary: fail to read/write SATA hard disk connected to bf537 IDE daughter board via SATA/IDE converter
Details:
Test board: BF537-STAMP; cf/ide-ata/nand EXTENDER board; SATA/IDE converter board
Kernel codes:Trunk head
ATA can work, but SATA can't work.
This bug is reported from customer.
1. SATA device can be found while system start-up:
scsi0 : pata_platform
ata1: PATA max PIO0 mmio cmd 0x20314020 ctl 0x2031401c irq 55
ata1.00: qc timeout (cmd 0x27)
ata1.00: failed to read default max address (err_mask=0x4)
ata1.00: HPA support seems broken, skipping HPA handling
ata1.00: configured for PIO
scsi 0:0:0:0: Direct-Access ATA Hitachi HTS54161 SB4O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
2. when reading /dev/sda by fdisk/cat etc commands, kernel will give the following log:
root:/> fdisk /dev/sda
irq 55: nobody cared (try booting with the "irqpoll" option)
Hardware Trace:
0 Target : <0x00004b20> { _dump_stack + 0x0 }
Source : <0x0002e2e4> { ___report_bad_irq + 0x1c } CALL pcrel
1 Target : <0x0002e2e4> { ___report_bad_irq + 0x1c }
Source : <0x0002e340> { ___report_bad_irq + 0x78 } JUMP.S
2 Target : <0x0002e340> { ___report_bad_irq + 0x78 }
Source : <0x00010d1a> { _printk + 0x16 } RTS
3 Target : <0x00010d16> { _printk + 0x12 }
Source : <0x0001154c> { _vprintk + 0x128 } RTS
4 Target : <0x00011540> { _vprintk + 0x11c }
Source : <0x00011532> { _vprintk + 0x10e } IF !CC JUMP
5 Target : <0x0001152a> { _vprintk + 0x106 }
Source : <0x00011664> { _vprintk + 0x240 } JUMP.S
6 Target : <0x00011664> { _vprintk + 0x240 }
Source : <0x00010b3e> { _wake_up_klogd + 0x1a } RTS
7 Target : <0x00010b24> { _wake_up_klogd + 0x0 }
Source : <0x00010ff8> { _release_console_sem + 0xb4 } JUMP.L
8 Target : <0x00010ff2> { _release_console_sem + 0xae }
Source : <0x00010fd8> { _release_console_sem + 0x94 } IF !CC JUMP
9 Target : <0x00010fce> { _release_console_sem + 0x8a }
Source : <0x000242ce> { _up + 0x3e } RTS
10 Target : <0x000242c8> { _up + 0x38 }
Source : <0x000242ba> { _up + 0x2a } IF !CC JUMP
11 Target : <0x00024290> { _up + 0x0 }
Source : <0x00010fca> { _release_console_sem + 0x86 } CALL pcrel
12 Target : <0x00010fb6> { _release_console_sem + 0x72 }
Source : <0x00010f90> { _release_console_sem + 0x4c } IF !CC JUMP
13 Target : <0x00010f7e> { _release_console_sem + 0x3a }
Source : <0x00010fa6> { _release_console_sem + 0x62 } IF CC JUMP
14 Target : <0x00010fa0> { _release_console_sem + 0x5c }
Source : <0x00010a16> { __call_console_drivers + 0x7a } RTS
15 Target : <0x00010a10> { __call_console_drivers + 0x74 }
Source : <0x000109d2> { __call_console_drivers + 0x36 } IF !CC JUMP
Stack info:
SP: [0x00e29cd8] <0x00e29cd8> /* kernel dynamic memory */
FP: (0x00e29cf0)
Memory from 0x00e29cd0 to 00e2a000
00e29cd0: 00e29cd8 0000000a [00000001]<0002e2e8> 001db0e0 00000000 001cd270 00000037
00e29cf0:(00000000)<0002e3e4> 001db0e0 001d6c04 00000006 00000000 <0002ee74> 001db0e0
00e29d10: 00000000 00000037 00000000 00000006 0000001f <0009d086><00008f06> 001d09a0
00e29d30: 00e28000 00e29eb8 0000ffff 00000001 <000151d2><ffa00300> 00000022 00e29eb8
00e29d50: 0000ffff 00003004 0009cf1e 000d6c04 <ffa00bb2> ffc00014 00000002 00000000
00e29d70: 00000005 00000000 00000019 00014de8 <0000d010> 00000000 00000000 00f84000
00e29d90: 00a0ed5c 00014de8 <ffa0032e> 0000000c 02002000 0000a3ca ffa017a8 0000a3b2
00e29db0: ffa017a8 00000000 00000000 0000f3bf 00000000 0014068f 00000000 00000000
00e29dd0: 00000000 001da1f0 001ce7bc 00000000 00000000 00000000 00000000 00000000
00e29df0: 00000000 00000000 00000000 00000000 00000000 ffffffff ffffffff 00000000
00e29e10: 00000001 001d09a0 00e28000 001cd270 001d73b8 00000094 001c855c 00000002
00e29e30: 00000000 0000ffff 0000000a 00000000 00000100 00000100 0000ffff 0000ffff
00e29e50: 001c855c 00000006 00000000 00000000 00000000 <0002ec40> 001da564 00e29fa4
00e29e70:<ffa0032e> 001d09a0 00e1d828 00000000 00000006 00000000 0000ffff 00000001
00e29e90: 00000001 037e8bec 0001000c <ffa00bb2> ffc00014 03794000 00e1d834 037e8bc0
00e29eb0: 00e29edc <0000a1be> 000d4fa6 00008050 00000000 00000000 00f84000 00a0ed5c
00e29ed0: 000d4fa6 <000d5298> 00000006 02003004 000d4f44 ffa017a8 000d4f22 ffa017a8
00e29ef0: 00000020 00000000 00000904 00000000 003d08c7 00000000 00000000 00000000
00e29f10: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00e29f30: 00000000 00000000 00000000 00000000 00000000 000f4240 00000000 00e29fa4
00e29f50: 00e21940 00e1d828 00000000 001d73b8 001dfc0c 03794074 03794000 00e1d834
00e29f70: 0000ffff 00000001 00000000 00000000 0000003f 0000ffff 0000ffff 03794074
00e29f90: 00000006 00000000 <000bda5a> 00e28000 00e28000 00000000 <000bc714> 00e1d800
00e29fb0: 00000000 00000000 00e1d800 00000000 00000000 00000000 00e1d800 00e1d800
00e29fd0: 00000000 <0002090c> 000bc694 00000000 00000000 00000000 <00001466> 00000000
00e29ff0: 00000000 00000000 ffffffff 00000006 037861e0
Return addresses in stack:
address : <0x0002e2e8> { ___report_bad_irq + 0x20 }
frame 1 : <0x0002e3e4> { _note_interrupt + 0x84 }
address : <0x0002ee74> { _handle_level_irq + 0x9c }
address : <0x0009d086> { _number + 0x2a2 }
address : <0x00008f06> { _bfin_demux_gpio_irq + 0x72 }
address : <0x000151d2> { _irq_enter + 0xa }
address : <0xffa00300> { _asm_do_IRQ + 0x34 }
address : <0xffa00bb2> { __common_int_entry + 0x72 }
address : <0x0000d010> { _sys_sched_getscheduler + 0x18 }
address : <0xffa0032e> { _asm_do_IRQ + 0x62 }
address : <0x0002ec40> { _handle_simple_irq + 0x74 }
address : <0xffa0032e> { _asm_do_IRQ + 0x62 }
address : <0xffa00bb2> { __common_int_entry + 0x72 }
address : <0x0000a1be> { _enqueue_task + 0xe }
address : <0x000d5298> { _ata_scsi_error + 0x3bc }
address : <0x000bda5a> { _scsi_run_host_queues + 0xe }
address : <0x000bc714> { _scsi_error_handler + 0x80 }
address : <0x0002090c> { _kthread + 0x50 }
address : <0x00001466> { _kernel_thread_helper + 0x6 }
handlers:
[<000d71a8>] (_ata_sff_interrupt+0x0/0x194)
Disabling IRQ #55
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:20:00:00:00/00:00:00:00:00/e0 tag 0 pio 16384 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: limiting speed to UDMA7:PIO5
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:20:00:00:00/00:00:00:00:00/e0 tag 0 pio 16384 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: limiting speed to PIO0
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:20:00:00:00/00:00:00:00:00/e0 tag 0 pio 16384 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:20:00:00:00/00:00:00:00:00/e0 tag 0 pio 16384 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:20:00:00:00/00:00:00:00:00/e0 tag 0 pio 16384 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
INFO: task ata_aux:79 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
ata_aux D ffa00934 0 79 2
Stack info:
SP: [0x037abca0] <0x037abca0> /* kernel dynamic memory */
FP: (0x037abcbc)
Memory from 0x037abca0 to 037ac000
037abca0:[00e377e0] 037813a0 037d30a0 00e37ae0 001c852c 00000002 037aa000 (037abcd8)
037abcc0:<ffa01c46> 030deebc ffffffff 037abd48 037aa000 037aa000 (037abd50)<ffa020bc>
037abce0: 037aa000 037aa000 037abde8 7fffffff 00000000 00000002 001d73b8 00000001
037abd00: 00df00c8 <000af594> 00000068 00000001 030deebc <000be65e> 00e1d000 00000001
037abd20:<ffa01e68> 037aa000 7fffffff 00000000 037abeac <00090c1e> 030deebc 00000001
037abd40: 037813a0 0000c09c 037abdec 037abdec (037abeac)<00090cb6> 030deebc 030deebc
037abd60: 00000000 00b426e0 037abde8 00000000 00df00c8 00080000 00000000 037abe5c
037abd80: 00000001 00090bac 00df00c8 00df00d8 00000001 00000000 00000000 00000004
037abda0: 001dde6d 00000000 00000010 00000000 <0008e964> 00df00c8 00e1d000 037abeac
037abdc0: 00000000 00000000 037abeb8 001dde6c fffffffe 037abde4 00000010 001aa5c0
037abde0: 001e16cc 037f37a0 00000000 037abd48 037abd48 <000bdf08> 030deebc 00e1d000
037abe00: 037abeac 00000000 00000000 037abeb8 00000000 00000000 0000ffff 00000000
037abe20: 00000001 037abf34 <000bdfa4> 00001d4c 00000005 00e1d000 00b426e0 00000000
037abe40: 0000000d 037abe60 00b38c0c 00000000 00000000 00b426e0 00001d4c 00000005
037abe60: 00000000 00000000 <000c3830> 00e03200 037abeb8 00000000 00000000 00000000
037abe80: 0000ffff 00000000 00b38be0 037abeb8 00000003 00000000 00000000 037abeb8
037abea0: 00001d4c 00000005 00000000 (00000000) 00000000 00000000 00000000 037aa000
037abec0: 037aa000 <000c45bc> 00e03200 00e1d000 00dfde00 00b3b800 03795458 0000ffff
037abee0: 03794000 <000af594> 00000068 <0000b944> 001c855c <0005f668> 00dfde00 03795300
037abf00: 000d0db4 00e03200 001c852c <000c32a8> 00e1d0ac <000c3346> 001df490 00e03200
037abf20: 03795458 0000ffff 037abf54 <0000bb9c> 001c855c <000c022e> 00e1d000 00b38be0
037abf40: 001c852c 00000000 <000d0e48> 03795458 001d5d60 037abf7c <ffa01c54><0001d9a4>
037abf60: 03795d78 037b4d40 001d73b8 037aa000 037abfac 00000000 037aa000 00000000
037abf80:<0001e33a> 037aa000 00000000 <0001e314> 037aa000 037aa000 037b4d40 037b4d48
037abfa0: 001d5d60 00000000 00000000 00000000 037813a0 00020cc4 037abfb8 037abfb8
037abfc0:<0002090c> 0001e298 00000000 00000000 037b4d40 00000000 00000000 00000000
037abfe0: 00000000 00000000 <00001466> 00000000 00000000 00000000 ffffffff 00000006
037ac000: 4c412023
Return addresses in stack:
frame 1 : <0xffa01c46> { _schedule + 0x182 }
frame 2 : <0xffa020bc> { _schedule_timeout + 0x6c }
address : <0x000af594> { _get_device + 0x14 }
address : <0x000be65e> { _scsi_request_fn + 0x24e }
address : <0xffa01e68> { _wait_for_common + 0x84 }
address : <0x00090c1e> { _blk_execute_rq_nowait + 0x4a }
frame 3 : <0x00090cb6> { _blk_execute_rq + 0x62 }
address : <0x0008e964> { _get_request_wait + 0x18 }
address : <0x000bdf08> { _scsi_execute + 0x98 }
address : <0x000bdfa4> { _scsi_execute_req + 0x5c }
address : <0x000c3830> { _sd_spinup_disk + 0x60 }
address : <0x000c45bc> { _sd_revalidate_disk + 0x68 }
address : <0x000af594> { _get_device + 0x14 }
address : <0x0000b944> { _dequeue_entity + 0x2c }
address : <0x0005f668> { _revalidate_disk + 0x14 }
address : <0x000c32a8> { _scsi_disk_get_from_dev + 0x24 }
address : <0x000c3346> { _sd_rescan + 0x1e }
address : <0x0000bb9c> { _pick_next_task_fair + 0x2c }
address : <0x000c022e> { _scsi_rescan_device + 0x4a }
address : <0x000d0e48> { _ata_scsi_dev_rescan + 0x94 }
address : <0xffa01c54> { _schedule + 0x190 }
address : <0x0001d9a4> { _run_workqueue + 0x7c }
address : <0x0001e33a> { _worker_thread + 0xa2 }
address : <0x0001e314> { _worker_thread + 0x7c }
address : <0x0002090c> { _kthread + 0x50 }
address : <0x00001466> { _kernel_thread_helper + 0x6 }
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:20:00:00:00/00:00:00:00:00/e0 tag 0 pio 16384 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for PIO
sd 0:0:0:0: [sda] Result: hostbyte=0x00 driverbyte=0x08
sd 0:0:0:0: [sda] Sense Key : 0xb [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
00 00 00 00
sd 0:0:0:0: [sda] ASC=0x0 ASCQ=0x0
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
Buffer I/O error on device sda, logical block 1
Buffer I/O error on device sda, logical block 2
Buffer I/O error on device sda, logical block 3
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x1)
ata1.00: revalidation failed (errno=-5)
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x1)
ata1.00: revalidation failed (errno=-5)
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x1)
ata1.00: revalidation failed (errno=-5)
ata1: soft resetting link
ata1.00: failed to IDENTIFY (I/O error, err_mask=0x1)
ata1.00: revalidation failed (errno=-5)
ata1: link is slow to respond, please be patient (ready=0)
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: link is slow to respond, please be patient (ready=0)
ata1: device not ready (errno=-16), forcing hardreset
ata1: soft resetting link
ata1: link is slow to respond, please be patient (ready=0)
ata1: SRST failed (errno=-16)
ata1: soft resetting link
ata1: link is slow to respond, please be patient (ready=0)
ata1.00: revalidation failed (errno=-2)
ata1: soft resetting link
ata1.00: revalidation failed (errno=-2)
ata1: link is slow to respond, please be patient (ready=0)
ata1: soft resetting link
ata1.00: configured for PIO
ata1: EH complete
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata1.00: cmd 20/00:08:00:00:00/00:00:00:00:00/e0 tag 0 pio 4096 in
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }
ata1: soft resetting link
ata1.00: configured for PIO
sd 0:0:0:0: [sda] Result: hostbyte=0x00 driverbyte=0x08
sd 0:0:0:0: [sda] Sense Key : 0xb [current] [descriptor]
Descriptor sense data with sense descriptors (in hex):
72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00
00 00 00 00
sd 0:0:0:0: [sda] ASC=0x0 ASCQ=0x0
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
ata1: EH complete
fdisk: can't read from /dev/sdasd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
root:sd
root:/>
root:/> 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Follow-ups
--- Barry Song 2009-06-22 06:34:39
Even though SATA can't work at trunk head, with the log:
irq 55: nobody cared (try booting with the "irqpoll" option)
But it can work normally in 2009R1 release like the log:
...
scsi0 : pata_platform
ata1: PATA max PIO0 mmio cmd 0x20314020 ctl 0x2031401c irq 55
ata1.00: qc timeout (cmd 0x27)
ata1.00: failed to read default max address (err_mask=0x4)
ata1.00: HPA support seems broken, skipping HPA handling
ata1.00: configured for PIO
scsi 0:0:0:0: Direct-Access ATA Hitachi HTS54161 SB4O PQ: 0 ANSI: 5
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sd 0:0:0:0: [sda] 312581808 512-byte hardware sectors: (160 GB/149 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support
DPO or FUA
sda: sda1 sda2
sd 0:0:0:0: [sda] Attached SCSI disk
sd 0:0:0:0: Attached scsi generic sg0 type 0
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0,
regs_base@ffc00500, dma channel@7
...
root:/> mount /dev/sda1 /mnt/
EXT2-fs warning (device sda1): ext2_fill_super: mounting ext3 filesystem as
ext2
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
root:/> cd /mnt/
root:/mnt> ls
1.txt lost+found
root:/mnt> cat 1.txt
ajjajajajajaj
nkksdkjds
kasksdkldskla
barry
root:/mnt>
I will check what's the difference.
--- Barry Song 2009-06-23 04:06:16
By the workaround, SATA can work normally for SATA hard disk connected to bf537
IDE daughter board via SATA/IDE converter.
Index: libata-core.c
===================================================================
--- libata-core.c (revision 6835)
+++ libata-core.c (working copy)
@@ -6128,9 +6128,9 @@
}
/* enable irq after probe if it is asked to be disabled when request */
- if (host->irq_flags & IRQF_DISABLED)
+/* if (host->irq_flags & IRQF_DISABLED)
enable_irq(host->irq);
-
+*/
/* perform each probe asynchronously */
for (i = 0; i < host->n_ports; i++) {
struct ata_port *ap = host->ports[i];
Index: libata-sff.c
===================================================================
--- libata-sff.c (revision 6835)
+++ libata-sff.c (working copy)
@@ -1156,6 +1156,7 @@
if (qc) {
if (likely(!(qc->err_mask & AC_ERR_HSM))) {
ap->ops->sff_irq_on(ap);
+ enable_irq(ap->host->irq);
ata_qc_complete(qc);
} else
ata_port_freeze(ap);
Tt seems our hardwares fail to set the interrupt output low in the init phase.
So the workaround postpone the enable_irq until real transfer needs the irq.
--- Michael Hennerich 2009-07-10 11:00:52
Hi Barry,
I think this issue is caused by a Pull-Up resistor on the INTRQ line on the
CF-IDE-NAND Card.
Read this:
http://www.mail-archive.com/t13@tgi.com/msg00418.html//www.mail-archive.com/t13@tgi.com/msg00418.html
On the CF Card socket we also have that pull-up – but there we had no choice
since in PC-Card IO mode the Interrupt is asserted Low. So this was a tradeoff,
and at the time doing the card – it worked without errors.
The problem here is that the INTRQ signal output line has a high impedance when
no devices are
selected or interruption is disabled.
Like you noticed, recent Linux libata assumes the INTRQ staying inactive the
time between the IRQ is requested and the device is configured.
If this fix isn’t acceptable to mainline we should revert – and fix the
HW.
-Michael
--- Barry Song 2009-07-12 22:01:31
Hi Michael,
Yes. We are using a SW workaround to make our ATA-friend storage can work at
the same time without HW change. Then we are polling in the probe, then moving
to IRQ mode for data transfer. As you know, the workaround will not enter the
mainline only as our codes.
So do you think I should revert all to the original codes? But it seems the
workaround way has existed for a long time.
-Barry
--- Robin Getz 2009-07-12 22:16:50
Barry:
If we have been doing it wrong a long time, we still have been doing it wrong.
The goal is to be able to boot a kernel.org kernel (eventually) - if it is not
acceptable upstream - we should not be doing it, unless we have really good
reasons. Busted hardware (wrong pull up/down) isn't a good reason.
-Robin
--- Sonic Zhang 2009-07-12 23:25:24
Micheal means the IDE daughter board should be fixed. But, we have to keep this
walk around till it is done. Can Micheal change the schematics in the hardware
project? We can do it accordingly in Shanghai.
--- Barry Song 2009-07-24 01:26:35
After pulldown the IDE_IRQ, we can use normal mainline codes to access harddisk.
Codes are reverted. So closed.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found