Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits)
  SCSI: convert struct class_device to struct device
  DRM: remove unused dev_class
  IB: rename "dev" to "srp_dev" in srp_host structure
  IB: convert struct class_device to struct device
  memstick: convert struct class_device to struct device
  driver core: replace remaining __FUNCTION__ occurrences
  sysfs: refill attribute buffer when reading from offset 0
  PM: Remove destroy_suspended_device()
  Firmware: add iSCSI iBFT Support
  PM: Remove legacy PM (fix)
  Kobject: Replace list_for_each() with list_for_each_entry().
  SYSFS: Explicitly include required header file slab.h.
  Driver core: make device_is_registered() work for class devices
  PM: Convert wakeup flag accessors to inline functions
  PM: Make wakeup flags available whenever CONFIG_PM is set
  PM: Fix misuse of wakeup flag accessors in serial core
  Driver core: Call device_pm_add() after bus_add_device() in device_add()
  PM: Handle device registrations during suspend/resume
  block: send disk "change" event for rescan_partitions()
  sysdev: detect multiple driver registrations
  ...

Fixed trivial conflict in include/linux/memory.h due to semaphore header
file change (made irrelevant by the change to mutex).
  • Loading branch information
Linus Torvalds committed Apr 21, 2008
2 parents 529a41e + ee959b0 commit e80ab41
Show file tree
Hide file tree
Showing 129 changed files with 3,879 additions and 2,322 deletions.
23 changes: 23 additions & 0 deletions Documentation/ABI/testing/sysfs-ibft
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
What: /sys/firmware/ibft/initiator
Date: November 2007
Contact: Konrad Rzeszutek <ketuzsezr@darnok.org>
Description: The /sys/firmware/ibft/initiator directory will contain
files that expose the iSCSI Boot Firmware Table initiator data.
Usually this contains the Initiator name.

What: /sys/firmware/ibft/targetX
Date: November 2007
Contact: Konrad Rzeszutek <ketuzsezr@darnok.org>
Description: The /sys/firmware/ibft/targetX directory will contain
files that expose the iSCSI Boot Firmware Table target data.
Usually this contains the target's IP address, boot LUN,
target name, and what NIC it is associated with. It can also
contain the CHAP name (and password), the reverse CHAP
name (and password)

What: /sys/firmware/ibft/ethernetX
Date: November 2007
Contact: Konrad Rzeszutek <ketuzsezr@darnok.org>
Description: The /sys/firmware/ibft/ethernetX directory will contain
files that expose the iSCSI Boot Firmware Table NIC data.
This can this can the IP address, MAC, and gateway of the NIC.
5 changes: 0 additions & 5 deletions Documentation/DocBook/kernel-api.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,6 @@ X!Earch/x86/kernel/mca_32.c
!Ikernel/acct.c
</chapter>

<chapter id="pmfuncs">
<title>Power Management</title>
!Ekernel/power/pm.c
</chapter>

<chapter id="devdrivers">
<title>Device drivers infrastructure</title>
<sect1><title>Device Drivers Base</title>
Expand Down
9 changes: 7 additions & 2 deletions Documentation/filesystems/sysfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ implementations:
Recall that an attribute should only be exporting one value, or an
array of similar values, so this shouldn't be that expensive.

This allows userspace to do partial reads and seeks arbitrarily over
the entire file at will.
This allows userspace to do partial reads and forward seeks
arbitrarily over the entire file at will. If userspace seeks back to
zero or does a pread(2) with an offset of '0' the show() method will
be called again, rearmed, to fill the buffer.

- On write(2), sysfs expects the entire buffer to be passed during the
first write. Sysfs then passes the entire buffer to the store()
Expand All @@ -192,6 +194,9 @@ implementations:

Other notes:

- Writing causes the show() method to be rearmed regardless of current
file position.

- The buffer will always be PAGE_SIZE bytes in length. On i386, this
is 4096.

Expand Down
5 changes: 5 additions & 0 deletions Documentation/power/devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ its parent; and can't be removed or suspended after that parent.

The policy is that the device tree should match hardware bus topology.
(Or at least the control bus, for devices which use multiple busses.)
In particular, this means that a device registration may fail if the parent of
the device is suspending (ie. has been chosen by the PM core as the next
device to suspend) or has already suspended, as well as after all of the other
devices have been suspended. Device drivers must be prepared to cope with such
situations.


Suspending Devices
Expand Down
5 changes: 5 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3610,6 +3610,11 @@ M: mhoffman@lightlink.com
L: lm-sensors@lm-sensors.org
S: Maintained

SMX UIO Interface
P: Ben Nizette
M: bn@niasdigital.com
S: Maintained

SOFTWARE RAID (Multiple Disks) SUPPORT
P: Ingo Molnar
M: mingo@redhat.com
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,8 @@ source "drivers/dma/Kconfig"

source "drivers/dca/Kconfig"

source "drivers/uio/Kconfig"

endmenu

source "fs/Kconfig"
Expand Down
4 changes: 1 addition & 3 deletions arch/x86/kernel/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,10 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
err = cpuid_device_create(cpu);
break;
case CPU_UP_CANCELED:
case CPU_UP_CANCELED_FROZEN:
case CPU_DEAD:
cpuid_device_destroy(cpu);
break;
case CPU_UP_CANCELED_FROZEN:
destroy_suspended_device(cpuid_class, MKDEV(CPUID_MAJOR, cpu));
break;
}
return err ? NOTIFY_BAD : NOTIFY_OK;
}
Expand Down
4 changes: 1 addition & 3 deletions arch/x86/kernel/msr.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,10 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
err = msr_device_create(cpu);
break;
case CPU_UP_CANCELED:
case CPU_UP_CANCELED_FROZEN:
case CPU_DEAD:
msr_device_destroy(cpu);
break;
case CPU_UP_CANCELED_FROZEN:
destroy_suspended_device(msr_class, MKDEV(MSR_MAJOR, cpu));
break;
}
return err ? NOTIFY_BAD : NOTIFY_OK;
}
Expand Down
3 changes: 3 additions & 0 deletions arch/x86/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/efi.h>
#include <linux/init.h>
#include <linux/edd.h>
#include <linux/iscsi_ibft.h>
#include <linux/nodemask.h>
#include <linux/kexec.h>
#include <linux/crash_dump.h>
Expand Down Expand Up @@ -689,6 +690,8 @@ void __init setup_bootmem_allocator(void)
#endif
numa_kva_reserve();
reserve_crashkernel();

reserve_ibft_region();
}

/*
Expand Down
4 changes: 4 additions & 0 deletions arch/x86/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <linux/acpi.h>
#include <linux/kallsyms.h>
#include <linux/edd.h>
#include <linux/iscsi_ibft.h>
#include <linux/mmzone.h>
#include <linux/kexec.h>
#include <linux/cpufreq.h>
Expand Down Expand Up @@ -439,6 +440,9 @@ void __init setup_arch(char **cmdline_p)
}
#endif
reserve_crashkernel();

reserve_ibft_region();

paging_init();
map_vsyscall();

Expand Down
11 changes: 5 additions & 6 deletions block/bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ static struct bsg_device *bsg_add_device(struct inode *inode,
mutex_lock(&bsg_mutex);
hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode)));

strncpy(bd->name, rq->bsg_dev.class_dev->class_id, sizeof(bd->name) - 1);
strncpy(bd->name, rq->bsg_dev.class_dev->bus_id, sizeof(bd->name) - 1);
dprintk("bound to <%s>, max queue %d\n",
format_dev_t(buf, inode->i_rdev), bd->max_queue);

Expand Down Expand Up @@ -946,7 +946,7 @@ void bsg_unregister_queue(struct request_queue *q)
mutex_lock(&bsg_mutex);
idr_remove(&bsg_minor_idr, bcd->minor);
sysfs_remove_link(&q->kobj, "bsg");
class_device_unregister(bcd->class_dev);
device_unregister(bcd->class_dev);
put_device(bcd->dev);
bcd->class_dev = NULL;
mutex_unlock(&bsg_mutex);
Expand All @@ -959,7 +959,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev,
struct bsg_class_device *bcd;
dev_t dev;
int ret, minor;
struct class_device *class_dev = NULL;
struct device *class_dev = NULL;
const char *devname;

if (name)
Expand Down Expand Up @@ -998,8 +998,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev,
bcd->queue = q;
bcd->dev = get_device(gdev);
dev = MKDEV(bsg_major, bcd->minor);
class_dev = class_device_create(bsg_class, NULL, dev, gdev, "%s",
devname);
class_dev = device_create(bsg_class, gdev, dev, "%s", devname);
if (IS_ERR(class_dev)) {
ret = PTR_ERR(class_dev);
goto put_dev;
Expand All @@ -1016,7 +1015,7 @@ int bsg_register_queue(struct request_queue *q, struct device *gdev,
return 0;

unregister_class_dev:
class_device_unregister(class_dev);
device_unregister(class_dev);
put_dev:
put_device(gdev);
remove_idr:
Expand Down
4 changes: 2 additions & 2 deletions drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ static int ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
static int ahci_pci_device_resume(struct pci_dev *pdev);
#endif

static struct class_device_attribute *ahci_shost_attrs[] = {
&class_device_attr_link_power_management_policy,
static struct device_attribute *ahci_shost_attrs[] = {
&dev_attr_link_power_management_policy,
NULL
};

Expand Down
15 changes: 8 additions & 7 deletions drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ static const char *ata_scsi_lpm_get(enum link_pm policy)
return NULL;
}

static ssize_t ata_scsi_lpm_put(struct class_device *class_dev,
const char *buf, size_t count)
static ssize_t ata_scsi_lpm_put(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct Scsi_Host *shost = class_to_shost(class_dev);
struct Scsi_Host *shost = class_to_shost(dev);
struct ata_port *ap = ata_shost_to_port(shost);
enum link_pm policy = 0;
int i;
Expand Down Expand Up @@ -162,9 +163,9 @@ static ssize_t ata_scsi_lpm_put(struct class_device *class_dev,
}

static ssize_t
ata_scsi_lpm_show(struct class_device *class_dev, char *buf)
ata_scsi_lpm_show(struct device *dev, struct device_attribute *attr, char *buf)
{
struct Scsi_Host *shost = class_to_shost(class_dev);
struct Scsi_Host *shost = class_to_shost(dev);
struct ata_port *ap = ata_shost_to_port(shost);
const char *policy =
ata_scsi_lpm_get(ap->pm_policy);
Expand All @@ -174,9 +175,9 @@ ata_scsi_lpm_show(struct class_device *class_dev, char *buf)

return snprintf(buf, 23, "%s\n", policy);
}
CLASS_DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
ata_scsi_lpm_show, ata_scsi_lpm_put);
EXPORT_SYMBOL_GPL(class_device_attr_link_power_management_policy);
EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);

static void ata_scsi_invalid_field(struct scsi_cmnd *cmd,
void (*done)(struct scsi_cmnd *))
Expand Down
Loading

0 comments on commit e80ab41

Please sign in to comment.