# Your eSATA hot plug successes and failures?

## KarlisRepsons

How many people out there, who have working eSATA hot plug? Does that take any additional drivers / kernel support normally?

This far I could not make it with ASUS P5Q-E board, because only if I restart my system, I see the new SATA, but can't even access... Perhaps is because of Marvell driver, which is problematic?

----------

## alex.blackbit

afaik you need ahci for that. try

```
zgrep AHCI /proc/config.gz
```

----------

## KarlisRepsons

CONFIG_SATA_AHCI=y

----------

## fuzzykiller

On some controllers (my old VIA board had such a controller) it works without AHCI.

----------

## fangorn

AFAIK this is a feature not supported when running in any mode compatible with Windows XP. 

I do not have problems with eSATA hotplug, but Windows XP is not booting any more (not a big loss as it was started next to never in the last five years anyway  :Twisted Evil:  ).

In BIOS setup try setting the the SATA controller to AHCI (usually has "AHCI" "RAID" and "IDE" or something like that). For this mode you need to give  Windows XP special drivers to make it aware of the harddiscs again, which is a real PITA.

----------

## KarlisRepsons

What XP?! I don't have it on my PC. And in BIOS there is AHCI SATA.

----------

## d2_racing

Mine is working, I have a Asus P5Q-Deluxe and it work like a charm.

----------

## KarlisRepsons

Hmmm... Did you compiled kernel yourself? If so, what drivers are used for that single eSATA port? I think, it is Marvell and there are problems with it in 2.6.25 kernel... Also, which kernel version? And one more indicator: is IDE working ok w/o kernel patching?

----------

## energyman76b

I haven't tried esata yet, but SATA hotplug works very well.

Just set ahci in bios (the handbook of your mobo might even recommend it). Compile kernel with ahci support. For the ide ports, use the libata drivers. That's it. Don't hotplug ide!

----------

## KarlisRepsons

The strange thing is: in my BIOS I see SATA drive as IDE!

----------

## energyman76b

em, I am sure you either misunderstanding something or you are misunderstanding something. there is a 'ide' setting in most bios - for backwards compatibility with broken windows versions (all of them). and the sata disks might be listed at the same place as the ide disks. please read the manual for your mainboard, I am sure everything is explained there.

----------

## d2_racing

Hi, I use only the SATA plug, because I have a SATA burner and my HDD is on SATA too.

Here my config :

```

CONFIG_SATA_AHCI=y

# CONFIG_SATA_SVW is not set

# CONFIG_SATA_MV is not set

# CONFIG_SATA_NV is not set

# 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

# CONFIG_SATA_INIC162X is not set

CONFIG_PATA_MARVELL=y

```

I forgot to tell, it works only if I boot my kernel and my external HDD is plug and is working.

The hotplug feature doesn't work right now with my kernel 2.6.27.

----------

## Monkeh

 *fangorn wrote:*   

> AFAIK this is a feature not supported when running in any mode compatible with Windows XP. 
> 
> I do not have problems with eSATA hotplug, but Windows XP is not booting any more (not a big loss as it was started next to never in the last five years anyway  ).
> 
> In BIOS setup try setting the the SATA controller to AHCI (usually has "AHCI" "RAID" and "IDE" or something like that). For this mode you need to give  Windows XP special drivers to make it aware of the harddiscs again, which is a real PITA.

 

Tell that to my two working SATA controllers under XP. With hotplug..

Also, it's not a problem if you do it properly from the start.

 *Quote:*   

> The hotplug feature doesn't work right now with my kernel 2.6.27.

 

AHCI hotplug has been functional for some time, and definitely works with 2.6.27.

----------

## KarlisRepsons

To be honest, I didn't became any smarter about how can I use that funny Marvell eSATA. MB manual is useless.. Not sure about those drivers, that are provided by ASUS (havent tried to look at).

----------

## asturm

You need to set your SATA controller to operating in AHCI mode instead of IDE. BIOS --> Integrated Peripherals

----------

## KarlisRepsons

It is set to AHCI! Apparently I will wait until I need really bad or it gets fixed in future kernels. Currently I have to use patched kernel just to get my DVD working... That same driver is responsible for eSATA, perhaps driver is the problem.

----------

## dmpogo

 *fangorn wrote:*   

> AFAIK this is a feature not supported when running in any mode compatible with Windows XP. 
> 
> I do not have problems with eSATA hotplug, but Windows XP is not booting any more (not a big loss as it was started next to never in the last five years anyway  ).
> 
> In BIOS setup try setting the the SATA controller to AHCI (usually has "AHCI" "RAID" and "IDE" or something like that). For this mode you need to give  Windows XP special drivers to make it aware of the harddiscs again, which is a real PITA.

 

What are you talking about ? XP in latest service pack versions at least works just fine with AHCI in BIOS (that's what I have). I did not even know there are still people with new hardware that are running SATA drives in compatibility mode  :Smile: 

----------

## gentoo_ram

I am using kernel 2.6.27-gentoo with my SATA controller using AHCI mode and eSATA hot-plug works.  I sometimes get timeouts when using the drive, but it always seems to recover.  When I do backups, I've gotten speeds up to 7.5 MB/sec talking to my external drive over eSATA.  It's faster than I was getting with USB to the same drive.  My motherboard is an ASUS M3N78-VM.  However, I am having USB weirdness with this motherboard, so I can't completely recommend using it.  I don't know what the USB issue is yet.

The motherboard is using an NVidia chipset:

00:09.0 SATA controller: nVidia Corporation MCP78S [GeForce 8200] AHCI Controller (rev a2)

Turning on the eSATA drive:

```

Nov 14 08:21:01 jaipur ata4: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen

Nov 14 08:21:01 jaipur ata4: irq_stat 0x00000040, connection status changed

Nov 14 08:21:01 jaipur ata4: SError: { CommWake DevExch }

Nov 14 08:21:01 jaipur ata4: hard resetting link                                                    

Nov 14 08:21:02 jaipur ata4: SATA link down (SStatus 21 SControl 300)                               

Nov 14 08:21:02 jaipur ata4: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0xe frozen t4            

Nov 14 08:21:02 jaipur ata4: irq_stat 0x00400040, connection status changed

Nov 14 08:21:02 jaipur ata4: hard resetting link

Nov 14 08:21:05 jaipur ata4: SATA link down (SStatus 21 SControl 300)

Nov 14 08:21:05 jaipur ata4: EH complete

Nov 14 08:21:12 jaipur ata4: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen

Nov 14 08:21:12 jaipur ata4: irq_stat 0x00000040, connection status changed

Nov 14 08:21:12 jaipur ata4: SError: { CommWake DevExch }

Nov 14 08:21:12 jaipur ata4: hard resetting link

Nov 14 08:21:13 jaipur ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

Nov 14 08:21:13 jaipur ata4.00: ATA-7: SAMSUNG HD753LJ, 1AA01108, max UDMA7

Nov 14 08:21:13 jaipur ata4.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 31/32)

Nov 14 08:21:13 jaipur ata4.00: configured for UDMA/133

Nov 14 08:21:13 jaipur ata4: EH complete

Nov 14 08:21:13 jaipur scsi 3:0:0:0: Direct-Access     ATA      SAMSUNG HD753LJ  1AA0 PQ: 0 ANSI: 5

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] 1465149168 512-byte hardware sectors (750156 MB)

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] Write Protect is off

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support\

 DPO or FUA

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] 1465149168 512-byte hardware sectors (750156 MB)

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] Write Protect is off

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support\

 DPO or FUA

Nov 14 08:21:13 jaipur sdc: sdc1

Nov 14 08:21:13 jaipur sd 3:0:0:0: [sdc] Attached SCSI disk

Nov 14 08:21:13 jaipur sd 3:0:0:0: Attached scsi generic sg3 type 0

```

Turning off the drive:

```

Nov 14 09:38:37 jaipur ata4: exception Emask 0x10 SAct 0x0 SErr 0x1910000 action 0xe frozen         

Nov 14 09:38:37 jaipur ata4: irq_stat 0x00400000, PHY RDY changed                                   

Nov 14 09:38:37 jaipur ata4: SError: { PHYRdyChg Dispar LinkSeq TrStaTrns }                         

Nov 14 09:38:37 jaipur ata4: hard resetting link                                                    

Nov 14 09:38:38 jaipur ata4: SATA link down (SStatus 0 SControl 310)                                

Nov 14 09:38:43 jaipur ata4: hard resetting link                                                    

Nov 14 09:38:43 jaipur ata4: SATA link down (SStatus 0 SControl 310)                                

Nov 14 09:38:48 jaipur ata4: hard resetting link                                                    

Nov 14 09:38:49 jaipur ata4: SATA link down (SStatus 0 SControl 310)                                

Nov 14 09:38:49 jaipur ata4.00: disabled                                                            

Nov 14 09:38:49 jaipur ata4: EH complete                                                            

Nov 14 09:38:49 jaipur ata4.00: detaching (SCSI 3:0:0:0)

Nov 14 09:38:49 jaipur sd 3:0:0:0: [sdc] Synchronizing SCSI cache                                   

Nov 14 09:38:49 jaipur sd 3:0:0:0: [sdc] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGE\

ST_OK

Nov 14 09:38:49 jaipur sd 3:0:0:0: [sdc] Stopping disk

Nov 14 09:38:49 jaipur sd 3:0:0:0: [sdc] START_STOP FAILED                                          

Nov 14 09:38:49 jaipur sd 3:0:0:0: [sdc] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK,SUGGE\

ST_OK

```

While writing backups to the drive, I sometimes get timeouts, but it always recovers:

```

Nov 14 08:40:17 jaipur ata4.00: exception Emask 0x0 SAct 0x1bffff SErr 0x0 action 0x6 frozen

Nov 14 08:40:17 jaipur ata4.00: cmd 61/e8:00:5f:f3:fe/02:00:4b:00:00/40 tag 0 ncq 380928 out

Nov 14 08:40:17 jaipur res 40/00:0c:19:93:ab/00:00:2b:00:00/40 Emask 0x4 (timeout)                  

Nov 14 08:40:17 jaipur ata4.00: status: { DRDY }

Nov 14 08:40:17 jaipur ata4.00: cmd 61/10:08:d7:60:fe/02:00:4b:00:00/40 tag 1 ncq 270336 out

Nov 14 08:40:17 jaipur res 40/00:0c:19:93:ab/00:00:2b:00:00/40 Emask 0x4 (timeout)                  

Nov 14 08:40:17 jaipur ata4.00: status: { DRDY }

...

Nov 14 08:40:17 jaipur ata4: hard resetting link                                                    

Nov 14 08:40:17 jaipur ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 310)                       

Nov 14 08:40:17 jaipur ata4.00: configured for UDMA/133                                             

Nov 14 08:40:17 jaipur ata4: EH complete                                                            

Nov 14 08:40:17 jaipur sd 3:0:0:0: [sdc] 1465149168 512-byte hardware sectors (750156 MB)           

Nov 14 08:40:17 jaipur sd 3:0:0:0: [sdc] Write Protect is off                                       

Nov 14 08:40:17 jaipur sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00                                    

Nov 14 08:40:17 jaipur sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support\

 DPO or FUA                                                                                         

```

Kernel:

```

CONFIG_SATA_PMP=y

CONFIG_SATA_AHCI=y

# CONFIG_SATA_SIL24 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_SIS is not set

# CONFIG_SATA_ULI is not set

CONFIG_SATA_VIA=y

# CONFIG_SATA_VITESSE is not set

# CONFIG_SATA_INIC162X is not set

```

----------

## mdr13

gentoo_ram, have you solved this problem?

I was a happy user of an eSATA drive, hotplugging worked like a charm, etc. Then, for some stupid reason, I decided to change the bios setting to IDE. When I realised that hotplugging didn't work anymore, I reverted it to AHCI, but hotplugging still doesn't work. The disk is recognised, shows up in dmesg, can be mounted manually, but no hotplug. Of course, no problem if I use USB.

I have a jmicron controller for eSATA integrated in the MB.

If anyone has a solution to this, I will be eternally grateful  :Smile: 

----------

## VoidMage

Grave digger, your problem is probably unrelated to this thread, 

being simply a hal issue.

----------

## mdr13

 *VoidMage wrote:*   

> Grave digger, your problem is probably unrelated to this thread, 
> 
> being simply a hal issue.

 

Thank you, VoidMage! It was a hal issue, indeed. I recently upgraded from hal-0.5.11-r1 to 0.5.11-r8. Guess what? A nice little file was added there, /usr/share/hal/fdi/policy/10osvendor/99-storage-policy-fixed-drives.fdi

This file basically tells hal to ignore any device with the following property:

```
  storage.hotpluggable = false  (bool)
```

Since all eSATA devices have such property (don't ask me why...), it simply ignores eSATA devices! Reverting to hal-0.5.11-r1 solved the issue (only after restarting linux, though... restarting hal didn't help).

I'm going to file a bug report.

----------

## Cyker

I have an external eSATA enclosure connected to a Silicon Image eSATA port (SIL24) and have been hot-plug/unplugging it happily  :Smile: 

I intend to swap the enclosure for one of those 8-drive eSATA multiplexed enclosures at some point; Should be interesting...!

----------

## hardstor

Got myself an eSATA drive. Comments above were sort of helpful to identify what i needed to make sure was enabled in the kernel/bios etc. 

CONFIG_SATA_AHCI=y - Check

Bios: P5N-SLI - No explicit setting for AHCI mode - nothing to change

but still nothing.

recent kernel recompile with the following setting sorted it all out for me.

```
# cat /usr/src/linux/.config |grep AHCI

CONFIG_SATA_AHCI=m
```

cheers

hard

----------

