# SATA questions

## fosstux

Hi!

I've got a Promise SATA II 150 TX4 Seaial ATA Controller and a 200GB hdd from Maxtor which is being recognized at bios startup.

When entering lspci I get 

```
0000:00:0f.0 Unknown mass storage controller: Promise Technology, Inc. PDC20518 SATAII 150 IDE Controller (rev 02)
```

Therefor my card is being detected.,

In the kernel I enabled the Promise tx4 low level support and the SCSI disk support.

But I cannot see the harddisk in the /dev directory (such as /dev/sda).

What am I doing wrong?

Please help.

Thanks.

----------

## NeddySeagoon

crparr,

You need SCSI disc support at the high level too. It will appear as /dev/sda

----------

## fosstux

I have got SCSI Disk Support. But I think I know why it does not work.

The Low level driver supports SATA TX4 but I have a SATA II 150 TX4.

----------

## NeddySeagoon

crparr,

The 150 is probaly the SATA speed. Please post the SCSI section of your kernel .config file.

----------

## fosstux

Here is the SCSI part of my kernel Configuration:

```
#

# SCSI device support

#

CONFIG_SCSI=y

CONFIG_SCSI_PROC_FS=y

#

# SCSI support type (disk, tape, CD-ROM)

#

CONFIG_BLK_DEV_SD=y

# CONFIG_CHR_DEV_ST is not set

# CONFIG_CHR_DEV_OSST is not set

CONFIG_BLK_DEV_SR=y

# CONFIG_BLK_DEV_SR_VENDOR is not set

CONFIG_CHR_DEV_SG=y

#

# Some SCSI devices (e.g. CD jukebox) support multiple LUNs

#

# CONFIG_SCSI_MULTI_LUN is not set

# CONFIG_SCSI_CONSTANTS is not set

# CONFIG_SCSI_LOGGING is not set

#

# SCSI Transport Attributes

#

# CONFIG_SCSI_SPI_ATTRS is not set

# CONFIG_SCSI_FC_ATTRS is not set

#

# SCSI low-level drivers

#

# CONFIG_BLK_DEV_3W_XXXX_RAID is not set

# CONFIG_SCSI_3W_9XXX is not set

# CONFIG_SCSI_ACARD is not set

# CONFIG_SCSI_AACRAID is not set

# CONFIG_SCSI_AIC7XXX is not set

# CONFIG_SCSI_AIC7XXX_OLD is not set

# CONFIG_SCSI_AIC79XX is not set

# CONFIG_SCSI_DPT_I2O is not set

# CONFIG_MEGARAID_NEWGEN is not set

# CONFIG_MEGARAID_LEGACY is not set

CONFIG_SCSI_SATA=y

# CONFIG_SCSI_SATA_AHCI is not set

# CONFIG_SCSI_SATA_SVW is not set

# CONFIG_SCSI_ATA_PIIX is not set

# CONFIG_SCSI_SATA_NV is not set

CONFIG_SCSI_SATA_PROMISE=y

# CONFIG_SCSI_SATA_SX4 is not set

# CONFIG_SCSI_SATA_SIL is not set

# CONFIG_SCSI_SATA_SIS is not set

# CONFIG_SCSI_SATA_ULI is not set

# CONFIG_SCSI_SATA_VIA is not set

# CONFIG_SCSI_SATA_VITESSE is not set

# CONFIG_SCSI_BUSLOGIC is not set

# CONFIG_SCSI_DMX3191D is not set

# CONFIG_SCSI_EATA is not set

# CONFIG_SCSI_EATA_PIO is not set

# CONFIG_SCSI_FUTURE_DOMAIN is not set

# CONFIG_SCSI_GDTH is not set

# CONFIG_SCSI_IPS is not set

# CONFIG_SCSI_INITIO is not set

# CONFIG_SCSI_INIA100 is not set

# CONFIG_SCSI_SYM53C8XX_2 is not set

# CONFIG_SCSI_IPR is not set

# CONFIG_SCSI_QLOGIC_ISP is not set

# CONFIG_SCSI_QLOGIC_FC is not set

# CONFIG_SCSI_QLOGIC_1280 is not set

CONFIG_SCSI_QLA2XXX=y

# CONFIG_SCSI_QLA21XX is not set

# CONFIG_SCSI_QLA22XX is not set

# CONFIG_SCSI_QLA2300 is not set

# CONFIG_SCSI_QLA2322 is not set

# CONFIG_SCSI_QLA6312 is not set

# CONFIG_SCSI_QLA6322 is not set

# CONFIG_SCSI_DC395x is not set

# CONFIG_SCSI_DC390T is not set

# CONFIG_SCSI_NSP32 is not set

# CONFIG_SCSI_DEBUG is not set

```

But what disturbs me is not the 150 but the II in the Model name.

Thanks.

----------

## NeddySeagoon

crparr,

According to 

http://www.linuxmafia.com/faq/Hardware/sata.html there is a patch against the 2.6.10 kernel for your SATA.

 *Quote:*   

> (link) PDC20518 SATAII150 TX4 card  fakeraid. This is a SATA-II chip. libata's sata_promise driver can support it using a patch to the kernel 2.6.10 libata code.

 That means you need a special kernel. The liveCD does not support that chip. 

You can try the depreciated IDE SATA driver (if its in the liveCD) for the install or usining a PATA for the install, until you have built a 2.6.10+patch kernel, when you can copy everying to your SATA

----------

## fosstux

Wow, super!!!!!!    :Very Happy:   :Very Happy:   :Very Happy: 

Thank you very much indeed!

I'll let you know whether it works.

Thanks.

----------

## mccart

Did you ever get this to work?  How did you do it?  I'm trying to get this same card working myself.

----------

## geta

Hello crparr + mccart,

did you get it to work in the end? I'm probably hanging at the same problem as you are. Kernel 2.6.11.4 does not work for me, neither does the gentoo patched kernel (2.6.11-r4). The changelog of kernel 2.6.11.5 (see kernel.org) doesn't give me the impression anything has changed at the official stock kernel.

Here's what I get when doing lspci (boiled down to the most important bits):

 *Quote:*   

> 
> 
> 00:0c.0 Unknown mass storage controller: Promise Technology, Inc.: Unknown device 3d18 (rev 02)
> 
> 00:11.0 Unknown mass storage controller: Promise Technology, Inc. 20265 (rev 02)
> ...

 

I have the same scsi configuration as already printed at the top.

I'm now going to try out the following two things:

2.6.10 + patch

2.6.11-dark2 (see https://forums.gentoo.org/viewtopic-t-302583-highlight-promise+tx4.html )

Cheers,

geta

BTW: My system is up and running, so my computer does not depend on the SATA card, though I'll definitely want to be using my faster and bigger harddisk soon (running off a slow 10GB harddisk at the moment and will still be for the main system, my new HD is a SATA-150 with 80Gig)

----------

## geta

Hello again,

to answer my question from above: There can be success  :Very Happy:  (but I had a few hours to get there)

I used the following combo:

- development-sources-2.6.10-r1

- the tiny patch from http://marc.theaimsgroup.com/?l=linux-ide&m=110426005503319&q=raw as pointed out on http://www.linuxmafia.com/faq/Hardware/sata.html#promise-20518 (which was referred to a bit further up this posting)

Any other methods I tried did not work. Strangest thing: the patch for the 2.6.10 kernel is tiny, yet it's not in the 2.6.11 vanilla kernel.

+-+-+-+-+-+-+-+-+-+-

If you do not know how to patch a kernel here's a short instruction. The last time I did that was about two years ago, when acpi was something new and the 2.6 kernel was way off from being used.

If you don't know which part of the mail is the patch, here it is again:

```

--- linux-2.6.10/drivers/scsi/sata_promise.c   2004-12-24 22:35:23.000000000 +0100

+++ linux-2.6.10-lirc/drivers/scsi/sata_promise.c   2004-12-28 19:03:31.000000000 +0100

@@ -160,10 +160,11 @@ static struct pci_device_id pdc_ata_pci_

      board_20319 },

    { PCI_VENDOR_ID_PROMISE, 0x3319, PCI_ANY_ID, PCI_ANY_ID, 0, 0,

      board_20319 },

+   { PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0,

+     board_20319 },

    { }   /* terminate list */

 };

 

-

 static struct pci_driver pdc_ata_pci_driver = {

    .name         = DRV_NAME,

    .id_table      = pdc_ata_pci_tbl,

@@ -408,6 +409,8 @@ static irqreturn_t pdc_interrupt (int ir

 

         spin_lock(&host_set->lock);

 

+        writel(mask, mmio_base + PDC_INT_SEQMASK);

+

         for (i = 0; i < host_set->n_ports; i++) {

       VPRINTK("port %u\n", i);

       ap = host_set->ports[i];

```

1. Save this patch as a file (I called mine promise-sata-2.6.10.patch). Put the file in /usr/src/linux-2.6.10-r1 (the directory was created for you by gentoo when emerging the kernel sources)

2. Then run the command "patch -p1 < promise-sata-2.6.10.patch > patching-errors.txt".

3. Look at patching-errors.txt. Any errors? If not, you can continue safely.

4. In the kernel directory run "make". Look at the output. Did a line with "sata_promise.o" in it appear? If not, run "make clean" and then again "make".

5. Copy your kernel over to the boot partition.

6. Reboot (yes, you really have to do that, unless you have compiled sata_promise as a module).

+-+-+-+-+-+-+-+-+-+-

Cheers,

geta

----------

## geta

Just a little update: seems to work fine without patching the kernel when using version 2.6.11.10 (vanilla-sources).

Cheers,

geta

----------

