support for PMP used in TT BlackX Duet drive dock

Submitted by Pavel Herrmann on April 7, 2011, 5:08 p.m.

Details

Message ID 201104071908.10852.morpheus.ibis@gmail.com
State Not Applicable
Delegated to: David Miller
Headers show

Commit Message

Pavel Herrmann April 7, 2011, 5:08 p.m.
On Thursday 07 of April 2011 18:54:10 I wrote:
> Hi,
> 
> Current linux kernel failes to communicate with PMP chip used in
> Thermaltake BlackX Duet (ST0015E) external drive, adding same quirks (some
> of them may not be necessary) as other chips have fixes it (tested on AHCI
> driver, on JMB363 and ICH10R)
> 
> Please note that this patch is purposefully not in state includable in
> mainline, it is meant as a base for someone with more understanding of
> libata to make a proper fix
> 
> Thanks
> Pavel Herrmann

the patch included in the last mail had a copy/paste error, this one is fixed

Pavel Herrmann

Comments

Tejun Heo April 7, 2011, 7:03 p.m.
On Thu, Apr 07, 2011 at 07:08:10PM +0200, Pavel Herrmann wrote:
> +	} else if (vendor == 0x1095 && devid == 0x4726) {
> +		/* chip found in Thermaltake BlackX Duet */
> +		ata_for_each_link(link, ap, EDGE) {
> +			/* Use same quirks as sil chips	to make it work */
> +			link->flags |= ATA_LFLAG_NO_LPM |
> +				       ATA_LFLAG_NO_SRST |
> +				       ATA_LFLAG_ASSUME_ATA;
> +		}

I'm confused.  Against which version is the patch generated?  Upstream
already has quirks for 4726.

Thakns.
Pavel Herrmann April 7, 2011, 7:40 p.m.
On Thursday 07 of April 2011 21:03:00 Tejun Heo wrote:
> I'm confused.  Against which version is the patch generated?  Upstream
> already has quirks for 4726.
> 
> Thakns.

this is what you get from running and editing a different tree (and being 
lazy), sorry for messing it up.

the correct (tested) code, without beautifications/comments:

        } else if (vendor == 0x197b && devid == 0x2352) {
                ata_for_each_link(link, ap, EDGE) {
                        link->flags |= ATA_LFLAG_NO_LPM |
                                       ATA_LFLAG_NO_SRST |
                                       ATA_LFLAG_ASSUME_ATA;
                }
        }

third time's the charm

Thanks
Pavel Herrmann

PS: just to be on the safe side, this is the device detection from dmesg
ata8.15: Port Multiplier 1.1, 0x197b:0x2352 r0, 2 ports, feat 0x0/0x0
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Garzik April 8, 2011, 4:58 a.m.
On 04/07/2011 03:40 PM, Pavel Herrmann wrote:
> On Thursday 07 of April 2011 21:03:00 Tejun Heo wrote:
>> I'm confused.  Against which version is the patch generated?  Upstream
>> already has quirks for 4726.
>>
>> Thakns.
>
> this is what you get from running and editing a different tree (and being
> lazy), sorry for messing it up.
>
> the correct (tested) code, without beautifications/comments:
>
>          } else if (vendor == 0x197b&&  devid == 0x2352) {
>                  ata_for_each_link(link, ap, EDGE) {
>                          link->flags |= ATA_LFLAG_NO_LPM |
>                                         ATA_LFLAG_NO_SRST |
>                                         ATA_LFLAG_ASSUME_ATA;
>                  }
>          }
>
> third time's the charm
>
> Thanks
> Pavel Herrmann
>
> PS: just to be on the safe side, this is the device detection from dmesg
> ata8.15: Port Multiplier 1.1, 0x197b:0x2352 r0, 2 ports, feat 0x0/0x0

So you're gonna resend this as a real patch, right?  :)


--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

From 55617331f5d1ef24f7fb60f9640a2363e3649cdf Mon Sep 17 00:00:00 2001
From: Pavel Herrmann <morpheus.ibis@gmail.com>
Date: Thu, 7 Apr 2011 18:15:26 +0200
Subject: [PATCH] libata-pmp: add support for Thermaltake BlackX Duet esata drive dock

some errors still show up, but the dock works, both drives can be
accessed at the same time

the chip maker and designation is unknown - possibly jmicron JMB350?

Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
---
 drivers/ata/libata-pmp.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index 3120596..abc8474 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -449,6 +449,14 @@  static void sata_pmp_quirks(struct ata_port *ap)
 		 * otherwise.  Don't try hard to recover it.
 		 */
 		ap->pmp_link[ap->nr_pmp_links - 1].flags |= ATA_LFLAG_NO_RETRY;
+	} else if (vendor == 0x1095 && devid == 0x4726) {
+		/* chip found in Thermaltake BlackX Duet */
+		ata_for_each_link(link, ap, EDGE) {
+			/* Use same quirks as sil chips	to make it work */
+			link->flags |= ATA_LFLAG_NO_LPM |
+				       ATA_LFLAG_NO_SRST |
+				       ATA_LFLAG_ASSUME_ATA;
+		}
 	}
 }
 
-- 
1.7.4.1