# eSATA drive not recognised with kernel 3.12 [SOLVED]

## NathanZachary

Hello all,

I have an external enclosure that I connect via eSATA to my main machine.  When I was using kernel 3.8.0, it worked without a problem:

```

Jan 27 11:35:37  kernel: [   43.123403] ata15: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0xe frozen

Jan 27 11:35:37  kernel: [   43.123407] ata15: irq_stat 0x02400000, PHY RDY changed

Jan 27 11:35:37  kernel: [   43.123414] ata15: hard resetting link

Jan 27 11:35:38  kernel: [   43.844027] ata15: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

Jan 27 11:35:38  kernel: [   43.846023] ata15.00: ATA-8: HUA723030ALA640, MKAOA690, max UDMA/133

Jan 27 11:35:38  kernel: [   43.846028] ata15.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 0/32)

Jan 27 11:35:38  kernel: [   43.848120] ata15.00: configured for UDMA/133

Jan 27 11:35:38  kernel: [   43.848128] ata15: EH complete

Jan 27 11:35:38  kernel: [   43.848214] scsi 14:0:0:0: Direct-Access     ATA      HUA723030ALA640  MKAO PQ: 0 ANSI: 5

Jan 27 11:35:38  kernel: [   43.848306] sd 14:0:0:0: Attached scsi generic sg4 type 0

Jan 27 11:35:38  kernel: [   43.848366] sd 14:0:0:0: [sdc] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)

Jan 27 11:35:38  kernel: [   43.848447] sd 14:0:0:0: [sdc] Write Protect is off

Jan 27 11:35:38  kernel: [   43.848449] sd 14:0:0:0: [sdc] Mode Sense: 00 3a 00 00

Jan 27 11:35:38  kernel: [   43.848474] sd 14:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA

Jan 27 11:35:38  kernel: [   43.884840]  sdc: sdc1 sdc2

Jan 27 11:35:38  kernel: [   43.885589] sd 14:0:0:0: [sdc] Attached SCSI disk

Jan 27 11:36:13  kernel: [   78.732685] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)

```

Now that I've switched to kernel 3.12.9, it doesn't even show in /var/log/messages when it is connected.

Can anyone point me in the right direction?  I've been looking at differences in the kernel configurations for a while now, but haven't had any luck.

Thank you preemptively!

Cheers,

Nathan Zachary

----------

## kernelOfTruth

no errors in dmesg ?

is pciehp or some other related pcie modules loaded or compiled into the kernel ?

esata drives kept on working for me from ->3.10->3.11->3.12(including 3.2.1 :Cool: ->3.13

not sure what could have caused this

is the external case or drive OK ?

----------

## NathanZachary

After sorting the two kernel .configs, I've found that these are the only options that are present in the 3.8 kernel (which was working with my eSATA enclosure) but are not present in my 3.12.9 kernel:

```

# diff -y 3.12kernelsorted 3.8kernelsorted | grep '>'

                           >   CONFIG_ACPI_DOCK=y

                           >   CONFIG_ACPI_I2C=y

                           >   CONFIG_ACPI_PROC_EVENT=y

                           >   CONFIG_AGP_AMD64=y

                           >   CONFIG_ARCH_SUPPORTS_MSI=y

                           >   CONFIG_CRYPTO_SHA1_SSSE3=y

                           >   CONFIG_DM_DEBUG=y

                           >   CONFIG_EVENT_POWER_TRACING_DEPRECATED=y

                           >   CONFIG_EXPERIMENTAL=y

                           >   CONFIG_GAMEPORT=y

                           >   CONFIG_GENERIC_HARDIRQS=y

                           >   CONFIG_GENERIC_SIGALTSTACK=y

                           >   CONFIG_HAVE_GENERIC_HARDIRQS=y

                           >   CONFIG_HAVE_IRQ_WORK=y

                           >   CONFIG_HAVE_TEXT_POKE_SMP=y

                           >   CONFIG_I7300_IDLE_IOAT_CHANNEL=y

                           >   CONFIG_I7300_IDLE=y

                           >   CONFIG_INPUT_JOYDEV=y

                           >   CONFIG_JOYSTICK_ANALOG=y

                           >   CONFIG_MMC_SDHCI_PLTFM=y

                           >   CONFIG_PERCPU_RWSEM=y

                           >   CONFIG_SND_USB=y

                           >   CONFIG_STEP_WISE=y

                           >   CONFIG_UIDGID_CONVERTED=y

                           >   CONFIG_USB_ARCH_HAS_EHCI=y

                           >   CONFIG_USB_ARCH_HAS_OHCI=y

                           >   CONFIG_USB_ARCH_HAS_XHCI=y

                           >   CONFIG_USB_STORAGE_ALAUDA=y

                           >   CONFIG_USB_STORAGE_DATAFAB=y

                           >   CONFIG_USB_STORAGE_DEBUG=y

                           >   CONFIG_USB_STORAGE_ENE_UB6250=y

                           >   CONFIG_USB_STORAGE_FREECOM=y

                           >   CONFIG_USB_STORAGE_ISD200=y

                           >   CONFIG_USB_STORAGE_USBAT=y

                           >   CONFIG_X86_EXTENDED_PLATFORM=y

                           >   CONFIG_XZ_DEC_ARMTHUMB=y

                           >   CONFIG_XZ_DEC_ARM=y

                           >   CONFIG_XZ_DEC_IA64=y

                           >   CONFIG_XZ_DEC_POWERPC=y

                           >   CONFIG_XZ_DEC_SPARC=y

```

I wouldn't think that anything in there would cause the problem, so I'm really at a loss as to what could be causing it.  If I reboot my host and boot the 3.8.0 kernel, the drive is recognised.  Unfortunately, dmesg doesn't show anything when I'm booted into the 3.12.9 kernel.

Thanks for the help thus far.

Cheers,

Nathan Zachary

----------

## kernelOfTruth

you could still test the kernels in between (3.9, 3.10) or the vanilla 3.12 kernel if that lets it work again

I thought that some libata changes got into 3.12.8 or .9 but I was wrong

----------

## paradigm-X

> "If I reboot my host and boot the 3.8.0 kernel, the drive is recognised."

You might try this technique, which I have found helpful: When you see it in 3.8.0, use lspci to get the info on its driver and such, then search for that particular information in the 3.12 kernel config settings while in menuconfig. Also, that is a good jump from 3.8 to 3.12; so you might want to configure the kernel from scratch instead of reusing ".config" (if you even did reuse it), just to have a fresh starting point without worries of missing settings. I have encountered problems that were removed by doing it over like that. Though it is a pain, you may be better off.

----------

## NathanZachary

Thanks for the helpful tips!

I have solved the problem, in an odd way.  I did a menuconfig on the 3.8.0 kernel, and looked at the 'SCSI device support' section and the 'Serial ATA and Parallel ATA drivers' section (figuring that the problem had to be in one of those two areas).  I found that I had more built in to the 3.12.9 kernel than the 3.8.0 kernel.  So, I removed everything except what was in the 3.8.0 kernel and it works now in the 3.12.9 kernel.  I'm thinking that maybe there was a driver conflict, possibly in the SATA portion, where I now only have AHCI support.

Thanks again for the help!

Cheers,

Nathan Zachary

----------

## paradigm-X

>" So, I removed everything except what was in the 3.8.0 kernel and it works now in the 3.12.9 kernel. I'm thinking that maybe there was a driver conflict, possibly in the SATA portion, where I now only have AHCI support." 

Good move, and I know that is a relief! A lot that happens in the SATA and SCSI sections is mysterious to me, but I am trying as much as time allows to learn much more about it, like a snippet here and there while compiling is busy and whatnot. It really makes me appreciate how much work goes into the effort from Linux kernel developers.

I am finding that pretty much all the PATA functionality is unnecessary for my needs except on the older machines. Although I would really like to enjoy and explore every single iota of functionality available by "flipping on" a lot of the switches, it sometimes breaks it too. Take care.

----------

## Yamakuzure

AHCI for eSATA is broken for ages. Your kernel will recognize the drive once, and only once. If you eject it and re-insert, it won't be seen.

However, sys-apps/rescan-scsi-bus works, the drive is just no longer handled as removable, but as fixed.

----------

## NathanZachary

 *Yamakuzure wrote:*   

> AHCI for eSATA is broken for ages. Your kernel will recognize the drive once, and only once. If you eject it and re-insert, it won't be seen.
> 
> However, sys-apps/rescan-scsi-bus works, the drive is just no longer handled as removable, but as fixed.

 

Hmmmm, that's strange.  I am able to plug it in, remove it, and plug it in again without problem.  The drive is always seen (takes a little bit, since the link is slow to respond).

----------

## Yamakuzure

 *NathanZachary wrote:*   

>  *Yamakuzure wrote:*   AHCI for eSATA is broken for ages. Your kernel will recognize the drive once, and only once. If you eject it and re-insert, it won't be seen.
> 
> However, sys-apps/rescan-scsi-bus works, the drive is just no longer handled as removable, but as fixed. 
> 
> Hmmmm, that's strange.  I am able to plug it in, remove it, and plug it in again without problem.  The drive is always seen (takes a little bit, since the link is slow to respond).

 Strange. I have "SCSI Disk Support" and "AHCI" compiled in, nothing more. And eSATA drives are never recognized. But maybe it's the SATA controller in this (not-so-new) notebook, that's the culprit: "Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller".

----------

## s4e8

Intel esata ports is very piggy. 

Old ICH9 or earlier, all sata port support hotplug and PMP. 

5 series PCH remove hotplug and PMP support. 

6 series(SB/IVB) or later, most BIOS can select which port is hotpluggable. If the port marked as hotplug, it work as it does. If the port not marked as hotplug and no device connected at boot, the port will disabled, and need reboot to connect new device.

----------

