public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PATCH] AOE bugfixes for 2.6.12-rc3
@ 2005-05-04  7:10 Greg KH
  2005-05-04  7:11 ` [PATCH] aoe: improve allowed interfaces configuration Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2005-05-04  7:10 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel

Here are a number of AOE bugfixes for 2.6.12-rc3.  They have all been in
the last few -mm releases.

Pull from:
	rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/aoe-2.6.git/

Full patches will be sent to the linux-kernel mailing lists, if anyone
wants to see them.

thanks,

greg k-h

-------------

 Documentation/aoe/aoe.txt   |   52 +++++++++++++++++++++++++++++++++++---------
 Documentation/aoe/status.sh |    4 ---
 drivers/block/aoe/aoe.h     |    2 -
 drivers/block/aoe/aoeblk.c  |   13 +++++++++++
 drivers/block/aoe/aoedev.c  |   11 +++------
 drivers/block/aoe/aoenet.c  |   17 +++++++++++++-
 6 files changed, 76 insertions(+), 23 deletions(-)

Ed L. Cashin:
  o aoe: update version number to 10
  o aoe: add firmware version to info in sysfs
  o aoe: allow multiple aoe devices to have the same mac
  o aoe: update the documentation to mention aoetools
  o aoe: aoe-stat should work for built-in as well as module
  o aoe: improve allowed interfaces configuration


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] aoe: improve allowed interfaces configuration
  2005-05-04  7:10 [GIT PATCH] AOE bugfixes for 2.6.12-rc3 Greg KH
@ 2005-05-04  7:11 ` Greg KH
  2005-05-04  7:11   ` [PATCH] aoe: aoe-stat should work for built-in as well as module Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2005-05-04  7:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: ecashin

[PATCH] aoe: improve allowed interfaces configuration

improve allowed interfaces configuration

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

diff -uprN a/Documentation/aoe/aoe.txt b/Documentation/aoe/aoe.txt

---
commit 03c41c434775c52092d17a5031ad8ebaaf555bc4
tree a2f4e5f5fef46fac69b1e47e31ccbcf7d950b016
parent 8800cea62025a5209d110c5fa5990429239d6eee
author Ed L Cashin <ecashin@coraid.com> 1114784643 -0400
committer Greg KH <gregkh@suse.de> 1115188493 -0700

Index: Documentation/aoe/aoe.txt
===================================================================
--- 2aa9e4732d7014dcda4c0e80d2e377f52e2262e9/Documentation/aoe/aoe.txt  (mode:100644 sha1:43e50108d0e21c56ec5bcd873916c9f547a765c8)
+++ a2f4e5f5fef46fac69b1e47e31ccbcf7d950b016/Documentation/aoe/aoe.txt  (mode:100644 sha1:1212987a30fa018c0e2d1f32e0baf29a6537d123)
@@ -33,6 +33,9 @@
   "cat /dev/etherd/err" blocks, waiting for error diagnostic output,
   like any retransmitted packets.
 
+  The /dev/etherd/interfaces special file is obsoleted by the
+  aoe_iflist boot option and module option (and its sysfs entry
+  described in the next section).
   "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
   limit ATA over Ethernet traffic to eth2 and eth4.  AoE traffic from
   untrusted networks should be ignored as a matter of security.
@@ -89,3 +92,23 @@
       e4.7            eth1              up
       e4.8            eth1              up
       e4.9            eth1              up
+
+  Use /sys/module/aoe/parameters/aoe_iflist (or better, the driver
+  option discussed below) instead of /dev/etherd/interfaces to limit
+  AoE traffic to the network interfaces in the given
+  whitespace-separated list.  Unlike the old character device, the
+  sysfs entry can be read from as well as written to.
+
+  It's helpful to trigger discovery after setting the list of allowed
+  interfaces.  If your distro provides an aoe-discover script, you can
+  use that.  Otherwise, you can directly use the /dev/etherd/discover
+  file described above.
+
+DRIVER OPTIONS
+
+  There is a boot option for the built-in aoe driver and a
+  corresponding module parameter, aoe_iflist.  Without this option,
+  all network interfaces may be used for ATA over Ethernet.  Here is a
+  usage example for the module parameter.
+
+    modprobe aoe_iflist="eth1 eth3"
Index: drivers/block/aoe/aoenet.c
===================================================================
--- 2aa9e4732d7014dcda4c0e80d2e377f52e2262e9/drivers/block/aoe/aoenet.c  (mode:100644 sha1:bc92aacb6dadad9f2bff4145d237acd35856526d)
+++ a2f4e5f5fef46fac69b1e47e31ccbcf7d950b016/drivers/block/aoe/aoenet.c  (mode:100644 sha1:9e6f51c528b094684c2b709c55be738c3d361225)
@@ -7,6 +7,7 @@
 #include <linux/hdreg.h>
 #include <linux/blkdev.h>
 #include <linux/netdevice.h>
+#include <linux/moduleparam.h>
 #include "aoe.h"
 
 #define NECODES 5
@@ -26,6 +27,19 @@
 };
 
 static char aoe_iflist[IFLISTSZ];
+module_param_string(aoe_iflist, aoe_iflist, IFLISTSZ, 0600);
+MODULE_PARM_DESC(aoe_iflist, "aoe_iflist=\"dev1 [dev2 ...]\"\n");
+
+#ifndef MODULE
+static int __init aoe_iflist_setup(char *str)
+{
+	strncpy(aoe_iflist, str, IFLISTSZ);
+	aoe_iflist[IFLISTSZ - 1] = '\0';
+	return 1;
+}
+
+__setup("aoe_iflist=", aoe_iflist_setup);
+#endif
 
 int
 is_aoe_netif(struct net_device *ifp)
@@ -36,7 +50,8 @@
 	if (aoe_iflist[0] == '\0')
 		return 1;
 
-	for (p = aoe_iflist; *p; p = q + strspn(q, WHITESPACE)) {
+	p = aoe_iflist + strspn(aoe_iflist, WHITESPACE);
+	for (; *p; p = q + strspn(q, WHITESPACE)) {
 		q = p + strcspn(p, WHITESPACE);
 		if (q != p)
 			len = q - p;


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] aoe: allow multiple aoe devices to have the same mac
  2005-05-04  7:11     ` [PATCH] aoe: update the documentation to mention aoetools Greg KH
@ 2005-05-04  7:11       ` Greg KH
  2005-05-04  7:11         ` [PATCH] aoe: update version number to 10 Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2005-05-04  7:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: ecashin

[PATCH] aoe: allow multiple aoe devices to have the same mac

allow multiple aoe devices to have the same mac

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

diff -u b/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c

---
commit 93d489fc56f819d8805d80ae83cbafc5e5719804
tree 946adcae0abe20dc6d9d58682ea2d6980efd1a4c
parent 67d9f84786cc4fd42cb40c9474c248eadaff15c6
author Ed L Cashin <ecashin@coraid.com> 1114784662 -0400
committer Greg KH <gregkh@suse.de> 1115188494 -0700

Index: drivers/block/aoe/aoedev.c
===================================================================
--- f1ef2e8c1d1f1b21969704666f20ac1dbec42197/drivers/block/aoe/aoedev.c  (mode:100644 sha1:ec16c64dd114c37b30f2f97bb5e8f895c0a6e9bb)
+++ 946adcae0abe20dc6d9d58682ea2d6980efd1a4c/drivers/block/aoe/aoedev.c  (mode:100644 sha1:6e231c5a119958dd3549e5d825f4706f9d04f9ec)
@@ -109,25 +109,22 @@
 	spin_lock_irqsave(&devlist_lock, flags);
 
 	for (d=devlist; d; d=d->next)
-		if (d->sysminor == sysminor
-		|| memcmp(d->addr, addr, sizeof d->addr) == 0)
+		if (d->sysminor == sysminor)
 			break;
 
 	if (d == NULL && (d = aoedev_newdev(bufcnt)) == NULL) {
 		spin_unlock_irqrestore(&devlist_lock, flags);
 		printk(KERN_INFO "aoe: aoedev_set: aoedev_newdev failure.\n");
 		return NULL;
-	}
+	} /* if newdev, (d->flags & DEVFL_UP) == 0 for below */
 
 	spin_unlock_irqrestore(&devlist_lock, flags);
 	spin_lock_irqsave(&d->lock, flags);
 
 	d->ifp = ifp;
-
-	if (d->sysminor != sysminor
-	|| (d->flags & DEVFL_UP) == 0) {
+	memcpy(d->addr, addr, sizeof d->addr);
+	if ((d->flags & DEVFL_UP) == 0) {
 		aoedev_downdev(d); /* flushes outstanding frames */
-		memcpy(d->addr, addr, sizeof d->addr);
 		d->sysminor = sysminor;
 		d->aoemajor = AOEMAJOR(sysminor);
 		d->aoeminor = AOEMINOR(sysminor);


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] aoe: update the documentation to mention aoetools
  2005-05-04  7:11   ` [PATCH] aoe: aoe-stat should work for built-in as well as module Greg KH
@ 2005-05-04  7:11     ` Greg KH
  2005-05-04  7:11       ` [PATCH] aoe: allow multiple aoe devices to have the same mac Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2005-05-04  7:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: ecashin

[PATCH] aoe: update the documentation to mention aoetools

update the documentation to mention aoetools

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit 67d9f84786cc4fd42cb40c9474c248eadaff15c6
tree f1ef2e8c1d1f1b21969704666f20ac1dbec42197
parent c59a24dc512952cb434b34a66c3792555159fa36
author Ed L Cashin <ecashin@coraid.com> 1114784658 -0400
committer Greg KH <gregkh@suse.de> 1115188494 -0700

Index: Documentation/aoe/aoe.txt
===================================================================
--- 3b13ab42ed88a09f304c1fc87962a82c1f49c098/Documentation/aoe/aoe.txt  (mode:100644 sha1:1212987a30fa018c0e2d1f32e0baf29a6537d123)
+++ f1ef2e8c1d1f1b21969704666f20ac1dbec42197/Documentation/aoe/aoe.txt  (mode:100644 sha1:3a4dbe4663c9556f15fd062cfafcd1f6e3dddd1d)
@@ -4,6 +4,16 @@
 
   It has many tips and hints!
 
+The aoetools are userland programs that are designed to work with this
+driver.  The aoetools are on sourceforge.
+
+  http://aoetools.sourceforge.net/
+
+The scripts in this Documentation/aoe directory are intended to
+document the use of the driver and are not necessary if you install
+the aoetools.
+
+
 CREATING DEVICE NODES
 
   Users of udev should find the block device nodes created
@@ -33,19 +43,17 @@
   "cat /dev/etherd/err" blocks, waiting for error diagnostic output,
   like any retransmitted packets.
 
-  The /dev/etherd/interfaces special file is obsoleted by the
-  aoe_iflist boot option and module option (and its sysfs entry
-  described in the next section).
   "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
   limit ATA over Ethernet traffic to eth2 and eth4.  AoE traffic from
-  untrusted networks should be ignored as a matter of security.
+  untrusted networks should be ignored as a matter of security.  See
+  also the aoe_iflist driver option described below.
 
   "echo > /dev/etherd/discover" tells the driver to find out what AoE
   devices are available.
 
   These character devices may disappear and be replaced by sysfs
-  counterparts, so distribution maintainers are encouraged to create
-  scripts that use these devices.
+  counterparts.  Using the commands in aoetools insulates users from
+  these implementation details.
 
   The block devices are named like this:
 
@@ -69,7 +77,8 @@
   through which we are communicating with the remote AoE device.
 
   There is a script in this directory that formats this information
-  in a convenient way.
+  in a convenient way.  Users with aoetools can use the aoe-stat
+  command.
 
   root@makki root# sh Documentation/aoe/status.sh 
      e10.0            eth3              up
@@ -100,9 +109,9 @@
   sysfs entry can be read from as well as written to.
 
   It's helpful to trigger discovery after setting the list of allowed
-  interfaces.  If your distro provides an aoe-discover script, you can
-  use that.  Otherwise, you can directly use the /dev/etherd/discover
-  file described above.
+  interfaces.  The aoetools package provides an aoe-discover script
+  for this purpose.  You can also directly use the
+  /dev/etherd/discover special file described above.
 
 DRIVER OPTIONS
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] aoe: update version number to 10
  2005-05-04  7:11       ` [PATCH] aoe: allow multiple aoe devices to have the same mac Greg KH
@ 2005-05-04  7:11         ` Greg KH
  2005-05-04  7:11           ` [PATCH] aoe: add firmware version to info in sysfs Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2005-05-04  7:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: ecashin

[PATCH] aoe: update version number to 10

update version number to 10

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit 0e57c7166675a86293f150d5ef7779edd629fe2a
tree 5227de18bbd59513f48766b4f38694d122ffeb59
parent 4613ed277ab8a41640434181898ef4649cc7301e
author Ed L Cashin <ecashin@coraid.com> 1114784668 -0400
committer Greg KH <gregkh@suse.de> 1115188495 -0700

Index: drivers/block/aoe/aoe.h
===================================================================
--- a1993e2276302a253f73e5139347e9ab374561bc/drivers/block/aoe/aoe.h  (mode:100644 sha1:aa8b547ffafa669f7cd3d547e4ac025203d799af)
+++ 5227de18bbd59513f48766b4f38694d122ffeb59/drivers/block/aoe/aoe.h  (mode:100644 sha1:721ba8086043bd714c06e5353f60a348e7989f50)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2004 Coraid, Inc.  See COPYING for GPL terms. */
-#define VERSION "6"
+#define VERSION "10"
 #define AOE_MAJOR 152
 #define DEVICE_NAME "aoe"
 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] aoe: aoe-stat should work for built-in as well as module
  2005-05-04  7:11 ` [PATCH] aoe: improve allowed interfaces configuration Greg KH
@ 2005-05-04  7:11   ` Greg KH
  2005-05-04  7:11     ` [PATCH] aoe: update the documentation to mention aoetools Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Greg KH @ 2005-05-04  7:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: ecashin

[PATCH] aoe: aoe-stat should work for built-in as well as module

aoe-stat should work for built-in as well as module

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

diff -uprN a/Documentation/aoe/status.sh b/Documentation/aoe/status.sh

---
commit c59a24dc512952cb434b34a66c3792555159fa36
tree 3b13ab42ed88a09f304c1fc87962a82c1f49c098
parent 03c41c434775c52092d17a5031ad8ebaaf555bc4
author Ed L Cashin <ecashin@coraid.com> 1114784653 -0400
committer Greg KH <gregkh@suse.de> 1115188493 -0700

Index: Documentation/aoe/status.sh
===================================================================
--- a2f4e5f5fef46fac69b1e47e31ccbcf7d950b016/Documentation/aoe/status.sh  (mode:100644 sha1:6628116d4a9f7b4da22a8991cf5426c6e92b8d22)
+++ 3b13ab42ed88a09f304c1fc87962a82c1f49c098/Documentation/aoe/status.sh  (mode:100644 sha1:751f3be514b831296b038fd343443c15d0aa5b32)
@@ -14,10 +14,6 @@
 	echo "$me Error: sysfs is not mounted" 1>&2
 	exit 1
 }
-test -z "`lsmod | grep '^aoe'`" && {
-	echo  "$me Error: aoe module is not loaded" 1>&2
-	exit 1
-}
 
 for d in `ls -d $sysd/block/etherd* 2>/dev/null | grep -v p` end; do
 	# maybe ls comes up empty, so we use "end"


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] aoe: add firmware version to info in sysfs
  2005-05-04  7:11         ` [PATCH] aoe: update version number to 10 Greg KH
@ 2005-05-04  7:11           ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2005-05-04  7:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: ecashin

[PATCH] aoe: add firmware version to info in sysfs

add firmware version to info in sysfs

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit 4613ed277ab8a41640434181898ef4649cc7301e
tree a1993e2276302a253f73e5139347e9ab374561bc
parent 93d489fc56f819d8805d80ae83cbafc5e5719804
author Ed L Cashin <ecashin@coraid.com> 1114784665 -0400
committer Greg KH <gregkh@suse.de> 1115188495 -0700

Index: drivers/block/aoe/aoeblk.c
===================================================================
--- 946adcae0abe20dc6d9d58682ea2d6980efd1a4c/drivers/block/aoe/aoeblk.c  (mode:100644 sha1:4780f7926d4292bc8150e2712ea18d8a11204ec2)
+++ a1993e2276302a253f73e5139347e9ab374561bc/drivers/block/aoe/aoeblk.c  (mode:100644 sha1:0e97fcb9f3a15b3bbe5b4a0bb8bd085c20e05b2b)
@@ -37,6 +37,13 @@
 
 	return snprintf(page, PAGE_SIZE, "%s\n", d->ifp->name);
 }
+/* firmware version */
+static ssize_t aoedisk_show_fwver(struct gendisk * disk, char *page)
+{
+	struct aoedev *d = disk->private_data;
+
+	return snprintf(page, PAGE_SIZE, "0x%04x\n", (unsigned int) d->fw_ver);
+}
 
 static struct disk_attribute disk_attr_state = {
 	.attr = {.name = "state", .mode = S_IRUGO },
@@ -50,6 +57,10 @@
 	.attr = {.name = "netif", .mode = S_IRUGO },
 	.show = aoedisk_show_netif
 };
+static struct disk_attribute disk_attr_fwver = {
+	.attr = {.name = "firmware-version", .mode = S_IRUGO },
+	.show = aoedisk_show_fwver
+};
 
 static void
 aoedisk_add_sysfs(struct aoedev *d)
@@ -57,6 +68,7 @@
 	sysfs_create_file(&d->gd->kobj, &disk_attr_state.attr);
 	sysfs_create_file(&d->gd->kobj, &disk_attr_mac.attr);
 	sysfs_create_file(&d->gd->kobj, &disk_attr_netif.attr);
+	sysfs_create_file(&d->gd->kobj, &disk_attr_fwver.attr);
 }
 void
 aoedisk_rm_sysfs(struct aoedev *d)
@@ -64,6 +76,7 @@
 	sysfs_remove_link(&d->gd->kobj, "state");
 	sysfs_remove_link(&d->gd->kobj, "mac");
 	sysfs_remove_link(&d->gd->kobj, "netif");
+	sysfs_remove_link(&d->gd->kobj, "firmware-version");
 }
 
 static int


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-05-04  7:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-04  7:10 [GIT PATCH] AOE bugfixes for 2.6.12-rc3 Greg KH
2005-05-04  7:11 ` [PATCH] aoe: improve allowed interfaces configuration Greg KH
2005-05-04  7:11   ` [PATCH] aoe: aoe-stat should work for built-in as well as module Greg KH
2005-05-04  7:11     ` [PATCH] aoe: update the documentation to mention aoetools Greg KH
2005-05-04  7:11       ` [PATCH] aoe: allow multiple aoe devices to have the same mac Greg KH
2005-05-04  7:11         ` [PATCH] aoe: update version number to 10 Greg KH
2005-05-04  7:11           ` [PATCH] aoe: add firmware version to info in sysfs Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox