From nobody@FreeBSD.org  Sat May 26 18:28:24 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 437DF37B423
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 May 2001 18:28:24 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f4R1SOE28134;
	Sat, 26 May 2001 18:28:24 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200105270128.f4R1SOE28134@freefall.freebsd.org>
Date: Sat, 26 May 2001 18:28:24 -0700 (PDT)
From: sean@mcneil.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: IDE Interrupts disabled on resume
X-Send-Pr-Version: www-1.0

>Number:         27674
>Category:       kern
>Synopsis:       IDE Interrupts disabled on resume
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sos
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 26 18:30:03 PDT 2001
>Closed-Date:    Wed Dec 12 05:57:04 PST 2001
>Last-Modified:  Wed Dec 12 05:58:22 PST 2001
>Originator:     Sean McNeil
>Release:        5.0-CURRENT
>Organization:
Sean McNeil Consulting
>Environment:
FreeBSD mobile.mcneil.com 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Wed May 23 20:45:46 PDT 2001     root@mobile.mcneil.com:/usr/src/sys/compile/INSPIRON  i386

>Description:
With INSPIRON 3500, the IDE device will cause a system hang because of interrupts in an incorrect state.
>How-To-Repeat:
Suspend INSPIRON and then Resume.

>Fix:
The following patch prevents system lockup upon resume.  I do not know of any side effects from this patch but there could be a performance degradation.

*** /sys/dev/ata/ata-all.c	Thu May 17 03:29:30 2001
--- ./ata-all.c	Sat May 26 18:15:36 2001
*************** out:
*** 946,952 ****
--- 946,954 ----
  #endif
  
      /* disable interrupt from device */
+ #if 0
      if (scp->flags & ATA_QUEUED)
+ #endif
  	ATA_OUTB(scp->r_altio, ATA_ALTSTAT, ATA_A_IDS | ATA_A_4BIT);
  
      /* select device */
*************** out:
*** 974,980 ****
--- 976,984 ----
  	ATA_OUTB(scp->r_io, ATA_CMD, command);
  
  	/* enable interrupt */
+ #if 0
  	if (scp->flags & ATA_QUEUED)
+ #endif
  	    ATA_OUTB(scp->r_altio, ATA_ALTSTAT, ATA_A_4BIT);
  
  	if (await(PRIBIO, 10 * hz)) {
*************** out:
*** 1005,1011 ****
--- 1009,1017 ----
  		   active2str(flags));
      }
      /* enable interrupt */
+ #if 0
      if (scp->flags & ATA_QUEUED)
+ #endif
  	ATA_OUTB(scp->r_altio, ATA_ALTSTAT, ATA_A_4BIT);
      return error;
  }

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: jesper 
Responsible-Changed-When: Sun May 27 16:29:26 PDT 2001 
Responsible-Changed-Why:  
sos is mister ata 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27674 

From: Peter Pentchev <roam@orbitel.bg>
To: sean@mcneil.com
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/27674: IDE Interrupts disabled on resume
Date: Mon, 28 May 2001 09:11:32 +0300

 On Sat, May 26, 2001 at 06:28:24PM -0700, sean@mcneil.com wrote:
 > 
 > >Number:         27674
 > >Category:       kern
 > >Synopsis:       IDE Interrupts disabled on resume
 > >Originator:     Sean McNeil
 > >Release:        5.0-CURRENT
 > >Organization:
 > Sean McNeil Consulting
 > >Environment:
 > FreeBSD mobile.mcneil.com 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Wed May 23 20:45:46 PDT 2001     root@mobile.mcneil.com:/usr/src/sys/compile/INSPIRON  i386
 > 
 > >Description:
 > With INSPIRON 3500, the IDE device will cause a system hang because of interrupts in an incorrect state.
 > >How-To-Repeat:
 > Suspend INSPIRON and then Resume.
 > 
 > >Fix:
 > The following patch prevents system lockup upon resume.  I do not know of any side effects from this patch but there could be a performance degradation.
 
 Would this not be simpler to achieve by just disabling tagged queueing?
 echo 'hw.ata.tags="0"' >> /boot/loader.conf, or maybe this is done with
 hints in -current..
 
 G'luck,
 Peter
 
 -- 
 This sentence every third, but it still comprehensible.

From: Sren Schmidt <sos@freebsd.dk>
To: sean@mcneil.com
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/27674: IDE Interrupts disabled on resume
Date: Mon, 28 May 2001 10:09:52 +0200 (CEST)

 It seems sean@mcneil.com wrote:
 > 
 > >Number:         27674
 > >Category:       kern
 > >Synopsis:       IDE Interrupts disabled on resume
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Sat May 26 18:30:03 PDT 2001
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Sean McNeil
 > >Release:        5.0-CURRENT
 > >Organization:
 > Sean McNeil Consulting
 > >Environment:
 > FreeBSD mobile.mcneil.com 5.0-CURRENT FreeBSD 5.0-CURRENT #1: Wed May 23 20:45:46 PDT 2001     root@mobile.mcneil.com:/usr/src/sys/compile/INSPIRON  i386
 > 
 > >Description:
 > With INSPIRON 3500, the IDE device will cause a system hang because of interrupts in an incorrect state.
 > >How-To-Repeat:
 > Suspend INSPIRON and then Resume.
 > 
 > >Fix:
 > The following patch prevents system lockup upon resume.  I do not know of any side effects from this patch but there could be a performance degradation.
 > 
 
 This will break some PCI based controllers, IIRC the Promise's are
 especially picky about this.
 
 This should be taken care of in the resume code, ie just always
 enable interrupts there on all devices, I'll look into that...
 
 > *** /sys/dev/ata/ata-all.c	Thu May 17 03:29:30 2001
 > --- ./ata-all.c	Sat May 26 18:15:36 2001
 > *************** out:
 > *** 946,952 ****
 > --- 946,954 ----
 >   #endif
 >   
 >       /* disable interrupt from device */
 > + #if 0
 >       if (scp->flags & ATA_QUEUED)
 > + #endif
 >   	ATA_OUTB(scp->r_altio, ATA_ALTSTAT, ATA_A_IDS | ATA_A_4BIT);
 >   
 >       /* select device */
 > *************** out:
 > *** 974,980 ****
 > --- 976,984 ----
 >   	ATA_OUTB(scp->r_io, ATA_CMD, command);
 >   
 >   	/* enable interrupt */
 > + #if 0
 >   	if (scp->flags & ATA_QUEUED)
 > + #endif
 >   	    ATA_OUTB(scp->r_altio, ATA_ALTSTAT, ATA_A_4BIT);
 >   
 >   	if (await(PRIBIO, 10 * hz)) {
 > *************** out:
 > *** 1005,1011 ****
 > --- 1009,1017 ----
 >   		   active2str(flags));
 >       }
 >       /* enable interrupt */
 > + #if 0
 >       if (scp->flags & ATA_QUEUED)
 > + #endif
 >   	ATA_OUTB(scp->r_altio, ATA_ALTSTAT, ATA_A_4BIT);
 >       return error;
 >   }
 > 
 > >Release-Note:
 > >Audit-Trail:
 > >Unformatted:
 > 
 > To Unsubscribe: send mail to majordomo@FreeBSD.org
 > with "unsubscribe freebsd-bugs" in the body of the message
 > 
 
 -Sren
State-Changed-From-To: open->analyzed 
State-Changed-By: sos 
State-Changed-When: Wed May 30 00:45:07 PDT 2001 
State-Changed-Why:  
OK, I've looked into this, the resume code always calls ata-reset 
which enables interrupts from the drive, so this is not the  
problem. What makes me wonder is that nobody else with that 
notebook series has reported any problems (yet). Could 
you mail me your kernel config file and dmesg please ? 


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27674 
State-Changed-From-To: analyzed->closed 
State-Changed-By: sos 
State-Changed-When: Wed Dec 12 05:57:04 PST 2001 
State-Changed-Why:  
No response, and no other reports of this problem. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27674 
>Unformatted:
