Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jul 2000 13:14:52 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        "Jung, Michael" <mjung@npc.net>
Cc:        "'Mike Smith'" <msmith@FreeBSD.ORG>, "'freebsd-alpha@FreeBSD.ORG'" <freebsd-alpha@FreeBSD.ORG>
Subject:   Re: Booting from Raid 
Message-ID:  <200007242014.NAA24357@mass.osd.bsdi.com>
In-Reply-To: Your message of "Mon, 24 Jul 2000 10:49:35 EDT." <921763828F4BD4118D7D00805FEDF35810C5B5@EXCHANGE1> 

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multipart MIME message.

--==_Exmh_4834857200
Content-Type: text/plain; charset=us-ascii

> 
> Here is the data on the box - once I installed on dka0 and rebuilt
> a kernel with the mlx driver it recognized the mylex card but had 
> errors - see below
...
> mlx0: <Mylex version 2 RAID interface> port 0x10180-0x101ff irq 32 at device
> 6.0 on pci0
> mlx0: couldn't allocate mailbox window

Unfortuately you have an older version of the card that is I/O-mapped 
only, and I never implemented support for these.  It should be easy 
though.

Please find attached a diff that ought to work.  Note that I haven't 
fixed the resource accounting, so attempting to unload or shutdown might 
result in a trap.

If that's the case, comment out the code in mlx_free() that releases the 
register window mapping.  You won't be able to unload and then reload the 
module, but you'll be fine otherwise.

Let me know how you go...


--==_Exmh_4834857200
Content-Type: text/plain ; name="mlx.diff"; charset=us-ascii
Content-Description: mlx.diff
Content-Disposition: attachment; filename="mlx.diff"

--- mlx_pci.c.bak	Mon Jul 24 09:57:22 2000
+++ mlx_pci.c	Mon Jul 24 13:11:40 2000
@@ -157,18 +157,22 @@
      * Allocate the PCI register window.
      */
     
-    /* type 2/3 adapters have an I/O region we don't use at base 0 */
+    /* type 2/3 adapters have an I/O region we don't prefer at base 0 */
     switch(sc->mlx_iftype) {
     case MLX_IFTYPE_2:
     case MLX_IFTYPE_3:
 	rid = MLX_CFG_BASE1;
-	break;
+	sc->mlx_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, RF_ACTIVE);
+	if (sc->mlx_mem == NULL) {
+	    rid = MLX_CFG_BASE0;
+	    sc->mlx_mem = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1, RF_ACTIVE);
+	}
     case MLX_IFTYPE_4:
     case MLX_IFTYPE_5:
 	rid = MLX_CFG_BASE0;
+	sc->mlx_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, RF_ACTIVE);
 	break;
     }
-    sc->mlx_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, RF_ACTIVE);
     if (sc->mlx_mem == NULL) {
 	device_printf(sc->mlx_dev, "couldn't allocate mailbox window\n");
 	mlx_free(sc);

--==_Exmh_4834857200
Content-Type: text/plain; charset=us-ascii

... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]

--==_Exmh_4834857200--




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007242014.NAA24357>