Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2000 05:40:56 -0800 (PST)
From:      adam@algroup.co.uk
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/22417: advansys wide scsi driver does not support more than 7 drives
Message-ID:  <20001030134056.2933937B479@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         22417
>Category:       kern
>Synopsis:       advansys wide scsi driver does not support more than 7 drives
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 30 05:50:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Adam Laurie
>Release:        4.1.1-STABLE
>Organization:
A.L. Digital Ltd.
>Environment:
FreeBSD tobermory 4.1.1-STABLE FreeBSD 4.1.1-STABLE #0: Fri Oct 20 13:12:24 GMT 2000     root@tobermory:/usr/src/sys/compile/TOBERMORY  i386

>Description:
it appears that advansys ultra2 scsi controller (tested with model ASB3940U2W) code is 
hardwired to 3 bit SCSI IDs, causing hangup during boot if more than 
3 bits worth of drives are present (or, presumably, any drive 
with an id higher than 7).

dmesg:

adw0: <AdvanSys 38C0800 Ultra2 SCSI Adapter> port 0xd800-0xd8ff mem 0xff8ffc00-0xff8ffcff irq 9 at device 11.0 on pci1
adw0: SCSI ID 0, High & Low SE Term Enabled, LVD Term Enabled, Queue Depth 253

(yes, I know having it set to SCSI id 0 is weird, but we have to because of 
the way the external drive chassis autonumbers).
>How-To-Repeat:
attach more than 7 scsi drives to an advansys controller.
>Fix:
the following patch was our attempt at a quick fix, which didn't work, but 
it's a start... :)

bash-2.03$ diff -u /usr/src/sys/dev/advansys/advlib.h.orig /usr/src/sys/dev/advansys/advlib.h
--- /usr/src/sys/dev/advansys/advlib.h.orig     Fri Oct 20 12:56:52 2000
+++ /usr/src/sys/dev/advansys/advlib.h  Mon Oct 30 10:56:14 2000
@@ -54,8 +54,8 @@
 
 typedef u_int8_t target_bit_vector;
 #define        TARGET_BIT_VECTOR_SET -1
-#define ADV_SCSI_ID_BITS       3
-#define ADV_MAX_TID            7
+#define ADV_SCSI_ID_BITS       4
+#define ADV_MAX_TID            15
 #define ADV_MAX_LUN            7
 
 /* Enumeration of board types */
@@ -297,7 +297,7 @@
 #define                EEPROM_SET_SCSIID(ep, id)                       \
                (ep).scsi_id_dma_speed &= ~EEPROM_SCSI_ID_MASK; \
                (ep).scsi_id_dma_speed |= ((id) & EEPROM_SCSI_ID_MASK)
-       u_int8_t        sdtr_data[8];
+       u_int8_t        sdtr_data[ADV_MAX_TID+1];
        u_int8_t        adapter_info[6];
 
        u_int16_t       cntl;


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001030134056.2933937B479>