Re: bin/173298: Splitted pool is not expandable

2012-11-12 Thread Dmitry Afanasiev
The following reply was made to PR bin/173298; it has been noted by GNATS.

From: Dmitry Afanasiev 
To: Andriy Gapon 
Cc: bug-follo...@freebsd.org
Subject: Re: bin/173298: Splitted pool is not expandable
Date: Mon, 12 Nov 2012 12:04:46 +0400

 On 03.11.2012 01:33, Andriy Gapon wrote:
 >> We have no way to expand pool tank2
 > Have you tried zpool online -e ... ... ?
 Omg. I'm confused, solaris's zpool command does not have '-e' switch.
 Yes, zpool online -e expands pool, but...
 Why autoexpand property for spitted pool have no effect?
 
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


kern/173584: [PATCH] [cxgbe] Add hw.cxgbe.force_firmware_install tunable to force firmware "updates" at module load

2012-11-12 Thread Garrett Cooper

>Number: 173584
>Category:   kern
>Synopsis:   [PATCH] [cxgbe] Add hw.cxgbe.force_firmware_install tunable to 
>force firmware "updates" at module load
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 12 19:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Garrett Cooper
>Release:9.1-STABLE
>Organization:
EMC Isilon
>Environment:
FreeBSD wf158.west.isilon.com 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #2: Tue Nov 
 6 14:00:42 PST 2012 
r...@wf158.west.isilon.com:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
The attached patch adds a tunable  which forces a firmware update in order to 
ensure that when the driver is loaded, if it's running a newer version of 
firmware it can be downgraded to an older version. Example:

# kenv hw.cxgbe.force_firmware_install=1
# kldload if_cxgbe
# sysctl dev.t4nex.0.firmware_version
dev.t4nex.0.firmware_version: 1.6.2.0

The firmware version provided on the card was newer before (1.7.x IIRC).
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: sys/dev/cxgbe/t4_main.c
===
--- sys/dev/cxgbe/t4_main.c (revision 242655)
+++ sys/dev/cxgbe/t4_main.c (working copy)
@@ -234,6 +234,9 @@
 static int t4_fcoecaps_allowed = 0;
 TUNABLE_INT("hw.cxgbe.fcoecaps_allowed", &t4_fcoecaps_allowed);
 
+static int t4_force_firmware_install = 0;
+TUNABLE_INT("hw.cxgbe.force_firmware_install", &t4_force_firmware_install);
+
 struct intrs_and_queues {
int intr_type;  /* INTx, MSI, or MSI-X */
int nirq;   /* Number of vectors */
@@ -1576,9 +1579,10 @@
/*
 * Always upgrade, even for minor/micro/build mismatches.
 * Downgrade only for a major version mismatch or if
-* force_firmware_install was specified.
+* t4_force_firmware_install was specified.
 */
-   if (fw != NULL && (rc < 0 || v > sc->params.fw_vers)) {
+   if (fw != NULL &&
+   (t4_force_firmware_install || rc < 0 || v > 
sc->params.fw_vers)) {
device_printf(sc->dev,
"installing firmware %d.%d.%d.%d on card.\n",
G_FW_HDR_FW_VER_MAJOR(v), G_FW_HDR_FW_VER_MINOR(v),


>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-unsubscr...@freebsd.org"


Re: kern/173584: [PATCH] [cxgbe] Add hw.cxgbe.force_firmware_install tunable to force firmware "updates" at module load

2012-11-12 Thread np
Synopsis: [PATCH] [cxgbe] Add hw.cxgbe.force_firmware_install tunable to force 
firmware "updates" at module load

Responsible-Changed-From-To: freebsd-bugs->np
Responsible-Changed-By: np
Responsible-Changed-When: Mon Nov 12 19:30:56 UTC 2012
Responsible-Changed-Why: 
I'll take a look at this.

http://www.freebsd.org/cgi/query-pr.cgi?pr=173584
___
freebsd-bugs@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"


bin/173589: [PATCH] usr.sbin/pkg_install/add

2012-11-12 Thread Byron Young

>Number: 173589
>Category:   bin
>Synopsis:   [PATCH] usr.sbin/pkg_install/add
>Confidential:   no
>Severity:   non-critical
>Priority:   low
>Responsible:freebsd-bugs
>State:  open
>Quarter:
>Keywords:   
>Date-Required:
>Class:  change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 12 23:20:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Byron Young
>Release:9.1-PRERELEASE
>Organization:
>Environment:
>Description:
pkg_add(1) contains logic to deduce the correct ports repository based on 
machine architecture and OSVERSION. Adding a simple command line switch (-d) 
would provide a consistent (with /usr/ports/Mk) means of obtaining this 
information.

Example:
pkg_add -d

would output

i386/packages-9.0-release

on an i386 9.0-RELEASE machine.

NOTE: no additional correspondence required! Just delete when required. Thanks.
>How-To-Repeat:
Not a problem report!
>Fix:
No problem to fix!

Patch attached with submission follows:

diff --git main.c main.c
index 670230b..8885145 100644
--- main.c
+++ main.c
@@ -38,6 +38,7 @@ Boolean Remote= FALSE;
 Boolean KeepPackage= FALSE;
 Boolean FailOnAlreadyInstalled = TRUE;
 Boolean IgnoreDeps = FALSE;
+Boolean PrintDirectory = FALSE;
 
 char   *Mode   = NULL;
 char   *Owner  = NULL;
@@ -104,13 +105,15 @@ struct {
 };
 
 static char *getpackagesite(void);
+static char *getpackagedirectory(void);
 int getosreldate(void);
 
 static void usage(void);
 
-static char opts[] = "hviIRfFnrp:P:SMt:C:K";
+static char opts[] = "hviIRdfFnrp:P:SMt:C:K";
 static struct option longopts[] = {
{ "chroot", required_argument,  NULL,   'C' },
+   { "directory",  no_argument,NULL,   'd' },
{ "dry-run",no_argument,NULL,   'n' },
{ "force",  no_argument,NULL,   'f' },
{ "help",   no_argument,NULL,   'h' },
@@ -207,6 +210,10 @@ main(int argc, char **argv)
IgnoreDeps = TRUE;
break;
 
+   case 'd':
+   PrintDirectory = TRUE;
+   break;
+
case 'h':
default:
usage();
@@ -216,6 +223,16 @@ main(int argc, char **argv)
 argc -= optind;
 argv += optind;
 
+if ( PrintDirectory ) {
+   char * pdir = getpackagedirectory();
+   if (pdir) {
+ fprintf(stdout,"%s",pdir);
+ exit (0);
+   } else {
+ exit (1);
+   }
+}
+
 if (AddMode != SLAVE) {
pkgs = (char **)malloc((argc+1) * sizeof(char *));
for (ch = 0; ch <= argc; pkgs[ch++] = NULL) ;
@@ -364,11 +381,39 @@ getpackagesite(void)
 
 }
 
+static char *
+getpackagedirectory(void)
+{
+int reldate, i;
+static char sitepath[MAXPATHLEN];
+int archmib[] = { CTL_HW, HW_MACHINE_ARCH };
+char arch[64];
+size_t archlen = sizeof(arch);
+
+if (sysctl(archmib, 2, arch, &archlen, NULL, 0) == -1)
+   return NULL;
+arch[archlen-1] = 0;
+if (strlcat(sitepath, arch, sizeof(sitepath)) >= sizeof(sitepath))
+   return NULL;
+
+reldate = getosreldate();
+for(i = 0; releases[i].directory != NULL; i++) {
+   if (reldate >= releases[i].lowver && reldate <= releases[i].hiver) {
+   if (strlcat(sitepath, releases[i].directory, sizeof(sitepath))
+   >= sizeof(sitepath))
+   return NULL;
+   break;
+   }
+}
+return sitepath;
+
+}
+
 static void
 usage(void)
 {
 fprintf(stderr, "%s\n%s\n",
-   "usage: pkg_add [-viInfFrRMSK] [-t template] [-p prefix] [-P prefix] 
[-C chrootdir]",
+   "usage: pkg_add [-viInfdFrRMSK] [-t template] [-p prefix] [-P prefix] 
[-C chrootdir]",
"   pkg-name [pkg-name ...]");
 exit(1);
 }
diff --git pkg_add.1 pkg_add.1
index 57edb63..f3d52e0 100644
--- pkg_add.1
+++ pkg_add.1
@@ -87,6 +87,8 @@ Turn on verbose output.
 Keep any downloaded package in
 .Ev PKGDIR
 if it is defined or in current directory by default.
+.It Fl d , -directory
+Output ARCH/PACKAGES subdirectory and immediately exit.
 .It Fl i , -no-deps
 Install the package without fetching and installing
 dependencies.


>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-unsubscr...@freebsd.org"