OpenSolaris

Printable Version Enter a New Search
Bug ID 6665032
Synopsis ahci driver doesn't work for ATI SB600 AHCI chipset (ASUS M2A-VM)
State 10-Fix Delivered (Fix available in build)
Category:Subcategory driver:ahci
Keywords AHCI | SB600 | ahci | opensolaris | rtiq_reviewed | sb600
Responsible Engineer Ying Tian
Reported Against snv_81
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_93
Fixed In snv_93
Release Fixed solaris_nevada(snv_93) , solaris_10u8(s10u8_01) (Bug ID:2169587)
Related Bugs 6624964 , 6636420 , 6648360 , 6699259 , 6727346 , 6732166 , 6764179 , 6875028
Submit Date 19-February-2008
Last Update Date 16-July-2009
Description
Category
   driver
Sub-Category
   other
Description
   After installing Nevada b81, the first boot into the installed system pauses after the Solaris startup message (SunOS Release 5.11 .... All rights reserved.). Eventually, the system panics because it is unable to mount the root filesystem. This only occurs when the SATA controller is set to AHCI in the BIOS, and only happens with the 64-bit kernel. 32-bit works correctly, and booting into the Xen kernel works correctly.
Initial kmdb session indicates that the sata_pkt is timing out trying to identify the devices.
NOTICE: hba AHCI bersion = 1.10
 pcplusmp: pciclass,010601 (ahci) instance 0 vector 0x16 ioapic 0x4
 intin 0x16 is bound to cpu 0
 NOTICE: ahci watchdog: port 0 satapkt 0xffffff0204a6be08 timed out
 NOTICE: ahci watchdog: port 0 satapkt 0xffffff0204a6be08 timed out
 ... panic, unable to mount root fs ...
With some more digging, it looks like what's timing out is a sata_pkt sent from sata_fetch_device_identify_data. Looking at the sata_pkt structure at the address referenced in the timeout message, it's just sending the SATA command SATAC_ID_DEVICE (0xEC). After the long delay and packet, that sata_pkt does end up with satapkt_reason set to the value indicating a timeout.
Frequency
   Always
Regression
   No
Steps to Reproduce
   1. Build a system with a motherboard that will exhibit this problem. I'm using an ASUS M2A-VM with the latest non-beta BIOS (1603). Attach a SATA hard drive to the motherboard.
2. In the system BIOS, set the SATA controller mode to AHCI
3. Install SXDE build 81 on to the attached SATA hard drive.
4. After installing, allow the system to boot using the default GRUB entry.
Expected Result
   The system should boot normally, correctly detecting the hard drive and loading Solaris from it.
Actual Result
   The system hangs for a couple minutes during boot and then eventually panics because it cannot mount the root filesystem (panic[cpu0]/thread=fffffffffbc24f20: cannot mount root path /pci@0,0/pci1043,82a)
Error Message(s)
   With kernel debugger, I set moddebug=0x80000000 and a breakpoint at ahci_timeout_pkts. When I hit the breakpoint, I set ahci_debug_flags=0xffffffff and continued. The following debug messages were output:
[0]> :c                                                                         
WARNING: ahci_timeout_pkts enter: port 0                                        
WARNING: ahci_restart_port_wait_till_ready: port 0 enter                        
WARNING: ahci_put_port_into_notrunning_state enter: port 0                      
WARNING: ahci_put_port_into_notrunning_state: succeeded to clear PxCMD.CR to '06
WARNING: ahci_start_port: 0 enter                                               
WARNING: ahci_timeout_pkts: port 0, finished_tags = 0x0, timeout_tags = 0x1, po 
WARNING: ahci_mop_commands entered: port: 0 slot_status: 0x1                    
WARNING: ahci_mop_commands: failed_tags: 0x0, timeout_tags: 0x1 aborted_tags: 00
WARNING: ahci_mop_commands: sending up pkt 0xffffff02109d2d98 with SATA_PKT_TIMT
WARNING: ahci_tran_start sata tran accepted: port 0                             
WARNING: ahci_tran_start enter: cport 0 satapkt 0xffffff02109d2d98              
WARNING: ahci_do_sync_start enter: port 0 spkt 0xffffff02109d2d98               
WARNING: ahci_claim_free_slot enter ahciport_pending_tags = 0x0 ahciport_pendin0
WARNING: ahci_claim_free_slot: found slot: 0x0                                  
WARNING: ahci_deliver_satapkt enter: cmd_reg: 0xa1, cmd_slot: 0x0, port: 0, sat8
WARNING: ncookies = 0x1, ahci_dma_prdt_number = 0x101                           
WARNING: command data direction is sata_data_direction = 0x2                    
WARNING:                                                                        
                                                                                
WARNING: Command header&table for spkt 0xffffff02109d2d98 cmd_reg 0xa1 port 0   
WARNING:   Command Header:   10085        0  44ba000        0                   
WARNING:   Command FIS:     a18027        0        0        0                   
WARNING:   ATAPI command:  0  0  0  0  0  0  0  0                               
WARNING:   ATAPI command:  0  0  0  0  0  0  0  0                               
WARNING:   Cookie 0:      d7e03820        0        0      1ff                   
WARNING: ahci_deliver_satapkt exit: port 0                                      
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: ahci_watchdog_handler entered                                          
WARNING: the current slot is 0                                                  
kmdb: stop at ahci`ahci_timeout_pkts                                            
kmdb: target stopped at:                                                        
ahci`ahci_timeout_pkts: pushq  %rbp                                             
[0]> :c                                                                         
WARNING: ahci_timeout_pkts enter: port 0                                        
WARNING: ahci_restart_port_wait_till_ready: port 0 enter                        
WARNING: ahci_put_port_into_notrunning_state enter: port 0                      
WARNING: ahci_put_port_into_notrunning_state: succeeded to clear PxCMD.CR to '06
WARNING: ahci_start_port: 0 enter                                               
WARNING: ahci_timeout_pkts: port 0, finished_tags = 0x0, timeout_tags = 0x1, po 
WARNING: ahci_mop_commands entered: port: 0 slot_status: 0x1                    
WARNING: ahci_mop_commands: failed_tags: 0x0, timeout_tags: 0x1 aborted_tags: 00
WARNING: ahci_mop_commands: sending up pkt 0xffffff02109d2d98 with SATA_PKT_TIMT
WARNING: ahci_tran_start sata tran accepted: port 0                             
WARNING: ahci_tran_probe_port enter: cport: 1, pmport: 0, qual: 4               
WARNING: ahci_tran_probe_port: port 1 PORT NORMAL 0                             
WARNING: ahci_tran_probe_port: port 1 No device found                           
WARNING: ahci_tran_probe_port enter: cport: 2, pmport: 0, qual: 4               
WARNING: ahci_tran_probe_port: port 2 PORT NORMAL 0                             
WARNING: ahci_tran_probe_port: port 2 No device found                           
WARNING: ahci_tran_probe_port enter: cport: 3, pmport: 0, qual: 4               
WARNING: ahci_tran_probe_port: port 3 PORT NORMAL 0                             
WARNING: ahci_tran_probe_port: port 3 No device found                           
WARNING: ahci_attach success!                                                   
                                                                                
panic[cpu0]/thread=fffffffffbc24f20: cannot mount root path /pci@0,0/pci1043,82a
                                                                                
fffffffffbc44da0 genunix:rootconf+113 ()                                        
fffffffffbc44df0 genunix:vfs_mountroot+65 ()                                    
fffffffffbc44e30 genunix:main+128 ()                                            
fffffffffbc44e40 unix:_locore_start+92 ()
Test Case
   
Workaround
    - Boot into 32-bit kernel
 - Boot into Xen kernel
 - Don't use AHCI mode, which falls back on IDE emulation
Submitter wants to work on bug
   No
Additional configuration information
   Motherboard: ASUS M2A-VM, with latest (non-beta) BIOS (1603)
BIOS SATA controller mode set to "AHCI"
Nevada b81 (SXCE), 64bit
One SATA hard drive attached to controller port 0
Work Around
Please use 32-bit kernel; Or when 64-bit kernel is used, disable the ahci 64-bit dma by kmdb, or just plug less than 4G memory.
Comments
N/A