Re: Tracking down ata0 reset hang

From: Jesse Guardiani <jesse_at_wingnet.net>
Date: Mon, 22 Dec 2003 17:31:34 -0500
Jesse Guardiani wrote:

> Soren Schmidt wrote:
> 
>> It seems Jesse Guardiani wrote:
>>> Nate Lawson wrote:
>>> 
>>> > I have a laptop that suspends and resumes fine.  Soeren's patch to
>>> > properly reset the hardware after the ATAng import fixed the problem
>>> > where resuming would hang in ata0 reset with the hard drive light on.
>>> > 
>>> > Sometime in the last month or two, the ATA reset phase of resume has
>>> > begun hanging again with the drive light on and I can't break to the
>>> > debugger. The interesting data point is that if I suspend/resume in
>>> > single user
>>> > mode, it works fine, including the reset.  But in multi-user mode, it
>>> > hangs.  I'm trying to disable various services to see if any of them
>>> > triggers the hang.
>>> > 
>>> > Has anyone else seen this regression?
>> 
>> I cant suspend/resume at all on my ASUS, it locks up somwhere long before
>> it gets to ATA. However it worked on my old Dell until about a month ago
>> when it ended its lifetime.
> 
> Have you tried detaching any and all peripheral drives before suspending?
> In 5.1-RELEASE I had to issue an `atacontrol detach 1` before suspending
> or else it would lock up on resume.
> 
> Have you tried loading 5.1-RELEASE on the ASUS and seeing if it works
> then?
> 
> 
> [...]
> 
>> I dont think this is an ATA issue, I think the new acpi/interrupt code is
>> not setting up things as they should on resume.
> 
> Is this code active even with acpi disabled? Like I said, it happens when
> using APM or ACPI.
> 
> 
>> That said I'm interested
>> in getting this to work as well, but so far I dont even make it to ATA
>> during resume...
> 
> I'd ship you my laptop, but I need it for work. :)

Hi Soren (I'd spell the 'o' correctly, but I don't know the keystroke combo
for it...) and the rest of you kernel gurus,

I found something interesting out today. If I boot with 'boot -v -D' then
I can successfully suspend and resume with APM.

If I boot with either 'boot -v' or 'boot -D' alone, I cannot!

Here's the verbose suspend/resume cycle:

Lock GEOM topology not exclusively locked _at_ ../../.
./geom/geom_subr.c:261
acd0: WARNING - removed from configuration
pcib2: device pccard0 requested decoded I/O range 0x3e8-0x3ef
sio4: detached
pci_cfgintr_valid: BIOS irq 9 is valid
pci_cfgintr: 0:29 INTA BIOS irq 9
pci_cfgintr_valid: BIOS irq 11 is valid
pci_cfgintr: 0:29 INTB BIOS irq 11
pci_cfgintr_valid: BIOS irq 9 is valid
pci_cfgintr: 0:29 INTC BIOS irq 9
pci_cfgintr_valid: BIOS irq 5 is valid
pci_cfgintr: 0:31 INTB BIOS irq 5
pci_cfgintr_valid: BIOS irq 5 is valid
pci_cfgintr: 0:31 INTB BIOS irq 5
pci_cfgintr_valid: BIOS irq 5 is valid
pci_cfgintr: 0:31 INTB BIOS irq 5
pci_cfgintr_valid: BIOS irq 9 is valid
pci_cfgintr: 1:0 INTA BIOS irq 9
pci_cfgintr_valid: BIOS irq 9 is valid
pci_cfgintr: 2:0 INTA BIOS irq 9
pci_cfgintr_valid: BIOS irq 5 is valid
pci_cfgintr: 2:0 INTB BIOS irq 5
pci_cfgintr_valid: BIOS irq 9 is valid
pci_cfgintr: 2:0 INTC BIOS irq 9
pci_cfgintr_valid: BIOS irq 9 is valid
pci_cfgintr: 2:2 INTA BIOS irq 9
pci_cfgintr_valid: BIOS irq 10 is valid
pci_cfgintr: 2:8 INTA BIOS irq 10
atkbd: the current kbd controller command byte 0047
atkbd: keyboard ID 0x54ab (2)
ata0: resetting devices ..
ata0: reset tp1 mask=03 ostat0=50 ostat1=00
ad0: stat=0x50 err=0x01 lsb=0x00 msb=0x00
ata0-slave:  stat=0x00 err=0x01 lsb=0x00 msb=0x00
ata0: reset tp2 mask=03 stat0=50 stat1=00 devices=0x1<ATA_MASTER>
ad0: pio=0x0c wdma=0x22 udma=0x45 cable=80pin
ad0: setting PIO4 on Intel ICH3 chip

<hangs here normally>


ad0: setting UDMA100 on Intel ICH3 chip
ad0: setting UDMA100 on Intel ICH3 chip
done
start (88000000) < sc->membase (c0200000)
end (ffffffff) > sc->memlimit (cfffffff)
start (88000000) < sc->pmembase (e8000000)
end (ffffffff) > sc->pmemlimit (cfffffff)
pcib2: device pccard0 requested decoded memory range 0x88000000-0xffffffff
pccard0: CIS version PC Card Standard 5.0
pccard0: CIS info: 3Com Megahertz, 3CXM756/3CCM756
pccard0: Manufacturer code 0x101, product 0x3f
pccard0: function 0: serial port, ccr addr 300 mask 17
pccard0: function 0, config table entry 32: I/O card; irq mask ffff; iomask a, i
ospace 3f8-3ff; rdybsy_active io8 irqlevel powerdown audio
pccard0: function 0, config table entry 33: I/O card; irq mask ffff; iomask a, i
ospace 2f8-2ff; rdybsy_active io8 irqlevel powerdown audio
pccard0: function 0, config table entry 34: I/O card; irq mask ffff; iomask a, i
ospace 3e8-3ef; rdybsy_active io8 irqlevel powerdown audio
pccard0: function 0, config table entry 35: I/O card; irq mask ffff; iomask a, i
ospace 2e8-2ef; rdybsy_active io8 irqlevel powerdown audio
pcib2: device pccard0 requested decoded I/O range 0x3f8-0x3ff
pccard0: Allocation failed for cfe 32
pcib2: device pccard0 requested decoded I/O range 0x2f8-0x2ff
pccard0: Allocation failed for cfe 33
pcib2: device pccard0 requested decoded I/O range 0x3e8-0x3ef
start (88000000) < sc->membase (c0200000)
end (ffffffff) > sc->memlimit (cfffffff)
start (88000000) < sc->pmembase (e8000000)
end (ffffffff) > sc->pmemlimit (cfffffff)
pcib2: device pccard0 requested decoded memory range 0x88000000-0xffffffff
sio4: <3Com Megahertz 3CXM756/3CCM756> at port 0x3e8-0x3ef irq 9 function 0 conf
ig 34 on pccard0
pcib2: device sio4 requested decoded I/O range 0x3e8-0x3ef
pcib2: device pccard0 requested decoded I/O range 0x3e8-0x3ef
pcib2: device sio4 requested decoded I/O range 0x3e8-0x3ef
sio4: type 16550A
sio4: unable to activate interrupt in fast mode - using normal mode
ata1: reset tp1 mask=03 ostat0=50 ostat1=00
ata1-master: stat=0x00 err=0x01 lsb=0x14 msb=0xeb
ata1-slave:  stat=0x00 err=0x01 lsb=0x14 msb=0xeb
ata1: reset tp2 mask=03 stat0=00 stat1=00 devices=0xc<ATAPI_SLAVE,ATAPI_MASTER>
ata1: [MPSAFE]
Dec 22 13:59:25 trevarthan kernel: wakeup from sleeping state (slept 00:00:13)
Dec 22 13:59:25 trevarthan kernel: kbdc: RESET_KBD return code:00fa
Dec 22 13:59:25 trevarthan kernel: kbdc: RESET_KBD status:00aa
Dec 22 13:59:25 trevarthan kernel: stray irq15
ata1-master: pio=0x0c wdma=0x22 udma=0x42 cable=40pin
ata1-master: setting PIO4 on Intel ICH3 chip
ata1-master: setting UDMA33 on Intel ICH3 chip
acd0: <HL-DT-STDVD-ROM GDR8081N/0011> DVDROM drive at ata1 as master
acd0: read 1722KB/s (4134KB/s), 512KB buffer, UDMA33
acd0: Reads: CDR, CDRW, CDDA stream, DVDROM, DVDR, DVDRAM, packet
acd0: Writes:
acd0: Audio: play, 256 volume levels
acd0: Mechanism: ejectable tray, unlocked
acd0: Medium: 120mm data disc


Pretty darn wierd. Anyone have any ideas as to why it works when the serial
console AND verbose boot is enabled?

-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net
Received on Mon Dec 22 2003 - 13:31:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:35 UTC