# [SOLVED] SATA (sata_via) drives not being detected

## ebike

Hi All,

I have a n ASUS motherboard with a Dick-Smith PCI card SATA controller (XH8269), this card uses a VIA controller which is apparently supported in the sata_via kernel module (at least in 2.6.11 which I am running)

The error is:

-----------------------------

libata version 1.10 loaded.

sata_via version 1.1

ACPI: PCI interrupt 0000:01:07.0[A] -> GSI 10 (level, low) -> IRQ 10

sata_via(0000:01:07.0): routed to hard irq line 10

ata1: SATA max UDMA/133 cmd 0xDFA0 ctl 0xDFAA bmdma 0xDF40 irq 10

ata2: SATA max UDMA/133 cmd 0xDF90 ctl 0xDF9A bmdma 0xDF48 irq 10

ata1 is slow to respond, please be patient

ata1 failed to respond (30 secs)

scsi7 : sata_via

ata2: no device found (phy stat 00000000)

scsi8 : sata_via

------------------------------------

lspci output is:

0000:01:07.0 RAID bus controller: VIA Technologies, Inc.: Unknown device 3249 (rev 50)

lspci -n 

0000:01:07.0 Class 0104: 1106:3249 (rev 50)

-------------------------------------

Anyone had this error before with this kernel module?

Thanks.

----------

## pactoo

No help, but I had a similar error in kernel 2.6.10. However, this has been resovled with 2.6.11, so it was clearly a kernel issue. And since you are already running the latest kernel ..

https://forums.gentoo.org/viewtopic-t-309383-highlight-.html

----------

## ebike

Thanks anyway.

By the way, do I have to set anything in the card's bios? I want to run in non raid mode.

----------

## pactoo

Well, I do not know your card, but if it has an onboard bios, a check would not be a bad idea.  I disabled anything raid related in my motherboard bios, as I am opting for softraid. 

However, as soon as you attache drives and those drives are individually visible by the kernel, all is set. A raid has to be created explicitly anyway, so I assume you do not need to change anything in advance. 

According to your error message: Did you try to put the card into a different PCI Slot ? Sometimes this still does wonder ...

----------

## ebike

Hi Pactoo,

Had a look in the bios, it is not set up for RAID, which is what I want. The drive is detected ok.

I tried turning ACPI off in the kernel, as per an old thread, but that didn't work either..

I havn't tried a different slot, will try that next. Running out of options.

----------

## ebike

It seems I might have solved my problem.

On bootup this morning my SATA drive had majically appeared.

The last thing I did last night was to put back ACPI in the kernel, recompile, and reboot.

On bootup I discovered my ethernet ports had been re-assigned (I hate that:x ), so had to fix up all  my config files

that had ethx:  settings .... humbug:( .

Obviously, it was the shuffling around that allowed my SATA pci card to work. Maybe my USB cardreader on /dev/sda was blocking it?

Anyway it all works now.

----------

## ebike

Actually the above was not the issue:

The last thing I did was to modify the sata_via.c module ( I found in another forum a patch for an ealier version of this kernel module, so I manually applied this simple patch to the current kernel). I don't know how to generate patches put the code snippet is:

```

static struct ata_probe_ent *vt6421_init_probe_ent(struct pci_dev *pdev)

{

        struct ata_probe_ent *probe_ent;

        unsigned int i;

        probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL);

        if (!probe_ent)

                return NULL;

        memset(probe_ent, 0, sizeof(*probe_ent));

        probe_ent->dev = pci_dev_to_dev(pdev);

        INIT_LIST_HEAD(&probe_ent->node);

        probe_ent->sht          = &svia_sht;

        probe_ent->host_flags   = ATA_FLAG_SATA | [color=red]ATA_FLAG_SRST[/color] | /*ATA_FLAG_SATA_RESET |*/

                                  ATA_FLAG_NO_LEGACY;

        probe_ent->port_ops     = &svia_sata_ops;

        probe_ent->n_ports      = N_PORTS;

        probe_ent->irq          = pdev->irq;

        probe_ent->irq_flags    = SA_SHIRQ;

        probe_ent->pio_mask     = 0x1f;

        probe_ent->mwdma_mask   = 0x07;

        probe_ent->udma_mask    = 0x7f;

        for (i = 0; i < N_PORTS; i++)

                vt6421_init_addrs(probe_ent, pdev, i);

        return probe_ent;

}

```

The added code is in red, to replace the commented next to it. It seems the proper RESET enumeration was not given to the device.

This patch was mean't to have made it to the kernel tree .... don't know why it was missed.

Maybe someone can generate a patch and feed it to Linus ...

Thanks.

----------

## JohnWW

Does anyone know where I can obtain a MacOS driver for this model of RAID card - DSE XH8269, for PCI slot, for two SATA plus two ATA drives? Or can anyone supply such a MacOS driver? I want to be able to use it on a dual-booting computer in either Windows OR MacOS, using mostly FAT32-formatted drives that can be accessed by both OSs. The driver software on the CD supplied with it, and that downloadable from www.dse.co.nz and www.dse.com.au , is for Windows only. Thanks in advance.

----------

