ciss(4) HP Smart Array P840
Jonathon Reinhart
jonathon.reinhart at gmail.com
Tue Nov 24 15:57:03 UTC 2015
After reviewing the differences between 9.3.1-STABLE and the latest
FreeBSD, I've decided to try and merge the latest back into 9.3.1 so
that I can use the current version of FreeNAS with my P840 controller.
Please forgive my ignorance in the FreeBSD release / development
process, as I'm not really sure how to figure out where FreeBSD
releases are made relative to the source code. I'm looking on
http://github.com/freebsd/freebsd, but there are no tags or releases.
I realize this is probably because FreeBSD uses SVN, but the TrueOS on
which FreeNAS is based uses Git.
FreeNAS (http://github.com/freenas/freenas.git) branch 9.3.1-STABLE
pulls in the FreeBSD source from TrueOS
(http://github.com/trueos/trueos), at branch 9.3.1-STABLE.
------------------------------------------------------------------------------------------------------------------------------------------------------
Latest TrueOS change:
$ git status
On branch 9.3.1-STABLE
$ git log -n2 sys/dev/ciss
commit e2839cc1b8453737875676ba9e8d2f0b42aaa460
Author: sbruno <sbruno at FreeBSD.org>
Date: Mon Apr 21 16:55:02 2014 +0000
MFC r264127
Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)
Submitted by: Benesh, Scott <scott.benesh at hp.com>
Sponsored by: Yahoo! Inc.
commit 34cc27f945a62076a0d8826f61b1a0f90b20ae4f (d85167d0 on freebsd/freebsd)
Author: sbruno <sbruno at FreeBSD.org>
Date: Tue Apr 15 17:52:22 2014 +0000
MFC r264354 but change the lock arg and implementation to fit the
current state
of CAM in stable/9
Fix insta-panic on assert of unlocked periph mtx in ciss(4) when
logical volume state changes.
I'm still setting the mergeinfo as done here as the intent of the
MFC, if not
the EXACT code is being implemented.
Reviewed by: mav@
Sponsored by: Yahoo! Inc
------------------------------------------------------------------------------------------------------------------------------------------------------
These are the changes to freebsd/master that are *not* in TrueOS 9.3.1-STABLE
$ git log --oneline d85167d~1..HEAD sys/dev/ciss
590adc1 r249170 was just plain wrong. The effect of the change is to
always delete a logic volume on status change which is NOT what we
want here.
bc3e70b Remove redundant mtx_lock/unlock in ciss_name_device. This is
a guaranteed insta-panic on device add/remove. This is only called
from the notify thread which already holds the lock while calling this
function.
346273b Remove MAXBSIZE use from drivers where it has nothing to do.
c8a5ac8 Remove compat shims for FreeBSD versions older than 6 (really
early 5). The only diffs in the disassembly were different line
numbers passed to lock functions.
dd63bf9 Prevent overflow issues in timeout processing
fcae8e0 Add detection for ciss(4) controllers that are set to
non-raid JBOD mode. If a controller is set to JBOD, it has no RAID
functions turned on.
af69ed3 Check return of cam_periph_find() before using it in a printf.
d85167d Fix insta-panic on assert of unlocked periph mtx in ciss(4)
when logical volume state changes
------------------------------------------------------------------------------------------------------------------------------------------------------
fcae8e0 Appears to be the winner here, adding JBOD / HBA mode support.
I've done my best to apply those patches to TrueOS 9.3.1-STABLE, and
I'm building it now.
After those commits, the only difference between FreeBSD "master" and
my branch is:
diff -u freebsd/sys/dev/ciss/ciss.c trueos/sys/dev/ciss/ciss.c
--- freebsd/sys/dev/ciss/ciss.c 2015-11-23 17:53:43.119544620 -0500
+++ trueos/sys/dev/ciss/ciss.c 2015-11-24 10:51:50.609160463 -0500
@@ -4388,17 +4388,11 @@
DB_COMMAND(ciss_prt, db_ciss_prt)
{
struct ciss_softc *sc;
- devclass_t dc;
- int maxciss, i;
- dc = devclass_find("ciss");
- if ( dc == NULL ) {
- printf("%s: can't find devclass!\n", __func__);
- return;
- }
- maxciss = devclass_get_maxunit(dc);
- for (i = 0; i < maxciss; i++) {
- sc = devclass_get_softc(dc, i);
+ sc = devclass_get_softc(devclass_find("ciss"), 0);
+ if (sc == NULL) {
+ printf("no ciss controllers\n");
+ } else {
ciss_print_adapter(sc);
}
If anyone, namely Sean, be willing to take a look at my diff, I would
greatly appreciate it:
https://github.com/trueos/trueos/compare/9.3.1-STABLE...JonathonReinhart:update-ciss-to-latest
You'll see there is one commit that I made, and that is the one I'm unsure of.
Thank you for your time,
Jonathon Reinhart
More information about the freebsd-scsi
mailing list