Feature #1299
closedSupport SiI3531 chipset in si3124 driver
100%
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
Updated by Charles Stephens about 12 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
Updated by Charles Stephens about 12 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 SiliconImage 3124/3132 SATA controller driver
++ 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 \
+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 thatsupports Silicon Image 3124 and 3132 \fBSATA\fR controllers. Note that while a/usr/src/pkg/manifests/driver-storage-si3124.mf Wed Jul 27 07:13:44 2011
+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
--0700 alias=pci1095,3132
++ 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,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>sictl_devid == SI3132_DEV_ID) {
++ 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
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
Updated by Charles Stephens about 12 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
Updated by Charles Stephens about 12 years ago
- File illumos-1299-a.diff.txt illumos-1299-a.diff.txt added
Attached revised diff with requested changes from Vineeth Pillai and Garrett D'Amore.
Updated by Garrett D'Amore about 12 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
Fixed in:
changeset: 13416:4634e6cb2ada
tag: tip
user: Charles Stephens <cfs@cowlabs.com>
date: Fri Jul 29 15:38:48 2011 -0700
description:
1299 Support SiI3531 chipset in si3124 driver
Reviewed by: Garrett D'Amore <garrett@nexenta.com>
Reviewed by: Vineeth Pillai <vineeth.pillai@nexenta.com>
Reviewed by: Igor Kozhukhov <igor.kozhukhov@nexenta.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Approved by: Garrett D'Amore <garrett@nexenta.com>