# SATA/Athlon64 troubles

## nerulluren

I've been trying to build a kernel that will successfully boot on my new Athlon64 box and I have had no end of troubles. Under the LiveCD I'm using (/experimental/amd64/livecd/) the system will boot up fine, I've partioned the drive, used the Stage3 tarball to get a working system, emerged and installed grub and gentoo-dev-sources (gentoo-sources is masked for x86-64). The box is as such:

System Configuration (Monarch Computer)

- - - - 

Athlon 64 3200

Asus K8V Motherboard

1gb RAM

Maxtor 160gb 7200 Serial ATA HD

GeForce FX5200

I've added all of the options I can find that seem to be relevant to SATA (under the SCSI subsystem). Specifically I've enabled support for "VIA SATA Support" under "Low Level SCSI Drivers." The problem is that when I attempt to boot of the build kernel the system stalls when it tries to load the SATA drive. The box also has a Promise SATA controller on board when the drive is on that bus it doesn't seem to identify under the LiveCD at all.

When booting from the drive (kernel I built using 2.6.0-test8) SATA-specific message is as such:

```
ata1: SATA max UDMA/133 cmd 0xE400 ctl 0xE002 bmdma 0xD000 irq 20

ata2: SATA max UDMA/133 cmd 0xD800 ctl 0xD402 bmdma 0xD000 irq 20

ata1: dev 0 ATA, max UDMA/133, 320173056 sectors (1ba48)

ata1: dev 0 configured for UDMA/133

scsi0 : sata_via

ATA: abnormal status 0x7F on port 0xD007

scsi1: sata_via 

  Vendor: ATA                Model: Maxtor 6Y160M0     Rev: 0.75

  Type: Direct-access                                             ANSI SCSI Revision: 05

SCSI: device sda: 320173056 512-byte hdw sectors (163929 MB)

SCSI: device sda: device cache: write through

 sda:(3)ata: DMA timeout. stat 0x1

ATA: abnormal status 0xD0 on port 0XE407

```

It pauses for about 15 seconds after printing "sda" then prints "(3)ata: DMA timeout. stat 0x1" and then after another delay (30 seconds or so) it prints "ATA: abnormal status 0xD0 on port 0XE407" after which the systems hangs permentantly.

Now when I boot from the LiveCD the SATA part of the dmesg looks like so... 

```
libata version 0.75 loaded.

sata_via version 0.11

ata1: SATA max UDMA/133 cmd 0xE400 ctl 0xE002 bmdma 0xD000 irq 10

ata2: SATA max UDMA/133 cmd 0xD800 ctl 0xD402 bmdma 0xD008 irq 10

ata1: dev 0 cfg 49:2f00 82:7c6b 83:7f09 84:4003 85:7c69 86:3e01 87:4003 88:407f

ata1: dev 0 ATA, max UDMA/133, 320173056 sectors (lba48)

ata1: dev 0 configured for UDMA/133

scsi0 : sata_via

ATA: abnormal status 0x7F on port 0xD807

ata2: thread exiting

scsi1 : sata_via

  Vendor: ATA       Model: Maxtor 6Y160M0    Rev: 0.75

  Type:   Direct-Access                      ANSI SCSI revision: 05

SCSI device sda: 320173056 512-byte hdwr sectors (163929 MB)

SCSI device sda: drive cache: write through

 /dev/scsi/host0/bus0/target0/lun0: p1 p2 p3 p4

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0

```

... and seems to work fine. I'm able to work with the drives without any issues. The primary difference between the two that I can see is the loading of the libata and "sata_via version 0.11" before the drives are first noted however I can't figure out how to build a kernel that works as the LiveCD kernel does.

Honestly I would be extremely happy if I could get a look at the kernel config that was used to build the kernel for the X86_64 liveCD because I suspect the answer is somewhere in there. 

Thanks very much for any help you can offer,

luke bowerman

----------

## dweigert

Is this a 2.4, or a 2.6 kernel?  (I don't have AMD64.. Yet) If it is 2.4, under /proc there may be a "file" called config.  that should be the running config.  If it is 2.6, there may be an analagous entry under /sys, or /proc/config may exist.

Dan

----------

## picard66

I've already posted about that:

https://forums.gentoo.org/viewtopic.php?t=100952&highlight=sata

Don't use SCSI/SATA Driver from Kernel-Config. For me it works using the normal ide-drivers.

Funny is, that livecd (x86_64) didnt work for me

p.s.: Sorry, forgot to mention, that I am using 2.6.0-test9Last edited by picard66 on Mon Nov 03, 2003 3:42 pm; edited 1 time in total

----------

## lbrtuk

Also try 2.6.0-test9: there was a huge merge of sata code between test8 and test9.

----------

## mb4guns

and keep us posted with your findings on your journey with sata...

[edit]typo[/edit]

----------

## Yarrick

a patch is needed. run either 2.6.0-test9-bk7 or gentoo-dev-sources to make it work.

----------

