From patchwork Sun Oct 9 03:47:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Robin H. Johnson" X-Patchwork-Id: 118571 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id B3E4BB70B7 for ; Sun, 9 Oct 2011 14:47:36 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751942Ab1JIDrO (ORCPT ); Sat, 8 Oct 2011 23:47:14 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:36190 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829Ab1JIDrM (ORCPT ); Sat, 8 Oct 2011 23:47:12 -0400 Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0D3CB1B4009 for ; Sun, 9 Oct 2011 03:47:11 +0000 (UTC) Received: (qmail 987 invoked by uid 129); 9 Oct 2011 03:47:11 -0000 X-Spam-Level: * X-Spam-Status: No, hits=-2.9 required=10.0 tests=ALL_TRUSTED,BAYES_00 X-Spam-Check-By: orbis-terrarum.net Received: from Unknown (HELO bohr-int.orbis-terrarum.net) (172.16.9.8) by orbis-terrarum.net (qpsmtpd/0.83) with SMTP; Sun, 09 Oct 2011 03:47:09 +0000 Received: (nullmailer pid 12461 invoked by uid 0); Sun, 09 Oct 2011 03:47:08 -0000 From: "Robin H. Johnson" To: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org Cc: "Robin H. Johnson" Subject: [PATCH] mv_sas: OCZ RevoDrive3 & zDrive R4 support Date: Sat, 8 Oct 2011 20:47:04 -0700 Message-Id: <1318132024-12426-1-git-send-email-robbat2@gentoo.org> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1318032026-21913-1-git-send-email-robbat2@gentoo.org> References: <1318032026-21913-1-git-send-email-robbat2@gentoo.org> X-Virus-Checked: Checked by ClamAV on orbis-terrarum.net Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org From: "Robin H. Johnson" In the OCZ RevoDrive3/zDrive R4 series, the "OCZ SuperScale Storage Controller" with "Virtualized Controller Architecture 2.0" really seems to be a Marvell 88SE9485 part, with OCZ firmware/BIOS. Developed and tested on OCZ RevoDrive3 120GB [PCI 1b85:1021] Should work on: - OCZ RevoDrive3 (2x SandForce 2281) - OCZ RevoDrive3 X2 (4x SandForce 2281) - OCZ zDrive R4 CM84 (4x SandForce 2281) - OCZ zDrive R4 CM88 (8x SandForce 2281) - OCZ zDrive R4 RM84 (4x SandForce 2582) - OCZ zDrive R4 RM88 (8x SandForce 2582) All of this because a friend recently bought a OCZ RevoDrive3 and was bitten by the lack of Linux support. Notes from testing: ------------------- - SMART works. - VPD Device Identification is "OCZ-REVODRIVE3" - Thin provisioning/TRIM seems to be implemented as WRITE SAME UNMAP, with deterministic (non-zero) read after TRIM, but I'm not sure if it works 100% in my testing. - Some of the tuning in the firmware seems to ensure much better performance when in a RAID0 setup than using the two devices seperately. I have not tested booting from the SSD, because all of this was developed and tested remotely from the actual hardware. Signed-off-by: Robin H. Johnson Thanks-To: Gordon Pritchard --- drivers/scsi/mvsas/mv_init.c | 10 ++++++++++ include/linux/pci_ids.h | 2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) Tested and cleaned up now :-). Please apply. diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c index 4e9af66..b88315a 100644 --- a/drivers/scsi/mvsas/mv_init.c +++ b/drivers/scsi/mvsas/mv_init.c @@ -723,6 +723,16 @@ static struct pci_device_id __devinitdata mvs_pci_table[] = { .class_mask = 0, .driver_data = chip_9485, }, + { PCI_VDEVICE(OCZ, 0x1021), chip_9485}, /* OCZ RevoDrive3 */ + { PCI_VDEVICE(OCZ, 0x1022), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ + { PCI_VDEVICE(OCZ, 0x1040), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ + { PCI_VDEVICE(OCZ, 0x1041), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ + { PCI_VDEVICE(OCZ, 0x1042), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ + { PCI_VDEVICE(OCZ, 0x1043), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ + { PCI_VDEVICE(OCZ, 0x1044), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ + { PCI_VDEVICE(OCZ, 0x1080), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ + { PCI_VDEVICE(OCZ, 0x1083), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ + { PCI_VDEVICE(OCZ, 0x1084), chip_9485}, /* OCZ RevoDrive3/zDriveR4 (exact model unknown) */ { } /* terminate list */ }; diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index ae96bbe..3fe46e9 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2868,3 +2868,5 @@ #define PCI_VENDOR_ID_XEN 0x5853 #define PCI_DEVICE_ID_XEN_PLATFORM 0x0001 + +#define PCI_VENDOR_ID_OCZ 0x1b85