From owner-freebsd-bugs Mon Oct 30 5:50: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 871B037B4E5 for ; Mon, 30 Oct 2000 05:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA76044; Mon, 30 Oct 2000 05:50:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 2933937B479; Mon, 30 Oct 2000 05:40:56 -0800 (PST) Message-Id: <20001030134056.2933937B479@hub.freebsd.org> Date: Mon, 30 Oct 2000 05:40:56 -0800 (PST) From: adam@algroup.co.uk To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/22417: advansys wide scsi driver does not support more than 7 drives Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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: 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