Re: Buying a new workstation
On Wed, Feb 04, 2004 at 02:35:02PM +0100, Marc Bevand wrote:
> Bastiaan Naber wrote:
> >Do you know how well this SATA controller is supported ? I want SATA also
> >but I am not sure about the controller under linux.
>
> Jeff Garzik (Linux developer, libata maintainer...) recommends
> ServerWorks and Promise hardware, it is the best supported SATA
> hardware.
>
> --
> Marc Bevand
With the attached patch the 3114 will work with the sii-ide driver. The
sata-driver has still some serious bugs (only SiliconImage).
Johannes
--
Die Ehe ist eine lange Mahlzeit, die mit dem Dessert beginnt.
-- Henri Toulouse-Lautrec
diff -Nru linux-2.6.1/drivers/ide/pci/siimage.c linux-2.6.1-ide/drivers/ide/pci/siimage.c
--- linux-2.6.1/drivers/ide/pci/siimage.c 2004-01-09 07:59:26.000000000 +0100
+++ linux-2.6.1-ide/drivers/ide/pci/siimage.c 2004-02-06 12:29:38.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * linux/drivers/ide/pci/siimage.c Version 1.06 June 11, 2003
+ * linux/drivers/ide/pci/siimage.c Version 1.09 June 11, 2003
*
* Copyright (C) 2001-2002 Andre Hedrick <andre@linux-ide.org>
* Copyright (C) 2003 Red Hat <alan@redhat.com>
@@ -56,6 +56,7 @@
{
case PCI_DEVICE_ID_SII_3112:
case PCI_DEVICE_ID_SII_1210SA:
+ case PCI_DEVICE_ID_SII_3114:
return 1;
case PCI_DEVICE_ID_SII_680:
return 0;
@@ -266,7 +267,7 @@
static void siimage_tuneproc (ide_drive_t *drive, byte mode_wanted)
{
ide_hwif_t *hwif = HWIF(drive);
- u32 speedt = 0;
+ u16 speedt = 0;
u16 speedp = 0;
unsigned long addr = siimage_seldev(drive, 0x04);
unsigned long tfaddr = siimage_selreg(hwif, 0x02);
@@ -1047,6 +1048,27 @@
hwif->mmio = 2;
}
+static int is_dev_seagate_sata(ide_drive_t *drive)
+{
+ const char *s = &drive->id->model[0];
+ unsigned len;
+
+ if (!drive->present)
+ return 0;
+
+ len = strnlen(s, sizeof(drive->id->model));
+
+ if ((len > 4) && (!memcmp(s, "ST", 2))) {
+ if ((!memcmp(s + len - 2, "AS", 2)) ||
+ (!memcmp(s + len - 3, "ASL", 3))) {
+ printk(KERN_INFO "%s: applying pessimistic Seagate "
+ "errata fix\n", drive->name);
+ return 1;
+ }
+ }
+ return 0;
+}
+
/**
* init_iops_siimage - set up iops
* @hwif: interface to set up
@@ -1068,7 +1090,7 @@
hwif->hwif_data = 0;
hwif->rqsize = 128;
- if (is_sata(hwif))
+ if (is_sata(hwif) && is_dev_seagate_sata(&hwif->drives[0]))
hwif->rqsize = 15;
if (pci_get_drvdata(dev) == NULL)
@@ -1179,6 +1201,7 @@
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1},
{ PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2},
+ { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3114, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3},
{ 0, },
};
diff -Nru linux-2.6.1/drivers/ide/pci/siimage.h linux-2.6.1-ide/drivers/ide/pci/siimage.h
--- linux-2.6.1/drivers/ide/pci/siimage.h 2004-01-09 07:59:43.000000000 +0100
+++ linux-2.6.1-ide/drivers/ide/pci/siimage.h 2004-02-06 12:30:46.000000000 +0100
@@ -82,6 +82,16 @@
.enablebits = {{0x00,0x00,0x00}, {0x00,0x00,0x00}},
.bootable = ON_BOARD,
.extra = 0,
+ },{ /* 3 */
+ .vendor = PCI_VENDOR_ID_CMD,
+ .device = PCI_DEVICE_ID_SII_3114,
+ .name = "SiI3114 Serial ATA",
+ .init_chipset = init_chipset_siimage,
+ .init_iops = init_iops_siimage,
+ .init_hwif = init_hwif_siimage,
+ .channels = 2,
+ .autodma = AUTODMA,
+ .bootable = ON_BOARD,
},{
.vendor = 0,
.device = 0,
diff -Nru linux-2.6.1/include/linux/pci_ids.h linux-2.6.1-ide/include/linux/pci_ids.h
--- linux-2.6.1/include/linux/pci_ids.h 2004-01-09 07:59:26.000000000 +0100
+++ linux-2.6.1-ide/include/linux/pci_ids.h 2004-02-06 12:32:04.000000000 +0100
@@ -883,6 +883,7 @@
#define PCI_DEVICE_ID_SII_680 0x0680
#define PCI_DEVICE_ID_SII_3112 0x3112
+#define PCI_DEVICE_ID_SII_3114 0x3114
#define PCI_DEVICE_ID_SII_1210SA 0x0240
#define PCI_VENDOR_ID_VISION 0x1098
Reply to: