From nobody@FreeBSD.org  Fri May 29 11:01:46 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5D346106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 May 2009 11:01:46 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 4BCB28FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 May 2009 11:01:46 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n4TB1jih045435
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 29 May 2009 11:01:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n4TB1jZf045434;
	Fri, 29 May 2009 11:01:45 GMT
	(envelope-from nobody)
Message-Id: <200905291101.n4TB1jZf045434@www.freebsd.org>
Date: Fri, 29 May 2009 11:01:45 GMT
From: Michael Moll <kvedulv@kvedulv.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: New VIA SATA controller are not getting detected correctly
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         135057
>Category:       kern
>Synopsis:       [ata] [patch] New VIA SATA controller are not getting detected correctly
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 29 11:10:02 UTC 2009
>Closed-Date:    Sat Nov 07 19:28:24 UTC 2009
>Last-Modified:  Sat Nov 07 19:28:24 UTC 2009
>Originator:     Michael Moll
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD marduk.kvedulv.de 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Wed May 27 16:50:02 CEST 2009     mmoll@marduk.kvedulv.de:/usr/obj/usr/src/sys/MARDUK  i386
>Description:
On newer VIA boards (VB8001 for example) the ATA controller is not recognized correctly and so only UDMA33 is possible.

mmoll@marduk:~$ dmesg |grep ^ad
ad4: 715404MB <WDC WD7500AYYS-01RCA0 30.04G30> at ata2-master UDMA33
ad6: 715404MB <WDC WD7500AYYS-01RCA0 30.04G30> at ata3-master UDMA33
>How-To-Repeat:
Boot FreeBSD on such a board.
>Fix:
A patch like the one in http://lists.freebsd.org/pipermail/freebsd-current/2009-February/003568.html

>Release-Note:
>Audit-Trail:

From: Xin LI <delphij@delphij.net>
To: Michael Moll <kvedulv@kvedulv.de>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/135057: New VIA SATA controller are not getting detected
 correctly
Date: Mon, 01 Jun 2009 01:18:29 -0700

 This is a multi-part message in MIME format.
 --------------060307080004030208020802
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 Hi, Michael,
 
 Would you please give us the output from your 'pciconf -l'?  By the way
 would you please try attached patch?  By the way are you sure that these
 chips supports SATA300 (my sources says that they just support 1.5Gbps
 mode)?  I think they don't support legacy IDE on the other hand...
 
 Michael Moll wrote:
 >> Number:         135057
 >> Category:       misc
 >> Synopsis:       New VIA SATA controller are not getting detected correctly
 >> Confidential:   no
 >> Severity:       serious
 >> Priority:       low
 >> Responsible:    freebsd-bugs
 >> State:          open
 >> Quarter:        
 >> Keywords:       
 >> Date-Required:
 >> Class:          change-request
 >> Submitter-Id:   current-users
 >> Arrival-Date:   Fri May 29 11:10:02 UTC 2009
 >> Closed-Date:
 >> Last-Modified:
 >> Originator:     Michael Moll
 >> Release:        8.0-CURRENT
 >> Organization:
 >> Environment:
 > FreeBSD marduk.kvedulv.de 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Wed May 27 16:50:02 CEST 2009     mmoll@marduk.kvedulv.de:/usr/obj/usr/src/sys/MARDUK  i386
 >> Description:
 > On newer VIA boards (VB8001 for example) the ATA controller is not recognized correctly and so only UDMA33 is possible.
 > 
 > mmoll@marduk:~$ dmesg |grep ^ad
 > ad4: 715404MB <WDC WD7500AYYS-01RCA0 30.04G30> at ata2-master UDMA33
 > ad6: 715404MB <WDC WD7500AYYS-01RCA0 30.04G30> at ata3-master UDMA33
 >> How-To-Repeat:
 > Boot FreeBSD on such a board.
 >> Fix:
 > A patch like the one in http://lists.freebsd.org/pipermail/freebsd-current/2009-February/003568.html
 > 
 >> Release-Note:
 >> Audit-Trail:
 >> Unformatted:
 > _______________________________________________
 > freebsd-bugs@freebsd.org mailing list
 > http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 > To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
 
 
 - --
 Xin LI <delphij@delphij.net>	http://www.delphij.net/
 FreeBSD - The Power to Serve!
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.11 (FreeBSD)
 
 iEYEARECAAYFAkojjtQACgkQi+vbBBjt66ACHwCfQqUf6XMZadA3IG/StTL8Pq+C
 qEgAoKk6SIzTfgjFgmyme5dFvSf4IZb2
 =InN2
 -----END PGP SIGNATURE-----
 
 --------------060307080004030208020802
 Content-Type: text/plain;
  name="via.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="via.diff"
 
 Index: chipsets/ata-via.c
 ===================================================================
 --- chipsets/ata-via.c	(revision 193197)
 +++ chipsets/ata-via.c	(working copy)
 @@ -100,6 +100,8 @@
      static struct ata_chip_id new_ids[] =
      {{ ATA_VIA6410,   0x00, 0,      0x00,    ATA_UDMA6, "6410" },
       { ATA_VIA6420,   0x00, 7,      0x00,    ATA_SA150, "6420" },
 +     { ATA_VIA6420_5372, 0x00, 7,   0x00,    ATA_SA150, "6420" },
 +     { ATA_VIA6420_7372, 0x00, 7,   0x00,    ATA_SA150, "6420" },
       { ATA_VIA6421,   0x00, 6,      VIABAR,  ATA_SA150, "6421" },
       { ATA_VIA8237A,  0x00, 7,      0x00,    ATA_SA150, "8237A" },
       { ATA_VIA8237S,  0x00, 7,      0x00,    ATA_SA150, "8237S" },
 Index: ata-pci.h
 ===================================================================
 --- ata-pci.h	(revision 193197)
 +++ ata-pci.h	(working copy)
 @@ -421,6 +421,8 @@
  #define ATA_VIA8662             0x31021106
  #define ATA_VIA6410             0x31641106
  #define ATA_VIA6420             0x31491106
 +#define ATA_VIA6420_5372        0x53721106
 +#define ATA_VIA6420_7372        0x73721106
  #define ATA_VIA6421             0x32491106
  
  /* global prototypes ata-pci.c */
 
 --------------060307080004030208020802--

From: Michael Moll <kvedulv@kvedulv.de>
To: Xin LI <delphij@delphij.net>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/135057: New VIA SATA controller are not getting detected
	correctly
Date: Mon, 1 Jun 2009 19:37:40 +0200

 Hi Xin,
 
 On Mon, Jun 01, 2009 at 01:18:29AM -0700, Xin LI wrote:
 > Would you please give us the output from your 'pciconf -l'?
 
 root@marduk:~# pciconf -l
 hostb0@pci0:0:0:0:	class=0x060000 card=0xaa111106 chip=0x03641106 rev=0x00 hdr=0x00
 hostb1@pci0:0:0:1:	class=0x060000 card=0x00000000 chip=0x13641106 rev=0x00 hdr=0x00
 hostb2@pci0:0:0:2:	class=0x060000 card=0x00000000 chip=0x23641106 rev=0x00 hdr=0x00
 hostb3@pci0:0:0:3:	class=0x060000 card=0x00000000 chip=0x33641106 rev=0x00 hdr=0x00
 hostb4@pci0:0:0:4:	class=0x060000 card=0x00000000 chip=0x43641106 rev=0x00 hdr=0x00
 ioapic0@pci0:0:0:5:	class=0x080020 card=0x00000000 chip=0x53641106 rev=0x00 hdr=0x00
 hostb5@pci0:0:0:6:	class=0x060000 card=0x00000000 chip=0x63641106 rev=0x00 hdr=0x00
 hostb6@pci0:0:0:7:	class=0x060000 card=0x00000000 chip=0x73641106 rev=0x00 hdr=0x00
 pcib1@pci0:0:1:0:	class=0x060400 card=0x00000000 chip=0xb1981106 rev=0x00 hdr=0x01
 pcib2@pci0:0:2:0:	class=0x060400 card=0xc3231106 chip=0xa3641106 rev=0x80 hdr=0x01
 pcib3@pci0:0:3:0:	class=0x060400 card=0xc3231106 chip=0xc3641106 rev=0x80 hdr=0x01
 atapci0@pci0:0:15:0:	class=0x01018f card=0x53721106 chip=0x53721106 rev=0x00 hdr=0x00
 atapci1@pci0:0:15:1:	class=0x01018a card=0x05711106 chip=0x05711106 rev=0x07 hdr=0x00
 uhci0@pci0:0:16:0:	class=0x0c0300 card=0x30381106 chip=0x30381106 rev=0xb0 hdr=0x00
 uhci1@pci0:0:16:1:	class=0x0c0300 card=0x30381106 chip=0x30381106 rev=0xb0 hdr=0x00
 uhci2@pci0:0:16:2:	class=0x0c0300 card=0x30381106 chip=0x30381106 rev=0xb0 hdr=0x00
 uhci3@pci0:0:16:3:	class=0x0c0300 card=0x30381106 chip=0x30381106 rev=0xb0 hdr=0x00
 none0@pci0:0:16:4:	class=0x0c0320 card=0x31041106 chip=0x31041106 rev=0x90 hdr=0x00
 isab0@pci0:0:17:0:	class=0x060100 card=0xaa111106 chip=0x33721106 rev=0x00 hdr=0x00
 hostb7@pci0:0:17:7:	class=0x060000 card=0x337e1106 chip=0x287e1106 rev=0x00 hdr=0x00
 hostb8@pci0:0:19:0:	class=0x060000 card=0x00000000 chip=0x337b1106 rev=0x00 hdr=0x00
 pcib4@pci0:0:19:1:	class=0x060401 card=0x337a1106 chip=0x337a1106 rev=0x00 hdr=0x01
 vgapci0@pci0:1:0:0:	class=0x030000 card=0x33711106 chip=0x33711106 rev=0x01 hdr=0x00
 em0@pci0:2:0:0:		class=0x020000 card=0x10828086 chip=0x107d8086 rev=0x06 hdr=0x00
 none1@pci0:3:0:0:	class=0x020000 card=0x01101106 chip=0x31191106 rev=0x82 hdr=0x00
 
 > By the way would you please try attached patch?
 
 Looks good:
 
 mmoll@marduk:~$ dmesg |grep ^ad
 ad4: 715404MB <WDC WD7500AYYS-01RCA0 30.04G30> at ata2-master SATA300
 ad6: 715404MB <WDC WD7500AYYS-01RCA0 30.04G30> at ata3-master SATA300
 
 BTW, here's a picture of the board:
 http://www.tuxjournal.net/wp-content/uploads/2008/11/via_vb8001_top_h.jpg
 The Southbridge is labeled as "8237S" there, not 6420.
 
 > By the way are you sure that these chips supports SATA300 (my sources
 > says that they just support 1.5Gbps mode)?  I think they don't support
 > legacy IDE on the other hand...
 
 According to the Operating Guide for the board (available at 
 http://www.via.com.tw/en/products/embedded/ProductDetail.jsp?productLine=1&motherboard_id=711
 -> Downloads -> Operating Guide): "It supports for up to two SATA (3
 Gbps) devices" and it also has one 40pin IDE Connector onboard (I think
 I turned that off in the BIOS).
 
 Maybe that's the difference between the devices with the differing
 PCI-IDs? With the patch from the -current mailinglist the disks
 negotiated to SATA300 (according to dmesg).
 
 Best Regards
 -- 
 Michael Moll

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/135057: commit references a PR
Date: Mon, 26 Oct 2009 10:01:25 +0000 (UTC)

 Author: mav
 Date: Mon Oct 26 10:00:59 2009
 New Revision: 198481
 URL: http://svn.freebsd.org/changeset/base/198481
 
 Log:
   Add two more VIA SATA chip IDs.
   
   PR:		kern/135057
 
 Modified:
   head/sys/dev/ata/ata-pci.h
   head/sys/dev/ata/chipsets/ata-via.c
 
 Modified: head/sys/dev/ata/ata-pci.h
 ==============================================================================
 --- head/sys/dev/ata/ata-pci.h	Mon Oct 26 09:16:08 2009	(r198480)
 +++ head/sys/dev/ata/ata-pci.h	Mon Oct 26 10:00:59 2009	(r198481)
 @@ -415,6 +415,8 @@ struct ata_pci_controller {
  #define ATA_VIA8237             0x32271106
  #define ATA_VIA8237A            0x05911106
  #define ATA_VIA8237S		0x53371106
 +#define ATA_VIA8237_5372	0x53721106
 +#define ATA_VIA8237_7372	0x73721106
  #define ATA_VIA8251             0x33491106
  #define ATA_VIA8361             0x31121106
  #define ATA_VIA8363             0x03051106
 
 Modified: head/sys/dev/ata/chipsets/ata-via.c
 ==============================================================================
 --- head/sys/dev/ata/chipsets/ata-via.c	Mon Oct 26 09:16:08 2009	(r198480)
 +++ head/sys/dev/ata/chipsets/ata-via.c	Mon Oct 26 10:00:59 2009	(r198481)
 @@ -103,6 +103,8 @@ ata_via_probe(device_t dev)
       { ATA_VIA6421,   0x00, 6,      VIABAR,  ATA_SA150, "6421" },
       { ATA_VIA8237A,  0x00, 7,      0x00,    ATA_SA150, "8237A" },
       { ATA_VIA8237S,  0x00, 7,      0x00,    ATA_SA150, "8237S" },
 +     { ATA_VIA8237_5372, 0x00, 7,   0x00,    ATA_SA300, "8237" },
 +     { ATA_VIA8237_7372, 0x00, 7,   0x00,    ATA_SA300, "8237" },
       { ATA_VIA8251,   0x00, 0,      VIAAHCI, ATA_SA300, "8251" },
       { 0, 0, 0, 0, 0, 0 }};
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/135057: commit references a PR
Date: Thu, 29 Oct 2009 10:05:22 +0000 (UTC)

 Author: mav
 Date: Thu Oct 29 10:05:08 2009
 New Revision: 198576
 URL: http://svn.freebsd.org/changeset/base/198576
 
 Log:
   MFC rev. 198481, 198482:
   Add two more VIA SATA chip IDs.
   
   PR:		kern/135057
 
 Modified:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/ata/ata-pci.h
   stable/8/sys/dev/ata/chipsets/ata-via.c
   stable/8/sys/dev/xen/xenpci/   (props changed)
 
 Modified: stable/8/sys/dev/ata/ata-pci.h
 ==============================================================================
 --- stable/8/sys/dev/ata/ata-pci.h	Thu Oct 29 10:03:08 2009	(r198575)
 +++ stable/8/sys/dev/ata/ata-pci.h	Thu Oct 29 10:05:08 2009	(r198576)
 @@ -415,6 +415,8 @@ struct ata_pci_controller {
  #define ATA_VIA8237             0x32271106
  #define ATA_VIA8237A            0x05911106
  #define ATA_VIA8237S		0x53371106
 +#define ATA_VIA8237_5372	0x53721106
 +#define ATA_VIA8237_7372	0x73721106
  #define ATA_VIA8251             0x33491106
  #define ATA_VIA8361             0x31121106
  #define ATA_VIA8363             0x03051106
 
 Modified: stable/8/sys/dev/ata/chipsets/ata-via.c
 ==============================================================================
 --- stable/8/sys/dev/ata/chipsets/ata-via.c	Thu Oct 29 10:03:08 2009	(r198575)
 +++ stable/8/sys/dev/ata/chipsets/ata-via.c	Thu Oct 29 10:05:08 2009	(r198576)
 @@ -95,6 +95,8 @@ ata_via_probe(device_t dev)
       { ATA_VIA8237,   0x00, VIA133, 0x00,    ATA_UDMA6, "8237" },
       { ATA_VIA8237A,  0x00, VIA133, 0x00,    ATA_UDMA6, "8237A" },
       { ATA_VIA8237S,  0x00, VIA133, 0x00,    ATA_UDMA6, "8237S" },
 +     { ATA_VIA8237_5372, 0x00, VIA133, 0x00, ATA_UDMA6, "8237" },
 +     { ATA_VIA8237_7372, 0x00, VIA133, 0x00, ATA_UDMA6, "8237" },
       { ATA_VIA8251,   0x00, VIA133, 0x00,    ATA_UDMA6, "8251" },
       { 0, 0, 0, 0, 0, 0 }};
      static struct ata_chip_id new_ids[] =
 @@ -103,6 +105,8 @@ ata_via_probe(device_t dev)
       { ATA_VIA6421,   0x00, 6,      VIABAR,  ATA_SA150, "6421" },
       { ATA_VIA8237A,  0x00, 7,      0x00,    ATA_SA150, "8237A" },
       { ATA_VIA8237S,  0x00, 7,      0x00,    ATA_SA150, "8237S" },
 +     { ATA_VIA8237_5372, 0x00, 7,   0x00,    ATA_SA300, "8237" },
 +     { ATA_VIA8237_7372, 0x00, 7,   0x00,    ATA_SA300, "8237" },
       { ATA_VIA8251,   0x00, 0,      VIAAHCI, ATA_SA300, "8251" },
       { 0, 0, 0, 0, 0, 0 }};
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: mav 
State-Changed-When: Sat Nov 7 19:27:30 UTC 2009 
State-Changed-Why:  
Patch merged to 8-STABLE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=135057 
>Unformatted:
