fixing slow sata drives under openbsd

dettus

Bicycle User
i'm writing this in english since i saw lots and LOTS of people with the same problem.

my new mainboard came with an ati sb700, but so far only the sb600 is officially supported in the openbsd kernel. in the dmesg i saw
Code:
pciide1 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x00: DMA (unsupported), channel 0 configured to native-PCI, channel 1 configured to native-PCI
pciide1: using apic 4 int 22 (irq 10) for native-PCI interrupt
wd0 at pciide1 channel 0 drive 0: <SAMSUNG HD103UJ>
wd0: 16-sector PIO, LBA48, 953869MB, 1953525168 sectors
wd1 at pciide1 channel 1 drive 0: <WDC WD20EADS-00R6B0>
wd1: 16-sector PIO, LBA48, 1907729MB, 3907029168 sectors
even though these are sata-drives, openbsd somehow treated them as ide.
moreover, the system was PAINFULLY slow.

so, i googled a bit and stumbeld upon http://www.devinsmith.net/journal/aug_2008.html
what a releive that i am not the only one who had that problem!!
unfortunately his patch was already one year old. and the team made a bit of progress in the file.
so, here is the updated patch for openbsd 4.6:
Code:
--- ahci.orig.c Tue Nov 10 16:56:09 2009
+++ ahci.c      Tue Nov 10 17:03:10 2009
@@ -423,6 +423,8 @@
                            struct pci_attach_args *);
 int                    ahci_ati_sb600_attach(struct ahci_softc *,
                            struct pci_attach_args *);
+int                    ahci_ati_sb700_attach(struct ahci_softc *,
+                           struct pci_attach_args *);
 int                    ahci_nvidia_mcp_attach(struct ahci_softc *,
                            struct pci_attach_args *);

@@ -431,6 +433,8 @@
            ahci_no_match,      ahci_vt8251_attach },
        { PCI_VENDOR_ATI,       PCI_PRODUCT_ATI_SB600_SATA,
            NULL,               ahci_ati_sb600_attach },
+       { PCI_VENDOR_ATI,       PCI_PRODUCT_ATI_SBX00_SATA_1,
+           NULL,               ahci_ati_sb700_attach },
        { PCI_VENDOR_NVIDIA,    PCI_PRODUCT_NVIDIA_MCP65_AHCI_2,
            NULL,               ahci_nvidia_mcp_attach },
        { PCI_VENDOR_NVIDIA,    PCI_PRODUCT_NVIDIA_MCP67_AHCI_1,
@@ -569,6 +573,11 @@
        return (0);
 }

+int
+ahci_ati_sb700_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
+{
+       return (0);
+}
 int
 ahci_ati_sb600_attach(struct ahci_softc *sc, struct pci_attach_args *pa)
 {
enjoy. and USE IT AT YOUR OWN RISK!!!!!!!!! :belehren::belehren:

however, it seems to have worked:
Code:
ahci1 at pci0 dev 17 function 0 "ATI SBx00 SATA" rev 0x00: apic 4 int 22 (irq 10), AHCI 1.1
scsibus1 at ahci1: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, SAMSUNG HD103UJ, 1AA0> SCSI3 0/direct fixed
sd0: 953869MB, 512 bytes/sec, 1953525168 sec total
sd1 at scsibus1 targ 1 lun 0: <ATA, WDC WD20EADS-00R, 01.0> SCSI3 0/direct fixed
sd1: 1907729MB, 512 bytes/sec, 3907029168 sec total
and trust me: it makes SOOOO much more fun now.

keywords: openbsd 4.6 sata harddrive slow sluggish sd0c wd0c ahci
 
Zuletzt bearbeitet:
Zurück
Oben