From nobody@FreeBSD.org  Mon Jul 13 14:40:18 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 52767106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Jul 2009 14:40:18 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 270898FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Jul 2009 14:40:18 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n6DEeHlb046413
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 13 Jul 2009 14:40:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n6DEeHgL046412;
	Mon, 13 Jul 2009 14:40:17 GMT
	(envelope-from nobody)
Message-Id: <200907131440.n6DEeHgL046412@www.freebsd.org>
Date: Mon, 13 Jul 2009 14:40:17 GMT
From: Andrew <andrew@flarn.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ciss driver issue on HP DL585
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         136718
>Category:       kern
>Synopsis:       [ciss] ciss driver issue on HP DL585
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gavin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jul 13 14:50:01 UTC 2009
>Closed-Date:    Wed Jan 13 22:14:56 UTC 2010
>Last-Modified:  Wed Jan 13 22:14:56 UTC 2010
>Originator:     Andrew
>Release:        8.0-BETA1
>Organization:
>Environment:
FreeBSD gboff01-gs-me02.complinet.local 8.0-BETA1 FreeBSD 8.0-BETA1 #1: Mon Jul 13 15:07:40 BST 2009     root@:/usr/obj/usr/src/sys/NODEBUG  amd64
>Description:
whilst attempting a `portsnap fetch` on a HP DL585 updated to 8.0-BETA1 I get the following kernel messages:
Jul 13 14:23:40 gboff01-gs-me02 kernel: ciss0: invalid command, offense size 0 at 52, value 0x0, function ciss_cam_complete
Jul 13 14:23:40 gboff01-gs-me02 last message repeated 4 times
Jul 13 14:23:40 gboff01-gs-me02 kernel: g_vfs_done():da0s1d[WRITE(offset=5218385920, length=131072)]error = 5
Jul 13 14:23:41 gboff01-gs-me02 kernel: ciss0: invalid command, offense size 0 at 52, value 0x0, function ciss_cam_complete
Jul 13 14:23:41 gboff01-gs-me02 last message repeated 4 times
Jul 13 14:23:41 gboff01-gs-me02 kernel: g_vfs_done():da0s1d[WRITE(offset=5218385920, length=131072)]error = 5

ciss0:
ciss0@pci0:2:4:0:       class=0x010400 card=0x40800e11 chip=0xb1780e11 rev=0x01 hdr=0x00
    vendor     = 'Compaq Computer Corp (Now owned by Hewlett-Packard)'
    device     = 'SMART2 Array Controller (CISSB)'
    class      = mass storage
    subclass   = RAID
    cap 01[c0] = powerspec 2  supports D0 D1 D3  current D0
    cap 05[cc] = MSI supports 2 messages, 64 bit 
    cap 07[dc] = PCI-X 64-bit supports 512 burst read, 4 split transactions


dmesg extract:
ciss0: <Compaq Smart Array 5i> port 0x5000-0x50ff mem 0xf7bc0000-0xf7bfffff,0xf5ef0000-0xf5ef3fff irq 18 at device 4.0 on pci2
ciss0: PERFORMANT Transport
ciss0: [ITHREAD]


>How-To-Repeat:
Install 8.0-BETA1 on a HP DL585G1, attempt any significant disk activity.
>Fix:
The following patch to cissvar.h seems to correct the issue, unsure if this is the correct fix:
--- sys/dev/ciss/cissvar.h.orig 2009-07-13 14:41:23.000000000 +0100
+++ sys/dev/ciss/cissvar.h      2009-07-13 14:41:34.000000000 +0100
@@ -137,7 +137,7 @@
  * too small.
  */
 
-#define CISS_COMMAND_ALLOC_SIZE                512     /* XXX tune to get sensible s/g list length */
+#define CISS_COMMAND_ALLOC_SIZE                1024    /* XXX tune to get sensible s/g list length */
 #define CISS_COMMAND_SG_LENGTH ((CISS_COMMAND_ALLOC_SIZE - sizeof(struct ciss_command)) \
                                 / sizeof(struct ciss_sg_entry))

With the kernel recompiled, which it wouldn't survive without the patch, I can `portsnap fetch` and `portsnap extract` without errors.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jul 13 15:09:44 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136718 
State-Changed-From-To: open->feedback 
State-Changed-By: gavin 
State-Changed-When: Tue Aug 25 18:04:04 UTC 2009 
State-Changed-Why:  
To submitter: I'm not sure it'll help, but is there any chance 
you can try the patch at http://people.freebsd.org/~scottl/ciss_p410.diff 
and see if that fixes things for you? 


Responsible-Changed-From-To: freebsd-scsi->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Tue Aug 25 18:04:04 UTC 2009 
Responsible-Changed-Why:  
Track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136718 
State-Changed-From-To: feedback->closed 
State-Changed-By: gavin 
State-Changed-When: Wed Jan 13 21:35:49 UTC 2010 
State-Changed-Why:  
Feedback timeout (4 months), we believe this has been fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=136718 
>Unformatted:
