From nobody@FreeBSD.org  Wed Dec 22 15:10:13 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id ACBAE16A4CF
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2004 15:10:13 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 83B6043D3F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2004 15:10:13 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id iBMFADxR005221
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Dec 2004 15:10:13 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iBMFADCL005215;
	Wed, 22 Dec 2004 15:10:13 GMT
	(envelope-from nobody)
Message-Id: <200412221510.iBMFADCL005215@www.freebsd.org>
Date: Wed, 22 Dec 2004 15:10:13 GMT
From: Sebastian <sebastian.holmqvist@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Future support of Promise SATAII150 TX4 wanted
X-Send-Pr-Version: www-2.3

>Number:         75387
>Category:       i386
>Synopsis:       [ata] feature request: support of Promise SATAII150 TX4 wanted
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 22 15:10:28 GMT 2004
>Closed-Date:    Thu Jan 05 00:41:38 GMT 2006
>Last-Modified:  Tue Mar 14 16:30:22 GMT 2006
>Originator:     Sebastian
>Release:        FreeBSD 5.3
>Organization:
>Environment:
>Description:
The Promise SATAII 150 TX4 is not supported by FreeBSD at this time.
It's predecessor (Promise SATA 150 TX4) is however supported.

The chip used by SATAII 150 TX4 is PDC40518 and I found this in the
current-mail-list:
http://lists.freebsd.org/pipermail/freebsd-current/2004-October/040327.html
Looks like they got no further.
>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: linimon 
State-Changed-When: Thu Oct 27 04:20:00 GMT 2005 
State-Changed-Why:  
Mark suspended awaiting a volunteer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75387 

From: Mikhail Teterin <mi+mx@aldan.algebra.com>
To: bug-followup@freebsd.org, sebastian.holmqvist@gmail.com
Cc: =?iso-8859-1?q?S=F8ren_Schmidt?= <sos@freebsd.org>
Subject: Re: i386/75387: [ata] feature request: support of Promise SATAII150
 TX4 wanted
Date: Mon, 14 Nov 2005 15:44:39 -0500

 --Boundary-00=_3cPeDWB4A2Onq3f
 Content-Type: text/plain;
   charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 My new SATA300 TX2plus is now working thanks to the very simple trick found 
 at:
 
 http://lists.freebsd.org/pipermail/freebsd-hardware/2005-October/002893.html
 
 Just use `pciconf -lv' to find the card's ID (card=...) and add it to the 
 ata-driver's table cloning an entry, that is the closest match.
 
 Yes, it only makes it work at SATA150 speeds. But it is soo much better, than 
 not work at all, that I'm happy. The disk is really a bottleneck anyway.
 
 The PR is 13 months old now. That even the simple work-around patch is not in 
 the tree, is a bloody shame...
 
 	-mi
 
 --Boundary-00=_3cPeDWB4A2Onq3f
 Content-Type: text/x-diff;
   charset="us-ascii";
   name="ata-id.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="ata-id.diff"
 
 Index: ata-chipset.c
 ===================================================================
 RCS file: /meow/ncvs/src/sys/dev/ata/ata-chipset.c,v
 retrieving revision 1.126.2.6
 diff -U2 -r1.126.2.6 ata-chipset.c
 --- ata-chipset.c	13 Oct 2005 08:07:46 -0000	1.126.2.6
 +++ ata-chipset.c	14 Nov 2005 19:55:36 -0000
 @@ -2401,4 +2401,5 @@
       { ATA_PDC20579,  0, PRMIO, PRCMBO2, ATA_SA150, "Promise PDC20579" },
       { ATA_PDC20580,  0, PRMIO, PRCMBO2, ATA_SA150, "Promise PDC20580" },
 +     { ATA_PDC20775,  0, PRMIO, PRCMBO2, ATA_SA150, "Promise PDC20775" },
       { ATA_PDC20617,  0, PRMIO, PRPATA,  ATA_UDMA6, "Promise PDC20617" },
       { ATA_PDC20618,  0, PRMIO, PRPATA,  ATA_UDMA6, "Promise PDC20618" },
 Index: ata-pci.h
 ===================================================================
 RCS file: /meow/ncvs/src/sys/dev/ata/ata-pci.h,v
 retrieving revision 1.49.2.4
 diff -U2 -r1.49.2.4 ata-pci.h
 --- ata-pci.h	13 Oct 2005 08:07:46 -0000	1.49.2.4
 +++ ata-pci.h	14 Nov 2005 19:54:51 -0000
 @@ -211,4 +211,5 @@
  #define ATA_PDC20579            0x3574105a
  #define ATA_PDC20580            0x3570105a
 +#define ATA_PDC20775		0x3d73105a
  #define ATA_PDC40518            0x3d18105a
  #define ATA_PDC40519            0x3519105a
 
 --Boundary-00=_3cPeDWB4A2Onq3f--

From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@FreeBSD.ORG>
To: Mikhail Teterin <mi+mx@aldan.algebra.com>
Cc: bug-followup@FreeBSD.ORG, sebastian.holmqvist@gmail.com
Subject: Re: i386/75387: [ata] feature request: support of Promise SATAII150 TX4 wanted
Date: Wed, 16 Nov 2005 23:12:47 +0100

 On 14/11/2005, at 21:44, Mikhail Teterin wrote:
 
 > My new SATA300 TX2plus is now working thanks to the very simple =20
 > trick found
 > at:
 >
 > http://lists.freebsd.org/pipermail/freebsd-hardware/2005-October/=20
 > 002893.html
 >
 > Just use `pciconf -lv' to find the card's ID (card=3D...) and add it =20=
 
 > to the
 > ata-driver's table cloning an entry, that is the closest match.
 >
 > Yes, it only makes it work at SATA150 speeds. But it is soo much =20
 > better, than
 > not work at all, that I'm happy. The disk is really a bottleneck =20
 > anyway.
 >
 > The PR is 13 months old now. That even the simple work-around patch =20=
 
 > is not in
 > the tree, is a bloody shame...
 >
 > 	-mi
 > <ata-id.diff>
 
 Hmm, in 6.0 and current the SATA2 promise chips are supported, =20
 however 3Gb is untested as I have no such equipment here. However, =20
 your chipid is unknown to me but you coud try to add it like the =20
 pdc40718/719 and let me know if that works.
 
 I'll ask promise about that chip, can you verify the chip type by =20
 reading whats printed on its back please ?
 
 S=F8ren Schmidt
 sos@FreeBSD.org
 
 
 

From: Mikhail Teterin <mi+mx@aldan.algebra.com>
To: =?utf-8?q?S=C3=B8ren_Schmidt?= <sos@freebsd.org>
Cc: bug-followup@freebsd.org, sebastian.holmqvist@gmail.com
Subject: Re: i386/75387: [ata] feature request: support of Promise SATAII150
 TX4 wanted
Date: Wed, 16 Nov 2005 17:26:55 -0500

 середа 16 листопад 2005 17:12, Søren Schmidt Ви написали:
 > Hmm, in 6.0 and current the SATA2 promise chips are supported,  
 > however 3Gb is untested as I have no such equipment here. However,  
 > your chipid is unknown to me but you coud try to add it like the  
 > pdc40718/719 and let me know if that works.
 >
 > I'll ask promise about that chip, can you verify the chip type by  
 > reading whats printed on its back please ?
 
 It is already deep inside my desktop system -- I can't reach there...
 The "marketing name" is SATA300 TX2plus (one PATA and 2 SATA channels), 
 although TX4 can't be very different (it has 4 SATA channels instead of 2):
 After applying the patch, it is identified as:
 
 atapci1: <Promise PDC20775 SATA150 controller> port 
 0xc000-0xc07f,0xc400-0xc4ff mem 0xf7051000-0xf7051fff,0xf7000000-0xf701ffff 
 irq 9 at device 11.0 on pci0
 
 `pciconv -lv' says:
 
 atapci1@pci0:11:0:      class=0x018000 card=0x3d73105a chip=0x3d73105a 
 rev=0x02 hdr=0x00
     vendor   = 'Promise Technology Inc'
     class    = mass storage
 
 IMHO, the driver should be smarter in identifying devices, you have not seen 
 before as compatible with something, you have. Anything unknown, with Promise 
 being the vendor and 'mass storate' being the class should be examined as an 
 ATA controller, for example.
 
 You can be very conservative enabling features, and even print a ton of 
 warnings, but it should be possible to install/boot FreeBSD with such 
 hardware. Is this not doable?
 
 Yours,
 
 	-mi

From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@FreeBSD.ORG>
To: Mikhail Teterin <mi+mx@aldan.algebra.com>
Cc: bug-followup@FreeBSD.ORG, sebastian.holmqvist@gmail.com
Subject: Re: i386/75387: [ata] feature request: support of Promise SATAII150 TX4 wanted
Date: Wed, 16 Nov 2005 23:53:54 +0100

 On 16/11/2005, at 23:26, Mikhail Teterin wrote:
 
 > =D1=81=D0=B5=D1=80=D0=B5=D0=B4=D0=B0 16 =D0=BB=D0=B8=D1=81=D1=82=D0=BE=D0=
 =BF=D0=B0=D0=B4 2005 17:12, S=C3=B8ren Schmidt =D0=92=D0=B8 =20
 > =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB=D0=B8:
 >> Hmm, in 6.0 and current the SATA2 promise chips are supported,
 >> however 3Gb is untested as I have no such equipment here. However,
 >> your chipid is unknown to me but you coud try to add it like the
 >> pdc40718/719 and let me know if that works.
 >>
 >> I'll ask promise about that chip, can you verify the chip type by
 >> reading whats printed on its back please ?
 >
 > It is already deep inside my desktop system -- I can't reach there...
 > The "marketing name" is SATA300 TX2plus (one PATA and 2 SATA =20
 > channels),
 > although TX4 can't be very different (it has 4 SATA channels =20
 > instead of 2):
 > After applying the patch, it is identified as:
 
 Well, the marketing bla bla doesn't tell the story nor the patch, I =20
 need to be sure whats on the chip, or get it verified by promise from =20=
 
 the pci id.
 >
 > IMHO, the driver should be smarter in identifying devices, you have =20=
 
 > not seen
 > before as compatible with something, you have. Anything unknown, =20
 > with Promise
 > being the vendor and 'mass storate' being the class should be =20
 > examined as an
 > ATA controller, for example.
 
 That wont fly sadly, if you look closer you'll see that things change =20=
 
 from generation to generation of the Promise chips, so chances are =20
 very slim it will work.
 
 With controllers saying they are ATA of some sort it will be treated =20
 as a generic chip, and it should work even with DMA but most likely =20
 with reduced performance. Promise chips are *not* in this category...
 
 S=C3=B8ren Schmidt
 sos@FreeBSD.org
 
 
 
State-Changed-From-To: suspended->closed 
State-Changed-By: sos 
State-Changed-When: Thu Jan 5 00:40:19 UTC 2006 
State-Changed-Why:  
The controller in question is fully supported now. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=75387 

From: Mikhail Teterin <mi+mx@aldan.algebra.com>
To: =?iso-8859-1?q?S=F8ren_Schmidt?= <sos@freebsd.org>
Cc: bug-followup@freebsd.org, sebastian.holmqvist@gmail.com, re@freebsd.org
Subject: Re: i386/75387: [ata] feature request: support of Promise SATAII150 TX4 wanted
Date: Mon, 13 Mar 2006 19:12:41 -0500

 --Boundary-00=_5pgFE8rt4qjxulT
 Content-Type: text/plain;
   charset="utf-8"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline
 
 The following patch (against today's 6.x) allows my little Promise controller
 to work. Note that my card is a 2-port version of the already listed 4-port
 one (PDC40775). Here is the resulting dmesg.boot (I don't have any SATA300
 drives here):
 
 atapci0: <SiS 962/963 UDMA133 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 2.5 on pci0
 ata0: <ATA channel 0> on atapci0
 ata1: <ATA channel 1> on atapci0
 atapci1: <Promise PDC20775 SATA300 controller> port 0xe000-0xe07f,0xe400-0xe4ff mem 0xf7051000-0xf7051fff,0xf7000000-0xf701ffff irq 5 at device 11.0 on pci0
 ata2: <ATA channel 0> on atapci1
 ata3: <ATA channel 1> on atapci1
 ata4: <ATA channel 2> on atapci1
 ad4: 35304MB <WDC WD360GD-00FNA0 35.06K35> at ata2-master SATA150
 ad6: 70911MB <WDC WD740GD-00FLA1 27.08D27> at ata3-master SATA150
 
 I'm not sure, where the PDC20580 should be listed in ata-chipset.c, so I did
 not merge it in. But it would be nice, if 6.1 "just worked" for owners of all
 this Promise hardware...
 
 	-mi
 
 --Boundary-00=_5pgFE8rt4qjxulT
 Content-Type: text/x-diff;
   charset="utf-8";
   name="ata.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="ata.patch"
 
 Index: ata-chipset.c
 ===================================================================
 RCS file: /meow/ncvs/src/sys/dev/ata/ata-chipset.c,v
 retrieving revision 1.126.2.10
 diff -U2 -r1.126.2.10 ata-chipset.c
 --- ata-chipset.c	1 Mar 2006 18:36:43 -0000	1.126.2.10
 +++ ata-chipset.c	13 Mar 2006 20:36:19 -0000
 @@ -2944,4 +2944,5 @@
       { ATA_PDC20579,  0, PRMIO, PRCMBO2, ATA_SA150, "PDC20579" },
       { ATA_PDC20771,  0, PRMIO, PRCMBO2, ATA_SA300, "PDC20771" },
 +     { ATA_PDC20775,  0, PRMIO, PRCMBO2, ATA_SA300, "PDC20775" },
       { ATA_PDC40775,  0, PRMIO, PRCMBO2, ATA_SA300, "PDC40775" },
       { ATA_PDC20617,  0, PRMIO, PRPATA,  ATA_UDMA6, "PDC20617" },
 Index: ata-pci.h
 ===================================================================
 RCS file: /meow/ncvs/src/sys/dev/ata/ata-pci.h,v
 retrieving revision 1.49.2.7
 diff -U2 -r1.49.2.7 ata-pci.h
 --- ata-pci.h	19 Feb 2006 15:18:23 -0000	1.49.2.7
 +++ ata-pci.h	14 Mar 2006 00:05:43 -0000
 @@ -225,4 +225,6 @@
  #define ATA_PDC20575            0x3d75105a
  #define ATA_PDC20579            0x3574105a
 +#define ATA_PDC20580            0x3570105a
 +#define ATA_PDC20775            0x3d73105a
  #define ATA_PDC20771            0x3570105a
  #define ATA_PDC40518            0x3d18105a
 
 --Boundary-00=_5pgFE8rt4qjxulT--

From: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@deepcore.dk>
To: Mikhail Teterin <mi+mx@aldan.algebra.com>
Cc: =?ISO-8859-1?Q?S=F8ren_Schmidt?= <sos@FreeBSD.ORG>,
        bug-followup@FreeBSD.ORG, sebastian.holmqvist@gmail.com,
        re@FreeBSD.ORG
Subject: Re: i386/75387: [ata] feature request: support of Promise SATAII150
 TX4 wanted
Date: Tue, 14 Mar 2006 07:36:14 +0100

 Mikhail Teterin wrote:
 > The following patch (against today's 6.x) allows my little Promise controller
 > to work. Note that my card is a 2-port version of the already listed 4-port
 > one (PDC40775). Here is the resulting dmesg.boot (I don't have any SATA300
 > drives here):
 
 I should work just as well before as the pdc40775 chip has the exact 
 same PCI id as yours and its already in there:
 
 #define ATA_PDC40775            0x3d73105a
 
 Are you saying that the original code doesn't work but the patched one 
 does ? Except for the different names printed in the boot messages there 
 is no difference in how they are treated whatsower...
 
 -Sren
 
 
 > Index: ata-chipset.c
 > ===================================================================
 > RCS file: /meow/ncvs/src/sys/dev/ata/ata-chipset.c,v
 > retrieving revision 1.126.2.10
 > diff -U2 -r1.126.2.10 ata-chipset.c
 > --- ata-chipset.c	1 Mar 2006 18:36:43 -0000	1.126.2.10
 > +++ ata-chipset.c	13 Mar 2006 20:36:19 -0000
 > @@ -2944,4 +2944,5 @@
 >       { ATA_PDC20579,  0, PRMIO, PRCMBO2, ATA_SA150, "PDC20579" },
 >       { ATA_PDC20771,  0, PRMIO, PRCMBO2, ATA_SA300, "PDC20771" },
 > +     { ATA_PDC20775,  0, PRMIO, PRCMBO2, ATA_SA300, "PDC20775" },
 >       { ATA_PDC40775,  0, PRMIO, PRCMBO2, ATA_SA300, "PDC40775" },
 >       { ATA_PDC20617,  0, PRMIO, PRPATA,  ATA_UDMA6, "PDC20617" },
 > Index: ata-pci.h
 > ===================================================================
 > RCS file: /meow/ncvs/src/sys/dev/ata/ata-pci.h,v
 > retrieving revision 1.49.2.7
 > diff -U2 -r1.49.2.7 ata-pci.h
 > --- ata-pci.h	19 Feb 2006 15:18:23 -0000	1.49.2.7
 > +++ ata-pci.h	14 Mar 2006 00:05:43 -0000
 > @@ -225,4 +225,6 @@
 >  #define ATA_PDC20575            0x3d75105a
 >  #define ATA_PDC20579            0x3574105a
 > +#define ATA_PDC20580            0x3570105a
 > +#define ATA_PDC20775            0x3d73105a
 >  #define ATA_PDC20771            0x3570105a
 >  #define ATA_PDC40518            0x3d18105a
 

From: Mikhail Teterin <mi+kde@aldan.algebra.com>
To: =?iso-8859-1?q?S=F8ren_Schmidt?= <sos@deepcore.dk>
Cc: Mikhail Teterin <mi+mx@aldan.algebra.com>,
        =?iso-8859-1?q?S=F8ren_Schmidt?= <sos@freebsd.org>,
        bug-followup@freebsd.org, sebastian.holmqvist@gmail.com,
        re@freebsd.org
Subject: Re: i386/75387: [ata] feature request: support of Promise SATAII150 TX4 wanted
Date: Tue, 14 Mar 2006 11:22:39 -0500

 On Tuesday 14 March 2006 01:36 am, Sren Schmidt wrote:
 = Are you saying that the original code doesn't work but the patched one 
 = does ? Except for the different names printed in the boot messages there 
 = is no difference in how they are treated whatsower...
 
 Oops, no I am not, sorry. I just noticed a conflict when I updated my 
 sys/dev/ata and proceeded to merge my earlier change into the new code.
 
 You are right, it would've worked anyway...
 
 Not sure about the card, that the originator of this PR has, though.
 
 Yours,
 
 	-mi
>Unformatted:
