Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 871
b: refs/heads/master
c: e2e6644
h: refs/heads/master
i:
  869: e0e8981
  867: 98fbaf9
  863: ace91ee
v: v3
  • Loading branch information
Matthew Dharm authored and Greg KH committed May 4, 2005
1 parent 246d6c5 commit c91ff16
Show file tree
Hide file tree
Showing 28 changed files with 126 additions and 189 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1d4ebdbb3806e9d2c37f32a043ec54f4534977c
refs/heads/master: e2e66446e08a7a365a59e25bbc8dd320ab3da0a6
40 changes: 4 additions & 36 deletions trunk/Documentation/aoe/aoe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ The EtherDrive (R) HOWTO for users of 2.6 kernels is found at ...

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
Expand Down Expand Up @@ -45,15 +35,14 @@ USING DEVICE NODES

"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. See
also the aoe_iflist driver option described below.
untrusted networks should be ignored as a matter of security.

"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. Using the commands in aoetools insulates users from
these implementation details.
counterparts, so distribution maintainers are encouraged to create
scripts that use these devices.

The block devices are named like this:

Expand All @@ -77,8 +66,7 @@ USING SYSFS
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. Users with aoetools can use the aoe-stat
command.
in a convenient way.

root@makki root# sh Documentation/aoe/status.sh
e10.0 eth3 up
Expand All @@ -101,23 +89,3 @@ USING SYSFS
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. 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

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"
4 changes: 4 additions & 0 deletions trunk/Documentation/aoe/status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ test ! -d "$sysd/block" && {
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"
Expand Down
1 change: 0 additions & 1 deletion trunk/Documentation/pci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ pci_for_each_dev_reverse() Superseded by pci_find_device_reverse()
pci_for_each_bus() Superseded by pci_find_next_bus()
pci_find_device() Superseded by pci_get_device()
pci_find_subsys() Superseded by pci_get_subsys()
pci_find_slot() Superseded by pci_get_slot()
pcibios_find_class() Superseded by pci_get_class()
pci_find_class() Superseded by pci_get_class()
pci_(read|write)_*_nodev() Superseded by pci_bus_(read|write)_*()
35 changes: 33 additions & 2 deletions trunk/Documentation/power/pci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,40 @@ Description:
These functions are intended for use by individual drivers, and are defined in
struct pci_driver:

int (*suspend) (struct pci_dev *dev, pm_message_t state);
int (*save_state) (struct pci_dev *dev, u32 state);
int (*suspend) (struct pci_dev *dev, u32 state);
int (*resume) (struct pci_dev *dev);
int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable);
int (*enable_wake) (struct pci_dev *dev, u32 state, int enable);


save_state
----------

Usage:

if (dev->driver && dev->driver->save_state)
dev->driver->save_state(dev,state);

The driver should use this callback to save device state. It should take into
account the current state of the device and the requested state in order to
avoid any unnecessary operations.

For example, a video card that supports all 4 states (D0-D3), all controller
context is preserved when entering D1, but the screen is placed into a low power
state (blanked).

The driver can also interpret this function as a notification that it may be
entering a sleep state in the near future. If it knows that the device cannot
enter the requested state, either because of lack of support for it, or because
the device is middle of some critical operation, then it should fail.

This function should not be used to set any state in the device or the driver
because the device may not actually enter the sleep state (e.g. another driver
later causes causes a global state transition to fail).

Note that in intermediate low power states, a device's I/O and memory spaces may
be disabled and may not be available in subsequent transitions to lower power
states.


suspend
Expand Down
10 changes: 10 additions & 0 deletions trunk/arch/arm/mach-ixp4xx/common-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,15 @@ pci_set_dma_mask(struct pci_dev *dev, u64 mask)
return -EIO;
}

int
pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask)
{
if (mask >= SZ_64M - 1 )
return 0;

return -EIO;
}

int
pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
{
Expand All @@ -511,6 +520,7 @@ pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
}

EXPORT_SYMBOL(pci_set_dma_mask);
EXPORT_SYMBOL(pci_dac_set_dma_mask);
EXPORT_SYMBOL(pci_set_consistent_dma_mask);
EXPORT_SYMBOL(ixp4xx_pci_read);
EXPORT_SYMBOL(ixp4xx_pci_write);
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/sparc64/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ void handler_irq(int irq, struct pt_regs *regs)
clear_softint(clr_mask);
}
#else
int should_forward = 0;
int should_forward = 1;

clear_softint(1 << irq);
#endif
Expand Down Expand Up @@ -1007,10 +1007,10 @@ static int retarget_one_irq(struct irqaction *p, int goal_cpu)
}
upa_writel(tid | IMAP_VALID, imap);

do {
while (!cpu_online(goal_cpu)) {
if (++goal_cpu >= NR_CPUS)
goal_cpu = 0;
} while (!cpu_online(goal_cpu));
}

return goal_cpu;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/block/aoe/aoe.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright (c) 2004 Coraid, Inc. See COPYING for GPL terms. */
#define VERSION "10"
#define VERSION "6"
#define AOE_MAJOR 152
#define DEVICE_NAME "aoe"

Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/block/aoe/aoeblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ static ssize_t aoedisk_show_netif(struct gendisk * disk, char *page)

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 },
Expand All @@ -57,26 +50,20 @@ static struct disk_attribute disk_attr_netif = {
.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)
{
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)
{
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
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/block/aoe/aoedev.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,22 +109,25 @@ aoedev_set(ulong sysminor, unsigned char *addr, struct net_device *ifp, ulong bu
spin_lock_irqsave(&devlist_lock, flags);

for (d=devlist; d; d=d->next)
if (d->sysminor == sysminor)
if (d->sysminor == sysminor
|| memcmp(d->addr, addr, sizeof d->addr) == 0)
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;
memcpy(d->addr, addr, sizeof d->addr);
if ((d->flags & DEVFL_UP) == 0) {

if (d->sysminor != sysminor
|| (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);
Expand Down
17 changes: 1 addition & 16 deletions trunk/drivers/block/aoe/aoenet.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <linux/hdreg.h>
#include <linux/blkdev.h>
#include <linux/netdevice.h>
#include <linux/moduleparam.h>
#include "aoe.h"

#define NECODES 5
Expand All @@ -27,19 +26,6 @@ enum {
};

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)
Expand All @@ -50,8 +36,7 @@ is_aoe_netif(struct net_device *ifp)
if (aoe_iflist[0] == '\0')
return 1;

p = aoe_iflist + strspn(aoe_iflist, WHITESPACE);
for (; *p; p = q + strspn(q, WHITESPACE)) {
for (p = aoe_iflist; *p; p = q + strspn(q, WHITESPACE)) {
q = p + strcspn(p, WHITESPACE);
if (q != p)
len = q - p;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/hotplug/ibmphp.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ struct ebda_hpc_bus {


/********************************************************************
* THREE TYPE OF HOT PLUG CONTROLLER *
* THREE TYPE OF HOT PLUG CONTROLER *
********************************************************************/

struct isa_ctlr_access {
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/pci/hotplug/ibmphp_hpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static int to_debug = FALSE;
#define WPG_I2C_OR 0x2000 // I2C OR operation

//----------------------------------------------------------------------------
// Command set for I2C Master Operation Setup Register
// Command set for I2C Master Operation Setup Regisetr
//----------------------------------------------------------------------------
#define WPG_READATADDR_MASK 0x00010000 // read,bytes,I2C shifted,index
#define WPG_WRITEATADDR_MASK 0x40010000 // write,bytes,I2C shifted,index
Expand Down Expand Up @@ -835,7 +835,7 @@ static void poll_hpc (void)
if (ibmphp_shutdown)
break;

/* try to get the lock to do some kind of hardware access */
/* try to get the lock to do some kind of harware access */
down (&semOperations);

switch (poll_state) {
Expand Down Expand Up @@ -906,7 +906,7 @@ static void poll_hpc (void)
poll_state = POLL_LATCH_REGISTER;
break;
}
/* give up the hardware semaphore */
/* give up the harware semaphore */
up (&semOperations);
/* sleep for a short time just for good measure */
msleep(100);
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/pci/hotplug/ibmphp_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,10 +1308,10 @@ static int unconfigure_boot_device (u8 busno, u8 device, u8 function)
/* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */
} else {
/* This is Memory */
start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
/* pfmem */
debug ("start address of pfmem is %x\n", start_address);
start_address &= PCI_BASE_ADDRESS_MEM_MASK;

if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
err ("cannot find corresponding PFMEM resource to remove\n");
Expand All @@ -1325,8 +1325,6 @@ static int unconfigure_boot_device (u8 busno, u8 device, u8 function)
} else {
/* regular memory */
debug ("start address of mem is %x\n", start_address);
start_address &= PCI_BASE_ADDRESS_MEM_MASK;

if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
err ("cannot find corresponding MEM resource to remove\n");
return -EIO;
Expand Down Expand Up @@ -1424,9 +1422,9 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
/* ????????? DO WE NEED TO WRITE ANYTHING INTO THE PCI CONFIG SPACE BACK ?????????? */
} else {
/* This is Memory */
start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (start_address & PCI_BASE_ADDRESS_MEM_PREFETCH) {
/* pfmem */
start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (ibmphp_find_resource (bus, start_address, &pfmem, PFMEM) < 0) {
err ("cannot find corresponding PFMEM resource to remove\n");
return -EINVAL;
Expand All @@ -1438,7 +1436,6 @@ static int unconfigure_boot_bridge (u8 busno, u8 device, u8 function)
}
} else {
/* regular memory */
start_address &= PCI_BASE_ADDRESS_MEM_MASK;
if (ibmphp_find_resource (bus, start_address, &mem, MEM) < 0) {
err ("cannot find corresponding MEM resource to remove\n");
return -EINVAL;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/pci/hotplug/pci_hotplug.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct hotplug_slot_info {
* @name: the name of the slot being registered. This string must
* be unique amoung slots registered on this system.
* @ops: pointer to the &struct hotplug_slot_ops to be used for this slot
* @info: pointer to the &struct hotplug_slot_info for the initial values for
* @info: pointer to the &struct hotplug_slot_info for the inital values for
* this slot.
* @release: called during pci_hp_deregister to free memory allocated in a
* hotplug_slot structure.
Expand Down
Loading

0 comments on commit c91ff16

Please sign in to comment.