Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Oct 2004 00:36:18 -0700
From:      "Jake Khuon" <khuon@NEEBU.Net>
To:        Bruce M Simpson <bms@spc.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: broken APM on IBM-T30 with 6.0-CURRENT 
Message-ID:  <200410290736.i9T7aIia017214@Espresso.NEEBU.Net>
In-Reply-To: Bruce M Simpson's message of Thu, 28 Oct 2004 17:38:52 -0700. <20041029003852.GE2063@empiric.icir.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
### On Thu, 28 Oct 2004 17:38:52 -0700, Bruce M Simpson <bms@spc.org>
### casually decided to expound upon Jake Khuon <khuon@NEEBU.Net> the
### following thoughts about "Re: broken APM on IBM-T30 with 6.0-CURRENT":

BMS> On Thu, Oct 28, 2004 at 05:33:03PM -0700, Jake Khuon wrote:
BMS> > That patch worked perfectly. I had to do a little hand-patching of one of
BMS> > the hunks that got rejected though.  Any thoughts on if this will get
BMS> > merged?  Thanks.
BMS> 
BMS> Please send me these patches so I can look at them...

After applying the patch, I did a backdiff.  This is against:

/src/sys/dev/ata/ata-all.c,v 1.233 2004/10/19 20:13:38


*** ata-all.c.orig	Mon Oct 25 06:28:47 2004
--- ata-all.c	Thu Oct 28 15:18:20 2004
***************
*** 86,91 ****
--- 86,92 ----
  static struct intr_config_hook *ata_delayed_attach = NULL;
  static int ata_dma = 1;
  static int atapi_dma = 1;
+ static int ata_resuming = 0;
  
  /* sysctl vars */
  SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters");
***************
*** 346,356 ****
--- 347,359 ----
  	if (ch->state == ATA_IDLE) {
  	    ch->state = ATA_ACTIVE;
  	    mtx_unlock(&ch->state_mtx);
+ 	    goto out;
  	    break;
  	}
  	mtx_unlock(&ch->state_mtx);
  	tsleep(ch, PRIBIO, "atasusp", hz/10);
      }
+ out:    
      ch->locking(ch, ATA_LF_UNLOCK);
      return 0;
  }
***************
*** 364,371 ****
--- 367,376 ----
      if (!dev || !(ch = device_get_softc(dev)))
  	return ENXIO;
  
+     ata_resuming = 1;
      error = ata_reinit(ch);
      ata_start(ch);
+     ata_resuming = 0;
      return error;
  }
  
***************
*** 838,844 ****
  void
  ata_udelay(int interval)
  {
!     if (interval < (1000000/hz) || ata_delayed_attach)
  	DELAY(interval);
      else
  	tsleep(&interval, PRIBIO, "ataslp", interval/(1000000/hz));
--- 843,849 ----
  void
  ata_udelay(int interval)
  {
!     if (interval < (1000000/hz) || ata_delayed_attach || ata_resuming)
  	DELAY(interval);
      else
  	tsleep(&interval, PRIBIO, "ataslp", interval/(1000000/hz));



--
/*===================[ Jake Khuon <khuon@NEEBU.Net> ]======================+
 | Packet Plumber, Network Engineers     /| / [~ [~ |) | | --------------- |
 | for Effective Bandwidth Utilisation  / |/  [_ [_ |) |_| N E T W O R K S |
 +=========================================================================*/



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