OCZ Vertex Drive: UDMA33 mode only

Hi, does anyone know what I'm missing or what I did wrong?

I have an OCZ Vertex drive but for some reason FreeBSD is unable to assign UDMA6. In the bios I have no AHCI option nor SATA150/300 selection hence I can only assign UDMA1-6 option but when I boot another OS such as linux or windows with the same motherboard, SATA300 or UDMA6 gets assigned. I've been dealing with this problem for a while now with no luck, I'm stuck at UDMA33 on FreeBSD :(

Here's are the technical details:

Code:
ada0 at ata1 bus 0 scbus1 target 0 lun 0
ada0: <OCZ-VERTEX v1.10 1370> ATA-7 SATA 2.x device
ada0: 33.300MB/s transfers (UDMA2, PIO 8192bytes)
ada0: 30533MB (62533296 512 byte sectors: 16H 63S/T 16383C)

Code:
none0@pci0:0:3:0:       class=0x078000 card=0x2a448086 chip=0x2a448086 rev=0x07 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Intel Management Engine Interface (Mobile 4 Series Chipset)'
    class      = simple comms
    bar   [10] = type Memory, range 64, base 0xfe5ff000, size 16, enabled

uhci0@pci0:0:26:0:      class=0x0c0300 card=0x29378086 chip=0x29378086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [20] = type I/O Port, range 32, base 0x8480, size 32, enabled
ehci0@pci0:0:26:7:      class=0x0c0320 card=0x293c8086 chip=0x293c8086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) USB2 Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [10] = type Memory, range 32, base 0xfe5ff400, size 1024, enabled
pcib1@pci0:0:28:0:      class=0x060400 card=0x29408086 chip=0x29408086 rev=0x03 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) PCIe Root Port 1'
    class      = bridge
    subclass   = PCI-PCI
pcib2@pci0:0:28:1:      class=0x060400 card=0x29428086 chip=0x29428086 rev=0x03 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) PCIe Root Port 2'
    class      = bridge
    subclass   = PCI-PCI
pcib3@pci0:0:28:2:      class=0x060400 card=0x29448086 chip=0x29448086 rev=0x03 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) PCIe Root Port 3'
    class      = bridge
    subclass   = PCI-PCI
pcib4@pci0:0:28:3:      class=0x060400 card=0x29468086 chip=0x29468086 rev=0x03 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) PCIe Root Port 4'
    class      = bridge
    subclass   = PCI-PCI
pcib5@pci0:0:28:4:      class=0x060400 card=0x29488086 chip=0x29488086 rev=0x03 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) PCIe Root Port 5'
    class      = bridge
    subclass   = PCI-PCI
uhci1@pci0:0:29:0:      class=0x0c0300 card=0x29348086 chip=0x29348086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [20] = type I/O Port, range 32, base 0x8c00, size 32, enabled
uhci2@pci0:0:29:1:      class=0x0c0300 card=0x29358086 chip=0x29358086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [20] = type I/O Port, range 32, base 0x8880, size 32, enabled
uhci3@pci0:0:29:2:      class=0x0c0300 card=0x29368086 chip=0x29368086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) USB Universal Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [20] = type I/O Port, range 32, base 0x8800, size 32, enabled
ehci1@pci0:0:29:7:      class=0x0c0320 card=0x293a8086 chip=0x293a8086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) USB2 Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [10] = type Memory, range 32, base 0xfe5ff800, size 1024, enabled
pcib6@pci0:0:30:0:      class=0x060401 card=0x24488086 chip=0x24488086 rev=0x93 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801 Family (ICH2/3/4/5/6/7/8/9-M) Hub Interface to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:      class=0x060100 card=0x29178086 chip=0x29178086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'ICH9M-E LPC Interface Controller'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:31:2:    class=0x01018a card=0x29288086 chip=0x29288086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) Mobile 2 port Serial ATA Storage Controller 1'
    class      = mass storage
    subclass   = ATA
    bar   [10] = type I/O Port, range 32, base 0x1f0, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0x3f4, size  1, enabled
    bar   [18] = type I/O Port, range 32, base 0x170, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0x374, size  1, enabled
    bar   [20] = type I/O Port, range 32, base 0xff90, size 16, enabled
    bar   [24] = type I/O Port, range 32, base 0xffa0, size 16, enabled
none1@pci0:0:31:3:      class=0x0c0500 card=0x29308086 chip=0x29308086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Intel(R) ICH9 Family SMBus Controller working fine with [url]http://download.cnet.com/Chipset-Driver-Inte[/url] (8086)'
    class      = serial bus
    subclass   = SMBus
    bar   [10] = type Memory, range 64, base 0xfe5ffc00, size 256, enabled
    bar   [20] = type I/O Port, range 32, base 0x400, size 32, enabled
atapci1@pci0:0:31:5:    class=0x010185 card=0x292d8086 chip=0x292d8086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) Mobile 2 port Serial ATA Storage Controller 2'
    class      = mass storage
    subclass   = ATA
    bar   [10] = type I/O Port, range 32, base 0x9880, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0x9800, size  4, enabled
    bar   [18] = type I/O Port, range 32, base 0x9480, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0x9400, size  4, enabled
    bar   [20] = type I/O Port, range 32, base 0x9080, size 16, enabled
    bar   [24] = type I/O Port, range 32, base 0x9000, size 16, enabled

Custom Kernel config in kernel for Hard Drive:

Code:
# Bus support.
device          acpi
device          pci

# ATA and ATAPI devices
device          ada
device          ata
options         ATA_CAM
device          ahci                # New driver architecture for AHCI-compliant SATA controllers
device          atadisk             # ATA disk drives
#device         atapicd             # ATAPI CDROM drives
#options        ATA_STATIC_ID       # Static device numbering

# SCSI peripherals required for USB storage
device          scbus      # SCSI bus (required for SCSI)
device          ch         # SCSI media changers
device          da         # Direct Access (disks)
device          sa         # Sequential Access (tape etc)
device          cd         # CD
device          pass       # Passthrough device (direct SCSI access)
device          ses        # SCSI Environmental Services (and SAF-TE)

Code:
# camcontrol devlist                                                                                                                   ~
<OCZ-VERTEX v1.10 1370>            at scbus1 target 0 lun 0 (ada0,pass0)

Code:
# camcontrol identify ada0                                                                                                             ~
pass0: <OCZ-VERTEX v1.10 1370> ATA-7 SATA 2.x device
pass0: 33.300MB/s transfers (UDMA2, PIO 8192bytes)

protocol              ATA/ATAPI-7 SATA 2.x
device model          OCZ-VERTEX v1.10
firmware revision     1370
serial number         C1M8H6PW47SRNQNR5UW8
cylinders             16383
heads                 16
sectors/track         63
sector size           logical 512, physical 512, offset 0
LBA supported         62533296 sectors
LBA48 supported       62533296 sectors
PIO supported         PIO4
DMA supported         WDMA2 UDMA6
media RPM             non-rotating

Feature                      Support  Enabled   Value           Vendor
read ahead                     yes      yes
write cache                    yes      yes
flush cache                    yes      yes
overlap                        no
Tagged Command Queuing (TCQ)   no       no
Native Command Queuing (NCQ)   yes              32 tags
SMART                          yes      no
microcode download             yes      yes
security                       yes      no
power management               yes      yes
advanced power management      no       no
automatic acoustic management  no       no
media status notification      no       no
power-up in Standby            no       no
write-read-verify              no       no
unload                         no       no
free-fall                      no       no
data set management (TRIM)     yes
Am I missing a driver or anything?
 
Problem is not in disk, but in controller. Your chipset ID seems rare and unknown to the driver. Please apply this patch and report how will it go:
Code:
Index: chipsets/ata-intel.c
===================================================================
--- chipsets/ata-intel.c        (revision 228458)
+++ chipsets/ata-intel.c        (working copy)
@@ -157,6 +157,10 @@
      { ATA_I82801IB_AH4, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
      { ATA_I82801IB_AH6, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
      { ATA_I82801IB_R1,  0, INTEL_AHCI, 0, ATA_SA300, "ICH9" },
+     { ATA_I82801IBM_S1, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9M" },
+     { ATA_I82801IBM_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9M" },
+     { ATA_I82801IBM_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9M" },
+     { ATA_I82801IBM_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9M" },
      { ATA_I82801JIB_S1, 0, INTEL_6CH,  0, ATA_SA300, "ICH10" },
      { ATA_I82801JIB_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
      { ATA_I82801JIB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" },
Index: ata-pci.h
===================================================================
--- ata-pci.h   (revision 228458)
+++ ata-pci.h   (working copy)
@@ -193,6 +193,10 @@
 #define ATA_I82801IB_AH4        0x29238086
 #define ATA_I82801IB_R1         0x29258086
 #define ATA_I82801IB_S2         0x29268086
+#define ATA_I82801IBM_S1        0x29288086
+#define ATA_I82801IBM_AH        0x29298086
+#define ATA_I82801IBM_R1        0x292a8086
+#define ATA_I82801IBM_S2        0x292d8086
 #define ATA_I82801JIB_S1        0x3a208086
 #define ATA_I82801JIB_AH        0x3a228086
 #define ATA_I82801JIB_R1        0x3a258086
 
Hi Mav,

Your patch worked! I'm getting UDMA5 which is much better than UDMA33!! Any idea if UDMA6 driver might get supported in the future?

Also will this patch end up in the stable branch? Many thanks!

Code:
Dec 13 11:25:09 core kernel: ada0: <OCZ-VERTEX v1.10 1370> ATA-7 SATA 2.x device
Dec 13 11:25:09 core kernel: ada0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
Dec 13 11:25:09 core kernel: ada0: 30533MB (62533296 512 byte sectors: 16H 63S/T 16383C)

Code:
ehci1@pci0:0:29:7:      class=0x0c0320 card=0x293a8086 chip=0x293a8086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) USB2 Enhanced Host Controller'
    class      = serial bus
    subclass   = USB
    bar   [10] = type Memory, range 32, base 0xfe5ff800, size 1024, enabled
pcib6@pci0:0:30:0:      class=0x060401 card=0x24488086 chip=0x24488086 rev=0x93 hdr=0x01
    vendor     = 'Intel Corporation'
    device     = '82801 Family (ICH2/3/4/5/6/7/8/9-M) Hub Interface to PCI Bridge'
    class      = bridge
    subclass   = PCI-PCI
isab0@pci0:0:31:0:      class=0x060100 card=0x29178086 chip=0x29178086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'ICH9M-E LPC Interface Controller'
    class      = bridge
    subclass   = PCI-ISA
atapci0@pci0:0:31:2:    class=0x01018a card=0x29288086 chip=0x29288086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) Mobile 2 port Serial ATA Storage Controller 1'
    class      = mass storage
    subclass   = ATA
    bar   [10] = type I/O Port, range 32, base 0x1f0, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0x3f4, size  1, enabled
    bar   [18] = type I/O Port, range 32, base 0x170, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0x374, size  1, enabled
    bar   [20] = type I/O Port, range 32, base 0xff90, size 16, enabled
    bar   [24] = type I/O Port, range 32, base 0xffa0, size 16, enabled
none1@pci0:0:31:3:      class=0x0c0500 card=0x29308086 chip=0x29308086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Intel(R) ICH9 Family SMBus Controller working fine with [url]http://download.cnet.com/Chipset-Driver-Inte[/url] (8086)'
    class      = serial bus
    subclass   = SMBus
    bar   [10] = type Memory, range 64, base 0xfe5ffc00, size 256, enabled
    bar   [20] = type I/O Port, range 32, base 0x400, size 32, enabled
atapci1@pci0:0:31:5:    class=0x010185 card=0x292d8086 chip=0x292d8086 rev=0x03 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82801IB/IR/IH (ICH9 Family) Mobile 2 port Serial ATA Storage Controller 2'
    class      = mass storage
    subclass   = ATA
    bar   [10] = type I/O Port, range 32, base 0x9880, size  8, enabled
    bar   [14] = type I/O Port, range 32, base 0x9800, size  4, enabled
    bar   [18] = type I/O Port, range 32, base 0x9480, size  8, enabled
    bar   [1c] = type I/O Port, range 32, base 0x9400, size  4, enabled
    bar   [20] = type I/O Port, range 32, base 0x9080, size 16, enabled
    bar   [24] = type I/O Port, range 32, base 0x9000, size 16, enabled
 
Thank you for the report. I will commit it now and merge it down after 9.0 release.

PATA mode for SATA devices intentionally limited to UDMA5 as workaround for buggy SATA<->PATA bridges and it is irrelevant for native SATA devices. For native SATA devices (modern SATA devices) it is not important what UDMA mode is chosen. Only important is it PIO or DMA. Transfer speed limited only by SATA connection speed.

Even without this patch your drive should be as fast as with it. Difference is only in some details, such as device probe logic, hot-plug support, device reporting and so on.
 
Hi Mav,

Thanks for helping me with a patch, regarding your last post, with my ocz vertex, I'm only getting 30mb/s at 4k writes which I find it slow for what the manufacturer claims. Does this sound reasonable to you? (using UFS file system)

I did my test using:

dd if=/dev/urandom of=/cache/test400m.bin bs=1m count=400
dd if=/cache/test400m.bin of=/home/test400m.bin bs=4k
 
I would say it is indeed not much. Just two points:
- You are writing with 4k block to the file on the file system. Most likely file system aggregates writes at least to the FS block size. That should improve performance, not reduce, but it's just about correctness or your test.
- If you are using your SSD for a long time, you could already wear it. After one year use without TRIM my OCZ Vertex become MUCH slower in some cases. Now after I erasing mine, I can write about 80%-90% of it's capacity quite fast, but then speed drops significantly.
 
Leander said:
Is this still an issue with FreeBSD 9.0 RELEASE, or was the patch not necessary anymore?

Patch was committed into 9-STABLE branch on January 2, but that was after 9.0-RELEASE. Next 9.1-RELEASE will include it.
 
Back
Top