# Emask 0x10 (ATA bus error)

## pandaxiongmao

Every time I attempt to mount CD/DVD or play audio cd for the very first time after fresh start-up (or reboot), these messages below show up on dmesg.

```
ata2.00: exception Emask 0x10 SAct 0x0 SErr 0x1870000 action 0x2

ata2.00: cmd a0/00:00:00:00:20/00:00:00:00:00/a0 tag 0 cdb 0x0 data 0

         res 51/64:03:00:00:20/00:00:00:00:00/a0 Emask 0x10 (ATA bus error)

ata2: hard resetting port

ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)

ata2.00: configured for UDMA/66

ata2: EH complete
```

Does anyone know what it means? The CD/DVD plays fine, but I don't like having an error message showing up w/o any good reason.

Just in case if people want to help me debugging the problem, I'll provide my kernel config (only the SCSI and SATA parts).

SCSI section

```
# SCSI device support

CONFIG_SCSI=y

# CONFIG_SCSI_TGT is not set

CONFIG_SCSI_NETLINK=y

CONFIG_SCSI_PROC_FS=y

# SCSI support type (disk, tape, CD-ROM)

# Some SCSI devices (e.g. CD jukebox) support multiple LUNs

# CONFIG_SCSI_MULTI_LUN is not set

CONFIG_SCSI_CONSTANTS=y

# CONFIG_SCSI_LOGGING is not set

# CONFIG_SCSI_SCAN_ASYNC is not set

# SCSI Transports

CONFIG_SCSI_SPI_ATTRS=y

CONFIG_SCSI_FC_ATTRS=y

# CONFIG_SCSI_ISCSI_ATTRS is not set

CONFIG_SCSI_SAS_ATTRS=y

# CONFIG_SCSI_SAS_LIBSAS is not set

# SCSI low-level drivers

# CONFIG_ISCSI_TCP is not set

# CONFIG_SCSI_3W_9XXX is not set

# CONFIG_SCSI_ACARD is not set

# CONFIG_SCSI_AACRAID is not set

# CONFIG_SCSI_AIC7XXX is not set

# CONFIG_SCSI_AIC7XXX_OLD is not set

# CONFIG_SCSI_AIC79XX is not set

# CONFIG_SCSI_AIC94XX is not set

# CONFIG_SCSI_ARCMSR is not set

# CONFIG_SCSI_HPTIOP is not set

# CONFIG_SCSI_BUSLOGIC is not set

# CONFIG_SCSI_DMX3191D is not set

# CONFIG_SCSI_EATA is not set

# CONFIG_SCSI_FUTURE_DOMAIN is not set

# CONFIG_SCSI_GDTH is not set

# CONFIG_SCSI_IPS is not set

# CONFIG_SCSI_INITIO is not set

# CONFIG_SCSI_INIA100 is not set

# CONFIG_SCSI_STEX is not set

# CONFIG_SCSI_SYM53C8XX_2 is not set

# CONFIG_SCSI_IPR is not set

# CONFIG_SCSI_QLOGIC_1280 is not set

# CONFIG_SCSI_QLA_FC is not set

# CONFIG_SCSI_QLA_ISCSI is not set

# CONFIG_SCSI_LPFC is not set

# CONFIG_SCSI_DC395x is not set

# CONFIG_SCSI_DC390T is not set

# CONFIG_SCSI_DEBUG is not set

# CONFIG_SCSI_SRP is not set

# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
```

SATA section

```
# CONFIG_SATA_AHCI is not set

# CONFIG_SATA_SVW is not set

# CONFIG_SATA_MV is not set

CONFIG_SATA_NV=y

# CONFIG_SATA_QSTOR is not set

# CONFIG_SATA_PROMISE is not set

# CONFIG_SATA_SX4 is not set

# CONFIG_SATA_SIL is not set

# CONFIG_SATA_SIL24 is not set

# CONFIG_SATA_SIS is not set

# CONFIG_SATA_ULI is not set

# CONFIG_SATA_VIA is not set

# CONFIG_SATA_VITESSE is not set
```

Any help or enlightenment would be appreciated. My DVD/CD drive is Plextor 755SA, and I have the latest firmware.

Thanks.

----------

## didymos

It sounds like the ata controller isn't getting initialized correctly during boot, so the first access triggers the reset, after which it gets properly re-initialized.  If it's only happening that one time after start-up, I wouldn't be too concerned about it.  More of an annoyance than anything else, if that's the case, and something to keep an eye on.  You might try putting a little stress on the bus and see if you can trigger another reset without rebooting the machine.  In any case, I doubt the actual drive has anything to do with it.  It's kind of a pain in the ass, but you could try swapping drive connections around to see if the error stays localized to that particular ata port.

----------

## pandaxiongmao

Thanks for the reply; I sometimes saw the problem re-occurring after my system woke up from hibernation. I'm going to try to switch to another SATA port as you suggested to see if it has something to do with my 2nd SATA port (it's connected to the 2nd port).

I also found something interesting below.

```
mycomputer ~ # lspci | grep -i sata

04:00.0 SATA controller: JMicron Technologies, Inc. JMicron 20360/20363 AHCI Controller (rev 02)
```

When I checked my kernel config, I found out that SATA AHCI support isn't set.

```
mycomputer ~ # cat /usr/src/linux/.config | grep -i ahci

# CONFIG_SATA_AHCI is not set
```

I just added SATA AHCI support into my kernel, and let's see if it can get rid of the error or not.

----------

## pandaxiongmao

Hmm, the problem suddenly disappears. I'll post again if I see another error.

Update: Bah, it didn't solve the problem because after my pc woke up from hibernation, it occurred again when I tried to play an audio cd. Whew, it seems to be totally random. 

This time it's complaining about ata3, and I don't have anything plugged to my 3rd SATA slot.

```
ata3.00: exception Emask 0x10 SAct 0x0 SErr 0x1870000 action 0x2

ata3.00: cmd a0/00:00:00:00:20/00:00:00:00:00/a0 tag 0 cdb 0x0 data 0

         res 51/64:03:00:00:20/00:00:00:00:00/a0 Emask 0x10 (ATA bus error)

ata3: hard resetting port

ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)

ata3.00: configured for UDMA/66

ata3: EH complete
```

Update: Nevermind, I just realized that activating AHCI would mean that my eSATA is now active; therefore, my SATA DVD/CD drive was re-assigned to ata3.

My temporary hypothesis is that when the system woke up from suspend-to-ram animation, it forgot to re-load the sata controller (similar to what didymos wrote); thus the kernel tried to reset it back to normal state.

----------

