Bug 120842 - [hptrr] hptrr driver causes detection of Marvell 88SX6081 SATA300 controller
Summary: [hptrr] hptrr driver causes detection of Marvell 88SX6081 SATA300 controller
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Scott Long
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-19 15:40 UTC by Alexey Strelkov
Modified: 2010-04-22 13:20 UTC (History)
1 user (show)

See Also:


Attachments
smime.p7s (6.10 KB, application/x-pkcs7-signature)
2010-04-22 12:58 UTC, Christian Marg
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Strelkov 2008-02-19 15:40:09 UTC
	The hptrr(4) driver grabs the Marvell 88SX6081 device,
	and the atapci(4) driver fails to attach.

--- dmesg with htprr(4) in kernel ---
hptrr0: <sx508x> port 0xd800-0xd8ff mem 0xdec00000-0xdecfffff irq 16 at device 0.0 on pci3
hptrr: adapter at PCI 3:0:0, IRQ 16
---

--- dmesg w/o htprr(4) in kernel ---
atapci3: <Marvell 88SX6081 SATA300 controller> port 0xd800-0xd8ff mem 0xdec00000-0xdecfffff irq 16 at device 0.0 on pci3
---

--- pciconf with htprr(4) in kernel ---
hptrr0@pci3:0:0:	class=0x010000 card=0x11ab11ab chip=0x608111ab rev=0x09 hdr=0x00
    vendor     = 'Marvell Semiconductor (Was: Galileo Technology Ltd)'
    device     = 'MV88SX6081 8-port SATA II PCI-X Controller'
    class      = mass storage
    subclass   = SCSI
---

--- pciconf w/o htprr(4) in kernel ---
atapci3@pci3:0:0:	class=0x010000 card=0x11ab11ab chip=0x608111ab rev=0x09 hdr=0x00
    vendor     = 'Marvell Semiconductor (Was: Galileo Technology Ltd)'
    device     = 'MV88SX6081 8-port SATA II PCI-X Controller'
    class      = mass storage
    subclass   = SCSI
---

Fix: 

Workaround: disable hptrr in kern conf file and rebuild kernel.
How-To-Repeat: 	Try to boot kernel with hptrr driver on a box that has
	Marvell 88SX6081 SATA300 controller.
Comment 1 Brooks Davis freebsd_committer freebsd_triage 2008-02-19 15:56:11 UTC
Responsible Changed
From-To: freebsd-bugs->scottl

Assign to vendor contact
Comment 2 Scott Long 2008-02-19 17:54:26 UTC
I take it that this device is not branded as a Highpoint RAID 
controller?  Marvell controller chips are typically found bundled
as software raid products; do you know which RAID vendor your
chip is associated with?

Scott
Comment 3 Alexey Strelkov 2008-02-20 09:30:41 UTC
On Tue, Feb 19, 2008 at 10:54:26AM -0700, Scott Long wrote:
> I take it that this device is not branded as a Highpoint RAID controller?  
> Marvell controller chips are typically found bundled
> as software raid products; do you know which RAID vendor your
> chip is associated with?
> 
> Scott

Hi!
This is Supermicro 8-Port SATA Card - (AOC-SAT2-MV8).

-- 
Hyppopotamus

áÌÅËÓÅÊ óÔÒÅÌËÏ× | Alexey Strelkov
  ïïï "òÁÍÂÌÅÒ éÎÔÅÒÎÅÔ èÏÌÄÉÎÇ"
      http://www.rambler.ru
Comment 4 Vladimir Laskov 2008-03-28 18:25:51 UTC
similar situation with installation process of FreeBSD 7.0 i386
installation process is failed (no disk)
system is using hptrr (Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx) 
driver for MV88SX6081 8-port SATA II PCI-X Controller

please note that: FreeBSD 7.0-RELEASE include hptrr driver in GENERIC 
kernel (default)

/Vladimir Ermakov
Comment 5 Peter Schuller 2008-07-19 18:20:44 UTC
I just ran into this myself upgrading a system from:

7.0-BETA3 FreeBSD 7.0-BETA3 #3: Thu Nov 29 00:22:20 CET 2007

To a 7.0-RELEASE-p3 from today. So whichever change triggered this happened in 
between those two releases.

FWIW, here is the device when properly detected:

atapci0@pci0:0:9:0:     class=0x010000 card=0x11ab11ab chip=0x608111ab 
rev=0x09 hdr=0x00
    vendor     = 'Marvell Semiconductor (Was: Galileo Technology Ltd)'
    device     = 'MV88SX6081 8-port SATA II PCI-X Controller'
    class      = mass storage
    subclass   = SCSI

I worked around it by disabling the probing of hptrr. Since the driver is a 
binary blob I guess there's not much to do about it other than hope for 
Highpoint?

Cases like these makes me wish there was a loader variable that would cause a 
particular driver to omit probing for devices even when built into the 
kernel. While there is a work-around in this case, it causes lots of trouble 
for bootstrapping a system since a RELEASE CD won't work.

Would a patch for such a thing forthis driver have any chance of being 
accepted, or is that type of functionality not considered kosher?

-- 
/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey@scode.org
E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org
Comment 6 Peter Schuller 2008-07-19 18:53:09 UTC
I noticed kern/120615:

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

Where there is talk of a rollback of the hptrr driver for RC3. Perhaps that is 
related.

-- 
/ Peter Schuller

PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey@scode.org
E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org
Comment 7 slvr32 2009-08-23 03:05:35 UTC
Any word on this?  This bug still exists in 7.2...
Comment 8 dfilter service freebsd_committer freebsd_triage 2009-11-08 11:34:06 UTC
Author: mav
Date: Sun Nov  8 11:33:51 2009
New Revision: 199043
URL: http://svn.freebsd.org/changeset/base/199043

Log:
  Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
  attach chips with generic Marvell (non-HighPoint) PCI identification.
  These chips are also supported by ata(4). Some vendors, like Supermicro,
  are using same chips without providing HPT RAID BIOS.
  
  PR:		kern/120842, kern/136750

Modified:
  head/share/man/man4/hptrr.4
  head/sys/dev/hptrr/hptrr_osm_bsd.c

Modified: head/share/man/man4/hptrr.4
==============================================================================
--- head/share/man/man4/hptrr.4	Sun Nov  8 11:32:39 2009	(r199042)
+++ head/share/man/man4/hptrr.4	Sun Nov  8 11:33:51 2009	(r199043)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 14, 2007
+.Dd November 8, 2009
 .Dt HPTRR 4
 .Os
 .Sh NAME
@@ -46,6 +46,14 @@ module at boot time, place the following
 .Bd -literal -offset indent
 hptrr_load="YES"
 .Ed
+.Pp
+The following tunables are settable from the loader:
+.Bl -ohang
+.It Va hw.hptrr.attach_generic
+set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint)
+PCI identification. These chips are also supported by ata(4).
+Some vendors are using same chips, but without providing RAID BIOS.
+.El
 .Sh DESCRIPTION
 The
 .Nm
@@ -101,6 +109,7 @@ manual page for details on support.
 .Pp
 This driver supersedes the older rr232x driver.
 .Sh SEE ALSO
+.Xr ata 4 ,
 .Xr cam 4 ,
 .Xr hptmv 4 ,
 .Xr loader 8

Modified: head/sys/dev/hptrr/hptrr_osm_bsd.c
==============================================================================
--- head/sys/dev/hptrr/hptrr_osm_bsd.c	Sun Nov  8 11:32:39 2009	(r199042)
+++ head/sys/dev/hptrr/hptrr_osm_bsd.c	Sun Nov  8 11:33:51 2009	(r199043)
@@ -34,6 +34,9 @@
 #include <dev/hptrr/os_bsd.h>
 #include <dev/hptrr/hptintf.h>
 
+static int attach_generic = 1;
+TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic);
+
 static int hpt_probe(device_t dev)
 {
 	PCI_ID pci_id;
@@ -41,6 +44,9 @@ static int hpt_probe(device_t dev)
 	int i;
 	PHBA hba;
 
+	/* Some of supported chips are used not only by HPT. */
+	if (pci_get_vendor(dev) != 0x1103 && !attach_generic)
+		return (ENXIO);
 	for (him = him_list; him; him = him->next) {
 		for (i=0; him->get_supported_device_id(i, &pci_id); i++) {
 			if ((pci_get_vendor(dev) == pci_id.vid) &&
_______________________________________________
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"
Comment 9 dfilter service freebsd_committer freebsd_triage 2009-11-26 15:16:15 UTC
Author: mav
Date: Thu Nov 26 15:16:03 2009
New Revision: 199835
URL: http://svn.freebsd.org/changeset/base/199835

Log:
  MFC r199043:
  Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
  attach chips with generic Marvell (non-HighPoint) PCI identification.
  These chips are also supported by ata(4). Some vendors, like Supermicro,
  are using same chips without providing HPT RAID BIOS.
  
  PR:		kern/120842, kern/136750

Modified:
  stable/8/sys/dev/hptrr/hptrr_osm_bsd.c
Directory Properties:
  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/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/hptrr/hptrr_osm_bsd.c
==============================================================================
--- stable/8/sys/dev/hptrr/hptrr_osm_bsd.c	Thu Nov 26 15:11:19 2009	(r199834)
+++ stable/8/sys/dev/hptrr/hptrr_osm_bsd.c	Thu Nov 26 15:16:03 2009	(r199835)
@@ -34,6 +34,9 @@
 #include <dev/hptrr/os_bsd.h>
 #include <dev/hptrr/hptintf.h>
 
+static int attach_generic = 1;
+TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic);
+
 static int hpt_probe(device_t dev)
 {
 	PCI_ID pci_id;
@@ -41,6 +44,9 @@ static int hpt_probe(device_t dev)
 	int i;
 	PHBA hba;
 
+	/* Some of supported chips are used not only by HPT. */
+	if (pci_get_vendor(dev) != 0x1103 && !attach_generic)
+		return (ENXIO);
 	for (him = him_list; him; him = him->next) {
 		for (i=0; him->get_supported_device_id(i, &pci_id); i++) {
 			if ((pci_get_vendor(dev) == pci_id.vid) &&
_______________________________________________
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"
Comment 10 Alexander Motin freebsd_committer freebsd_triage 2009-11-26 15:18:10 UTC
State Changed
From-To: open->closed

Patch merged to 7/8-STABLE.
Comment 11 dfilter service freebsd_committer freebsd_triage 2009-11-26 15:18:29 UTC
Author: mav
Date: Thu Nov 26 15:18:05 2009
New Revision: 199836
URL: http://svn.freebsd.org/changeset/base/199836

Log:
  MFC r199043:
  Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
  attach chips with generic Marvell (non-HighPoint) PCI identification.
  These chips are also supported by ata(4). Some vendors, like Supermicro,
  are using same chips without providing HPT RAID BIOS.
  
  PR:             kern/120842, kern/136750

Modified:
  stable/7/sys/dev/hptrr/hptrr_osm_bsd.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/dev/hptrr/hptrr_osm_bsd.c
==============================================================================
--- stable/7/sys/dev/hptrr/hptrr_osm_bsd.c	Thu Nov 26 15:16:03 2009	(r199835)
+++ stable/7/sys/dev/hptrr/hptrr_osm_bsd.c	Thu Nov 26 15:18:05 2009	(r199836)
@@ -34,6 +34,9 @@
 #include <dev/hptrr/os_bsd.h>
 #include <dev/hptrr/hptintf.h>
 
+static int attach_generic = 1;
+TUNABLE_INT("hw.hptrr.attach_generic", &attach_generic);
+
 static int hpt_probe(device_t dev)
 {
 	PCI_ID pci_id;
@@ -41,6 +44,9 @@ static int hpt_probe(device_t dev)
 	int i;
 	PHBA hba;
 
+	/* Some of supported chips are used not only by HPT. */
+	if (pci_get_vendor(dev) != 0x1103 && !attach_generic)
+		return (ENXIO);
 	for (him = him_list; him; him = him->next) {
 		for (i=0; him->get_supported_device_id(i, &pci_id); i++) {
 			if ((pci_get_vendor(dev) == pci_id.vid) &&
_______________________________________________
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"
Comment 12 dfilter service freebsd_committer freebsd_triage 2009-11-26 15:23:01 UTC
Author: mav
Date: Thu Nov 26 15:22:42 2009
New Revision: 199837
URL: http://svn.freebsd.org/changeset/base/199837

Log:
  MFC r199043:
  Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
  attach chips with generic Marvell (non-HighPoint) PCI identification.
  These chips are also supported by ata(4). Some vendors, like Supermicro,
  are using same chips without providing HPT RAID BIOS.
  
  PR:             kern/120842, kern/136750

Modified:
  stable/8/share/man/man4/hptrr.4
Directory Properties:
  stable/8/share/man/man4/   (props changed)

Modified: stable/8/share/man/man4/hptrr.4
==============================================================================
--- stable/8/share/man/man4/hptrr.4	Thu Nov 26 15:18:05 2009	(r199836)
+++ stable/8/share/man/man4/hptrr.4	Thu Nov 26 15:22:42 2009	(r199837)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 14, 2007
+.Dd November 8, 2009
 .Dt HPTRR 4
 .Os
 .Sh NAME
@@ -46,6 +46,14 @@ module at boot time, place the following
 .Bd -literal -offset indent
 hptrr_load="YES"
 .Ed
+.Pp
+The following tunables are settable from the loader:
+.Bl -ohang
+.It Va hw.hptrr.attach_generic
+set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint)
+PCI identification. These chips are also supported by ata(4).
+Some vendors are using same chips, but without providing RAID BIOS.
+.El
 .Sh DESCRIPTION
 The
 .Nm
@@ -101,6 +109,7 @@ manual page for details on support.
 .Pp
 This driver supersedes the older rr232x driver.
 .Sh SEE ALSO
+.Xr ata 4 ,
 .Xr cam 4 ,
 .Xr hptmv 4 ,
 .Xr loader 8
_______________________________________________
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"
Comment 13 dfilter service freebsd_committer freebsd_triage 2009-11-26 15:23:36 UTC
Author: mav
Date: Thu Nov 26 15:23:25 2009
New Revision: 199838
URL: http://svn.freebsd.org/changeset/base/199838

Log:
  MFC r199043:
  Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
  attach chips with generic Marvell (non-HighPoint) PCI identification.
  These chips are also supported by ata(4). Some vendors, like Supermicro,
  are using same chips without providing HPT RAID BIOS.
  
  PR:             kern/120842, kern/136750

Modified:
  stable/7/share/man/man4/hptrr.4
Directory Properties:
  stable/7/share/man/man4/   (props changed)

Modified: stable/7/share/man/man4/hptrr.4
==============================================================================
--- stable/7/share/man/man4/hptrr.4	Thu Nov 26 15:22:42 2009	(r199837)
+++ stable/7/share/man/man4/hptrr.4	Thu Nov 26 15:23:25 2009	(r199838)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 14, 2007
+.Dd November 8, 2009
 .Dt HPTRR 4
 .Os
 .Sh NAME
@@ -46,6 +46,14 @@ module at boot time, place the following
 .Bd -literal -offset indent
 hptrr_load="YES"
 .Ed
+.Pp
+The following tunables are settable from the loader:
+.Bl -ohang
+.It Va hw.hptrr.attach_generic
+set to 0 to deny driver attach to chips with generic Marvell (non-HighPoint)
+PCI identification. These chips are also supported by ata(4).
+Some vendors are using same chips, but without providing RAID BIOS.
+.El
 .Sh DESCRIPTION
 The
 .Nm
@@ -101,6 +109,7 @@ manual page for details on support.
 .Pp
 This driver supersedes the older rr232x driver.
 .Sh SEE ALSO
+.Xr ata 4 ,
 .Xr cam 4 ,
 .Xr hptmv 4 ,
 .Xr loader 8
_______________________________________________
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"
Comment 14 Christian Marg 2010-04-22 12:58:58 UTC
Hello,

I read that this bug is fixed in 8-Stable - is there any chance that it 
will be backported to 8-Release?

We are just starting to use "freebsd-update", but we'd need a 
GENERIC-Kernel for that - but a generic Kernel has the hptrr-Driver that 
breaks our SATA-Controller.

bye
Christian
-- 
Christian Marg                    mail  : mailto:marg@rz.tu-clausthal.de
Rechenzentrum TU Clausthal        web   : http://www.tu-clausthal.de
D-38678 Clausthal-Zellerfeld      fon   : 05323/72-2626
Germany                           jabber: ifcma@jabber.tu-clausthal.de