LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* PROBLEM: Corruption problems in pata_via for Via NanoBook owners (Cloudbook, EasyNote XS etc.)
@ 2008-02-17 14:21 Andrew Smith
  2008-02-17 15:40 ` Alan Cox
  2008-02-17 16:59 ` Bartlomiej Zolnierkiewicz
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Smith @ 2008-02-17 14:21 UTC (permalink / raw)
  To: linux-kernel

One Line : Changes in 2.24 have rendered the ide handling on the Via  
NanoBook unstable resulting in data loss under heavy load.

Keywords : modules, pata_via, viac82xxxx

Kernel version : 2.24

Environment : Packard Bell Easynote XS - based on Via Nanobook  
reference platform. (same as Everex Cloudbook in the USA).

Detail:

In v2.23 Kernel the following patch could be applied to viac82xxxx  
(see end of document), this works stably.

In 2.24 the device ID 0x581 for Vendor VIA was added to the pata_via  
driver causing some problems.

It builds fine and seems to start up OK, however, on large IOs then  
the kernel starts to throw errors about MULTICMDs (I think that was  
the term) returning an invalid response.

I have lost 2 builds so far (disk corruption) and have reverted to  
2.23 with the attached patch which does work fine (and gives UDMA133).

Suggestions:

Re-implement 0x581 handling in via82xxxx based on patch shown below.

Drop 0x581 support from pata_ide unless it is known to work with other  
hardware variants reliably.

If 0x581 is more desirable in pata_ide then make the via82cxxxx and  
pata_ide drivers mutually exclusive in a kernel configuration.


Regards,

-Andy Smith

*** linux-2.6.23/drivers/ide/pci/via82cxxx.c	2007-10-09  
22:31:38.000000000 +0200
--- linux-2.6.23-via-patch/drivers/ide/pci/via82cxxx.c	2007-11-02  
01:03:57.000000000 +0100
***************
*** 61,66 ****
--- 61,68 ----
   #define VIA_NO_UNMASK		0x08 /* Doesn't work with IRQ unmasking on */
   #define VIA_BAD_ID		0x10 /* Has wrong vendor ID (0x1107) */
   #define VIA_BAD_AST		0x20 /* Don't touch Address Setup Timing */
+ #define PCI_DEVICE_ID_VIA_CX700 0x8324
+ #define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581

   /*
    * VIA SouthBridge chips.
***************
*** 545,550 ****
--- 547,553 ----
   	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID,  
PCI_ANY_ID, 0, 0, 0},
   	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID,  
PCI_ANY_ID, 0, 0, 0},
   	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410,     PCI_ANY_ID,  
PCI_ANY_ID, 0, 0, 1},
+ 	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_CX700_IDE, PCI_ANY_ID,  
PCI_ANY_ID, 0, 0, 0},
   	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_SATA_EIDE,     PCI_ANY_ID,  
PCI_ANY_ID, 0, 0, 1},
   	{ 0, },
   };


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PROBLEM: Corruption problems in pata_via for Via NanoBook owners (Cloudbook, EasyNote XS etc.)
  2008-02-17 14:21 PROBLEM: Corruption problems in pata_via for Via NanoBook owners (Cloudbook, EasyNote XS etc.) Andrew Smith
@ 2008-02-17 15:40 ` Alan Cox
  2008-02-17 16:59 ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2008-02-17 15:40 UTC (permalink / raw)
  To: Andrew Smith; +Cc: linux-kernel

> In 2.24 the device ID 0x581 for Vendor VIA was added to the pata_via  
> driver causing some problems.

Actually we've had the CX700 supported for a while and as Tejun has
fixed other bugs related to it we know its being used and tested. The
slave port is a bit quirky but that is purely in the way it seems to mess
up the snooping of mode changes. Yours is the first bug report of this
type so more information about the precise combination of devices used
and the actual logs would be useful.

> It builds fine and seems to start up OK, however, on large IOs then  
> the kernel starts to throw errors about MULTICMDs (I think that was  
> the term) returning an invalid response.

No thats not a term I can guess at - do you have any logs with the exact
error reports in them ?

Also unfortunately you've compared 2.6.23 with 2.6.24 which means a bug
anywhere else could be causing the behaviour you see. It would be very
interesting to know if 2.6.24 built with old IDE rather than pata_via
(which is just config options) shows a difference in behaviour on your
box.

Alan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PROBLEM: Corruption problems in pata_via for Via NanoBook owners (Cloudbook, EasyNote XS etc.)
  2008-02-17 14:21 PROBLEM: Corruption problems in pata_via for Via NanoBook owners (Cloudbook, EasyNote XS etc.) Andrew Smith
  2008-02-17 15:40 ` Alan Cox
@ 2008-02-17 16:59 ` Bartlomiej Zolnierkiewicz
  1 sibling, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2008-02-17 16:59 UTC (permalink / raw)
  To: Andrew Smith; +Cc: linux-kernel, linux-ide, Jeff Garzik, Alan Cox


Hi,

On Sunday 17 February 2008, Andrew Smith wrote:
> One Line : Changes in 2.24 have rendered the ide handling on the Via  
> NanoBook unstable resulting in data loss under heavy load.
> 
> Keywords : modules, pata_via, viac82xxxx
> 
> Kernel version : 2.24
> 
> Environment : Packard Bell Easynote XS - based on Via Nanobook  
> reference platform. (same as Everex Cloudbook in the USA).
> 
> Detail:
> 
> In v2.23 Kernel the following patch could be applied to viac82xxxx  
> (see end of document), this works stably.
> 
> In 2.24 the device ID 0x581 for Vendor VIA was added to the pata_via  
> driver causing some problems.
> 
> It builds fine and seems to start up OK, however, on large IOs then  
> the kernel starts to throw errors about MULTICMDs (I think that was  
> the term) returning an invalid response.
> 
> I have lost 2 builds so far (disk corruption) and have reverted to  
> 2.23 with the attached patch which does work fine (and gives UDMA133).
> 
> Suggestions:
> 
> Re-implement 0x581 handling in via82xxxx based on patch shown below.

Thank you for reporting it (I was unaware that via82cxxx misses some ids).

I ported your patch over 2.6.25-rc2 and merged it.

> Drop 0x581 support from pata_ide unless it is known to work with other  
> hardware variants reliably.

Added Jeff/Alan to cc: so they can follow up on this.

> If 0x581 is more desirable in pata_ide then make the via82cxxxx and  
> pata_ide drivers mutually exclusive in a kernel configuration.
> 
> 
> Regards,
> 
> -Andy Smith
> 
> *** linux-2.6.23/drivers/ide/pci/via82cxxx.c	2007-10-09  
> 22:31:38.000000000 +0200
> --- linux-2.6.23-via-patch/drivers/ide/pci/via82cxxx.c	2007-11-02  
> 01:03:57.000000000 +0100
> ***************
> *** 61,66 ****
> --- 61,68 ----
>    #define VIA_NO_UNMASK		0x08 /* Doesn't work with IRQ unmasking on */
>    #define VIA_BAD_ID		0x10 /* Has wrong vendor ID (0x1107) */
>    #define VIA_BAD_AST		0x20 /* Don't touch Address Setup Timing */
> + #define PCI_DEVICE_ID_VIA_CX700 0x8324
> + #define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581
> 
>    /*
>     * VIA SouthBridge chips.
> ***************
> *** 545,550 ****
> --- 547,553 ----
>    	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1, PCI_ANY_ID,  
> PCI_ANY_ID, 0, 0, 0},
>    	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, PCI_ANY_ID,  
> PCI_ANY_ID, 0, 0, 0},
>    	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410,     PCI_ANY_ID,  
> PCI_ANY_ID, 0, 0, 1},
> + 	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_CX700_IDE, PCI_ANY_ID,  
> PCI_ANY_ID, 0, 0, 0},
>    	{ PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_SATA_EIDE,     PCI_ANY_ID,  
> PCI_ANY_ID, 0, 0, 1},
>    	{ 0, },
>    };

2.6.25-rc2 version:

From: Andrew Smith <asmith@tranquility.fsbusiness.co.uk>
Subject: [PATCH] via82cxxx: add new PCI id for cx700

[bart: manually ported it over via82cxxx changes]

From: Andrew Smith <asmith@tranquility.fsbusiness.co.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/via82cxxx.c |    1 +
 include/linux/pci_ids.h     |    1 +
 2 files changed, 2 insertions(+)

Index: b/drivers/ide/pci/via82cxxx.c
===================================================================
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -479,6 +479,7 @@ static int __devinit via_init_one(struct
 static const struct pci_device_id via_pci_tbl[] = {
 	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1),  0 },
 	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1),  0 },
+	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_CX700_IDE), 0 },
 	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410),      1 },
 	{ PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), 1 },
 	{ 0, },
Index: b/include/linux/pci_ids.h
===================================================================
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1351,6 +1351,7 @@
 #define PCI_DEVICE_ID_VIA_8231_4	0x8235
 #define PCI_DEVICE_ID_VIA_8365_1	0x8305
 #define PCI_DEVICE_ID_VIA_CX700		0x8324
+#define PCI_DEVICE_ID_VIA_CX700_IDE	0x0581
 #define PCI_DEVICE_ID_VIA_VX800		0x8353
 #define PCI_DEVICE_ID_VIA_8371_1	0x8391
 #define PCI_DEVICE_ID_VIA_82C598_1	0x8598

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-02-17 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-17 14:21 PROBLEM: Corruption problems in pata_via for Via NanoBook owners (Cloudbook, EasyNote XS etc.) Andrew Smith
2008-02-17 15:40 ` Alan Cox
2008-02-17 16:59 ` Bartlomiej Zolnierkiewicz

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).