linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anssi Hannula <anssi.hannula@iki.fi>
To: Tejun Heo <tj@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>,
	"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH #upstream] ahci: add HFLAG_YES_FBS and apply it to 88SE9128
Date: Tue, 30 Nov 2010 04:04:48 +0200	[thread overview]
Message-ID: <4CF45BC0.2030701@iki.fi> (raw)
In-Reply-To: <4C4AFE7C.5070506@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2344 bytes --]

On 24.07.2010 17:53, Tejun Heo wrote:
> 88SE9128 can do FBS and sets it in HOST_CAP but forgets to set FBSCP
> in PORT_CMD.  Implement AHCI_HFLAG_YES_FBS and apply it to 88SE9128.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
[...]
> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index f252253..41fa0a3 100644
[...]
> @@ -362,6 +371,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
>  	/* Marvell */
>  	{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },	/* 6145 */
>  	{ PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv },	/* 6121 */
> +	{ PCI_DEVICE(0x1b4b, 0x9123),
> +	  .driver_data = board_ahci_yes_fbs },			/* 88se9128 */

The device contains an IDE interface as well, and the above
pci_device_id matches them both:
08:00.0 SATA controller [0106]: Device [1b4b:9123] (rev 10)
08:00.1 IDE interface [0101]: Device [1b4b:9123] (rev 10)

This results in some (apparently harmless) mess [1].

Attached is a patch to make the id entry class-specific. The patch is
untested (the issue happens in a production machine).


[1]
ahci 0000:08:00.1: PCI INT B -> GSI 16 (level, low) -> IRQ 16
ahci 0000:08:00.1: irq 51 for MSI/MSI-X
ahci 0000:08:00.1: controller can do FBS, turning on CAP_FBS
ahci 0000:08:00.1: controller reset failed (0x80000085)
ahci 0000:08:00.1: failed to stop engine (-5)
ahci 0000:08:00.1: failed to stop engine (-5)
ahci 0000:08:00.1: failed to stop engine (-5)
ahci 0000:08:00.1: AHCI ffff.ffff 1 slots 6 ports ? Gbps 0x308 impl IDE mode
ahci 0000:08:00.1: flags: fbs ccc apst nvmp boh
ahci 0000:08:00.1: setting latency timer to 64
scsi38 : ahci
scsi39 : ahci
scsi40 : ahci
scsi41 : ahci
scsi42 : ahci
scsi43 : ahci
scsi44 : ahci
scsi45 : ahci
scsi46 : ahci
scsi47 : ahci
ata39: DUMMY
ata40: DUMMY
ata41: DUMMY
ata42: SATA max UDMA/133 abar m16@0xfb8fe000 port 0xfb8fe280 irq 51
ata43: DUMMY
ata44: DUMMY
ata45: DUMMY
ata46: DUMMY
ata47: SATA max UDMA/133 abar m16@0xfb8fe000 port 0xfb8fe500 irq 51
ata48: SATA max UDMA/133 abar m16@0xfb8fe000 port 0xfb8fe580 irq 51
ata42: failed to resume link (SControl FFFFFFFF)
ata47: failed to resume link (SControl FFFFFFFF)
ata47: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
ata48: failed to resume link (SControl FFFFFFFF)
ata48: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
ata42: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)

-- 
Anssi Hannula

[-- Attachment #2: 0001-ahci-do-not-match-the-IDE-interface-of-88SE9128.patch --]
[-- Type: text/x-patch, Size: 1225 bytes --]

>From 5e4e904eb78d69528bc3b3ddd39a55579642bfbd Mon Sep 17 00:00:00 2001
From: Anssi Hannula <anssi.hannula@iki.fi>
Date: Tue, 30 Nov 2010 03:43:15 +0200
Subject: [PATCH] ahci: do not match the IDE interface of 88SE9128

Commit 5f173107ecad83a50 added HFLAG_YES_FBS workaround for 88SE9128
(1b4b:9123).

However, that change inadvertently caused the legacy IDE interface of
the controller (with the same pci id) to become associated with the AHCI
driver as well, causing the driver to try to bring the interface up in
vain.

Fix that by matching against class as well.

Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
---
 drivers/ata/ahci.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 3288263..791cf9b 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -379,6 +379,8 @@ static const struct pci_device_id ahci_pci_tbl[] = {
 	{ PCI_VDEVICE(MARVELL, 0x6145), board_ahci_mv },	/* 6145 */
 	{ PCI_VDEVICE(MARVELL, 0x6121), board_ahci_mv },	/* 6121 */
 	{ PCI_DEVICE(0x1b4b, 0x9123),
+	  .class = PCI_CLASS_STORAGE_SATA_AHCI,
+	  .class_mask = 0xffffff,
 	  .driver_data = board_ahci_yes_fbs },			/* 88se9128 */
 
 	/* Promise */
-- 
1.7.3


  parent reply	other threads:[~2010-11-30  2:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-24 14:53 [PATCH #upstream] ahci: add HFLAG_YES_FBS and apply it to 88SE9128 Tejun Heo
2010-08-17 21:54 ` Jeff Garzik
2010-11-30  2:04 ` Anssi Hannula [this message]
2010-11-30 13:31   ` Tejun Heo
2010-11-30 20:10     ` Anssi Hannula
2010-12-07 19:45       ` Anssi Hannula
2010-12-08 11:10         ` Tejun Heo
2010-12-08 18:09           ` Jeff Garzik
2010-12-08 18:13             ` Tejun Heo
2011-01-07 19:22               ` Anssi Hannula
2011-01-19  1:07               ` Jeff Garzik
2010-12-20  3:24           ` Anssi Hannula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF45BC0.2030701@iki.fi \
    --to=anssi.hannula@iki.fi \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).