OpenSolaris

Printable Version Enter a New Search
Bug ID 6824745
Synopsis ahci doesn't find sata disk at boot, after the putback for 6753962
State 10-Fix Delivered (Fix available in build)
Category:Subcategory driver:ahci
Keywords ALPM | ahci | opensolaris | oss-reques | oss-sponsor
Sponsor
Submitter keil
Responsible Engineer Ying Tian
Reported Against snv_112
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_114
Fixed In snv_114
Release Fixed solaris_nevada(snv_114)
Related Bugs 6753962
Submit Date 1-April-2009
Last Update Date 13-May-2009
Description
Category
   driver
Sub-Category
   sata
Description
   Most of the time (~ 9/10 cases) onnv-gate build 112 release bits
panic on a ASUS N4L-VM DH mainboard during boot / zfs mount root
(in rare cases there is no panic and the system does boot):
NOTICE: error reading device label
NOTICE:
  ***************************************************
  *  This device in not bootable!                   *
  *  It is either offlined or detached or faulted.  *
  *  Please try to boot from a different device.    *
  ***************************************************
NOTICE: spa_import_rootpool: error 19
Cannot mount root on /pci@0,0/pci1043,8129@1f,2/disk@0,0:a fstype zfs
panic[cpu0]/thread=fffffffffbc2cfe0: vfs_mountroot: cannout mount root
genunix:vfs_mountroot+350 ()
genunix:main+f0 ()
unix:_locore_start+92 ()
build 112 debug bits are able to boot, most of the time. But there
have been rare cases where the same panic has been seen with build 112
debug bits.
               -------------------
It seems that we get ahci interrupts (ahci_intr() -> ahci_intr_phyrdy_change())
before the ahci sata hba is registered (by a call to sata_hba_attach(), from 
ahci_register_sata_hba_tran()).  It seems the phyrdy change interrupt should
send a sata hba event, but sata_hba_event_notify() drops the event because
the sata_hba_list is empty (sata_hba_attach() has not yet been called)
at the point the ahci interrupt is received.
With build 111 no such ahci_intr_phyrdy_change() interrupt is generated.
And with build 111 (or older) the ASUS N4L-VM mainboard was able to boot
from zfs root.
               -------------------
Apparently this has changed with the putback for 6753962 "ahci does
not work with Asus M3N78 Pro/M3N-HT (nforce 780a) motherboard SATA
interfaces".
ahci_initialize_port() was changed to call ahci_port_reset() when the
"port task file" interface status has the AHCI_TFD_STS_BSY or
AHCI_TFD_STS_DRQ bit set.  On my ASUS N4L-VM DH the "port task file"
data returned by the hardware at ahci_initialize_port() time is 0x80
(= AHCI_TFD_STS_BSY) ==> ahci_port_reset() is called.  It seems the
hardware sends a "phyrdy_change" interrupt after that port reset,
before the ahci sata hba is registered with the sata framework, so
that the "phyrdy_change" gets lost in sata_hba_event_notify().
Frequency
   Often
Regression
   Solaris 10
Steps to Reproduce
   Try to boot build 112 from a S-ATA HDD on ASUS N4L-VM DH mainboard (ICH7-M), 
when the intel chipset s-ata controller is configured for ahci mode.
Expected Result
   Kernel is able to find the s-ata boot drive on ahci, and is able to boot
Actual Result
   Kernel panics with 
NOTICE: error reading device label
NOTICE: spa_import_rootpool: error 19
Cannot mount root on /pci@0,0/pci1043,8129@1f,2/disk@0,0:a fstype zfs
Error Message(s)
   
NOTICE: error reading device label
NOTICE:
  ***************************************************
  *  This device in not bootable!                   *
  *  It is either offlined or detached or faulted.  *
  *  Please try to boot from a different device.    *
  ***************************************************
NOTICE: spa_import_rootpool: error 19
Cannot mount root on /pci@0,0/pci1043,8129@1f,2/disk@0,0:a fstype zfs
panic[cpu0]/thread=fffffffffbc2cfe0: vfs_mountroot: cannout mount root
genunix:vfs_mountroot+350 ()
genunix:main+f0 ()
unix:_locore_start+92 ()
Test Case
   
Workaround
   
Additional configuration information
   ASUS N4L-VM DH mainboard (ICH7-M)
- S-ATA HDD, Samsung 250GB
- S-ATA DVD-writer device
SX:CE build 104, bfu'ed to onnv-gate build 112
Work Around
N/A
Comments
N/A