NetBSD Problem Report #19299

Received: (qmail 2697 invoked by uid 605); 6 Dec 2002 09:53:27 -0000
Message-Id: <200212060953.BAA03698@lothlorien.nfbcal.org>
Date: Fri, 6 Dec 2002 01:53:26 -0800 (PST)
From: buhrow@lothlorien.nfbcal.org
Sender: gnats-bugs-owner@netbsd.org
Reply-To: buhrow@lothlorien.nfbcal.org
To: gnats-bugs@gnats.netbsd.org
Subject: Patch to make twe(4) driver work with large capacity Escalade cards.
X-Send-Pr-Version: 3.01.6

>Number:         19299
>Category:       kern
>Synopsis:       The twe(4) driver is too quic to time out on large capacity cards.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 06 09:54:01 +0000 2002
>Closed-Date:    
>Last-Modified:  Mon Dec 16 20:47:52 +0000 2002
>Originator:     Brian Buhrow
>Release:        1.6, 1.6-current
>Organization:
	NFB of California
>Environment:
    	All platforms supporting the twe(4) driver.
System: NetBSD 1.6/i386


>Description:

	Following up again on my own adventures with the twe(4) driver, I've
got things working.  Below is the patch I needed to use to get the card
communicating with the driver.  The stock driver is very quick to timeout
when polling the card.  This is a 12-port card with 12 200GB disks attached
to it.  It takes a while to do a soft reset and a config.
	I'll send-pr this diff file, which should easily 
apply to 1.6 and 1.6-current, and hope it gets integrated into the release.
 I think we should be able to support any sized Escalade card out of the
box, and I believe this simple patch does just that.
-thanks
-Brian

*** twe.c	Fri Dec  6 00:21:48 2002
--- twe.c.fcs	Sun May 26 09:05:36 2002
***************
*** 373,379 ****
  	    TWE_CTL_CLEAR_ERROR_STS |
  	    TWE_CTL_DISABLE_INTRS);

! 	if (twe_status_wait(sc, TWE_STS_ATTN_INTR, 150)) {
  		printf("%s: no attention interrupt\n",
  		    sc->sc_dv.dv_xname);
  		return (-1);
--- 373,379 ----
  	    TWE_CTL_CLEAR_ERROR_STS |
  	    TWE_CTL_DISABLE_INTRS);

! 	if (twe_status_wait(sc, TWE_STS_ATTN_INTR, 15)) {
  		printf("%s: no attention interrupt\n",
  		    sc->sc_dv.dv_xname);
  		return (-1);
***************
*** 633,639 ****
  	/* Submit the command and either wait or let the callback handle it. */
  	if (func == NULL) {
  		s = splbio();
! 		rv = twe_ccb_poll(sc, ccb, 500);
  		twe_ccb_unmap(sc, ccb);
  		twe_ccb_free(sc, ccb);
  		splx(s);
--- 633,639 ----
  	/* Submit the command and either wait or let the callback handle it. */
  	if (func == NULL) {
  		s = splbio();
! 		rv = twe_ccb_poll(sc, ccb, 5);
  		twe_ccb_unmap(sc, ccb);
  		twe_ccb_free(sc, ccb);
  		splx(s);

>How-To-Repeat:
See above for the patch.
-Brian
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.