# SATA link takes too long time

## zrebec

Hi folks,

i have installed Gentoo Linux on my SATAII disk (see dmesg)  and Windows XP on standard IDE disk (multiboot is ok, no problem). The problem is that detecting SATA (maybe) takes really long time. I just have only 1 SATA disk but at the booting, kernel probing all devices (i think) and then ends it with "Timeout".

See devices from lspci :

```

epona zrebec # lspci | grep -i sata

00:1f.2 SATA controller: Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller (rev 01)

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

```

See my dmesg:

```

epona zrebec # dmesg | grep -i ata

 BIOS-e820: 000000003ff80000 - 000000003ff8e000 (ACPI data)

Memory: 904204k/917504k available (3122k kernel code, 12908k reserved, 1093k data, 300k init, 0k highmem)

      .data : 0xc040cb08 - 0xc051e0b4   (1093 kB)

libata version 2.21 loaded.

ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0xf impl SATA mode

ata1: SATA max UDMA/133 cmd 0xf882a900 ctl 0x00000000 bmdma 0x00000000 irq 216

ata2: SATA max UDMA/133 cmd 0xf882a980 ctl 0x00000000 bmdma 0x00000000 irq 216

ata3: SATA max UDMA/133 cmd 0xf882aa00 ctl 0x00000000 bmdma 0x00000000 irq 216

ata4: SATA max UDMA/133 cmd 0xf882aa80 ctl 0x00000000 bmdma 0x00000000 irq 216

ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

ata1.00: ATA-7: WDC WD1600YS-01SHB0, 20.06C03, max UDMA/133

ata1.00: 321672960 sectors, multi 16: LBA48 NCQ (depth 31/32)

ata1.00: configured for UDMA/133

ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

ata2.00: qc timeout (cmd 0xec)

ata2.00: failed to IDENTIFY (I/O error, err_mask=0x5)

ata2: port is slow to respond, please be patient (Status 0x80)

ata2: COMRESET failed (errno=-16)

ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

ata2.00: ATA-6: Config  Disk, RGL10364, max UDMA/133

ata2.00: 640 sectors, multi 1: LBA 

ata2.00: configured for UDMA/133

ata3: SATA link down (SStatus 0 SControl 300)

ata4: SATA link down (SStatus 0 SControl 300)

scsi 0:0:0:0: Direct-Access     ATA      WDC WD1600YS-01S 20.0 PQ: 0 ANSI: 5

scsi 1:0:0:0: Direct-Access     ATA      Config  Disk     RGL1 PQ: 0 ANSI: 5

ahci 0000:02:00.0: AHCI 0001.0000 32 slots 2 ports 3 Gbps 0x3 impl SATA mode

ata5: SATA max UDMA/133 cmd 0xf882c100 ctl 0x00000000 bmdma 0x00000000 irq 19

ata6: SATA max UDMA/133 cmd 0xf882c180 ctl 0x00000000 bmdma 0x00000000 irq 19

ata5: SATA link down (SStatus 0 SControl 300)

ata6: SATA link down (SStatus 0 SControl 300)

ata_piix 0000:00:1f.1: version 2.11

scsi6 : ata_piix

scsi7 : ata_piix

ata7: PATA max UDMA/133 cmd 0x000101f0 ctl 0x000103f6 bmdma 0x0001ffa0 irq 14

ata8: PATA max UDMA/133 cmd 0x00010170 ctl 0x00010376 bmdma 0x0001ffa8 irq 15

ata7.00: ATA-7: Maxtor 6Y120P0, YAR41BW0, max UDMA/133

ata7.00: 240121728 sectors, multi 16: LBA 

ata7.01: ATAPI: ASUS    DRW-1608P3S, 1.24, max UDMA/66

ata7.00: configured for UDMA/133

ata7.01: configured for UDMA/66

scsi 6:0:0:0: Direct-Access     ATA      Maxtor 6Y120P0   YAR4 PQ: 0 ANSI: 5

scsi8 : pata_jmicron

scsi9 : pata_jmicron

ata9: PATA max UDMA/100 cmd 0x00019c00 ctl 0x00019882 bmdma 0x00019400 irq 17

ata10: PATA max UDMA/100 cmd 0x00019800 ctl 0x00019482 bmdma 0x00019408 irq 17

ReiserFS: sda3: using ordered data mode

ReiserFS: sda1: using ordered data mode

```

And this line takes too long time (maybe 30 seconds):

```

ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

```

and then ends it with:

```

ata2.00: qc timeout (cmd 0xec)

ata2.00: failed to IDENTIFY (I/O error, err_mask=0x5)

```

Then loading continuing normally. Of course, i have jmicron compiled in kernel (as module)

```

epona zrebec # cat /usr/src/linux/.config | grep -i micron

CONFIG_BLK_DEV_JMICRON=m

CONFIG_PATA_JMICRON=y

```

And of coruse, my /etc/modules.autoload.d/kernel-2.6:

```

#### Virtualization

kvm

kvm-intel

### Other

hid

fan

button

joydev

gameport

nfsd

irda

ntfs

fat

bluetooth

i2c-core

i2c-dev

i2c-ocores

i2c-i801

i2c-i810

xpad

floppy

hwmon

coretemp

asb100

### USB

usbcore

usb-storage

#usbmon

usbhid

ehci-hcd

ohci-hcd

uhci-hcd

### Sound

#snd-mpu401

snd-hda-intel

snd-ac97-codec

ide-mod

ide-disk

ide-cd

jmicron

```

 :Embarassed:   Sorry, I`m ashamed about my modules autoloading. I trying build modulable kernel but i'm not very experienced with it. Maybe some modules are needless.

But I think that detecting non-exists ata2 device is a some error, isn't? Thank You for any hint!

Many regards

----------

## eccerr0r

Sorry, no solution here, but I found my m/b also with JMicron times out on bootup with a pata CDROM attached to it.  It seems to work just fine, however, if ACPI is working (which I have to disable most of the time because the machine hangs on startup most of the time.)

Weird.  Firmware issues... that don't show up in windows.

----------

## zrebec

Ou.... what a pity. OK, i try write to ASUS. I think that they are more responsible company for that as JMicron (Intel?). But thank You very much for the post!

----------

## eccerr0r

JMicron seems to be some random Taiwanese company and apparently sells really cheap PCIe SATA/PATA solutions.  I guess it's also kind of sad that a lot of Intel ICH??+ boards that don't have PATA ports get these things soldered on and people assume Intel made these just because all of them have JMicron...

I may not have the same problem as yours though - are you having to also disable ACPI on your board to get it to boot?

When I can boot the machine and ACPI works (it's really flaky) the JMicron board seems to work fine.

----------

## zrebec

Maybe JMicron is some Taiwan comapny with cheap solutions but I believed to ASUS and their soulutions (I really can't imagine better brand for motherboards. MSI? GigaByte?). Maybe original Intel could be best solution but Intel hasn't usualy 'm/b benefits' like SLI and Crossfire support on the board, etc,etc.

What You mean with disable ACPI? In the BIOS? I turned off JMicron in the BIOS but i keeped AHCI in "IDE Configuration". If i switched it to "Enchanced IDE" i got kernel panic  :Smile: 

----------

## eccerr0r

hmm. maybe we do have different problems.  The issue I'm having is I get these really slow bootups (and the drive doesn't work) with timeout after timeout if I have acpi=off on the command line bootup.

I guess I'm just not using the jmicron port for now.  Need to figure out what's going on with my ACPI (if I can figure out exactly where it's hanging...)

----------

## gerardo

Disable ATA/ATAPI/MFM/RLL support in your kernel and select in section Serial ATA (prod) and Parallel ATA (experimental) drivers:

<*>   AHCI SATA support 

<*>   Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support

<*>   JMicron PATA support

Also, add irqpoll to the options in your kernel boot line in grub.

----------

