All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: David Miller <davem@davemloft.net>,
	linux-ide@vger.kernel.org, alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] Don't use UDMA on VIA UDMA33 controller with Transcend SSD
Date: Tue, 11 Oct 2011 19:12:01 +0200	[thread overview]
Message-ID: <201110111912.01574.bzolnier@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0911181151140.5068@hs20-bc2-1.build.redhat.com>

Mikulas Patocka wrote:

> On Tue, 17 Nov 2009, David Miller wrote:
> 
> > From: Mikulas Patocka <mpatocka@redhat.com>
> > Date: Wed, 4 Nov 2009 20:25:21 -0500 (EST)
> > 
> > > Don't use UDMA on VIA UDMA33 controller with Transcend SSD
> > > 
> > > The computer locks up if Transcend SSD runs in any of UDMA modes.
> > > It doesn't lockup with different brand SSD, so this is specific to Transcend.
> > > 
> > > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > 
> > Mikulas, I'm happy to apply this if you match on the full
> > ID string, not just "TS".
> > 
> > Please update your patch and I'll push it upstream.
> > 
> > Thank you.
> 
> Transcend makes various versions of their SSDs and all begin with TS. You 
> can assume that Transcend SSDs with different capacity or format won't 
> work too because they likely use the same controller. The naming is this:
> 
> TS64GSSD25-M
> TS: Transcend
> 64G: capacity
> SSD25: 2.5" format
> -M: MLC
> 
> So the problem is that if you match against the full string, you are going 
> to miss the other Transcend devices and the patch becomes quite useless.
> 
> If you want to harden it against false negatives, you can grep the string 
> for "SSD", as in the patch below, but there is not anything better to do 
> --- if you include "64G" in the string, you fail on non-64G devices, if 
> you include "SSD25", you fail on 1.8" devices, if you include "-M", you 
> fail on SLC.
> 
> Mikulas
> 
> ---
> 
> Don't use UDMA on VIA UDMA33 controller with Transcend SSD
> 
> The computer locks up after if Transcend SSD runs in any of UDMA modes.
> It doesn't lockup with different brand SSD, so this is specific to Transcend.
> 
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

Reviewed-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Still valid for 3.1.  Dave, ping?

> ---
>  drivers/ide/via82cxxx.c |   17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> Index: linux-2.6.31.6-fast/drivers/ide/via82cxxx.c
> ===================================================================
> --- linux-2.6.31.6-fast.orig/drivers/ide/via82cxxx.c	2009-11-16 13:08:04.000000000 +0100
> +++ linux-2.6.31.6-fast/drivers/ide/via82cxxx.c	2009-11-18 17:57:22.000000000 +0100
> @@ -195,6 +195,22 @@ static void via_set_pio_mode(ide_drive_t
>  	via_set_drive(drive, XFER_PIO_0 + pio);
>  }
>  
> +static u8 via_udma_filter(ide_drive_t *drive)
> +{
> +	char *m = (char *)&drive->id[ATA_ID_PROD];
> +
> +	/*
> +	 * Restrict UDMA for Transcend flash cards.
> +	 * On VIA 33, UDMA locks up. On VIA 133, it works. I can't test other
> +	 * controllers.
> +	 */
> +	if (!memcmp(m, "TS", 2) && strstr(m, "SSD") &&
> +	    drive->hwif->ultra_mask == ATA_UDMA2)
> +		return 0;
> +
> +	return drive->hwif->ultra_mask;
> +}
> +
>  static struct via_isa_bridge *via_config_find(struct pci_dev **isa)
>  {
>  	struct via_isa_bridge *via_config;
> @@ -372,6 +388,7 @@ static const struct ide_port_ops via_por
>  	.set_pio_mode		= via_set_pio_mode,
>  	.set_dma_mode		= via_set_drive,
>  	.cable_detect		= via82cxxx_cable_detect,
> +	.udma_filter		= via_udma_filter,
>  };
>  
>  static const struct ide_port_info via82cxxx_chipset __devinitdata = {

  parent reply	other threads:[~2011-10-11 17:14 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21 18:55 [PATCH] Serialize CMD643 and CMD646 to fix a hardware bug with SSD Mikulas Patocka
2009-10-21 19:34 ` Mikael Pettersson
2009-10-21 23:01   ` Mikulas Patocka
2009-10-27 11:34     ` Alan Cox
2009-10-28  1:10       ` Mikulas Patocka
2009-10-21 19:39 ` Bartlomiej Zolnierkiewicz
2009-10-22  0:41   ` David Miller
2009-10-22  9:44     ` Bartlomiej Zolnierkiewicz
2009-10-22 11:00       ` David Miller
2009-10-22 11:15         ` Bartlomiej Zolnierkiewicz
2009-10-22 11:20           ` David Miller
2009-10-23 14:29       ` Mikulas Patocka
2009-10-23 14:31         ` David Miller
2009-10-23 14:44         ` Bartlomiej Zolnierkiewicz
2009-10-23 14:55           ` Mikulas Patocka
2009-10-23 15:03             ` Bartlomiej Zolnierkiewicz
2009-10-23 15:18               ` Daniela Engert
2009-10-23 16:51             ` Alan Cox
2009-10-23 17:27               ` Sergei Shtylyov
2009-10-23 18:22                 ` Alan Cox
2009-10-23 18:52                   ` Bartlomiej Zolnierkiewicz
2009-10-24  3:24                     ` David Miller
2009-10-24 12:38                       ` Bartlomiej Zolnierkiewicz
2009-10-24 12:58                         ` David Miller
2009-10-24 13:13                           ` Bartlomiej Zolnierkiewicz
2009-10-24 13:20                             ` David Miller
2009-10-26 11:36                   ` Mikulas Patocka
2009-10-26 12:18                     ` Alan Cox
2009-11-05  1:25                       ` [PATCH] Don't use UDMA on VIA UDMA33 controller with Transcend SSD Mikulas Patocka
2009-11-05 10:40                         ` Alan Cox
2009-11-05 22:18                           ` Mikulas Patocka
2009-11-05 22:46                             ` Alan Cox
2009-11-05 23:19                               ` Mikulas Patocka
2009-11-17 12:30                         ` David Miller
2009-11-18 17:09                           ` Mikulas Patocka
2009-11-18 17:22                             ` Alan Cox
2009-11-18 17:32                               ` David Miller
2009-11-18 17:46                                 ` Mikulas Patocka
2009-11-18 17:53                                   ` David Miller
2009-11-18 18:04                                     ` Mikulas Patocka
2009-11-18 17:37                               ` Mikulas Patocka
2009-11-18 17:50                                 ` Alan Cox
2009-11-18 18:02                                   ` Mikulas Patocka
2011-10-11 17:12                             ` Bartlomiej Zolnierkiewicz [this message]
2011-10-11 19:05                               ` David Miller
2011-10-11 19:39                                 ` Alan Cox
2011-10-12 14:38                                   ` Bartlomiej Zolnierkiewicz
2011-10-12 17:59                                     ` Alan Cox
2011-10-13 10:35                                       ` Bartlomiej Zolnierkiewicz
2010-01-14 15:49                         ` Bartlomiej Zolnierkiewicz
2010-01-14 19:24                           ` Alan Cox
2010-01-14 20:17                             ` Bartlomiej Zolnierkiewicz
2009-10-23 17:15         ` [PATCH] Serialize CMD643 and CMD646 to fix a hardware bug with SSD Alan Cox
2009-10-22 13:56     ` Alan Cox
2009-10-23  1:30       ` David Miller
2009-10-23 14:50     ` Mikulas Patocka
2009-10-23 20:50       ` Sergei Shtylyov
2009-10-26 11:30         ` Mikulas Patocka
2009-10-26 18:20           ` Sergei Shtylyov
2009-10-24 11:28     ` Frans Pop
2009-10-24 11:31       ` David Miller
2009-10-25  2:48         ` Frans Pop
2009-10-29 10:02           ` David Miller

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=201110111912.01574.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davem@davemloft.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.