[Bug 213876] 3ware tws driver: TWS_MAX_NUM_LUNS wrong value

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Oct 29 09:49:05 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213876

            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 at FreeBSD.org
          Reporter: J.Catrysse at proximedia.be

3ware tws driver has TWS_MAX_NUM_LUNS set to 16 but this is not enough. I think
the maximum LUN's should be 255.

I have the issue on my 3ware 9750-8i controller with a RAID array spanned into
21 volumes. Only volume the first 16 volumes are detected.

CAMCONTROL DEVLIST

<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 0 (pass0,da0)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 1 (pass1,da1)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 2 (pass2,da2)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 3 (pass3,da3)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 4 (pass4,da4)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 5 (pass5,da5)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 6 (pass6,da6)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 7 (pass7,da7)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 8 (pass8,da8)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun 9 (pass9,da9)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun a (pass10,da10)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun b (pass11,da11)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun c (pass12,da12)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun d (pass13,da13)
<LSI 9750-8i    DISK 5.12>         at scbus0 target 0 lun e (pass14,da14)
<LSI 9750-8i    DISK 5.12>         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 >= TWS_MAX_NUM_LUNS) {
...
ccb_h->status |= 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 controllers.

I changed the value to 32 (to be safe) and it works like a charm.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list