Project

General

Profile

Feature #1299

Support SiI3531 chipset in si3124 driver

Added by Charles Stephens over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
driver - device drivers
Start date:
2011-07-28
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

The SiI3531 is a single port version of the SiI3124 using the same command set. Should be trivial to support it by adding the appropriate number of ports and a device ID in the si3124 driver code.


Files

illumos-1299-a.diff.txt (4.65 KB) illumos-1299-a.diff.txt Charles Stephens, 2011-07-29 09:14 PM
#1

Updated by Charles Stephens over 9 years ago

Suggested fix which has been tested on an HP mediasmart ex495:

diff -r b42c1f0432b6 usr/src/uts/common/io/sata/adapters/si3124/si3124.c
--- a/usr/src/uts/common/io/sata/adapters/si3124/si3124.c       Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/uts/common/io/sata/adapters/si3124/si3124.c       Thu Jul 28 21:57:32 2011 +0000
@@ -565,7 +565,11 @@
                if (si_ctlp->sictl_devid == SI3132_DEV_ID) {
                        si_ctlp->sictl_num_ports = SI3132_MAX_PORTS;
                } else {
-                       si_ctlp->sictl_num_ports = SI3124_MAX_PORTS;
+                       if (si_ctlp->sictl_devid == SI3124_DEV_ID) {
+                               si_ctlp->sictl_num_ports = SI3124_MAX_PORTS;
+                       } else {
+                               si_ctlp->sictl_num_ports = SI3531_MAX_PORTS;
+                       }
                }

                attach_state |= ATTACH_PROGRESS_CONF_HANDLE;
diff -r b42c1f0432b6 usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h
--- a/usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h   Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h   Thu Jul 28 21:57:32 2011 +0000
@@ -314,6 +314,7 @@

 #define        SI3124_DEV_ID   0x3124
 #define        SI3132_DEV_ID   0x3132
+#define        SI3531_DEV_ID   0x3531

 #define        PM_CSR(devid)    ((devid == SI3124_DEV_ID) ? 0x68 : 0x58)

diff -r b42c1f0432b6 usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h
--- a/usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h   Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h   Thu Jul 28 21:57:32 2011 +0000
@@ -32,6 +32,7 @@

 #define        SI3124_MAX_PORTS                4
 #define        SI3132_MAX_PORTS                2
+#define        SI3531_MAX_PORTS                1
 #define        SI_MAX_PORTS                    SI3124_MAX_PORTS

 #define        SI_LOGBUF_LEN                   512
#2

Updated by Charles Stephens over 9 years ago

Charles Stephens wrote:

Suggested fix which has been tested on an HP mediasmart ex495:

[...]

D'oh, forgot the manifest and man page changes:

diff r b42c1f0432b6 usr/src/man/man7d/si3124.7d
--
a/usr/src/man/man7d/si3124.7d Wed Jul 27 07:13:44 2011 0700
++ b/usr/src/man/man7d/si3124.7d Thu Jul 28 22:07:53 2011 +0000
@ -5,7 +5,7 @
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH si3124 7D "17 August 2007" "SunOS 5.11" "Devices"
.SH NAME
-si3124 \
SiliconImage 3124/3132 SATA controller driver
+si3124 \- SiliconImage 3124/3132/3531 SATA controller driver
.SH SYNOPSIS
.LP
.nf
@ -16,7 +16,7 @
.sp
.LP
The \fBsi3124\fR driver is a \fBSATA\fR framework-compliant HBA driver that
supports Silicon Image 3124 and 3132 \fBSATA\fR controllers. Note that while
+supports Silicon Image 3124, 3132 and 3531 \fBSATA\fR controllers. Note that while
the Silicon Image controllers supports standard \fBSATA\fR features including
SATA-II disks, NCQ, hotplug, port multiplier and ATAPI disks, the \fBsi3124\fR
driver currently does not support NCQ, port multiplier or ATAPI features.
diff -r b42c1f0432b6 usr/src/pkg/manifests/driver-storage-si3124.mf
--
a/usr/src/pkg/manifests/driver-storage-si3124.mf Wed Jul 27 07:13:44 2011 0700
++ b/usr/src/pkg/manifests/driver-storage-si3124.mf Thu Jul 28 22:07:53 2011 0000
@ -41,7 +41,8 @
dir path=usr/share/man/man7d
driver name=si3124 class=scsi-self-identifying perms="* 0644 root sys" \
alias=pci1095,3124 \
alias=pci1095,3132
alias=pci1095,3132 \
+ alias=pci1095,3531
file path=kernel/drv/$(ARCH64)/si3124 group=sys
file path=kernel/drv/si3124 group=sys
file path=usr/share/man/man7d/si3124.7d
diff r b42c1f0432b6 usr/src/uts/common/io/sata/adapters/si3124/si3124.c
--
a/usr/src/uts/common/io/sata/adapters/si3124/si3124.c Wed Jul 27 07:13:44 2011 0700
++ b/usr/src/uts/common/io/sata/adapters/si3124/si3124.c Thu Jul 28 22:07:53 2011 +0000
@ -565,7 +565,11 @
if (si_ctlp
>sictl_devid == SI3132_DEV_ID) {
si_ctlp->sictl_num_ports = SI3132_MAX_PORTS;
} else {
- si_ctlp->sictl_num_ports = SI3124_MAX_PORTS;
if (si_ctlp->sictl_devid == SI3124_DEV_ID) {
+ si_ctlp->sictl_num_ports = SI3124_MAX_PORTS;
+ } else {
+ si_ctlp->sictl_num_ports = SI3531_MAX_PORTS;
+ }
}

attach_state |= ATTACH_PROGRESS_CONF_HANDLE;
diff r b42c1f0432b6 usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h
--
a/usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h Thu Jul 28 22:07:53 2011 +0000
@ -314,6 +314,7 @
#define        SI3124_DEV_ID   0x3124
#define SI3132_DEV_ID 0x3132
+#define SI3531_DEV_ID 0x3531
#define        PM_CSR(devid)    ((devid == SI3124_DEV_ID) ? 0x68 : 0x58)

diff r b42c1f0432b6 usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h
--
a/usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h Thu Jul 28 22:07:53 2011 +0000
@ -32,6 +32,7 @

#define        SI3124_MAX_PORTS                4
#define SI3132_MAX_PORTS 2
+#define SI3531_MAX_PORTS 1
#define SI_MAX_PORTS SI3124_MAX_PORTS
#define        SI_LOGBUF_LEN                   512
#3

Updated by Charles Stephens over 9 years ago

And the third time is a charm:


diff -r b42c1f0432b6 usr/src/man/man7d/si3124.7d
--- a/usr/src/man/man7d/si3124.7d       Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/man/man7d/si3124.7d       Thu Jul 28 22:07:53 2011 +0000
@@ -5,7 +5,7 @@
 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
 .TH si3124 7D "17 August 2007" "SunOS 5.11" "Devices" 
 .SH NAME
-si3124 \- SiliconImage 3124/3132 SATA controller driver
+si3124 \- SiliconImage 3124/3132/3531 SATA controller driver
 .SH SYNOPSIS
 .LP
 .nf
@@ -16,7 +16,7 @@
 .sp
 .LP
 The \fBsi3124\fR driver is a \fBSATA\fR framework-compliant HBA driver that
-supports Silicon Image 3124 and 3132 \fBSATA\fR controllers. Note that while
+supports Silicon Image 3124, 3132 and 3531 \fBSATA\fR controllers. Note that while
 the Silicon Image controllers supports standard \fBSATA\fR features including
 SATA-II disks, NCQ, hotplug, port multiplier and ATAPI disks, the \fBsi3124\fR
 driver currently does not support NCQ, port multiplier or ATAPI features.
diff -r b42c1f0432b6 usr/src/pkg/manifests/driver-storage-si3124.mf
--- a/usr/src/pkg/manifests/driver-storage-si3124.mf    Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/pkg/manifests/driver-storage-si3124.mf    Thu Jul 28 22:07:53 2011 +0000
@@ -41,7 +41,8 @@
 dir path=usr/share/man/man7d
 driver name=si3124 class=scsi-self-identifying perms="* 0644 root sys" \
     alias=pci1095,3124 \
-    alias=pci1095,3132
+    alias=pci1095,3132 \
+    alias=pci1095,3531
 file path=kernel/drv/$(ARCH64)/si3124 group=sys
 file path=kernel/drv/si3124 group=sys
 file path=usr/share/man/man7d/si3124.7d
diff -r b42c1f0432b6 usr/src/uts/common/io/sata/adapters/si3124/si3124.c
--- a/usr/src/uts/common/io/sata/adapters/si3124/si3124.c       Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/uts/common/io/sata/adapters/si3124/si3124.c       Thu Jul 28 22:07:53 2011 +0000
@@ -565,7 +565,11 @@
                if (si_ctlp->sictl_devid == SI3132_DEV_ID) {
                        si_ctlp->sictl_num_ports = SI3132_MAX_PORTS;
                } else {
-                       si_ctlp->sictl_num_ports = SI3124_MAX_PORTS;
+                       if (si_ctlp->sictl_devid == SI3124_DEV_ID) {
+                               si_ctlp->sictl_num_ports = SI3124_MAX_PORTS;
+                       } else {
+                               si_ctlp->sictl_num_ports = SI3531_MAX_PORTS;
+                       }
                }

                attach_state |= ATTACH_PROGRESS_CONF_HANDLE;
diff -r b42c1f0432b6 usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h
--- a/usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h   Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/uts/common/sys/sata/adapters/si3124/si3124reg.h   Thu Jul 28 22:07:53 2011 +0000
@@ -314,6 +314,7 @@

 #define        SI3124_DEV_ID   0x3124
 #define        SI3132_DEV_ID   0x3132
+#define        SI3531_DEV_ID   0x3531

 #define        PM_CSR(devid)    ((devid == SI3124_DEV_ID) ? 0x68 : 0x58)

diff -r b42c1f0432b6 usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h
--- a/usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h   Wed Jul 27 07:13:44 2011 -0700
+++ b/usr/src/uts/common/sys/sata/adapters/si3124/si3124var.h   Thu Jul 28 22:07:53 2011 +0000
@@ -32,6 +32,7 @@

 #define        SI3124_MAX_PORTS                4
 #define        SI3132_MAX_PORTS                2
+#define        SI3531_MAX_PORTS                1
 #define        SI_MAX_PORTS                    SI3124_MAX_PORTS

 #define        SI_LOGBUF_LEN                   512
#4

Updated by Charles Stephens over 9 years ago

Attached revised diff with requested changes from Vineeth Pillai and Garrett D'Amore.

#5

Updated by Garrett D'Amore over 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Fixed in:

changeset: 13416:4634e6cb2ada
tag: tip
user: Charles Stephens <>
date: Fri Jul 29 15:38:48 2011 -0700
description:
1299 Support SiI3531 chipset in si3124 driver
Reviewed by: Garrett D'Amore <>
Reviewed by: Vineeth Pillai <>
Reviewed by: Igor Kozhukhov <>
Reviewed by: Albert Lee <>
Reviewed by: Yuri Pankov <>
Approved by: Garrett D'Amore <>

Also available in: Atom PDF