From owner-freebsd-bugs@freebsd.org Sat Oct 29 09:49:05 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 026C9C2595D for ; Sat, 29 Oct 2016 09:49:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5DE09D6 for ; Sat, 29 Oct 2016 09:49:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u9T9n4Z6057272 for ; Sat, 29 Oct 2016 09:49:04 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 213876] 3ware tws driver: TWS_MAX_NUM_LUNS wrong value Date: Sat, 29 Oct 2016 09:49:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.3-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: J.Catrysse@proximedia.be X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2016 09:49:05 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213876 Bug ID: 213876 Summary: 3ware tws driver: TWS_MAX_NUM_LUNS wrong value Product: Base System Version: 10.3-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: J.Catrysse@proximedia.be 3ware tws driver has TWS_MAX_NUM_LUNS set to 16 but this is not enough. I t= hink the maximum LUN's should be 255. I have the issue on my 3ware 9750-8i controller with a RAID array spanned i= nto 21 volumes. Only volume the first 16 volumes are detected. CAMCONTROL DEVLIST at scbus0 target 0 lun 0 (pass0,da0) at scbus0 target 0 lun 1 (pass1,da1) at scbus0 target 0 lun 2 (pass2,da2) at scbus0 target 0 lun 3 (pass3,da3) at scbus0 target 0 lun 4 (pass4,da4) at scbus0 target 0 lun 5 (pass5,da5) at scbus0 target 0 lun 6 (pass6,da6) at scbus0 target 0 lun 7 (pass7,da7) at scbus0 target 0 lun 8 (pass8,da8) at scbus0 target 0 lun 9 (pass9,da9) at scbus0 target 0 lun a (pass10,da10) at scbus0 target 0 lun b (pass11,da11) at scbus0 target 0 lun c (pass12,da12) at scbus0 target 0 lun d (pass13,da13) at scbus0 target 0 lun e (pass14,da14) at scbus0 target 0 lun f (pass15,da15) DMESG (probe0:tws0:0:0:10): INQUIRY. CDB: 12 00 00 00 24 00 (probe0:tws0:0:0:10): CAM status: Invalid Lun (probe0:tws0:0:0:10): Error 22, Unretryable error (probe0:tws0:0:0:11): INQUIRY. CDB: 12 00 00 00 24 00 (probe0:tws0:0:0:11): CAM status: Invalid Lun (probe0:tws0:0:0:11): Error 22, Unretryable error (probe0:tws0:0:0:12): INQUIRY. CDB: 12 00 00 00 24 00 (probe0:tws0:0:0:12): CAM status: Invalid Lun (probe0:tws0:0:0:12): Error 22, Unretryable error (probe0:tws0:0:0:13): INQUIRY. CDB: 12 00 00 00 24 00 (probe0:tws0:0:0:13): CAM status: Invalid Lun (probe0:tws0:0:0:13): Error 22, Unretryable error (probe0:tws0:0:0:14): INQUIRY. CDB: 12 00 00 00 24 00 (probe0:tws0:0:0:14): CAM status: Invalid Lun (probe0:tws0:0:0:14): Error 22, Unretryable error In tws(4) driver sources I see: if (ccb_h->target_lun >=3D TWS_MAX_NUM_LUNS) { ... ccb_h->status |=3D CAM_LUN_INVALID; } Where TWS_MAX_NUM_LUNS is 16. So it is clear why it does not work. The only question is whether a higher value could provoke issues on other controller= s. I changed the value to 32 (to be safe) and it works like a charm. --=20 You are receiving this mail because: You are the assignee for the bug.=