Bug 13762

Summary: AHCI on HP Compaq 6715s broken, did not detect slots/ports -> unable to boot
Product: Drivers Reporter: Matthias Tingelhoff (mindo83)
Component: PCIAssignee: drivers_pci (drivers_pci)
Status: CLOSED CODE_FIX    
Severity: normal CC: jbarnes, jgarzik, mindo83, rjw, serkamil, tj
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.31-rc2-git7 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 13615    
Attachments: broken AHCI slot/port detection
working AHCI, for comparison

Description Matthias Tingelhoff 2009-07-11 20:48:38 UTC
Created attachment 22314 [details]
broken AHCI slot/port detection

Hi folks,

I wanted to test 2.6.31-rc to look at radeon KMS support, but the kernel doesnt boot because it cannot access my HD on my HP Compaq 6715s Notebook. I think this could affect other systems too.
Everything works great using 2.6.30.1 so its some kind of regression.

I attach dmesg output of both kernels for comparison.

The first development version I've tested was 2.6.31-rc1, the regression also occurred there.
Comment 1 Matthias Tingelhoff 2009-07-11 20:51:48 UTC
Created attachment 22315 [details]
working AHCI, for comparison
Comment 2 Tejun Heo 2009-07-15 06:41:39 UTC
That's one interesting failure.  Looks like register access is somehow borked.

 ahci 0000:00:12.0: implemented port map (0xf720ff83) contains more ports than nr_ports (1), using nr_ports
 ahci 0000:00:12.0: forcing PORTS_IMPL to 0x1

Here, the controller is reporting garbage for PORTS_IMPL register and then it's reporting 0x00400040 for PORT_CMD_ISSUE triggering the following failures.

 ata1: illegal qc_active transition (00000000->00400040)

I don't think the problem is in the ahci driver proper.  Something is affecting the controller in a very weird way.  Can you please try to bisect it?

Thanks.
Comment 3 Matthias Tingelhoff 2009-07-15 18:56:34 UTC
Hello Tejun, just finished bisecting, what a fun :)


# good: [a6c140969b4685f9b9f6773c0760f55ca66d1825] Delete pcibios_select_root
git bisect good a6c140969b4685f9b9f6773c0760f55ca66d1825
# bad: [a76117dfd687ec4be0a9a05214f3009cc5f73a42] x86: Use pci_claim_resource
git bisect bad a76117dfd687ec4be0a9a05214f3009cc5f73a42


I hope this is helpful for you, my notebook is still smoking from that compile-marathon :)

greets, Matthias
Comment 4 Tejun Heo 2009-07-16 02:27:51 UTC
Okay, pinged Matthew and Greg.  Thanks a lot for bisecting.
Comment 5 Matthias Tingelhoff 2009-07-17 00:32:27 UTC
I've done more investigations with that "Use pci_claim_resource" patch, and I figured out that if pcibios_allocate_bus_resources or pcibios_assign_resources uses pci_claim_resource, it doesn't matter to my system == boots fine.

But as soon pcibios_allocate_resources is using that pci_claim_resource method, the failure we're talking about here is triggered.

Hope that helps in some way, at least I have something like a workaround now to see radeon KMS in it's baby-shoes :)
Comment 6 Tejun Heo 2009-07-17 03:14:50 UTC
Jeff, I can't change the product.  Can you please change it to pci and reassign this bug?
Comment 7 Jeff Garzik 2009-07-17 05:14:52 UTC
I didn't see a Bus/PCI, the best category I found was Drivers/PCI.  CC'd PCI subsystem maintainer at any rate, that should work :)  Hi Jesse.
Comment 8 Rafael J. Wysocki 2009-07-27 20:50:18 UTC
On Monday 27 July 2009, Matthias T. wrote:
> Yes, this regression still exists in 2.6.31-rc4
> 
> 
> 
> Am Sonntag, 26. Juli 2009 22:28:24 schrieben Sie:
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> >
> > The following bug entry is on the current list of known regressions
> > from 2.6.30.  Please verify if it still should be listed and let me know
> > (either way).
> >
> >
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=13762
> > Subject             : AHCI on HP Compaq 6715s broken, did not detect
> slots/ports ->
> > unable to boot Submitter    : Matthias Tingelhoff <mindo83@t-online.de>
> > Date                : 2009-07-11 20:48 (16 days old)
Comment 9 Rafael J. Wysocki 2009-07-29 11:26:47 UTC
Caused by:

commit a76117dfd687ec4be0a9a05214f3009cc5f73a42
Author: Matthew Wilcox <willy@linux.intel.com>
Date:   Wed Jun 17 16:33:35 2009 -0400

    x86: Use pci_claim_resource

First-Bad-Commit : a76117dfd687ec4be0a9a05214f3009cc5f73a42
Comment 10 Rafael J. Wysocki 2009-08-03 21:37:24 UTC
On Monday 03 August 2009, Matthias T. wrote:
> This regression is history since rc5-git2, great job folks !
> 
> 
> Am Sonntag, 2. August 2009 20:58:26 schrieben Sie:
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> >
> > The following bug entry is on the current list of known regressions
> > from 2.6.30.  Please verify if it still should be listed and let me know
> > (either way).
> >
> >
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=13762
> > Subject             : AHCI on HP Compaq 6715s broken, did not detect
> slots/ports ->
> > unable to boot Submitter    : Matthias Tingelhoff <mindo83@t-online.de>
> > Date                : 2009-07-11 20:48 (23 days old)