[#4607] ide-cdrom detects error when kernel booting up
Submitted By: Mingquan Pan
Open Date
2008-11-04 23:26:57 Close Date
2009-07-24 03:56:32
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.:
Oct 10
App binary format:
N/A
Summary: ide-cdrom detects error when kernel booting up
Details:
ide-cdrom detects error when kernel booting up on trunk head now. It happens about the kernel been upgraded on Oct 29.
U-Boot 1.1.6-svn1273 (ADI-2008R1.5) (Jul 21 2008 - 00:33:04)
CPU: ADSP bf537-0.2 (Detected Rev: 0.2)
Board: ADI BF537 stamp board
Support: blackfin.uclinux.org/
Clock: VCO: 500 MHz, Core: 500 MHz, System: 100 MHz
RAM: 64 MB
Fl
RAM size is 64 MB.
ash: 4 MB
In: serial
Out: serial
Err: serial
Net: Blackfin EMAC
MAC: 00:EA:BC:80:02:00
Hit any key to stop autoboot: 0
bfin> set bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600
bfin> set serverip 10.100.4.174
bfin> set ipaddr 10.100.4.50
bfin> save
Saving Environment to Flash...
. done
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
. done
Protected 1 sectors
bfin> tftpboot 0x2000000 linux
Using Blackfin EMAC device
TFTP from server 10.100.4.174; our IP address is 10.100.4.50
Filename 'linux'.
Load address: 0x2000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
###########################################################
done
Bytes transferred = 5955411 (5adf53 hex)
Image size is 5adf53
bfin> run addip
bfin> bootelf
Loading .text @ 0x00001000 (1270304 bytes)
Loading .rodata @ 0x00137220 (326200 bytes)
Loading .init.rodata @ 0x00186c58 (80 bytes)
Loading __ksymtab @ 0x00186ca8 (16824 bytes)
Loading __ksymtab_gpl @ 0x0018ae60 (6528 bytes)
Loading __ksymtab_strings @ 0x0018c7e0 (52643 bytes)
Loading __init_rodata @ 0x00199584 (172 bytes)
Loading __param @ 0x00199630 (880 bytes)
Clearing .bss @ 0x001999a0 (71140 bytes)
Loading .data @ 0x001aaf84 (69756 bytes)
Loading .init.text @ 0x001bc000 (102564 bytes)
Loading .init.data @ 0x001d50a4 (21812 bytes)
Loading .init.setup @ 0x001da5d8 (596 bytes)
Loading .initcall.init @ 0x001da82c (600 bytes)
Loading .con_initcall.init @ 0x001daa84 (4 bytes)
Loading .init.ramfs @ 0x001daa88 (3402350 bytes)
Loading .text_l1 @ 0xffa00000 (7184 bytes)
sh_addr: FFA00000, p_paddr: 005194F6
Loading from: 02509000 to 005194F6, size: 7184
Loading .data_l1 @ 0xff800000 (224 bytes)
sh_addr: FF800000, p_paddr: 0051B106
Loading from: 0250B000 to 0051B106, size: 224
## Starting application at 0x001ca270 ...
Linux version 2.6.28-rc2-ADI-2009R1-pre-svn5568 (test@uclinux55-bf537-cf) (gcc version 4.1.2 (ADI svn)) #31 Tue Nov 4 11:53:51 MST 2008
console [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x00137220
rodata = 0x00137220-0x001999a0
bss = 0x001999a0-0x001aaf84
data = 0x001aaf84-0x001bc000
stack = 0x001ba000-0x001bc000
init = 0x001bc000-0x0051c000
available = 0x0051c000-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Reset caused by Software reset
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 350 MHz core clock and 70 MHz System Clock
NOMPU: setting up cplb tables for global access
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14223
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:1:eth0:off
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 256 (order: 8, 1024 bytes)
console handover: boot [early_BFuart0] -> real [ttyBF0]
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory available: 51528k/65536k RAM, (3456k init code, 1240k kernel code, 532k data, 1024k dma, 7756k reserved)
Calibrating delay loop... 696.32 BogoMIPS (lpj=1392640)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (40 KB free)
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
SCSI subsystem initialized
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 100
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART
brd: module loaded
bfin_mac_mdio: probed
bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=13)@sclk=70MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
Driver 'sr' needs updating - please use bus_type methods
scsi0 : pata_platform
ata1: PATA max PIO0 mmio cmd 0x20314020 ctl 0x2031401c irq 55
ata1.00: ATAPI: TSSTcorpDVD-ROM TS-H352C, CH01, max UDMA/33
ata1.00: configured for PIO
ata1.00: qc timeout (cmd 0xa0)
ata1.00: TEST_UNIT_READY failed (err_mask=0x5)
ata1.00: configured for PIO
ata1.00: qc timeout (cmd 0xa0)
ata1.00: TEST_UNIT_READY failed (err_mask=0x4)
ata1.00: configured for PIO
ata1.00: qc timeout (cmd 0xa0)
ata1.00: TEST_UNIT_READY failed (err_mask=0x4)
ata1.00: disabled
ata1: soft resetting link
ata1: EH complete
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 00:00:19 UTC (19)
IP-Config: Complete:
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,
host=1, domain=, nis-domain=(none),
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=
Freeing unused kernel memory: 3456k freed
dma_alloc_init: dma_page @ 0x00519000 - 256 pages at 0x03f00000
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.12.1 (2008-11-04 05:11:28 MST) built-in shell (msh)
Enter 'help' for a list of built-in commands.
Follow-ups
--- Sonic Zhang 2008-11-12 02:08:11
PATA harddisk runs proper under the same libata driver. It seems this is a bug
in common SCSI CDROM driver of the new 2.6.28-rc2 kernel.
--- Sonic Zhang 2008-11-12 02:36:18
The problem has nothing to do with sr.c. Still be somewhere in libata.
ata1.01: configured for PIO
ata1.01: qc timeout (cmd 0xa0)
ata1.01: TEST_UNIT_READY failed (err_mask=0x4)
ata1.01: disabled
--- Sonic Zhang 2008-11-12 05:10:59
The error information means DVDROM fails to response to the ATAPI command
TEST_UNIT_READY in functions ata_std_error_handler() -> ata_do_eh() ->
ata_eh_recover() -> atapi_eh_clear_ua() -> atapi_eh_tur() ->
ata_exec_internal().
--- Barry Song 2009-07-09 02:14:19
The problem still comes from interrupt issue. TEST_UNIT_READY depends on
interrupt. TEST_UNIT_READY is done in the process of probe. But for our hardware
problem, our interrupt is enabled after probe. So that makes the TEST_UNIT_READY
fail for CD-ROM.
After move enable_irq ahead the TEST_UNIT_READY, the CD-ROM works normally.
Polling is a way making our codes support pata/sata/CD-ROM without any function
issue. But maybe it means low performance.
Then we need to find a good function to place enable_irq in the process of
probe.
--- Robin Getz 2009-07-09 12:00:17
So - it sounds like our driver isn't enabling the interrupt in the probe (like
the kernel expects?)
-Robin
--- Barry Song 2009-07-09 23:10:09
Yes. In the mainline code, the IRQ is enabled while request irq. In our codes,
due to some abnormal HW interrupt, board drivers set IRQ_NOAUTOEN flag to
disable ATA interrupt while request, then in the process of probe, we can avoid
flooding interrupt.
So our ATA interrupt is enabled after probe. But some CD-ROM command used
interrupts while probe. So that caused commands fail and CD-ROM doesn't work.
To fix it, use polling while probe, then move to irq mode for data transfer.
--- Mingquan Pan 2009-07-24 03:56:32
Yes, ide-cdrom can be detected as sr0 now:
sr0: scsi3-mmc drive: 48x/48x cd/rw xa/form2 cdda tray
So close.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found