Bug 27674

Summary: IDE Interrupts disabled on resume
Product: Base System Reporter: Sean McNeil <sean>
Component: kernAssignee: Søren Schmidt <sos>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Sean McNeil 2001-05-27 02:30:03 UTC
With INSPIRON 3500, the IDE device will cause a system hang because of interrupts in an incorrect state.

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.
How-To-Repeat: Suspend INSPIRON and then Resume.
Comment 1 Jesper Skriver freebsd_committer freebsd_triage 2001-05-28 00:29:26 UTC
Responsible Changed
From-To: freebsd-bugs->sos

sos is mister ata
Comment 2 Peter Pentchev 2001-05-28 07:11:32 UTC
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.
Comment 3 sos 2001-05-28 09:09:52 UTC
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
> 

-Søren
Comment 4 Søren Schmidt freebsd_committer freebsd_triage 2001-05-30 08:45:07 UTC
State Changed
From-To: open->analyzed

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 ?
Comment 5 Søren Schmidt freebsd_committer freebsd_triage 2001-12-12 13:57:04 UTC
State Changed
From-To: analyzed->closed

No response, and no other reports of this problem.